Skip to main content

Crate combs_formats

Crate combs_formats 

Source
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§

GgufSource
A parsed GGUF file.
ModelMetadata
Architecture + hyperparameter description of a model, format-agnostic.
SafetensorsSource
ModelSource over a HuggingFace-format directory:
SamplerConfig
Default sampler parameters, typically from generation_config.json.
TensorReader
A lazy view over one tensor’s raw bytes inside a ModelSource.
TokenizerSpec
Where to find the tokenizer and which special tokens it defines.
VisionConfig
Vision-encoder hyperparameters parsed from config.json::vision_config (plus top-level scale_factor / image_token_id).

Enums§

FormatError
Errors produced by format adapters.
TensorDtype
Element dtypes supported by the loaders.

Traits§

ModelSource
The central adapter trait: a source of model weights + config, independent of the on-disk format (LiteRT-LM ModelResources equivalent).

Functions§

open_model_source
Opens any supported model path: a .gguf file, 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.