transformers
91da3bec - Save a fast tokenizer's own truncation and padding, not its last call's

Commit
21 days ago
Save a fast tokenizer's own truncation and padding, not its last call's A call sets its truncation and padding on the backend tokenizer, which `save_pretrained` wrote to `tokenizer.json`. Reloaded, they became init kwargs, so a processor applied the call's `max_length` to every modality: Qwen2-Audio padded its audio to 8192 samples instead of 30 s. The tokenizer now saves the truncation and padding it was loaded with, or set on its backend directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents
Loading