Expand description
Ferrum 模型层
该 crate 负责围绕 ferrum-interfaces/ferrum-types 定义的核心抽象
提供模型定义解析、构建器与权重加载占位实现,确保上层可以在
重构阶段编译。
Re-exports§
pub use architectures::BertModelWrapper;pub use architectures::ClipModelWrapper;pub use architectures::LlamaModelWrapper;pub use architectures::Qwen2ModelWrapper;pub use architectures::Qwen3ModelWrapper;pub use builder::DefaultModelBuilderFactory;pub use builder::SimpleModelBuilder;pub use definition::ConfigManager;pub use definition::ModelDefinition;pub use executor::BertModelExecutor;pub use executor::CandleModelExecutor;pub use executor::ClipModelExecutor;pub use executor::Qwen2ModelExecutor;pub use executor::Qwen3ModelExecutor;pub use executor::StubModelExecutor;pub use hf_download::HfDownloader;pub use image_processor::ClipImageProcessor;pub use loader::SafeTensorsLoader;pub use registry::Architecture;pub use registry::DefaultModelRegistry;pub use registry::ModelAlias;pub use registry::ModelDiscoveryEntry;pub use registry::ModelFormatType;pub use source::DefaultModelSourceResolver;pub use source::ModelFormat;pub use source::ModelSourceConfig;pub use source::ModelSourceResolver;pub use source::ResolvedModelSource;pub use tensor_wrapper::CandleTensorWrapper;pub use tokenizer::TokenizerFactory;pub use tokenizer::TokenizerHandle;pub use weights::default_weight_loader;pub use weights::StubWeightLoader;pub use weights::WeightLoaderHandle;
Modules§
- architectures
- Model architecture implementations
- builder
- Builder 模块:提供默认构建器工厂与占位实现
- definition
- Model definition and configuration parsing
- executor
- Model executor implementations
- hf_
download - HuggingFace model downloader with proxy and resume support
- image_
processor - Image preprocessing for CLIP models.
- loader
- Weight loading from SafeTensors files
- registry
- Model registry and alias management
- source
- Model source resolution and downloading with progress tracking
- tensor_
wrapper - Candle Tensor wrapper implementing TensorLike
- tokenizer
- Tokenizer 占位实现
- weights
- Weight loading - MVP stub implementation
Structs§
- Attention
Config - Attention configuration for model architecture
- Model
Config - Model configuration for runtime
- Model
Info - Model information and metadata
- Rope
Scaling - RoPE (Rotary Position Embedding) scaling configuration
Enums§
- Activation
- Activation function type
- Model
Type - Model type enumeration
- Norm
Type - Normalization type used in the model
Traits§
- Model
Builder - Model builder for constructing model executors
- Model
Executor - Core model executor trait focusing on tensor operations
- Weight
Loader - Weight loading interface for model parameter management
Type Aliases§
- Result
- Result type used throughout Ferrum