Repository navigation
[serge] Fix 4 integration tests regressed by commit ce5c8f5e4352 (PR #47988) - #48535
sergereview[bot] wants to merge 2 commits into
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…the rebuild Skipping `update_post_processor()` whenever `tokenizer.json` ships a post-processor makes the call added by #47988 dead code -- the base class already updates the post-processor in exactly those cases (`_should_update_post_processor`, `tokenization_utils_tokenizers.py`) -- so it reintroduces the OLMo bug. Verified on `allenai/OLMo-7B-hf`: with that patch every input gets `<|endoftext|>` appended again. The actual root cause is that `_from_pretrained` drops `add_bos_token`/`add_eos_token` from the init kwargs when a `tokenizer.json` is present, so #47988 rebuilds the post-processor from flags that have just been erased. The result is "no bos, no eos" for every GPTNeoX checkpoint: correct for OLMo (which saves `false`/`false`), wrong for any checkpoint whose post-processor adds special tokens -- `blab-jhu/test-32m-dec` went from `[CLS] Paris is the capital of` to `Paris is the capital of`. Keep the flags for the tokenizers whose class opts in, and let the base class rebuild the post-processor from them. This restores the pre-#42563 behaviour on both checkpoints (verified locally): - `allenai/OLMo-7B-hf` (`add_bos_token=false`, `add_eos_token=false`): no EOS appended. - `blab-jhu/test-32m-dec` (`add_bos_token=true`): `[CLS] Paris is the capital of`, i.e. 6 tokens. The trailing `[SEP]` its `tokenizer.json` adds is the same pathology as OLMo's EOS on a causal LM, and 6 was the expected value from #38967 until #43764 bumped it to 7 as collateral of the tokenizer refactor. The expected logit slices are unchanged, as only the trailing token disappears. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
I pushed a different fix — the bot's patch silently reverted #47988. Guarding i.e. the OLMo garbage-generation bug is back. Root cause. Patch. Keep the saved flags for tokenizer classes that opt in (
One decision for you: this makes the checkpoint's config win, so |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: gpt_neox, modernbert_decoder |
|
run-slow: gpt_neox, modernbert_decoder |
|
This comment contains models: ["models/gpt_neox", "models/modernbert_decoder"] |
CI recapDashboard: View test results in Grafana |
✅ Post-hoc GPU verification:
|
baseline f62dc9bf |
this PR 9c66f2db |
|
|---|---|---|
ModernBertDecoderIntegrationTest::test_inference_causal_lm |
failed | green |
new failures in tests/models/modernbert_decoder |
— | 0 |
Red before, green after, held across 5 runs per tree, and the rest of the model's slow suite is unaffected. This is the evidence the PR body should have carried when it was opened.
The patch also classifies as a real code change, not an expectation rewrite (reviewbot/expectation_guard.py) — so the green run is evidence rather than something the patch arranged for itself.
|
hey! In v5 we either load When we have a wrongly mapped tokenizer, we add it to |
Original CI failure
4 integration tests regressed by commit ce5c8f5e4352 (PR #47988)tests/models/modernbert_decoder/test_modeling_modernbert_decoder.py::ModernBertDecoderIntegrationTest::test_inference_causal_lm[multi-gpu] (other, seen 6/7)CI traceback —
tests/models/modernbert_decoder/test_modeling_modernbert_decoder.py::ModernBertDecoderIntegrationTest::test_inference_causal_lmWhere to watch it:
The ModernBertDecoder integration tests fail because tokenizing the prompt now returns 5 tokens instead of the expected 7. The regression traces to PR #47988, which added an unconditional
self.update_post_processor()call inGPTNeoXTokenizer.__init__. When the tokenizer is loaded viafrom_pretrained, that call overrides the post-processor baked intotokenizer.jsonwith one that defaultsadd_bos_token/add_eos_tokentoFalse, dropping the special tokens the tests rely on.The fix keeps the PR #47988 behavior for the case it was meant to fix (backend rebuilt from scratch, or explicit
add_bos_token/add_eos_tokenkwargs), but skips the override when a post-processor was already loaded fromtokenizer.json.Relates to #48533
This change was produced automatically by serge from a CI failure report. The patch was generated by an LLM and applied by serge; review before merging.
serge
v0.1.0· model:moonshotai/Kimi-K2.7-Code· 48 LLM turns · 50 tool calls · 84.4s · 1263272 in / 16404 out tokens