Running Gemma-2B in ~3MB of Pure C on Bare Metal Catches a Layer-15 Hallucination Flip

tom_tsai28 · reddit · 2026-10-06

A weekend experiment running Gemma-2B on bare-metal x86-64 in pure C + AVX2—zero Python/CUDA, a single 3.3MB binary. The author added a simple orthogonal probe on the residual stream to see what each layer does.

Test question: Taiwan's statutory VAT rate (legally 5%). Layers 0–14 stay factual, but at Layer 15 the truth signal collapses into the negative (+0.0163 → -0.0481), and by Layer 17 register RAX emits the tokens “15%”—capturing the exact moment a hallucination flips on at a specific layer.

Released artifacts: a web-based layer-by-layer trace, a 6-page technical whitepaper PDF, and the release binary plus GitHub repo (PULSAR-ASM) for low-level ML enthusiasts.

Original post →

More from Infra

Infra channel →