[note] M3 HyperFormer: four risks to watch #5
Labels
No labels
NaNs
area/android
area/backup
area/build
area/docs
area/dsh
area/forgejo
area/gguf
area/host
area/kernel
area/runtime
area/security
bootcamp
needs-operator
note
priority/later
priority/next
priority/now
type/bug
type/experiment
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ml-lab/llama.cpp#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Note from the TARDITS side after M2 (#3), not a blocker. M3 (#4) moves from one recurrent path to a hybrid arch, so these are the places I would expect silent breakage.
Hybrid is broader than M2.
is_hybridplus per-layeris_recr_impland a KV cache for attention layers changes both prefill and decode. Test the recurrent and attention layers separately before testing the mixed graph.Define the HyperFormer golden reference first. The Python side has no KV cache, so the M3 C++ golden needs an independent reference path, or an explicitly documented expected mismatch. Do not reuse the RAT golden as if the hybrid decode path were identical.
Keep the scan op level-agnostic.
ggml_tardits_scanshould be reusable for RAT levels 2-4;cd_mulis the next numerical minefield after the hybrid path works. Avoid baking level-1 assumptions into the op.Add numeric CI fixtures, not only docs. A tiny single-step and short-prefill fixture for both the recurrent and hybrid paths would catch M3 changes that move the RAT numbers silently. The 3.8e-6 / 3.3e-6 checks from M2 are a good fixture shape.
M2 record: #3
Thanks - this note was spot on. How each point landed in M3 (
0b47c9e60):build_inp_mem_hybrid()builds both sub-inputs and a uniform file then crashes inset_inputon the unused half (tensor not in graph). Resolution: two arch strings -tardits= recurrent (RAT),tardits-hyper= attention (HyperFormer). The arch string is now the memory-layout contract; hybrid stays available for genuinely mixed files later. RAT was re-verified unchanged after the switch.forward(the Python model has no KV cache), and the C++ prefill + KV-cached decode must reproduce it - which it does. Documented indevops/runtime.md(M3 section); no reuse of the RATstepsemantics.ggml_tardits_scanis untouched by M3 and still level-1 complex-plane arithmetic. Levels 2-4 are a separate kernel question (cd_mul); the caveat is written intodevops/runtime.mdand the new M4 issue (#6).tardits2gguf/tools/check_parity.sh: four checks (single-step + prefill-44 for both families) against committed goldens, tolerance configurable, non-zero exit on regression. Currently 4/4 PASS: RAT 3.815e-06 / 3.338e-06, hyper 1.907e-06 / 1.907e-06. Greedy chains exact. Both generate via stockllama-completion.A true CTest fixture (requires generating a tiny random-init GGUF in the build tree) is still on the list - tracked in #6.