Expand description
§combs-formats
File-format adapter layer. The runtime and model crates never touch file
formats directly; they go through the ModelSource trait (the
LiteRT-LM ModelResources equivalent). Phase 1 ships the
[safetensors] adapter (HuggingFace config.json + model.safetensors,
mmap-backed, zero-copy views). GGUF / ONNX / litertlm adapters plug in
here later by implementing the same trait.
Structs§
- Gguf
Source - A parsed GGUF file.
- Model
Metadata - Architecture + hyperparameter description of a model, format-agnostic.
- Safetensors
Source ModelSourceover a HuggingFace-format directory:- Sampler
Config - Default sampler parameters, typically from
generation_config.json. - Tensor
Reader - A lazy view over one tensor’s raw bytes inside a
ModelSource. - Tokenizer
Spec - Where to find the tokenizer and which special tokens it defines.
- Vision
Config - Vision-encoder hyperparameters parsed from
config.json::vision_config(plus top-levelscale_factor/image_token_id).
Enums§
- Format
Error - Errors produced by format adapters.
- Tensor
Dtype - Element dtypes supported by the loaders.
Traits§
- Model
Source - The central adapter trait: a source of model weights + config, independent
of the on-disk format (LiteRT-LM
ModelResourcesequivalent).
Functions§
- open_
model_ source - Opens any supported model path: a
.gguffile, or a directory in the HuggingFace safetensors layout. This is the single entry point the CLI, FFI and server use — format detection lives here.
Type Aliases§
- Result
- Convenient result alias for this crate.