Repository navigation
Read validation shard payloads for variance analysis - #2177
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Signed-off-by: Sylvester Kaczmarek <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The variance-analysis command reads a training shard as raw uint16 values, including its 1024-byte header. This adds 512 metadata-derived token IDs to the sample, displaces validation tokens, and hides out-of-vocabulary values by clipping them. The statistics therefore describe altered input.
Change
Reuse the existing baseline shard reader, then take the same 8192-token prefix. Reject out-of-vocabulary IDs in that prefix instead of rewriting them. Preserve model loading, hooks, variance calculation, command-line arguments, and output structure. No training-script or archived-submission changes.
Validation
git diff --checkpass.python -m pytest tests/test_variance_shard_input.pywith the baseline dependencies and pytest installed.Python 3.12.14, PyTorch 2.14.1, and NumPy 2.5.3 on macOS arm64 CPU. No pretrained weights, external datasets, full training, or GPU evaluation was used. This establishes input fidelity without claiming changes to published results. No dependency changes.
Reproduced against
f5c079314c4877fbb0af378c0abade5a8ca33d3a.Maintenance validation on 6 November 2026
Revalidated synthetic shard payloads, malformed headers, vocabulary bounds and the small forward-hook integration case. No further source changes were needed.
Focused validation at
71dd3580e9eb: 14 CPU tests passed. The combined six-PR checkout passed 121 tests, including the actual PyTorch and MLX CPU implementations. The two baseline scripts remain below 1,500 lines; archived record scripts were not modified.Python 3.12.14, PyTorch 2.15.0 and SentencePiece 0.2.3 on macOS arm64. Tests used synthetic inputs with external sockets disabled. No pretrained checkpoint, external dataset, GPU training, full validation benchmark or leaderboard measurement was used. There are no hosted test runs on these PR heads. Earlier validation counts above are historical.