Repository navigation
Scope the 1e-4 target to block fixtures and model outputs - #42
Merged
Merged
Conversation
The 1e-4 absolute target against float32 PyTorch now states what it applies to: every block fixture's outputs and a model's final outputs. A model's intermediate outputs are recorded and checked against a float64 run of the same PyTorch model: the mirror must be no farther from it than float32 PyTorch is. Large intermediate values put 1e-4 out of reach of any float32 implementation, PyTorch's included. Every comparison records its scale: the largest value, the float32 step there, the errors against float32 and float64 PyTorch, and argmax flips. Random-weight model references take integer-generated weights, as fixtures already do, with BatchNorm running statistics calibrated from fixed integer-generated inputs by a procedure fixed in advance and run once. Native initialization is not bit-identical across platforms and can let activations grow far beyond a trained model's. Records made with native initialization stay as history.
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.
Base: 7eb3e47. Docs only:
CONTRIBUTING.mdandAGENTS.md.What changes
Why
The full-width SMP DPT target, built with its native random initialization, reaches activations near 190 in its late decoder. There, one float32 step is about 1.5e-5. The offline mirror misses 1e-4 against float32 PyTorch (fusion3 6.03e-4), but float32 PyTorch is itself 6.13e-4 from float64 PyTorch, while the mirror is 1.18e-4 from it (
docs/evidence/dpt-dtype-offline.json).Offline diagnostics (not committed) showed that:
The DPT reference will be moved to the new procedure in a follow-up.
Checks
tests/test_docs.py,tests/test_history_citations.py,tests/test_x08_docs_and_api.py: 25 passed.