Skip to content

Commit 59746f0

Browse files
ChenhanYuclaude
andcommitted
fix: match generation tag variants, revert uv.lock
- Match {%- generation -%} and {% generation %} in template verification - Revert uv.lock to main (auto-updated weekly, per reviewer request) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Chenhan Yu <chenhany@nvidia.com>
1 parent 7568408 commit 59746f0

3 files changed

Lines changed: 46 additions & 268 deletions

File tree

modelopt/torch/utils/plugins/transformers_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _verify_generation_tags(self):
191191
can be tested.
192192
"""
193193
template = self.tokenizer.chat_template
194-
if template and ("{% generation %}" in template or "{%generation%}" in template):
194+
if template and ("generation" in template and "endgeneration" in template):
195195
return
196196

197197
raise ValueError(

tests/unit/torch/speculative/plugins/test_hf_dflash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def test_chatml_think_template_produces_assistant_mask(
438438
)
439439

440440
# Verify template was replaced with generation-tagged version
441-
assert "{% generation %}" in collator.tokenizer.chat_template
441+
assert "generation" in collator.tokenizer.chat_template
442442

443443
# Tokenize a sample conversation
444444
messages = [

0 commit comments

Comments
 (0)