Last Updated: 2026-03-29
Authority: tools/cli/ai/ai_cli_shared.cpp, tools/cli/core/main.cpp, related tests and examples
This document answers one narrow question:
t81 ai ... commands are real today,The t81 ai command family is real and first-class in the CLI, but it is not yet a finished native end-user inference runtime.
Today, the strongest real model-execution lanes are:
t81 weights ...t81 code run ... --weights-model ...t81 internal llama-run ... for the experimental bridge pathThe biggest current gap is that t81 ai inference run is only partly real today:
t81_reference_vm lane, where it executes a
narrow native VM probe over an imported modelReadiness example coverage today:
ready: proven by
run_ready_ai_probe.shguarded: proven by
run_guarded_ai_probe.sh
using the real tiny Hugging Face Llama artifact, and now uses explicit
guarded-caution evidence policies instead of looking identical to readyartifact_visibility
block so callers can inspect evidence posture in one placeready single-probe lane now emits the same top-level
artifact_visibility shape, using not_applicable_single_probe.v1
markers where bounded-decode-specific evidence does not existartifact_visibility
now also carries the architecture-state confidence_envelope,
architecture_state_stability_kind, and
architecture_state_guardrail_triggered fields alongside readinessforward_state
object, derived from the bounded hidden projection and used on the later
decode transition pathforward_state now also has its own class/signature and can
shape later decode transitions directlyforward_state now also records generation depth and chains the
previous forward-state signature into later-step state evolution, so it is no
longer overwritten as a purely single-step snapshotforward_state now also persists bounded prior rows with decay,
ranks and trims them intentionally, and exposes a runnable 4-step evolution
path through
run_forward_state_ai_probe.shforward_state_history_feedback_state_transition.v1,
forward_state_history_projection.v1, and
prefer_tail_nonnegative_else_max.v1architecture_state_deep_feedback_state_transition.v1,
architecture_state_deep_feedback_window.v1, and
architecture_state_deep_feedback_projection.v1bounded_deep_architecture_state_probe.v1 and reports
architecture_state_deep_feedback_used: truearchitecture_state_summary now also reports deep_feedback_steps, so
callers can distinguish “deep mode happened once” from future longer-horizon
runs without parsing the tracearchitecture_state_summary.utilization now normalizes deep feedback depth
against total architecture-state feedback depthtermination_reason now reports
deep_architecture_state_horizon_reachedbounded_horizon_steps: 4bounded_horizon_reached: true when a bounded run actually stops
at that current ceilingbounded_horizon_remaining, so callers can see whether
a bounded run stopped at the ceiling or with room still leftbounded_horizon_utilization, so callers can treat the
current bounded horizon as an explicit normalized depth signalforward_state_summary, so
callers can see max generation depth and carried-state usage without walking
the full traceconsumed_state_input_row_ids, rather
than only the forward-state and hidden-projection slices separatelystate_input_summary, so
callers can see how much combined carried state actually influenced later VM
steps without reading the full tracestate_input_summary now also carries a final state-input signature, so
callers can distinguish the actual merged carried-state control input from
the forward-state summary aloneintermediate_tensor_export_supportedhidden_tensor_summaryhidden_tensor_signature_sha256true_state_carry_supported: truestate_carry_limitations.kind:
"bounded_intermediate_tensor_literal_import.v1"state_carry_limitations.import_path:
"compiled_tensor_literal_reimport.v1"state_carry_limitations.import_compute_path:
"attn0_plus_carried_hidden_blend.v1"hidden_tensor_import_usedhidden_tensor_blend_usedhidden_tensor_carry_mode_kind:
"evolved_hidden_tensor_feedback.v1"hidden_tensor_feedback_state_transition.v1 with
candidate_basis_kind: "hidden_tensor_feedback_window.v1"kv_state_summary now exposes a bounded
bounded_qk_tensor_state.v1 artifact derived from live q1/k1
tensor signaturesarchitecture_state_summary now exposes a bounded combined
bounded_hidden_tensor_qk_forward_state.v1 artifact, and later decode
window seeding now prefers that combined architecture-state signaturearchitecture_state_feedback_state_transition.v1 with
candidate_basis_kind: "architecture_state_feedback_window.v1" and
decode_mode_kind: "architecture_state_feedback_projection.v1"architecture_state_summary now also carries a compact confidence/stability
readout for that combined statedecode_trace and final_decode_state now also expose
architecture_state_confidence_score and
architecture_state_stability_kind, so callers can see the combined
architecture-state posture without inferring it from the generic probe
stability blockbounded_decode_health and readiness now switch to
confidence_envelope: "bounded_architecture_state_probe.v1" when the
combined architecture state is active, and they surface
architecture_state_guardrail_triggered plus
architecture_state_stability_kindarchitecture_state_evolved_hidden_tensor_feedback.v1kv_state_carry_mode_kind:
"architecture_state_evolved_qk_signature.v1" on the architecture-state-led
path, and that evolved KV signature feeds the combined architecture statekv_state_summary now also reports feedback_steps, so the
bounded Q/K carry depth is visible without reading the full decode tracearchitecture_state_summary now also reports feedback_steps,
so callers can see how many later decode steps were actually
architecture-state-ledhidden_tensor_summary now also reports feedback_steps, so
hidden-tensor carry depth is visible alongside the forward/KV/architecture
summarieshidden_tensor_import_used: trueforward_state_generation reaches 2consumed_state_input_row_ids shows the merged carried-state rows that
fed back into later VM stepsdegraded: proven by
run_degraded_ai_probe.sh
using a checked-in synthetic fixture that forces decode_probe_unavailable,
and by
run_real_hf_tiny_model.shreal: performs a concrete implemented operation with meaningful current valuescaffold: implemented command surface, but payloads or decisions are still mostly synthetic or policy/reporting-orientedstub: intentionally minimal compatibility surface; not a real execution lane| Command | Status | Classification | Notes |
|---|---|---|---|
t81 ai backend capabilities |
implemented | real | Emits a concrete backend capability JSON document |
t81 ai backend select |
implemented | real | Runs actual backend-selection logic and emits a trace payload |
t81 ai model inspect <model-file> |
implemented | real | Checks existence, infers format, fingerprints the file |
t81 ai verify determinism <model-file> |
implemented | scaffold | Real file inspection, but not a deep conformance replay or execution proof |
t81 ai verify --model <hash> |
implemented | scaffold | Hash-oriented reporting surface, not runtime verification |
t81 ai inference run ... |
implemented | mixed | Real for strict_deterministic + t81_reference_vm; other modes still emit synthetic payloads |
t81 ai quantization inspect ... |
implemented | scaffold | Emits quantization-shaped metadata, not a full analysis pass |
t81 ai benchmark run ... |
implemented | scaffold | Emits benchmark-shaped payload with fixed values, not measured execution |
t81 ai policy test ... |
implemented | scaffold | Event-type allow/deny behavior is mostly table-driven, not full runtime policy replay |
t81 ai workflow run ... |
implemented | scaffold | Produces workflow artifact scaffolding |
t81 ai workflow replay <artifact> |
implemented | scaffold | Artifact existence/reporting surface |
t81 ai workflow report <artifact> |
implemented | scaffold | Human-readable report over saved workflow artifact |
t81 ai observability trace <artifact> |
implemented | scaffold | Emits a canned trace-shaped artifact |
t81 ai quantize --input <file> |
implemented | real | Runs a small real ternary quantization transform over integer input |
t81 ai run --model <hash> |
implemented | stub | Compatibility alias; prints a minimal pass surface, not real inference |
Primary implementation surface:
Key observations from the current implementation:
inference run now executes a real native VM probe for the strict deterministic reference-VM lanestd.tnn.embedlm_head.weighttokenizer.json is present, the current native lane now
attempts a narrow tokenizer seed path:
▁ prefix convention, seeded from the last matched
subword tokenexecution_kind: "real_vm_native_probe"probe_kind: "llama_two_layer_attention_row_logits_sample" for the current Llama lanecandidate_selection metadata, including:
modetokenizer_seed_supportedbasisvocab_sizeprompt_token_history_token_idsprompt_token_history_countseed_token_idwindow_startwindow_endwindow_idsmode: "tokenizer_prompt_history" instead of
overloading tokenizer_prompt_tokensampled_logitsselected_candidatestateful_decode_supported: falserequested_max_tokenstermination_reasondecode_trace for the current bounded four-step carried-state lane
std.tnn.embed(...) input while still choosing candidate windows from
prompt-plus-history feedback, then hidden-tensor/qk/forward-state
feedback, and finally combined architecture-state feedback0 now
starts with bounded prompt-token context instead of an empty context set,
and the initial candidate window can be prompt-history seededstd.tensor.vec_add, currently using a
bounded recent-history windowstate_kind: "prompt_history_bounded_context.v1" decode-state block shapetransition_kind, next_window_start,
state_seed_sha256, and candidate_window_seed_sha256hidden_carry_row_ids, hidden_carry_scores, and
hidden_carry_signature_sha256attn1 state, rather than only from prompt/history
bookkeepinghidden_projection_row_ids, hidden_projection_scores,
hidden_projection_signature_sha256, and
consumed_hidden_projection_row_idshidden_state_class and hidden_state_class_signature_sha256, now
shaped by the hidden-carry probe layout as well as the projection scoreswindow_selection_kind:
"hidden_state_class_projection_mode_conditioned_window_seed.v1"candidate_basis_kindstate_rationale block summarizing the active class, carry layout,
carry mode, selection policy, and decode modestability block derived from sampled-logit margin and hidden-carry
peak evidencesteady steps now take the same explicit recovery branch as
fragile or ambiguous steps, so the recovery path is exercised on a
real bounded decode lane instead of being dead logicrecovery_triggered and recovery_stepsstability_recovery_exhausted, weak_steps, and
termination_reason: "stability_recovery_exhausted"generated_token_ids, generated_token_pieces, and a compact
generated_text_preview, so bounded native decode output is easier to
inspect than raw token ids alonegenerated_preview_policy, clipping preview output to the first decoded
token piece instead of showing the full low-confidence previewoutput_policy,
suppressing the raw VM probe output and replacing it with an explicit
output_summarydecode_trace_policy, exposing boundary steps instead of the full trace
once later bounded steps are no longer equally trustworthydecode_trace_detail_policy to a
summary-only view, keeping signatures and counts while suppressing later
raw evidence arrays in decode_trace and final_decode_statelogits_evidence_policy to a summary-only view, keeping
sampled_logits_count, sampled_logits_signature_sha256, and
selected_candidate while suppressing the raw sampled_logits arraycandidate_selection to a
summary-only evidence view, keeping candidate_window_count,
candidate_window_signature_sha256, and other metadata while
suppressing raw window_ids and prompt-token id arraysdegraded_artifact_summary so callers can see, in one place, which
evidence surfaces were clipped or suppressedreadiness block so
callers can judge, at a glance, whether the bounded native lane ended in
a ready, guarded, or degraded posturebounded_decode_health, and the
overall status can degrade from pass to degraded when bounded
native decode exhausts repeated weak or unavailable recovery stepsforward_state is no longer just a freshly overwritten
snapshot:
later steps now persist a bounded slice of prior forward-state rows with
score decay, and the state records forward_state_generation so
multi-step runs can prove real carried-state evolutionarchitecture_state_feedback_state_transition.v1 and then a deeper
fourth-step architecture_state_deep_feedback_state_transition.v1bounded_deep_architecture_state_probe.v1, and the payload
reports:
architecture_state_deep_feedback_used,
architecture_state_summary.deep_feedback_steps,
bounded_horizon_steps,
bounded_horizon_remaining,
bounded_horizon_utilization,
bounded_horizon_reached, and
termination_reason: "deep_architecture_state_horizon_reached"sample_window_kind and
sample_window_usedselection_policy_kinddecode_mode_kind and context_window_usedprojection_carry_mode_kindcarry_probe_layout_kindinput_token_id, context_anchor_token_id,
prompt_token_history_token_ids, generated_token_history_token_ids,
combined_history_token_ids, context_history_window,
context_history_token_ids, seed_token_id, and
the state/candidate seed digestsfinal_decode_state for the last realized bounded decode step, now using
the same explicit bounded decode-state shape and transition metadatainference run still fabricates output as deterministic:<prompt-hash-prefix> for the non-native scaffolded lanesbenchmark run currently emits fixed latency and throughput valuespolicy test currently decides allow/deny via a narrow event-type checkrun --model <hash> is a compatibility stub, not a model-execution patht81 weights import|info|verify|quantize|exportt81 code run ... --weights-model <model.t81w|sha3-256:hash>t81 repl --weights-model ...These surfaces are backed by the model import path, CanonFS registration, Axion policy, and VM tensor execution.
t81 internal llama-run <model.gguf|sha3-256:hash> <prompt> --policy <policy.apl>This is explicitly marked experimental and non-DCP in the CLI help. It is a governed external-runtime lane, not the same thing as native RFC-0034 inference completion.
These layers are substantially implemented and evidenced elsewhere in the repo:
std.tnn.* lowering surfaceThis means the missing work is not “invent inference.” The missing work is the higher-level product lane that turns those pieces into a runnable model architecture and decode UX.
The current repo now has a real bounded native inference lane for the strict
deterministic reference-VM path, but it still does not provide a complete
native t81 ai experience equivalent to “load a model and chat with it”
through a broadly reusable T81-native runtime path.
The bounded state logic (hidden/QK/forward/architecture carry) has now been successfully extracted out of the CLI glue into a foundational reusable module (t81::vm::DecodeState).
Still missing:
The smallest honest next milestone is:
t81::vm::DecodeState)t81_reference_vm and one narrow architecture first, likely tiny
Llamabenchmark run and policy test consume that same execution pathThat would promote t81 ai from “bounded native reference lane” to “reusable
native inference runtime entry point.”