pub struct Qwen3VLWeightLoader;Trait Implementations§
Source§impl ModelWeightLoader for Qwen3VLWeightLoader
impl ModelWeightLoader for Qwen3VLWeightLoader
Source§fn supports_tp(&self) -> bool
fn supports_tp(&self) -> bool
2026-09-25: Whether this loader’s weight slicing honours
config.tp_world_size / config.tp_rank. There is no default, so every
loader declares it. Read moreSource§fn load_layers(
&self,
store: &WeightStore,
config: &ModelConfig,
gpu: &dyn GpuBackend,
layer_kv_dtypes: &[KvCacheDtype],
) -> Result<Vec<Box<dyn TransformerLayer>>>
fn load_layers( &self, store: &WeightStore, config: &ModelConfig, gpu: &dyn GpuBackend, layer_kv_dtypes: &[KvCacheDtype], ) -> Result<Vec<Box<dyn TransformerLayer>>>
2026-09-25: Load all transformer layers from the weight store. Read more
fn load_embedding( &self, store: &WeightStore, config: &ModelConfig, _gpu: &dyn GpuBackend, ) -> Result<DenseWeight>
Source§fn load_final_norm(
&self,
store: &WeightStore,
config: &ModelConfig,
_gpu: &dyn GpuBackend,
) -> Result<DenseWeight>
fn load_final_norm( &self, store: &WeightStore, config: &ModelConfig, _gpu: &dyn GpuBackend, ) -> Result<DenseWeight>
2026-09-25: Load the final RMSNorm weight used before the LM head.
fn load_lm_head( &self, store: &WeightStore, config: &ModelConfig, _gpu: &dyn GpuBackend, ) -> Result<DenseWeight>
Source§fn load_mtp_weights(
&self,
_store: &WeightStore,
_config: &ModelConfig,
_gpu: &dyn GpuBackend,
) -> Result<Option<MtpWeights>>
fn load_mtp_weights( &self, _store: &WeightStore, _config: &ModelConfig, _gpu: &dyn GpuBackend, ) -> Result<Option<MtpWeights>>
2026-09-25: Load single-module MTP head weights, or
None.Source§fn load_vision_encoder(
&self,
store: &WeightStore,
config: &ModelConfig,
gpu: &dyn GpuBackend,
) -> Result<Option<VisionTower>>
fn load_vision_encoder( &self, store: &WeightStore, config: &ModelConfig, gpu: &dyn GpuBackend, ) -> Result<Option<VisionTower>>
2026-09-25: Load vision encoder weights; the default returns
None.Source§fn prune_after_load(
&self,
_store: &mut WeightStore,
_config: &ModelConfig,
_gpu: &dyn GpuBackend,
) -> Result<()>
fn prune_after_load( &self, _store: &mut WeightStore, _config: &ModelConfig, _gpu: &dyn GpuBackend, ) -> Result<()>
2026-09-25: Drop store tensors this loader has finished with.
factory::build
calls it after every load_* reader and before the KV budget is
computed, so the freed memory counts. Read moreSource§fn precision_schedule(&self, _config: &ModelConfig) -> PrecisionSchedule
fn precision_schedule(&self, _config: &ModelConfig) -> PrecisionSchedule
2026-09-25: Per-(layer, role) weight precision schedule. The default is
PrecisionSchedule::default(), in which every role is Dtype::Inherit.Source§fn load_ngram_embedding(
&self,
_store: &WeightStore,
_config: &ModelConfig,
_gpu: &dyn GpuBackend,
_max_tokens: usize,
) -> Result<Option<NgramEmbedding>>
fn load_ngram_embedding( &self, _store: &WeightStore, _config: &ModelConfig, _gpu: &dyn GpuBackend, _max_tokens: usize, ) -> Result<Option<NgramEmbedding>>
2026-09-25: Build the n-gram embedding, for an architecture that fuses
hashed n-gram lookups into the input embedding (the LongCat loader).
The default
None leaves the plain embed_tokens gather in place.Source§fn load_mtp_weights_multi(
&self,
store: &WeightStore,
config: &ModelConfig,
gpu: &dyn GpuBackend,
) -> Result<Vec<MtpWeights>>
fn load_mtp_weights_multi( &self, store: &WeightStore, config: &ModelConfig, gpu: &dyn GpuBackend, ) -> Result<Vec<MtpWeights>>
2026-09-25: Load every MTP module;
factory::build calls this one.
The default wraps load_mtp_weights (zero or one module). The MiniMax
and Step3p7 loaders override it.Source§fn kv_layer_dims(&self, _config: &ModelConfig) -> Vec<(usize, usize)>
fn kv_layer_dims(&self, _config: &ModelConfig) -> Vec<(usize, usize)>
2026-09-25: Per-attention-layer
(num_kv_heads, head_dim), indexed like
layer_kv_dtypes, for models whose attention geometry differs per layer
(the Gemma-4 loader). The default is empty: every layer uses the global
dims.Source§fn load_dflash_weights(
&self,
_drafter_store: &WeightStore,
_config: &ModelConfig,
_gpu: &dyn GpuBackend,
_tp_size: usize,
) -> Result<Option<DflashWeights>>
fn load_dflash_weights( &self, _drafter_store: &WeightStore, _config: &ModelConfig, _gpu: &dyn GpuBackend, _tp_size: usize, ) -> Result<Option<DflashWeights>>
2026-09-25: Load DFlash drafter weights from the drafter’s own
WeightStore. The default returns None, and no loader overrides it:
factory::build loads the drafter with the free function
dflash_loader::load_dflash_weights.Source§fn load_lora_adapters(
&self,
adapters: &[LoraAdapterInput<'_>],
config: &ModelConfig,
gpu: &dyn GpuBackend,
max_loras: usize,
max_lora_rank: usize,
) -> Result<Option<LoraWeights>>
fn load_lora_adapters( &self, adapters: &[LoraAdapterInput<'_>], config: &ModelConfig, gpu: &dyn GpuBackend, max_loras: usize, max_lora_rank: usize, ) -> Result<Option<LoraWeights>>
2026-09-25: Load startup-static PEFT LoRA adapters into the LoRA pool,
through
metrale_model_layers::lora::load_lora_adapters_multi.
factory::build calls it before the buffer arena and the KV budget, so
the pool counts as used memory.Source§fn binds_vision_encoder(&self) -> bool
fn binds_vision_encoder(&self) -> bool
2026-09-25: Will this loader bind a vision encoder for a multimodal
checkpoint? Read more
Source§fn reads_expert_table_plan(&self) -> bool
fn reads_expert_table_plan(&self) -> bool
2026-10-02: Does this loader read the serve’s MoE expert-table decision
(
metrale_model_layers::layers::MoeExpertTables)? The serve plans and publishes it before
load only for a loader that does.Source§fn defer_predicate(&self, _config: &ModelConfig) -> Option<DeferHook>
fn defer_predicate(&self, _config: &ModelConfig) -> Option<DeferHook>
2026-09-25: Which checkpoint tensors will this loader read from the host
at bind time, so the checkpoint loader records their location instead
of uploading them? Read more
Auto Trait Implementations§
impl Freeze for Qwen3VLWeightLoader
impl RefUnwindSafe for Qwen3VLWeightLoader
impl Send for Qwen3VLWeightLoader
impl Sync for Qwen3VLWeightLoader
impl Unpin for Qwen3VLWeightLoader
impl UnwindSafe for Qwen3VLWeightLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more