Expand description
Model factory: builds the right model from config + weights.
Weight loader selection is registry-driven — add new models by implementing
ModelWeightLoader and registering in loader_for_config. No other
code changes needed.
Structs§
- Dflash
Build Args - DFlash speculative-decoding build arguments.
Nonefor non-DFlash runs;Some(...)carries the drafter’s separateWeightStore, parsedconfig.json, and CLI overrides for γ and the sliding-window size. - Lora
Build Args - LoRA adapter build arguments (
--lora-adapter NAME=PATH).Nonefor base-only runs;Some(...)carries the adapter’s separate on-deviceWeightStore(loaded viaspark_runtime::weights::adapter::load_adapter_safetensors), the parsedadapter_config.json, and the pool-shape CLI knobs.
Functions§
- build_
model - loader_
for_ config - Select the weight loader for a given model config.