pub struct ModelCapabilities {
pub has_ssm_layers: bool,
pub has_attention_layers: bool,
pub has_moe_layers: bool,
pub supports_thinking: bool,
pub supports_vision: bool,
pub has_mtp: bool,
pub ssm_architecture: SsmArchitecture,
pub attention_type: AttentionType,
pub has_nested_config: bool,
}Fields§
§has_ssm_layers: bool2026-09-26: Some layer is LinearAttention, or the Mamba-2 head dims are set.
has_attention_layers: bool2026-09-26: Some layer is FullAttention.
has_moe_layers: bool2026-09-26: num_experts > 0.
supports_thinking: bool2026-09-26: Equal to has_ssm_layers: it follows the architecture, not the tokenizer
vocabulary.
supports_vision: bool2026-09-26: ModelConfig::vision is set.
has_mtp: bool2026-09-26: mtp_num_hidden_layers > 0.
ssm_architecture: SsmArchitecture§attention_type: AttentionType§has_nested_config: bool2026-09-26: Copied from ModelConfig::nested_config, which a parser sets when the text
model’s fields sit under a nested key such as text_config.
Implementations§
Source§impl ModelCapabilities
impl ModelCapabilities
pub fn from_config(config: &ModelConfig) -> Self
Trait Implementations§
Source§impl Clone for ModelCapabilities
impl Clone for ModelCapabilities
Source§fn clone(&self) -> ModelCapabilities
fn clone(&self) -> ModelCapabilities
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelCapabilities
impl RefUnwindSafe for ModelCapabilities
impl Send for ModelCapabilities
impl Sync for ModelCapabilities
impl Unpin for ModelCapabilities
impl UnwindSafe for ModelCapabilities
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