Repository navigation
test(fixtures): ship a usable tokenizer in the DiffusionGemma tied-decoder reload fixture (#6386) - #6433
Merged
Conversation
…coder reload fixture #6386 rejects a checkpoint without a usable tokenizer, and `test_quantized_checkpoint_reloads_with_tied_decoder` saves its tiny DiffusionGemma source with `save_pretrained` only, so `GPTQModel.load` fails at fixture setup ("Tokenizer files are missing") before the #5514/#5716 reload path is reached. Write `tests/tiny_tokenizer.py::write_tiny_tokenizer` next to the model, as #6407 did. `vocab_size=60` keeps every tokenizer id below the config's image/boi/eoi ids (60-62); the calibration rows and forward inputs are pre-tokenized ids 1-56, so the test still feeds exactly the same data. The remaining files from the same sweep are covered by the open draft #6420 (#6404); this is the one rejected fixture it does not touch. No product code changes; the #6386 check is exercised as-is. Co-Authored-By: Claude Opus 5.5 <[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.
Summary
#6386 makes
GPTQModel.loadreject a checkpoint that has no usable tokenizer.tests/models/test_diffusion_gemma.py::test_quantized_checkpoint_reloads_with_tied_decodersaves its tiny DiffusionGemma source withsave_pretrainedand no tokenizer, so on currentmain(a4471c53b) it fails during fixture setup, before the #5514/#5716 tied-decoder reload path runs:The other rejected fixtures from the same sweep (5831, 4869, 5026, 4747, 4741, 5209/4204, fp8, 5218, the AWQ VL rotary test) are already covered by the open draft #6420 (#6404). This PR fixes the one rejected fixture that #6420 does not touch, so the two PRs don't overlap.
What Changed
tests/models/test_diffusion_gemma.py: writetests/tiny_tokenizer.py::write_tiny_tokenizer(source, vocab_size=60)next to the model, the same approach test(fixtures): ship usable tokenizers in #6386-rejected fixtures #6407 used. With 60 tokens, every tokenizer id stays below the config'simage_token_id/boi_token_id/eoi_token_id(60-62). The calibration rows (ids 1-56) and forward inputs are already pre-tokenized, so the test feeds exactly the same data as before.require_load_tokenizeris not touched. No API or behavior change.Tests
bash format/check.sh:All checks passed!(ruff 0.14.2).Not run:
TestDiffusionGemma::test_diffusion_gemma(same file) quantizes the full 26B checkpoint. This change doesn't touch it.Measured Impact
Not applicable: test-fixture-only change.
Model Support / Module Plan
Model test node IDs and results: not applicable. No model, alias, definition or module plan changes.
AWQ onboarding safety
Not applicable: AWQ is not touched.
Logic Flow Documentation
Not applicable: no control flow or decision mechanism changes. Only a test fixture gains a tokenizer file.
Review Requirements
tests/tiny_tokenizer.pyas test(fixtures): ship usable tokenizers in #6386-rejected fixtures #6407 did).Kernel Accuracy Requirements
Not applicable: no kernel changes.
Notes
Cross-check of #6420 at head
442c6a07a(read-only, CPU plus one GPU for CUDA-gated nodes). On the full list of rejected nodes it gives47 passed, 1 skipped(free-threaded-onlytest_model_load_lock_4204node). The one failure left is this DiffusionGemma node. With #6420's fixtures, scratch mutations of the library under test still turn the capture-reuse tests red:_reusable_initial_capturereturningNone: 5831test_initial_capture_runs_once_per_batch[*]andtest_reused_capture_matches_double_capture[*]fail with12 == 6.copy.deepcopy:test_reused_capture_matches_double_capture[*](packedqweightdiffers) andtest_reused_cache_is_a_private_copyfail._model_initial_capture_is_genericgate:test_model_capture_override_disables_reusefails with6 == 12.sort="shuffle": all three 4869 nodes fail (order mismatch, layer-0dXXT334.26, andRuntimeError: The size of tensor a (144) must match ... (88)).test_transformers_unpatched.py::test_gptqmodel_leaves_third_party_libraries_unpatched,module_tree/test_inkling2_loop_plan.py::test_inkling2_loop_public_loader_uses_local_code_and_checkpoint_keysandtest_hf_bridge_cpu_offload_5022.py(27 nodes, CUDA) already pass onmain.🤖 Generated with Claude Code