Skip to main content

Module model_core

Module model_core 

Source
Expand description

Model trait and configuration system Core Model Abstraction

This module provides the foundational model abstraction that all model implementations build upon. It defines clean interfaces that hide implementation complexity.

Structs§

GenerationConfig
Generation configuration
MemoryRequirements
Memory requirements for a model
MoEConfig
Configuration for MoE layer
MoEExpert
Helper struct for a standard MoE expert (simple MLP)
MoELayer
Mixture of Experts layer Routes tokens to top-k experts and combines their outputs
ModelRegistry
Model registry for managing all supported architectures
ModelWeights
Model weights container
WeightMetadata
Weight metadata

Enums§

ModelInputs
Unified model inputs - supports all model types
ModelOutputs
Unified model outputs - supports all model types
RouterType
Router types for MoE
WeightFormat
Supported weight formats

Traits§

MLPLayer
MLP trait for expert networks in MoE layers
Model
Core model trait - the single interface all models implement
ModelConfig
Model configuration trait
ModelFactory
Model factory trait for creating models by name

Functions§

registry
Get global model registry