transformers
9f8c7c94 - Fix Qwen VL positions when a text cache is reused with a new image (#50427)

Commit
21 days ago
Fix Qwen VL positions when a text cache is reused with a new image (#50427) * Fix vision positions when generation reuses a text cache Recompute M-RoPE positions when the uncached prompt contains vision tokens instead of reusing stale text-only rope deltas. Test Plan: - Targeted generation tests: 2 passed; the new regression fails on unchanged main. - Three model directories: 676 passed, 469 skipped, 9 xpassed; eight video-decoder failures reproduce on baseline. - Changed-file Ruff checks passed. - Repository-wide checks remain outstanding. * Preserve cached rope deltas for new vision tokens * Keep the Qwen VL cache fix minimal Go back to only recomputing positions when the uncached tokens contain images or videos. Drops the chunked position handling and the second test.
Author
Parents
Loading