Skip to main content

Crate aria_inference

Crate aria_inference 

Source
Expand description

Aria inference: bundle loader, family registry, Session.

Re-exports§

pub use multimodal::action_head;
pub use multimodal::asr_transcribe_pcm16le;
pub use multimodal::rag_pack_context;
pub use multimodal::vision_encode;

Modules§

fixture
Synthetic tiny Aria bundles / QuantTensors for contract tests (mirrors model tiny layout).
multimodal
Stage C multimodal helpers: ASR stub + RAG pack. Vision / VLA action require real bundle tensors — Session APIs return Unsupported rather than RGB mean-pool / fake linear stubs.

Structs§

Bundle
BundleTokenizer
ChatTurn
EngineProfile
Family
Runtime family handle used by Session.
GenerateOpts
GenerateProfile
Generation
LoadProfile
ModelConfig
QuantTensor
Session
SessionBuilder

Enums§

ArchClass
Architecture class for graph / loader hooks.
ComputePref
CLI / config preference for local GEMM.
EngineError
Unified engine error (requirements §3.6).
FamilyPhase
Delivery phase for a registered family (requirements §1.1).
TensorData

Constants§

FAMILY_REGISTRY
Full registry mirroring model/requirements.md §1.1.

Functions§

apply_chat_template
Render messages with a generation prompt for the next assistant turn.
arch_class_representatives
Representative path per arch class for tiny E2E tests.
confidence_from_logits
Optional confidence heuristic for hybrid: mean max-softmax over last logits proxy.
decode_placeholders
Fallback when no tokenizer sidecar: stable <id> placeholders (legacy demos).
dequantize
Rotated-space reconstruction (matches Python dequantize).
effective_rope_theta
Qwen3 uses θ=1e6; Qwen3.5 gated attention uses θ=1e7 (rope_parameters.rope_theta). Bundles that omit rope_theta hit serde default 10000 and produce empty / garbage completions (Hello → content: "" with a full max_tokens budget).
encode_naive
Fallback encode when no sidecar: map UTF-8 bytes into [0, vocab).
family_phase
graph_hook
Graph hook id for an architecture class (stage B/C dispatch).
infer_family_path
Map a bundle directory or slug_q4 / slug_q326_channel name onto a registry path.
load_bundle
lookup_family
require_runnable
Any registered family that can run the shared text decoder (+ stage C extras).
require_stage_a
Stage A only: gemma-4-e2b-it.
require_stage_b
Stage B: text / MoE families (+ stage-A golden path).
strip_assistant_visible
Drop Qwen3 thinking and ChatML specials from decoded assistant text.