Commit c3a71fc
pillar1(R2): HF per-layer hidden state dump tool
tools/pillar1/hf_dump.py runs a prompt through Qwen3-0.6B FP32 (HF
reference) and saves every post-layer hidden state + logits to npz.
Structure captured for prompt "Hello" (1 token, dim=1024):
emb — embedding output
h0..h27 — output of each of 28 transformer layers
logits — post-final-norm + lm_head [1, vocab=151936]
tokens — input token IDs
Top-5 logits on "Hello": "Answer" 8.139, "Question" 8.077 (matches
R1 smoke test generation " Answer! I'm a bit confused...").
This is the ground-truth reference. R3 will add a matching dump to
our engine and compute layer-by-layer diff to find the first
divergence.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent de2df31 commit c3a71fc
1 file changed
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments