Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2.3. Handler Routing

ForwardPassHandlerLoader reads general.architecture from GGUF metadata and dispatches to the matching transformer handler:

If a .lora adapter is attached, load() wraps whichever handler was selected in LoraTrainableHandler. Adapters are applied read-only during inference; the base GGUF on disk is never modified.

Each handler delegates its matrix-vector multiplication to an injected MatVec implementation, chosen independently of architecture routing:

CudaMatVec and RocmMatVec both implement the sealed GpuMatVec interface and expose upload() / uploadHalf() so a handler never needs to know which GPU vendor it is running against. Weights upload once at load time; releaseGpuResources() frees VRAM on unload. See GPU acceleration for the full backend story.

After loadShard(), every node also wires its handler into the KV cache:

Backend selection is automatic via selectBindings() in GpuContext: CUDA first, then ROCm, then CPU. Override with -Djuno.gpu.backend=cuda|rocm|auto. selectBackend() in ForwardPassHandlerLoader reads JUNO_USE_GPU and -Djuno.cuda.device (defaults to 0).

Supported vs. under-development architectures

general.architectureHandlerStatus
llama, mistral, tinyllamaLlamaTransformerHandlerSupported
phi3Phi3TransformerHandlerSupported
qwen2, qwen2.5LlamaTransformerHandler (frozen QKV biases)Under development
gemmaLlamaTransformerHandler (SentencePiece path)Under development
qwen3Qwen3TransformerHandlerUnder development
qwen3moeQwen3MoeTransformerHandlerUnder development
qwen35Separate hybrid DeltaNet plan, not yet implementedUnder development

No LoRA training or --lora-play inference is available for architectures marked under development. See Supported models for the user-facing summary of this table.

See also


<- 2.2 Distributed Inference  |  Table of Contents  |  2.4 GPU Acceleration ->