load_lora_adapters_multi

Function load_lora_adapters_multi 

Source
pub fn load_lora_adapters_multi(
    adapters: &[LoraAdapterInput<'_>],
    cfg: &ModelConfig,
    gpu: &dyn GpuBackend,
    max_loras: usize,
    max_lora_rank: usize,
) -> Result<LoraWeights>
Expand description

2026-09-25: Load startup adapters: audit each one, check free memory, pack adapter k into slot k, then build the per-module [max_loras] pointer tables (0 where a slot has no pair) and the [max_loras] scale table. Slots past the adapter count are empty placeholders.

Called through ModelWeightLoader::load_lora_adapters from model-engine factory::build_model before BufferArena::new and before the free-memory read that sizes the KV cache, so the pools come out of the KV budget.