pub struct Qwen35Config {Show 26 fields
pub vocab_size: usize,
pub hidden_size: usize,
pub intermediate_size: usize,
pub num_hidden_layers: usize,
pub nextn_predict_layers: usize,
pub num_attention_heads: usize,
pub num_key_value_heads: usize,
pub key_length: usize,
pub value_length: usize,
pub max_position_embeddings: usize,
pub rms_norm_eps: f64,
pub rope_theta: f64,
pub rope_dim_count: usize,
pub rope_dim_sections: Vec<usize>,
pub full_attention_interval: usize,
pub ssm_conv_kernel: usize,
pub ssm_group_count: usize,
pub ssm_inner_size: usize,
pub ssm_state_size: usize,
pub ssm_time_step_rank: usize,
pub tie_word_embeddings: bool,
pub num_experts: usize,
pub num_experts_used: usize,
pub expert_ffn_size: usize,
pub shared_expert_ffn_size: usize,
pub expert_weights_scale: f32,
}Expand description
Qwen3.5 model config — fields covering both the per-layer Mamba+ Attention block and the MTP head.
Fields§
§vocab_size: usize§intermediate_size: usizeTotal layer count (= main layers + nextn_predict_layers MTP heads).
nextn_predict_layers: usizeLayers at index < num_hidden_layers - nextn_predict_layers
use the hybrid Mamba+Attention block. The remaining
nextn_predict_layers layers use standard attention for MTP.
num_attention_heads: usize§num_key_value_heads: usize§key_length: usizePer-head Q dim. The MTP attention head uses this.
value_length: usizePer-head V dim.
max_position_embeddings: usize§rms_norm_eps: f64§rope_theta: f64§rope_dim_count: usize§rope_dim_sections: Vec<usize>§full_attention_interval: usizeSome Qwen3.5 layers do full attention every N blocks (interspersed with the Mamba-style blocks). Read but not yet acted on.
ssm_conv_kernel: usize§ssm_group_count: usize§ssm_inner_size: usize§ssm_state_size: usize§ssm_time_step_rank: usize§tie_word_embeddings: bool§num_experts: usizeMoE (qwen35moe): routed expert count. Zero for dense models.
num_experts_used: usizeTop-k experts activated per token.
expert_ffn_size: usizePer-expert FFN inner dim (qwen35.expert_feed_forward_length).
Shared-expert FFN inner dim (qwen35.expert_shared_feed_forward_length).
expert_weights_scale: f32Router weight multiplier applied after softmax (llama.cpp default 1.0).
Implementations§
Source§impl Qwen35Config
impl Qwen35Config
Sourcepub fn from_gguf(raw: &GgufFile) -> Result<Qwen35Config, Error>
pub fn from_gguf(raw: &GgufFile) -> Result<Qwen35Config, Error>
Read from a GGUF file with general.architecture in
{qwen35, qwen35moe, qwen36, qwen36moe}. Qwen3.6 reuses the
Qwen3.5 trunk; only the metadata-key prefix differs (qwen36.*
vs qwen35.*). Returns an error when any required key is missing.
Sourcepub fn expert_ffn_dim(&self) -> usize
pub fn expert_ffn_dim(&self) -> usize
Routed-expert SwiGLU inner width.
Shared-expert SwiGLU inner width.
Sourcepub fn mtp_layer_start(&self) -> Option<usize>
pub fn mtp_layer_start(&self) -> Option<usize>
Index of the first MTP layer (= num_hidden_layers - nextn_predict_layers). Returns None when the file has no
MTP heads.
Sourcepub fn from_hf_config_json(path: &Path) -> Result<Qwen35Config, Error>
pub fn from_hf_config_json(path: &Path) -> Result<Qwen35Config, Error>
Read from a HuggingFace config.json (the safetensors
distribution counterpart to GGUF metadata). Maps the standard
HF Qwen2.x / Qwen3.x field names; unknown fields fall back to
the same defaults used by Self::from_gguf. PLAN.md M1
safetensors load path (HauhauCS catalog rows).
Trait Implementations§
Source§impl Clone for Qwen35Config
impl Clone for Qwen35Config
Source§fn clone(&self) -> Qwen35Config
fn clone(&self) -> Qwen35Config
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Qwen35Config
impl RefUnwindSafe for Qwen35Config
impl Send for Qwen35Config
impl Sync for Qwen35Config
impl Unpin for Qwen35Config
impl UnsafeUnpin for Qwen35Config
impl UnwindSafe for Qwen35Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more