fix: transformers v5 compatibility for AUTOMODEL_CAUSALLM VLMs (#3276)
fix: transformers v5 compatibility for AUTOMODEL_CAUSALLM VLMs (#3273) In transformers v5, AutoProcessor.from_pretrained returns a TokenizersBackend directly for pure-tokenizer processors (e.g. Falcon-OCR with AUTOMODEL_CAUSALLM), which has no .tokenizer attribute. Resolve the tokenizer via a helper that falls back to the processor itself so both v4 wrapper processors and v5 TokenizersBackend shapes are supported. Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
G
geoHeil committed
d43122447f9b5b9dcad1f88819b8cb2a59f62b33
Parent: 27d3cf4
Committed by GitHub <noreply@github.com>
on 4/13/2026, 5:28:58 AM