Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
Glossary (domain words of the Leleka runtime)
One term per concept, project-wide. Names in code, comments and docs use these words with exactly this meaning
(docs/architecture/naming.md, rule 3). Add a word here in the same change that introduces it; if two words mean one thing, keep the
first and rename the other. Definitions are read from docs/original-serve.md, docs/adaptive-spec.md, docs/chain-kernels.md,
docs/kv-streaming.md, docs/kar-file-source.md and the code they name.
| Term | Meaning | Not |
|---|---|---|
| Original | The reference serve path: Strata's mode17 generate.cpp serve loop ported to Rust/CUDA (docs/original-serve.md). |
"vanilla", "main path" |
| preview | The Rust-native decoder chain that serves when the Original path cannot (--backend-mode preview). |
"fallback" |
| expert | One routed feed-forward expert of a mixture-of-experts layer, identified by (layer, expert index). | "head", "shard" |
| bank | The host-side (pinned) collection of the model's routed expert weights from which the tier is filled. | "cache" |
| tier (expert tier) | The experts kept resident in VRAM in front of the bank, with its residency, adaptive swaps and prompt loan (ExpertTierConfig). |
"cache" for the whole tier |
| slot | One fixed place in the tier that holds the weights of one expert at a time. | "entry", "line" |
| miss | A routed expert that is not in the tier and is served from the bank or the CPU pool. | "fault" |
| token | One vocabulary id of the model. | |
| prefill | Reading the prompt in batched chunks to fill the KV storage before generating. | "prompt pass" |
| decode | Generating tokens after prefill, one round at a time. | |
| draft | A token proposed by a drafter before the model has verified it: the MTP chain or the suffix (prompt lookup) continuation. | "guess", "speculation" for one token |
| MTP | The multi-token-prediction head used as a drafter; its chain proposes spec - 1 drafts per round. |
|
| suffix draft | Drafts copied from an earlier match in the context (prompt lookup). | |
| window (verify window) | The rows (the last committed token plus the drafts) the model verifies together in one round, up to 6 rows. | "batch" |
| round | One decode iteration: draft, verify the window, commit the accepted prefix. Counted by ms/round and tokens/round. |
"step", "iteration", "tick" |
| accept | A draft is accepted when the model's own choice at its row equals it. | |
| commit | Publishing the accepted prefix of a verified window into the session (tokens, KV) after a round. | "apply", "flush" |
| KV | The attention key/value storage of a session; QSA is its storage format (INT8 by default) with a resident window of cells in VRAM and the rest streamed from pinned host memory (--kv, --kv-resident). |
"cache" |
| cell | One position of a layer's KV storage. | |
| ring | The MTP drafter's own fixed-size KV ring (20480 cells). | |
| KAR archive | The sealed model archive file the runtime reads weights from. | "model file" in general |
session (QwenSession) |
The state of one conversation on the engine: tokens, KV, position. | "context" for the object |
| context | The token history of a conversation, as text the model attends to (size in tokens). | |
| port, adapter | Hexagonal terms: a port is a trait the core owns; an adapter implements it for a technology (docs/architecture/hexagonal.md). |
|
| layer L0..L4 | The dependency layers of the architecture gate (architecture.json). |
"level" |
| gate | A script that fails the build on a rule (check-architecture.py, check-limits.py). |
"lint" |
Established abbreviations allowed in names because they are domain terms: kv, qsa, mtp, kar, moe, gpu, cpu, ple, rms,
qkv, ffi. Anything else is written out.