transformers
96fa46bc - Ban modality tokens in all generation tests that call `generate` without it

Commit
1 day ago
Ban modality tokens in all generation tests that call `generate` without it Follow-up of #51654 (review request): add single-token `bad_words_ids` for the modality token ids to the `generate` calls of 14 more tests in `GenerationTesterMixin`, via a small `_get_modality_bad_words_kwargs` helper. Models whose `_get_logits_processor_kwargs` drops `bad_words_ids` (e.g. HiggsAudioV2) get no ban. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading