transformers
914d8c5f - Block image_start/end_token_id in generation test sampling (#45914)

Commit
198 days ago
Block image_start/end_token_id in generation test sampling (#45914) Add image_start_token_id and image_end_token_id to the VLM special-token exclusion list in GenerationTesterMixin._get_logits_processor_kwargs, so sample-generation tests don't accidentally sample tokens that VLM forwards interpret as image boundaries. Fixes a low-probability flake in tests/models/glm_image/test_modeling_glm_image.py::GlmImageModelTest::test_sample_generate_dict_output. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
Parents
Loading