Expand description
Models as data. A checkpoint’s own metadata describes its architecture (spec); this module reads it — a GGUF
file (gguf), or a Hugging Face directory of safetensors shards in place (hf, safetensors) —,
dequantizes its weights in every format a model ships in (quant), tokenizes text as the checkpoint’s vocabulary
does (tokenizer), hashes Qwen3.8-Flash-Next’s n-gram embedding rows (ngram_hash), writes what it computes as
a LOGOS program (author) whose weights it binds to the checkpoint’s tensors (bind) as the layout its arms
read presents them (layout), names each cut of that
one program every backend lowers (program), and evaluates that computation in f64 as the oracle every lane is
measured against (reference).
Modules§
- author
- A model’s computation written as a LOGOS program, from its
ModelSpec. - bind
- Which checkpoint tensor fills each weight an authored program declares, and how.
- gguf
- A read-only GGUF reader: the whole metadata table, typed, the tensor directory, and every tensor’s weights in
the formats
super::quant::GgmlTypereads. - hf
- A Hugging Face checkpoint directory read in place:
config.json(itstext_configmerged over it as a multimodal checkpoint nests it), the safetensors shards its index names, and the tokenizer files. It is presented as the GGUF llama.cpp’s converter (convert_hf_to_gguf.py) writes from it — the same architecture keys, tensor names, ggml dim order and element order — soModelSpec::from_source, the binder and the reference read it unchanged. - layout
- A checkpoint presented in the layout the spec’s arms read.
- ngram_
hash - The row ids of Qwen3.8-Flash-Next’s hashed n-gram embedding (
qwen4_exp‘s per-layer embedding), as transformers’Qwen4ExpTextNGramEmbeddingcomputes them. - program
- A model’s one program.
authorwrites a model’s computation as a LOGOS program, and every backend lowers that program and no other: the CUDA lane compiles its decode step and prefill chunks, the D5005 engine reads its decode step, a spatial chip lowers its embedding, its layers and its head one program each. A backend never grows a model writer of its own, and takes every cut it lowers from this module. - quant
- The GGUF weight formats, and their dequantization to
f32. - reference
- The reference forward: what a
ModelSpeccomputes, evaluated inf64on the CPU over the checkpoint’s own weights. - safetensors
- Safetensors files as a checkpoint directory publishes them: one file, or shards named by
model.safetensors.index.json. A file is an 8-byte little-endian header length, a JSON header naming every tensor’s dtype, shape and byte range within the data section, then the data. Tensors are read by position, never mapped or read whole, so a checkpoint of any size opens in the time it takes to read its headers. - spec
- A decoder-only language model’s architecture, as data.
- tokenizer
- The tokenizer a GGUF checkpoint carries, read from its
tokenizer.ggml.*metadata and run the way llama.cpp runs it (src/llama-vocab.cppat the pinned commit): text to token ids, ids to text pieces, and the special tokens that end generation. - triage
- What a checkpoint of an architecture no arm reads carries.
Traits§
- Checkpoint
- A checkpoint a model is brought up from: its metadata, which
spec::ModelSpec::from_sourcereads, and its tensors, which the reference and every host read through their bindings — a GGUF file or a Hugging Face directory.
Functions§
- open_
checkpoint - The checkpoint at
path: a Hugging Face directory (config.jsonbeside its safetensors shards) or a GGUF file, presented in the layout the spec’s arms read (layout::presented).