Skip to main content

Crate ferrotensor_loader

Crate ferrotensor_loader 

Source
Expand description

Model loading for Ferrotensor: Hugging Face config.json parsing (Lfm2Config), memory-mapped safetensors weights (single file or sharded, F32/F16/BF16 read as F32, int-quantized weights dequantized on the GPU) through WeightsContext, and a Tokenizer / Sampler pair for text in and out.

Re-exports§

pub use tokenizer::argmax;
pub use tokenizer::Sampler;
pub use tokenizer::Tokenizer;

Modules§

tokenizer
Tokenizer for LFM2.5 models

Structs§

Lfm2Config
Model hyperparameters read from config.json (Llama and LFM2 layouts).
ModelLoader
Reads model config files and raw safetensors files.
QuantizationConfig
Quantization settings from the model config.
TensorMetadata
Shape and dtype of a stored tensor.
WeightsContext
Memory-mapped safetensors files and an index from tensor name to file.

Enums§

LoaderError
Errors returned while loading model configs, weights and tensors.

Type Aliases§

LlamaConfig
Alias kept for older code that used the Llama-specific config name.