Expand description
frink-models: GGUF decoder, architecture registry, and structural presets for frontier stacks (GLM / DeepSeek V4 / Kimi).
Unconfirmed preset fields go in best_effort_fields and must be
overwritten from real config.json / GGUF metadata. Status of what
actually runs: docs/MODELS.md. Presets glm_5_2 / deepseek_v4_pro
/ kimi_k3 are sketches for synthetic tests — not real-checkpoint
support. Dedicated primitives live in glm52_*, deepseek_v4_*,
kimi_* modules.
Re-exports§
pub use bert_encoder::BertEncoder;pub use bert_encoder::BertHparams;pub use bert_encoder::BertLayer;pub use bert_gguf_loader::load_bert_encoder_from_path;pub use bert_gguf_loader::read_bert_hparams;pub use bert_gguf_loader::BERT_ARCH;pub use capability::architecture_catalog;pub use capability::coverage_report_markdown;pub use capability::resolve_architecture;pub use capability::resolve_profile;pub use capability::ArchPath;pub use capability::ArchProfile;pub use capability::ArchScope;pub use capability::DecoderFamily;pub use capability::MemoryKind;pub use capability::QkNormStyle;pub use config::deepseek_v4_pro;pub use config::glm_5_2;pub use config::kimi_k3;pub use config::FfnActivation;pub use config::ModelConfig;pub use config::RopeLayout;pub use decoder::Decoder;pub use decoder::MultiSeqKv;pub use device_budget::BudgetBackend;pub use device_budget::DeviceBudget;pub use draft_model::DraftModelSpeculator;pub use draft_model::VocabMismatch;pub use embedding_model::is_embedding_arch;pub use embedding_model::EmbedError;pub use embedding_model::EmbeddingModel;pub use encoder::EncodeError;pub use encoder::PairSequence;pub use encoder::TextEncoder;pub use engine::DeepseekV4Engine;pub use engine::Engine;pub use engine::Glm52Engine;pub use engine::KimiEngine;pub use engine::MlaDenseFfn;pub use engine::MlaEngine;pub use engine::MlaLayerFfn;pub use engine::MlaLayerWeights;pub use engine::MlaMoeFfn;pub use engine::MlaMoeRuntime;pub use engine::TextTokenizer;pub use engine_factory::ensure_generic_decoder;pub use engine_factory::load_gemma4_engine_from_path;pub use engine_factory::load_glm52_engine_from_path;pub use engine_factory::load_mla_engine_from_path;pub use engine_factory::select_engine_kind;pub use engine_factory::EngineSelectError;pub use engine_factory::SelectedEngineKind;pub use engine_factory::ServedEngine;pub use execution_plan::ExecutionPlan;pub use execution_plan::FusedOpCaps;pub use execution_plan::MemoryPlan;pub use execution_plan::PlanGeometry;pub use gemma4_engine::Gemma4Engine;pub use gemma4_engine::Gemma4Hparams;pub use gemma4_engine::GEMMA4_ARCHES;pub use kv_budget::Ceiling;pub use kv_budget::ContextCap;pub use kv_budget::ContextFit;pub use kv_budget::KvBudget;pub use kv_budget::KvBudgetError;pub use kv_budget::KvElem;pub use kv_budget::KvLayout;pub use kv_budget::KvResidency;pub use kv_budget::KvShape;pub use kv_budget::CTX_AUTO_GRANULARITY;pub use loader::LoadError;pub use norm::NormOp;pub use output_projection::grouped_output_projection;pub use penalty_window::PenaltyWindow;pub use pooling::l2_normalize;pub use pooling::pool;pub use pooling::PoolingError;pub use pooling::PoolingType;pub use prefix_cache::PrefixCache;pub use prefix_cache::PrefixCacheStats;pub use prefix_cache::PrefixMatch;pub use rank_head::load_rank_head;pub use rank_head::RankHead;pub use rerank_pooler::splice_pooler;pub use rerank_pooler::SpliceError;pub use rerank_pooler::SplicedPooler;pub use sampler_order::ChainStep;pub use sampler_order::SamplerName;pub use sampler_order::SamplerOrder;pub use sampler_order::SamplerOrderError;pub use sampling::sampling_distribution;pub use sampling::Sampler;pub use sampling::SamplingParams;pub use speculative::accept_or_resample;pub use speculative::speculative_decode;pub use speculative::speculative_decode_with;pub use speculative::DraftBlock;pub use speculative::DraftDist;pub use speculative::Drafter;pub use speculative::PromptLookupSpeculator;pub use speculative::SpeculativeDecodeResult;pub use speculative::SpeculativeOptions;pub use tensor_role::TensorRole;pub use tokenizer::ByteTokenizer;pub use tokenizer::GgufBpeTokenizer;pub use tokenizer::GgufPlamo2Tokenizer;pub use tokenizer::GgufSpmTokenizer;pub use tokenizer::GgufUnigramTokenizer;pub use tokenizer::GgufWordPieceTokenizer;pub use tokenizer::NormalizerOptions;pub use tokenizer::TokenizerLoadError;
Modules§
- act_
layers - WHICH ACTIVATION EACH LAYER RUNS, with WHICH PARAMETERS – the
per-layer half of
ModelConfig::ffn_activation. - alibi
- WHICH GRAPHS USE ALiBi, and where each one gets its
f_max_alibi_biasfrom. The arithmetic isfrink_core::alibi. - attn_
gate - The learned attention output gate:
attn_out *= act(W_g · x)beforewo, llama.cpp’sLLM_TENSOR_ATTN_GATE(blk.N.attn_gate.weight). - attn_
temperature - Per-position attention temperature – llama.cpp’s
llm_graph_input_attn_temp, as one value aModelConfigcarries and one table that says which architectures compute it. - attn_
value_ scale - THE ATTENTION OUTPUT SCALE –
{arch}.attention.value_scale, a scalar one graph multiplies the attention branch by AFTERwo. - bert_
encoder - BERT: the encoder graph, transcribed from llama.cpp
src/models/bert.cpp(llama_model_bert::graph::graph). - bert_
gguf_ loader - BERT GGUF →
BertEncoder. - block_
residual - Kimi K3’s cross-layer “block residual” mixing mechanism
(
_apply_attn_resin the realmodeling_kimi_linear.py), a real architectural feature discovered by readingKimiDecoderLayer.forwardin full rather than assuming a standard pre-norm residual: every layer blends its running residual stream with a growing set of saved checkpoints from earlier layers in the same block, using a learned RMSNorm-projected softmax score to weight the blend – structurally a tiny self-attention over{checkpoints..., current}. - capability
- Explicit architecture capability registry for the generic GGUF path.
- chat_
template - Chat-template rendering driven by the GGUF’s own
tokenizer.chat_templateJinja2 string. - chunked_
swa LLAMA_SWA_TYPE_CHUNKED: a “window” that is the query’s own chunk.- clamp_
kqv {arch}.attention.clamp_kqv, for the architectures whose graph applies it.- config
- Architecture configs. Prefer GGUF / config.json over preset defaults.
Unconfirmed preset fields must be listed in
best_effort_fields. What actually runs:docs/MODELS.md. - ctk
- The
-ctkvalue vocabulary, which is llama.cpp’s. The-ctk/--cache-type-kvalue vocabulary, which is llama.cpp’s. - decoder
- Generic decoder-only transformer forward pass, assembled from a ModelConfig. Each layer is: RMSNorm -> GQA attention (+RoPE) -> residual -> RMSNorm -> MoE FFN (router + routed experts + shared experts) -> residual. This is the standard decoder block shape shared by the LLaMA/DeepSeek/GLM/Kimi family of open-weight models.
- deepseek_
v4_ budget - DSV4 paged KV: sizing four heterogeneous tiers out of one budget, and the page-atomic allocator that hands out the window tier.
- deepseek_
v4_ decoder - A dedicated decoder skeleton for DeepSeek V4’s real architecture,
separate from
frink-models::decoder::Decoder(the generic GQA path every other preset uses) — analogous toglm52_decoder.rs/kimi_decoder.rs: composes the already-independently-tested mHC, CSA/HCA compression + attention, derope, grouped output projection, and sqrtsoftplus MoE primitives into one synthetic forward pass. - device_
budget - How many bytes the selected backend will let this process hold –
the right-hand side of
crate::kv_budget’s inequality. - devices
- What
--list-devicesprints, shared by both front ends. What--list-devicesprints, in one place. - draft_
model - A second, smaller GGUF used as the drafter for speculative decoding.
- dry
- The DRY repetition sampler (“Don’t Repeat Yourself”), ported from
llama.cpp’s
llama_sampler_dry(src/llama-sampler.cpp:3078-3400), which is itself a port of Koboldcpp PR 982 by pi6am. - embedding_
model - One GGUF path in, one embedding vector out.
- encoder
- The seam for encoder-only (embedding) models, which is deliberately
not
crate::engine::Engine. - engine
- A trait-based abstraction over the two structurally different but
text-in/text-out-shaped forward passes this crate has:
Decoder(GQA+RoPE, used by GLM-5.2/DeepSeek V4 Pro and every real GGUF checkpoint) and Kimi K3’s dedicated hybrid KDA/Gated-MLA stack (kimi_decoder). This letsfrink-servershare one generic generation loop across both engines (seefrink-server::generate::generate_engine) for the actual sampling/stop-sequence logic, rather than hand-duplicating it – while keeping GGUF-only features (the KV block pool,PrefixCache) asDecoder-specific code layered on top, not forced into this trait. The reason: Kimi’s KDA state is a fixed-size recurrent matrix that collapses history irreversibly, so it cannot support the same restore/truncate operationsKvCachecan – unifying those too would mean either a leaky abstraction or silently pretending Kimi supports something it doesn’t. - engine_
factory - Load-time engine selection (llama.cpp
llama_model_*factory analogue). - execution_
plan - Load-time execution / memory plans (llama.cpp graph-params analogue).
- gdn
- The gated delta-net block (Qwen3.5’s linear attention), at the site
attention occupies on a recurrent layer
(
crate::layer_shapes::AttnShape::Gdn). - gemma4_
engine - Gemma-4 dedicated text engine (E2B / E4B-style GGUF).
- gemma4_
gguf_ loader - Gemma-4 GGUF →
crate::gemma4_engine::Gemma4Engine. - glm52_
decoder - A dedicated decoder for GLM-5.2’s real architecture, separate from
frink-models::decoder::Decoder(the generic GQA path every other preset uses) – analogous tokimi_decoder.rs’s role for Kimi K3: composes the already-independently-testedglm_dsaattention module with a standard SwiGLU dense/MoE FFN into a real forward pass, without touching the existing GQA decoder. - glm52_
gguf_ loader - Loads
frink-models::glm52_decoderweights from a GLM-5.2 GGUF checkpoint, viafrink_gguf::TensorSource– the same traitfrink-models::loader’s generic GQA path andkimi_gguf_loader’s Kimi K3 path both use. Followskimi_gguf_loader.rs’s dedicated-loader pattern (a hand-written loader for an architecture whose MLA+DSA structure doesn’t fit the generic GQA loader), notloader.rs’s generic path. - glm_dsa
- GLM-5.2’s real DSA (DeepSeek Sparse Attention) attention layer:
RoPE-carrying MLA (
frink_models::mla’s math, inlined here rather than reused directly – see below) plus the lightning indexer (frink_core::attention::lightning_indexer_topk) selecting which causal positions are visible, then sparse attention restricted to exactly those (frink_core::attention::causal_mla_attention_sparse). - grammar
- GBNF grammar-constrained decoding.
- grammar_
sampler - The sampler hook a
Grammarhangs on: a live grammar plus the vocabulary it constrains. - hadamard_
fold prism.hadamard.*: which weights of a PrismML checkpoint carry a folded Hadamard rotation, and the per-weight transform that undoes it (frink_core::weight_matrix::hadamard).- hf_pull
- Hugging Face Hub download helper.
- hrm
- HRM-Text’s TWO residual streams, and the schedule that recombines them.
- hybrid_
engine - The refusal for the hybrid rows no generic-path seam serves yet.
- hyper_
connections - DeepSeek V4’s “mHC” (multi-stream Hyper-Connection) residual mixing:
instead of one residual stream, the model carries
hc(hc_mult, real reference value 4) parallel streams per token, and each sub-layer (attention, FFN) is preceded by a learned, per-token gated merge of those streams into one input, followed by a Sinkhorn- normalized mix back into allhcstreams. - kda
- Kimi K3’s KDA (Kimi Delta Attention): a gated delta-rule linear
attention mechanism used on the majority of Kimi K3’s layers
(69 of 93, per
AttentionKind::KimiHybrid), interleaved with Gated MLA (frink_models::mla) on the remainder. - kimi_
decoder - A dedicated decoder for Kimi K3’s real hybrid architecture, separate
from
frink-models::decoder::Decoder(which every GQA-only preset – GLM-5.2, DeepSeek V4 Pro, the test fixtures – uses and whichfrink-cli,frink-server,prefix_cache, andspeculativeall depend on): this module composes the already-independently-testedkda,mla,latent_moe,block_residual, andfrink_core::situ_and_mulpieces into a real forward pass, without touching any of that existing, production-quality GQA code path (a shared, polymorphicDecoderwas judged too risky to attempt without a way to verify it end to end). - kimi_
generate - Ties
kimi_tokenizer::KimiTokenizer,kimi_decoder::kimi_forward_token, andsampling::Samplerinto a real text-in/text-out generation loop for Kimi K3 – the piece that turns “a decoder that can run one forward pass given weights and a token id” into something a CLI or server can actually use for a prompt. Mirrors the shape offrink-server::generate’s loop (encode prompt, decode incrementally, sample each step, stop at max tokens or EOS, decode the output ids) but againstkimi_decoder’s separate per-token state/forward-pass API rather thanfrink_core::cache::KvCache. - kimi_
gguf_ loader - Loads
frink-models::kimi_decoderweights from a real Kimi K3 GGUF checkpoint (as opposed tokimi_loader, which reads the real safetensors checkpoint) – viafrink_gguf::TensorSource, the same traitfrink-models::loader’s GQA-model GGUF path uses. - kimi_
loader - Loads
frink-models::kimi_decoderweights from Kimi K3’s real safetensors checkpoint (viafrink-safetensors::ShardedSafetensors), using the exact real tensor names/shapes/dtypes fetched live fromhuggingface.co/moonshotai/Kimi-K3(a real shard header, not guessed) – confirmed to match this crate’skda/mla/latent_moe/kimi_decoderstruct field names and shapes exactly. - kimi_
tokenizer - Kimi K3’s real tokenizer: tiktoken-style rank-based BPE, loaded from
a real
tiktoken.modelfile (base64-encoded byte sequence + rank per line – the standard OpenAI tiktoken vocab format, confirmed against a real downloaded Kimi K3tiktoken.modeland its realtokenization_kimi.py/tokenizer_config.json), not from GGUF metadata likeGgufBpeTokenizer/GgufSpmTokenizer– Kimi K3 ships as safetensors, with its own real tokenizer format, distinct from both existing tokenizers in this module. - kimi_
validate - Validate a Kimi K3 checkpoint directory without loading all shards.
- kv_
budget - Pre-load KV budget arithmetic: answer “will this fit” before allocating anything, from terms that are all exact in the GGUF header.
- kv_
head_ dims - A V HEAD WIDTH THAT DIFFERS FROM THE K HEAD WIDTH – llama.cpp’s
n_embd_head_k/n_embd_head_vpair, as one resolution the loader makes and one table that says which architecture may declare them apart. - latent_
moe - Kimi K3’s “latent MoE” block (
KimiSparseMoeBlockin the realmodeling_kimi_linear.py), a real architectural detail beyond a standard top-k MoE FFN, discovered by reading the real source rather than assuming the more common DeepSeek-V3-style MoE this crate’sfrink_moe::route_top_kwas originally written for: routed experts operate on a down-projected latent space (routed_expert_hidden_size= 3584, half ofhidden_size= 7168 in Kimi K3’s real config —use_latent_moe/latent_moe_use_normare real, confirmed-active config fields, not a rare/optional path), not the full hidden dimension. Real per-layer flow: - layer_
loops - THE SAME PHYSICAL LAYERS RUN MORE THAN ONCE – Nanbeige’s
num_loops, as one value aModelConfigcarries and one rule for which logical layer runs which weights and where the loop norm sits. - layer_
shapes - Per-layer attention and FFN shapes: llama.cpp’s
n_head(il),n_head_kv(il)andn_ff(il). - lightning
- MiniMax-01’s lightning attention block. MiniMax-01’s lightning attention block.
- loader
- Loads a real
Decoderfrom an on-disk GGUF file, using the llama.cpp-style tensor naming convention (token_embd.weight,blk.N.attn_q.weight,blk.N.ffn_gate.weightor, for MoE,blk.N.ffn_gate_exps.weight,output_norm.weight,output.weight). Until this module existed, frink could only run correctly-shaped random weights. - lora
- Reading a LoRA adapter GGUF: the file format llama.cpp’s
convert_lora_to_gguf.pywrites andsrc/llama-adapter.cppreads. - lora_
attach - Attaching a parsed
LoraAdapterto aDecoder: the walk from each<base name>in the adapter to theWeightMatrix(or matrices) frink holds for it, the shape checks llama.cpp makes against the base tensor (llama-adapter.cpp:346-367), and the refusals for what frink holds differently. - mamba1
- The Mamba-1 block (
build_mamba_layer,mamba-base.cpp:4-148): the selective-scan block of Mamba, FalconMamba and Jamba, at the site attention occupies on a zero-KV layer (crate::layer_shapes::AttnShape::Mamba1) or on every layer of a pure Mamba model. - mamba2
- The Mamba-2 block: the recurrent layer of the Mamba-2 hybrids
(
granite-hybrid,nemotron-h,falcon-h1) and ofmamba2itself, at the site attention occupies on a layer whosehead_count_kvis zero (crate::layer_shapes::AttnShape::Mamba2). - minimax_
engine - MiniMax M2 / M3 refusal, and why the reason it used to give was the wrong one.
- mla
- DeepSeek-style Multi-head Latent Attention (MLA): low-rank Q/KV
compression, with an optional sigmoid output gate (Kimi K3’s real
addition) and an optional RoPE rotation of the decoupled
q_rot/k_rotslices (MlaConfig::rope; GLM-5.2’s real addition – see below). Transcribed directly from real reference code, not guessed or derived by analogy: - mla_
arch - THE MLA ENGINE’S PER-ARCHITECTURE DECISIONS – one table for the
three places
deepseek2,mistral4andplmdiffer in whatmla_gguf_loaderbuilds, so the loader reads a row instead of restating anif arch ==chain at each site. - mla_
gguf_ loader - DeepSeek-2 / Mistral-4 / PLM GGUF →
crate::engine::MlaEngine. - mla_
q_ proj - HOW AN MLA LAYER PROJECTS Q – low-rank through
attn_q_a/attn_q_a_norm/attn_q_b, or DIRECT through oneattn_q. One enum every MLA attention body takes, so no forward pass can reach the query without the file having answered which. - mla_
yarn - YaRN ON THE MLA ENGINE – the frequency rewrite of the
peslices, the magnitude on them, and themscale^2folded into the softmax scale, assrc/models/deepseek2.cpp:312-328,438-448compute them, so that a real DeepSeek-V2 / V3 export (every one declares YaRN) runs at its declared factor instead of being refused. - mmproj
- Detect
mmproj-*.ggufvision towers next to a main GGUF (P7). - moe_
interleave {arch}.interleave_moe_layer_step, and why frink serves only the value real checkpoints carry.- mrope
rope.dimension_sectionsON THE GENERIC PATH – what llama.cpp does with M-RoPE sections on a text tower, per architecture, and what that means for a rotation frink decides per architecture.- mtp_
blocks - NextN / MTP blocks are inside
block_count, and are not layers. - norm
- The normalisation at ONE site in a decoder: before the attention branch, before the FFN branch, or before the LM head.
- norm_
sites - Which tensor each of a decoder layer’s norm sites is stored under, and with which function, per architecture – resolved ONCE.
- normed_
residual - The residual stream a sublayer’s branch joins, where it is not the stream that entered the layer.
- output_
projection - DeepSeek V4’s grouped attention output projection (
wo_a/wo_b,o_group_countgroups): a real, structural replacement for the usual single densewooutput projection, transcribed directly from the real, merged reference implementation (llama.cpp PR #24162,src/models/deepseek4.cpp::graph::build_attention, the tail end afterattn_derope). - parallel_
dense_ ffn - A DENSE FFN SUMMED WITH THE ROUTED EXPERTS – the Grok-2 and Arctic layer shape, served through the shared-expert slot, with the two things that differ between the two graphs as one table.
- parallel_
residual - THE PARALLEL RESIDUAL –
x + attn(norm(x)) + ffn(norm(x)), the layer shape the generic decoder does not have, and which of llama.cpp’s graphs build it. - penalty_
window - The one place that decides which tokens the repetition, presence and frequency penalties look back over.
- plamo2_
ssm - PLaMo-2’s state-space block (
build_plamo2_mamba_layer,plamo2.cpp:218-343): Mamba-1’s dt / B / C path feeding Mamba-2’s per-head scan, in one spelling that neithercrate::mamba1norcrate::mamba2has, at the site attention occupies on a zero-KV layer (crate::layer_shapes::AttnShape::Plamo2Ssm). - pooling
{arch}.pooling_type: how a sequence of hidden states becomes one embedding vector.- position_
embd - LEARNED ABSOLUTE POSITION EMBEDDINGS –
position_embd.weight, one row per trained position, ADDED to the token embedding before layer 0 in place of any rotation. - prefix_
cache - KV-prefix caching: when a new request’s tokens share a leading
subsequence with a previously processed request, skip recomputing
the KV state for that shared prefix entirely, restoring it from a
stored snapshot instead of running
forward_batchover tokens that were already processed. - proj_
bias - PROJECTION BIASES ON THE GENERIC PATH –
attn_output.biasand the dense FFN’sffn_{up,gate,down}.bias, which architectures’ graphs create them, and how the loader fills the two slots that apply them. - qk_
layer_ norm - THE PER-HEAD LAYERNORM ON Q AND K –
attn_q_normof shape{n_embd_head_k, n_head}, a DISTINCT weight per head, applied asLLM_NORM(mean-subtracting LayerNorm, no bias) over each head, and which of llama.cpp’s graphs build it. - rank_
head - The reranker classification head:
cls,cls.output,cls.normand{arch}.classifier.output_labels. - recurrent_
engine - Recurrent engine stub (Mamba / RWKV).
- rerank_
pooler frink splice-pooler: put aBertForSequenceClassificationreranker’s pooler back into the GGUF llama.cpp’s converter dropped it from – issue #82’s missing half.- residency_
report - Dry-run residency planning: what a checkpoint would cost to run,
computed from its GGUF header alone – no weights loaded, no
allocation. This is the “plan before you allocate” half of the
residency workstream; the enforcement half at decode time is the
bounded expert store (
frink_core::expert_store) plus the global device plan (frink_moe::ResidencyPlan). - rope_
finetuned {arch}.rope.scaling.finetunedas a SWITCH, for the one family that reads it that way.- rope_
layers - Which layers rotate. llama.cpp’s per-layer
use_ropegate, as one rule with a table, rather than one branch per architecture. - rope_
ntk_ alpha - The NTK-alpha RoPE base rescale, for the architectures that apply it.
- routed_
weight_ site - WHERE the routing weight multiplies a routed expert: its output, or its input.
- router_
input - WHICH TENSOR THE MoE ROUTER READS – the operand of
ffn_gate_inp, as one value aModelConfigcarries and one table that says which architecture reads what. - safetensors_
f32 - One place that says which safetensors element types widen to
f32and how. - sampler_
order - The ORDER the sampler chain runs in, as llama.cpp’s
--samplersspells it, and the refusal for every sampler frink does not have. - sampling
- Token sampling from a decoder’s output logits: llama.cpp’s whole default sampler chain, on top of the greedy argmax frink previously always used unconditionally.
- scalar_
multipliers - The four scalar multipliers a checkpoint can declare in METADATA, and which architectures apply which of them.
- shortconv
- LFM2’s short convolution: the recurrent block that stands where
attention stands on a layer whose
head_count_kvis zero. - skip_
stream - THE EMBEDDING SKIP STREAM – Talkie’s second residual: the normed embedding, added back into every layer’s output through a learned per-layer scalar.
- speculative
- Speculative decoding: propose several candidate next tokens with
something cheap, then verify them all in a single
Decoder::forward_batchcall instead of oneforward_tokencall per token. - ssm_
block - The state-space block a layer carries, in either generation.
- sub_
norms - THE TWO NORMS INSIDE THE BLOCKS – BitNet’s
attn_sub_normandffn_sub_norm, as one fact aModelConfigcarries, one table that says which architecture has them, and one loader for the pair. - swa_
geometry - The ways a sliding-window layer can differ from a full-attention layer in llama.cpp beyond its mask and its RoPE base: a second ROTARY WIDTH, which frink now honours; a second HEAD WIDTH, which it refuses by name; and YaRN switched off, which it refuses by name.
- swa_
layers - Which layers slide. llama.cpp’s
hparams.is_swa_impl[il], as one value aModelConfigcarries, with the per-layer ARRAY form of{arch}.attention.sliding_window_patternread the way each architecture’s graph reads it. - t5_
engine - T5 encoder-decoder engine stub.
- tensor_
role - Semantic tensor roles mirroring llama.cpp
llm_tensor/LLM_TN. - tokenizer
- A real, reversible byte-level tokenizer: each UTF-8 byte maps to
token id
byte as u32(vocabulary 0..256). This is not a full BPE/tokenizer.json implementation – GLM-5.2, DeepSeek V4 Pro, and Kimi K3 each ship their own trained BPE vocabulary alongside their weights, and none of those vocab files are guessable or available in this environment (see docs/MODELS.md) – but unlike the previous placeholder (byte % vocab_size, which was lossy and could not decode back to the original text), this tokenizer is exact and round-trips perfectly. It is the honest “smallest real thing that works” rather than a fake stand-in. - unread_
tensors - Tensors llama.cpp CREATES for an architecture and then never reads in its graph, so a file carrying them is served with them ignored – exactly as upstream serves it – rather than refused as “a term the graph is missing”.
- vision
- Kimi K3’s MoonViT-V2 vision encoder: patch embedding -> N transformer encoder layers (RMSNorm, self-attention with 2D RoPE, gated-MLP-free plain MLP2 feed-forward) -> a patch-merger projector into the text decoder’s embedding space. Genuinely new territory for frink, which has been text-only until now.
- vl_
engine - Multimodal / VL serve stub (Qwen2-VL / CogVLM / Gemma4-VL / …).
- weight_
scales - PER-TENSOR WEIGHT SCALES – the optional
<tensor>.scaleand<tensor>.input_scalecompanions llama.cpp multiplies a projection’s output by, which frink does not apply and therefore refuses by name. - weightless_
qk_ norm - Llama 4’s
Llama4TextL2Norm: a per-head RMSNorm with NO weight on Q and K, AFTER RoPE, on the layers that rotate. - yarn_
magnitude - YaRN’s magnitude term, and the one key that adjusts it.