ChrisMcCormick commited on
Commit
4f60492
·
verified ·
1 Parent(s): 96ad938

Model card: correct the recalibration — leaderboard is best-fit only, so the like-for-like gap is +0.019; both checkpoints now measured under both packings

Browse files
Files changed (1) hide show
  1. README.md +45 -36
README.md CHANGED
@@ -49,43 +49,52 @@ DecoderStack tracks 0.2–1.4% behind through step 1000 (where the upstream base
49
  stopped) while running ~6% faster per step (1,212 vs 1,291 ms/step). Full head-to-head in
50
  [`logs/baseline_report.md`](logs/baseline_report.md).
51
 
52
- ⚠️ **but 0.719042 is not comparable to an upstream nanochat val bpb.** Upstream batches with
53
- best-fit cropping — it fills each row with largest-doc-that-fits and crops a document to
54
- finish the row, then attends causally across the whole row with no document isolation
55
- (`cu_seqlens` appears nowhere in upstream `nanochat/gpt.py`). DecoderStack packs varlen and
56
- isolates documents in validation as in training. Different truncation points, different
57
- conditioning context: the two are not scoring the same predictions.
58
-
59
- ### Measured 2026-08-01: the packing gap is larger than the model gap
60
-
61
- Re-measured this checkpoint under **upstream's own row packer**, driven with this repo's
62
- tokenizer over the same pinned val shard and unwound into varlen batches whose `cu_seqlens`
63
- sit on the row boundaries so the model predicts exactly the tokens upstream would ask
64
- for, with exactly the same context.
65
-
66
- | packing | val tokens | bpb |
 
 
 
 
 
 
67
  |---|---|---|
68
- | upstream best-fit rows | 41.9M | **0.737183** |
69
- | upstream best-fit rows | 10.5M | 0.735274 |
70
- | varlen, document-isolated | 41.9M | 0.724316 |
71
- | varlen, document-isolated | 10.5M | 0.720717 |
72
-
73
- (all on the legacy `token_bytes` basis, for continuity with the numbers above; the
74
- regenerated basis reads ~0.05% higher — see [⚠️ Tokenizer](#️-tokenizer))
75
-
76
- Three things follow, and they revise the comparison:
77
-
78
- 1. **Packing alone is worth ~0.0129 bpb** same model, same shard, same budget. That is
79
- *larger* than the gap between this model and its sibling release, so bpb must never be
80
- cross-compared between the two packings.
81
- 2. **`ChrisMcCormick/nanochat-varlen-d24-2026-03-22` is ahead, not behind.** Its 0.724772
82
- was measured under best-fit rows; the like-for-like number here is **0.737183**, so it
83
- leads by ~0.0124 bpb. The raw headline figures (0.719042 vs 0.724772) pointed the other
84
- way purely because of packing. It also trained with FP8 and a different 32k tokenizer,
85
- so this is still not a controlled comparison — but it is now an honest one.
86
- 3. **The 10.5M val budget reads low.** Upstream's default is `--eval-tokens 80*524288` =
87
- 41.9M; this run used 10.5M, which comes in ~0.002–0.004 bpb optimistic rather than
88
- merely noisier.
 
 
 
89
 
90
  Reproduce: `agent-ops/stacks/2026-08-01_1241pm_d24-val-bpb-recalibration/`.
91
 
 
49
  stopped) while running ~6% faster per step (1,212 vs 1,291 ms/step). Full head-to-head in
50
  [`logs/baseline_report.md`](logs/baseline_report.md).
51
 
52
+ ⚠️ **but 0.719042 is not comparable to an upstream nanochat val bpb, and reads better than
53
+ a like-for-like number would.** Upstream batches with best-fit cropping — it fills each row
54
+ with largest-doc-that-fits and crops a document to finish the row, then attends causally
55
+ across the whole row with no document isolation (`cu_seqlens` appears nowhere in upstream
56
+ `nanochat/gpt.py`). DecoderStack packs varlen and isolates documents in validation as in
57
+ training. Different truncation points, different conditioning context: the two are not
58
+ scoring the same predictions. Measured below.
59
+
60
+ ### Measured 2026-08-01: what this checkpoint scores under upstream's packing
61
+
62
+ Varlen packing does not exist in upstream nanochat it is this fork's own work, and
63
+ **every nanochat leaderboard entry is measured with karpathy's best-fit row packer**. So a
64
+ varlen val bpb cannot be read against the leaderboard at all. To get a comparable number,
65
+ both checkpoints below were re-scored under upstream's row packer, driven with each
66
+ model's own tokenizer over the same pinned val shard and unwound into varlen batches whose
67
+ `cu_seqlens` sit on the row boundaries — the model predicts exactly the tokens upstream
68
+ would ask for, with exactly the same context.
69
+
70
+ Both models, both packings, same code, same shard, 41.9M val tokens:
71
+
72
+ | model (step 5568) | best-fit rows | varlen |
73
  |---|---|---|
74
+ | **this checkpoint** (`d24_decoderstack`) | **0.737183** | 0.724316 |
75
+ | `nanochat-varlen-d24-2026-03-22` | 0.737535 | 0.725014 |
76
+
77
+ At the 10.5M budget this run originally used: 0.735274 (best-fit) / 0.720717 (varlen).
78
+ All on the legacy `token_bytes` basis, matching how the leaderboard numbers were computed;
79
+ the regenerated basis reads ~0.05% higher see [⚠️ Tokenizer](#️-tokenizer).
80
+
81
+ What this says:
82
+
83
+ 1. **Against the leaderboard, the honest gap is ~0.019, not ~0.006.** The nanochat record
84
+ is 0.71808 (Run 5) / 0.71854 (Run 4), both best-fit. Like-for-like this checkpoint is
85
+ **0.737183**, i.e. **+0.0191** matching upstream's tokens moves *away* from the
86
+ record, not toward it. The 0.719042 headline above invited the opposite impression.
87
+ 2. **The packing penalty is universal, not model-specific**: +0.0129 here, +0.0125 for the
88
+ sibling release. Best-fit truncation costs ~0.0127 bpb whoever runs it.
89
+ 3. **The two checkpoints are near-identical**, this one marginally ahead under both
90
+ packings (−0.00035 best-fit, −0.00070 varlen). Not a controlled comparison — the
91
+ sibling used FP8 and a different 32k tokenizer — but the two pipelines land in the same
92
+ place.
93
+ 4. **The 10.5M val budget reads optimistic**, not merely noisier: ~0.002–0.004 bpb below
94
+ the 41.9M number. Upstream's default is `--eval-tokens 80*524288` = 41.9M.
95
+
96
+ Harness check: the sibling run self-reported 0.724772 and is measured here at 0.725014
97
+ varlen — 0.03% agreement, using the same loader that run used.
98
 
99
  Reproduce: `agent-ops/stacks/2026-08-01_1241pm_d24-val-bpb-recalibration/`.
100