Files
colibri/c
Dennis Paul 4a0435cbb3 glm.c: remove the LMHEAD_EXACT probe accidentally merged with #152 — functional no-op strip (#197)
#152 carried leftover debug scaffolding from the lm_head measurement posted on that
PR: a `g_lmhead_exact` global, an undocumented `LMHEAD_EXACT` getenv, and 7 lm_head
call sites routed through matmul_qt_ex(..., !g_lmhead_exact). None of it was in the
PR description; it rode in because `git checkout -B` carries uncommitted working-tree
edits forward.

It should not stay:
  - it does nothing worth having. Pinning lm_head off IDOT measures -0.03% perplexity
    across 5 corpora (in-distribution, isolated) — nothing.
  - LMHEAD_EXACT=1 would silently change lm_head numerics, undocumented and untested.
  - lm_head is fmt=1 (int8), so the IDOT gate applies to it unconditionally on every
    platform anyway; there is no threshold story here to expose.

The flag defaulted to 0 and `!g_lmhead_exact == 1 == matmul_qt`'s own allow_idot, so
this removal is a pure no-op. Verified rather than assumed — summed log-lik over 1023
tokens, in-distribution, CPU (deterministic), dev-with-probe vs dev-minus-probe:

  prose     -2295.245383  ==  -2295.245383
  markdown  -3272.146403  ==  -3272.146403

Bit-identical. make check green (6 C suites + 60 python tests), no new warnings.

The actual #152 changes are untouched: the three attention input projections and the
DSA indexer's ix_wk stay batched and pinned to the exact int4 kernel via
matmul_qt_ex(..., 0).
2026-07-14 18:01:04 +02:00
..