Model + Kernel Matrix
A visual map of what the C Kernel Engine supports: IR templates, kernel families, quant contracts, and pipeline coverage (inference-only vs. inference + v7 training). Grounded in the actual templates, IR lowering passes, and GGUF test corpus run locally.
One Pipeline, Every Model
Every supported family enters through the same deterministic compile path. The artifact (GGUF) carries the numbers, the template carries the structure, and lowering turns both into a concrete C runtime with a fixed memory plan. Vision families add a second lane that produces an encoder prefix and bridges it into the decoder. Audio families arrive as safetensors → BUMP and run an encoder–decoder pair: the audio encoder's output becomes cross-attention memory that the decoder reads on every generated token.
Certification Summary
Evidence is not one bucket. Each family below is labeled with the strongest evidence class it has actually earned — an eight-token replay agreement and a 4,096-token bit-exact trajectory are different claims, and the dots on the cards use the same classes.
None of these labels alone means production certification. CKE requires complete executed-graph and deterministic decode evidence for full-model numerical certification, then separately gates advertised context/media capacity, quality, ISA coverage, memory safety, repeatability, and performance. See the v8 certification contract, the model-family provider ownership rule, and X-Ray workflow.
| Model | Runtime status | Strongest evidence | Max tested context | Oracle | Remaining gap |
|---|---|---|---|---|---|
| Qwen2 0.5B | Coherent E2E | nightly regression smoke | 1,024 | v8 nightly regression | long-context and perf sweeps |
| Qwen3 0.6B | Coherent E2E | nightly regression smoke | 1,024 | v8 nightly regression | long-context and perf sweeps |
| Qwen3.5 0.8B | Coherent E2E | nightly regression smoke (hybrid DeltaNet) | 1,034 | v8 nightly regression | long-generation parity monitored |
| Qwen3.6 27B | Numerical sampled | kernel-exact head-parallel DeltaNet prefill + Q4_K×Q8_K VNNI x16 providers | — | kernel parity gates | 1K logit parity open; batched prefill opt-in |
| Qwen3.8 27B | Trajectory exact Planner-only | 4,096-token trajectory bit-exact (4,000/4,000 vocab rows); 262K memory planner certified | 4,096 runtime / 262,144 planner | llama.cpp | 128K/262K runtime claims deferred; ~1.49× slower than llama.cpp at 8K |
| Qwen3-VL 8B | Numerical sampled | BF16 and llama.cpp corpus certification lanes; promoted vision baseline | 1,024 smoke | PyTorch + llama.cpp corpus | semantic vision parity ongoing |
| Gemma3 270M | Coherent E2E | nightly regression Q5_K_M | 1,024 | v8 nightly regression | — |
| Gemma4 E4B | Numerical sampled | Q4_K_M coherent smoke + BF16 safetensors PyTorch parity lane | 2,048 | PyTorch | semantic vision parity active |
| GLM4 9B | Coherent E2E | GGUF Q4_K_M coherent generation; safetensors comparator lane | 1,024 | PyTorch comparator | long-trajectory sweeps |
| Nemotron Nano 9B v2 | Coherent E2E | Q4_K_M coherent smoke; Mamba2 state-shape contracts | 1,024 | PyTorch parity lane | long-trajectory sweeps |
| Kimi-VL A3B (text) | Numerical sampled | first-token + top-20 ranking match, cosine 0.997696; bit-identical repeat runs | 2,048 | PyTorch | MoonViT vision bridge; internal BF16 drift near layer 7 |
| Cohere2 Command R7B | Numerical sampled | tokenizer-free replay matches llama.cpp for the first 8 greedy positions | 2,048 | llama.cpp | long-trajectory parity; performance sweeps |
| Cohere North Mini Code 30B-A3B | Coherent E2E | two repeatable 131,072-token CKE capacity runs with identical first-logit and output-token hashes | 131,072 | CKE repeatability | matched full-model oracle parity; practical long-code quality |
| Cohere North Micro Vision 2.4B | Coherent E2E | real-image encoder/bridge/decoder run; official PyTorch layer X-Ray remains follow-up work | real-image smoke | PyTorch required | complete encoder/bridge/decoder parity; 40-image OCR quality |
| Cohere Transcribe 2B | Contract-only | 2,104-tensor inventory plus 52 independent oracle checkpoints; CKE conversion fails closed | — | CrispASR | assemble and certify CKE encoder, cross-attention, decoder, and tokenizer |
| Cohere Command A+ 218B/25B-active | Coherent E2E Numerical sampled | 675/675 required weights mapped; native packed NVFP4 leaf parity; coherent short text | 126 prompt + 32 decode | compressed-tensors formula + pinned leaf oracle | full-model/long-context parity, vision, quality, and matched performance |
| Command A Vision / Aya Vision / Translate | Not implemented | official artifacts identified; no CKE real-weight trajectory claim | — | PyTorch required | circuit/provider gap audit and complete bring-up |
| Laguna-XS 2.1 | Coherent E2E | bit-exact embedding + layer-0 RMSNorm; router replay within one ULP | 2,048 | llama.cpp (diagnostic) | long-trajectory parity not claimed (near-tied MoE route flips) |
| Instella-MoE 16B-A3B | Numerical sampled | full-logit cosine 0.99998 + top-1 match at a 32-token checkpoint | 32-token checkpoint | PyTorch | quantized GGUF and long trajectories uncertified |
| Llama / Nanbeige 3B | Coherent E2E | nightly regression smoke | 1,024 | v8 nightly regression | — |
| Whisper Tiny/Base/Small | Trajectory exact | JFK fixtures match Hugging Face token for token (all three sizes) | JFK sample; 33 s Base long-form | Hugging Face | broader corpus certification; hour-scale recordings |
| GPT-2 | Coherent E2E | GGUF baseline | — | v8 nightly regression | legacy lane |
QKV bias from weights · BPE tokenizer
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://Qwen/Qwen2-0.5B-Instruct-GGUF/qwen2-0_5b-instruct-q4_k_m.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=auto \
--generate-visualizer
No QKV bias · BPE tokenizer · learned QK‑Norm
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://Qwen/Qwen3-0.6B-GGUF/Qwen3-0.6B-Q8_0.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=auto \
--generate-visualizer
QK‑Norm (full‑attn only) · SwiGLU · Gated DeltaNet · BPE tokenizer
Block pattern: 3×recurrent → 1×full_attention
<think> / </think> markers on the built-in C tokenizer path and moved visible vs. suppressed thinking into the exported chat contract, instead of relying on Python-tokenizer fallback.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://unsloth/Qwen3.5-0.8B-GGUF/Qwen3.5-0.8B-Q4_K_M.gguf \
--context-len 1034 --force-compile --force-convert --chat-template=qwen35 \
--generate-visualizer
Q4_K_M quantized inference · optimized batched prefill (opt-in)
11.20 tok/s prompt rate (about 2.6x the previous CKE batched baseline) on an ICX AVX-512/VNNI host. 1K-context logit parity is not certified yet, so the lane stays behind CK_V8_FORCE_BATCHED_PREFILL=1. Operator steps: v8 runbook; performance context and remaining targets: prefill performance roadmap.
Text M-RoPE split · QK‑Norm (full‑attn only) · SwiGLU · tied LM head · BPE / ChatML
general.architecture=qwen35; the converter selects qwen38 via artifact metadata (basename / size label). Circuit carries validated contract selectors for q5_k, q6_k, q8_0 and BF16 recurrent dtypes. Evidence: PRs #387, #388, #390. Inspect the generated 128K engineering artifacts.
Commands & runnable lanes
.venv/bin/python -m unittest tests.test_v8_qwen38_contract
QWEN38_MODEL_DIR=/path/to/qwen38-27b QWEN38_GGUF=/path/to/qwen38.gguf \
make certify-qwen38-svg-parity
Post-norms · embed scale √dim · SentencePiece
rope_layout metadata and select the matching rope_qk kernel automatically.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://unsloth/gemma-3-270m-it-GGUF/gemma-3-270m-it-Q5_K_M.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=auto \
--generate-visualizer
GGUF decoder + mmproj runtime · thinking-mode control
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://Qwen/Qwen3-VL-8B-Instruct-GGUF/Qwen3VL-8B-Instruct-Q4_K_M.gguf \
--mmproj hf://Qwen/Qwen3-VL-8B-Instruct-GGUF/mmproj-Qwen3VL-8B-Instruct-Q8_0.gguf \
--image-path version/v8/test_assets/v8_vision_doc_card_72.png \
--prompt 'Explain this image.' \
--context-len 1024 --force-compile --force-convert \
--thinking-mode suppressed
LayerNorm · learned absolute position · GELU (erf) · dense bidirectional encoder
Commands & runnable lanes
version/v8/scripts/cks-v8-run audio hf://openai/whisper-base \
--wav /path/to/audio.wav --language en --task transcribe
BPE tokenizer · attention bias · GGUF + safetensors conversion lane
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://unsloth/GLM-4-9B-0414-GGUF/GLM-4-9B-0414-Q4_K_M.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=glm4 \
--prompt 'Give me a detailed example of C, Python and SQL code.' \
--max-tokens 256 --temperature 0.0 --generate-visualizer
Parallel attention+MLP residual · 3:1 sliding:full attention
Pairwise RoPE on sliding layers only · logit_scale footer · tied embeddings · BPE
logit_scale via a final_logit_scale_f32 footer op, and RoPE applies only to sliding layers per the exported contract. Contract test: tests.test_v8_cohere2_contract. Provider-level story: Cohere Kernel Story.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
/path/to/command-r7b-q4_k_m.gguf \
--context-len 2048 --force-compile --force-convert --chat-template=auto \
--max-tokens 64 --temperature 0.0
YaRN on global layers / full-rotary on sliding · sigmoid router + correction bias
Top‑8 routed + shared SwiGLU experts · RMSNorm · untied output.weight · BPE
beta_fast=64 (defaults 32). Softplus gate formula is observed, not yet oracle-validated. Contract test: tests.test_v8_laguna_contract. Expert kernels: MoE Expert Kernels.
Commands & runnable lanes
.venv/bin/python version/v8/scripts/ck_run_v8.py run \
/path/to/Laguna-XS-2.1-Q4_K_M.gguf \
--run /srv/cke/profiles/laguna-xs-2.1 \
--context-len 2048 --force-convert --force-compile \
--prompt 'Write a complete C program that prints the first ten Fibonacci numbers.' \
--chat-template auto --thinking-mode suppressed --max-tokens 512 --temperature 0.0
Sigmoid group-limited top-k router + shared experts (64 experts/layer)
FarSkip two-stream residuals · BPE
tests.test_v8_instella_moe_bringup (runs in the nightly demo-readiness profile).
Commands & runnable lanes
.venv/bin/python -m unittest tests.test_v8_instella_moe_bringup
# nightly: registered as v8_instella_moe_circuit_contracts
SwiGLU dense + sigmoid group-limited top-k routed/shared experts · tiktoken · untied LM head
mla_kv_cache_store and switches mla_attention to deepseek_mla_attention_decode_f32; prefill uses mla_kv_cache_batch_store. Internal BF16 drift becomes material near layer 7 — do not claim bit-exact internal parity.
Commands & runnable lanes
.venv/bin/python -m py_compile version/v8/scripts/build_ir_v8.py
make build/libckernel_engine.so
.venv/bin/python unittest/test_deepseek_reference_kernels.py
.venv/bin/python -m unittest tests.test_v8_kimi_template
Commands & runnable lanes
V8_KIMI_MODEL=/path/to/Kimi-VL-A3B-Instruct make test-v8-kimi-highmem
# requires ≥ 40 GiB RAM host; context 2048, 64 tokens
Hybrid full/sliding attention · per-layer theta · SentencePiece
rope_forward_qk_split_direct_f32 from IR data rather than hard-coding a Gemma-only kernel.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://unsloth/gemma-4-E4B-it-GGUF/gemma-4-E4B-it-Q4_K_M.gguf \
--context-len 2048 --force-compile --force-convert --chat-template=gemma4 \
--prompt 'Give me a detailed example of C code.' \
--max-tokens 256 --temperature 0.0 --generate-visualizer
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://unsloth/gemma-4-E4B-it-GGUF/gemma-4-E4B-it-Q4_K_M.gguf \
--mmproj hf://unsloth/gemma-4-E4B-it-GGUF/mmproj-F16.gguf \
--image-path version/v8/test_assets/v8_vision_doc_card_72.ppm \
--prompt 'Explain this image in one short paragraph.' \
--context-len 1024 --chat-template=gemma4 \
--max-tokens 8 --temperature 0.0
ReLU2 MLP · Q5_0/Q4_K/Q8_0 GGUF · BPE tokenizer
[heads, head_dim, state_dim], not a square DeltaNet-style recurrent matrix. The template/lowering path now carries that contract explicitly, stores no-RoPE attention KV after v_proj, and generated BPE runtimes can encode raw prompts end-to-end by default.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://bartowski/nvidia_NVIDIA-Nemotron-Nano-9B-v2-GGUF/nvidia_NVIDIA-Nemotron-Nano-9B-v2-Q4_K_M.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=auto \
--prompt 'Give me a detailed example of C, Python and SQL code.' \
--max-tokens 256 --temperature 0.0 --generate-visualizer
Untied LM head supported · SentencePiece · ChatML markers via GGUF
output.weight, and treats Nanbeige long coherent think traces as model behavior instead of a kernel/parity failure.
Commands & runnable lanes
version/v8/scripts/cks-v8-run run \
hf://mradermacher/Nanbeige4.1-3B-GGUF/Nanbeige4.1-3B.Q4_K_M.gguf \
--context-len 1024 --force-compile --force-convert --chat-template=auto \
--generate-visualizer
QKV bias · tied embeddings · BPE tokenizer
projector prep → Gemma4 decoder bridge · deterministic patch frontend
position_embeddings_add_gemma4v_xy and spatial_average_pool_contiguous for the Gemma4 merge path instead of Qwen3-VL's 2×2 spatial merge.
learned position embeddings · GELU MLP · reusable encoder contract
Kernel Families by Model
Whisper Tiny, Base, and Small share this encoder–decoder row: the encoder runs full self-attention over 1500 audio frames, the decoder adds the cross-attention lane (K/V from encoder memory, computed once) on top of causal self-attention. Position is a learned absolute table on both sides — no RoPE anywhere. Kernel-level detail: Concepts — Audio Frontend & Cross-Attention and Whisper Audio End-to-End.
IR + Quant Contracts
Supported Quant + DType Coverage
Weight-only quantized GEMM/GEMV kernels with BF16/FP32 activations and Q8_* activation contracts. Quantized kernels (Q4_K, Q5_K, Q6_K, Q8_0) are verified against both PyTorch and llama.cpp reference output — both references must agree before a kernel is considered validated.
src/kernels/deltanet_kernels.c for FP32 Gated DeltaNet parityHybrid Architecture Support
Full
qwen35.json template with hybrid block pattern: 3×recurrent → 1×full_attention.
Recurrent blocks: x → [q,k,v,z] + [beta,alpha] → conv(q/k/v) → DeltaNet state update S_t → RMSNorm(h) * SiLU(z) → outproj.
Full-attention blocks: q_gate_proj → split_q_gate → k/v_proj → qk_norm → rope → gated_attention → sigmoid_mul → outproj.
Dedicated kernel parity in src/kernels/deltanet_kernels.c (forward + backward).
Compatible with Qwen3.5-0.8B dense variant.
Treat it as a composed graph: causal attention + sigmoid gate multiply + output projection. Keep it stitched in CK unless profiling proves a fused epilogue is worth the extra maintenance.
Interpretation: DeltaNet earns a dedicated kernel because it mutates recurrent state; gated attention usually does not, because the gate is just an elementwise epilogue on top of otherwise standard attention.
Kernel Delta: What the New Families Required
Each newly supported family forced the kernel registry to grow. This map shows the kernel families added or hardened per architecture — every entry is a named provider in version/v8/kernel_maps with a source file you can read.
Counts and provider status live in version/v8/kernel_maps/KERNEL_REGISTRY.json (308 provider maps); the audit baseline is version/v8/contracts/kernel_interface_migration_baseline.json.
For the math behind each kernel family see v8 Kernel Architecture; for what each new model variant changed see Architecture Variants.
Provider-level deep dives: MoE Expert Kernels covers the Laguna
mixed-quant routed/shared experts and the Qwen3.5-MoE bucketed prefill; Cohere
Kernel Story covers the Cohere2 reuse bindings and the final_logit_scale_f32 footer.
Why Build C Kernel Engine?
This stack forces us to understand the invariants that actually matter: memory layout, kernel contracts, numerical stability, and graph scheduling. It turns the model into something we can inspect — dump activations, trace tensor ranges, validate gradients later — without guessing what’s happening inside a framework. That clarity is the foundation for training on CPU.
Current GGUF Test Corpus
Audio lane: openai/whisper-tiny and openai/whisper-base safetensors → BUMP as generated encoder + decoder runtime pairs,
validated through opt-in transcript and PyTorch parity gates rather than the GGUF corpus above.
Bring-up note: if a Llama-family/Nanbeige first reply starts with <think> or echoes
<|im_start|>assistant, the runtime is using the wrong chat wrapper or stop policy.
Preserve GGUF-exported ChatML markers and keep output.weight untied. For Gemma, if first-token parity collapses after a clean qk_norm stage, check the exported rope_layout before suspecting tokenizer or stop-token bugs.
Recent Bring-up Fixes
rope_layout and choose the matching RoPE kernel automatically.
<think> markers are preserved as special tokens, and visible vs. suppressed thinking is now a generic chat-contract mode instead of ad hoc runtime logic.
output.weight preserved. Nanbeige remains an active inference lane; long coherent think traces are treated as model style, not as evidence of kernel breakage.
ck_run_v8.py raw prompts work end-to-end; token-id-only fallback remains available with CK_DISABLE_FULL_BPE_TOKENIZER=1.
Validation Commands (v7 inference matrix)
These commands are the current inference readiness gates for Qwen2, Qwen3, Qwen3.5, Gemma3, and the active Nanbeige bring-up lane.
python3 version/v7/scripts/validate_model_matrix_v7.py
python3 version/v7/scripts/validate_parity_matrix_v7.py
python3 version/v7/scripts/validate_long_decode_stability_v7.py
# Nanbeige-specific stitched call-IR regression
python3 version/v7/scripts/test_kv_cache_batch_copy_call_ir_v7.py \
--run-dir ~/.cache/ck-engine-v7/models/mradermacher--Nanbeige4.1-3B-GGUF
Matrix validators honor cached GGUFs by default; add --allow-download when you want them to fetch missing models.