fix(invariance_check): feed int tokens, not a float residual batch (SPEC D4)#940
Open
ocg-goodfire wants to merge 1 commit into
Open
fix(invariance_check): feed int tokens, not a float residual batch (SPEC D4)#940ocg-goodfire wants to merge 1 commit into
ocg-goodfire wants to merge 1 commit into
Conversation
…PEC D4) The check predated the S18 amendment that made the model input token ids (Int[B,T] -> embed_tokens indexing); its float32 'resid' batch crashed clean_output with 'Indexer must have integer or boolean type'. Draw random int tokens like the llama8b tests do. Same failure family as the slow-eval hidden_acts crash fixed by #919. Verified: XLA_FLAGS=--xla_force_host_platform_device_count=4 passes (worst rel 1.02e-04 within tol). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
python -m param_decomp.experiments.invariance_check(step 3 of the validation stack, SPEC D4) crashed on cleanfeature/jaxwithTypeError: Indexer must have integer or boolean type, got indexer with type float32— the check still built a float32 residual batch from before the S18 amendment made the model input token ids, soclean_outputhitembed_tokensindexing with floats. Same failure family as the slow-evalhidden_actscrash fixed by #919.Fix: draw random int tokens (
random.randint(..., 0, cfg.vocab_size), matching thetest_llama8b.pybatch builders) and renameresid→tokens.Verification
XLA_FLAGS=--xla_force_host_platform_device_count=4 python -m param_decomp.experiments.invariance_check:make checkclean on the touched file (basedpyright 0 errors, ruff pass).Found while validating PR #939 (not caused by it). Bridge task:
fix-invariance-check-float-tokens.🤖 Generated with Claude Code