Skip to content

Qwen3-VL degenerates into repetition loops with transformers 5.17.0 (clean on 5.7.0) #441

Open

Description

@jason718

What happens

With transformers==5.17.0, Qwen/Qwen3-VL-4B-Instruct on the HF provider (greedy decoding) falls into repetition loops on 10-37% of outputs, depending on the benchmark (found on the OCR benchmarks of #412). With transformers==5.7.0, the same pages are clean (2-3% loops, the model's own rate), and the scores match the published numbers (olmOCR-bench 79.3 vs 79.2 published; OmniDocBench v1.5 text edit 0.054 vs 0.055).

The cause is in transformers, not in our pipeline. On the same 4 pages on a local A100, 5.7.0 looped on 0 of 4 and 5.17.0 on 3 of 4, and the 5.17.0 outputs matched Beaker's. Image preprocessing is identical under both versions (grid 128x78, 2562 image tokens), so the regression is in 5.17.0's Qwen3-VL model or generation code.

Versions

  • Last known good: 5.7.0
  • First known bad: 5.17.0. Nothing between the two has been tested for this, so the first bad release may be earlier.

main now pins transformers>=5.8.0,<5.13 (#411; uv.lock has 5.8.1). That range is untested, so it is not yet known whether the default install is affected. Raising the <5.13 cap could bring the problem back.

Workaround

Pin per run: -o 'provider.dependencies=["transformers==5.7.0"]'. The Qwen3-VL validation rows in #412 use this.

Suggested fix

Bisect 5.8.1..5.17.0 on a few looping pages, then cap the hf extra below the first bad release. If the current range turns out to be clean, at least check this before the <5.13 cap is raised.

Activity

  1. AyushBarik commented on Oct 10, 2026

    @AyushBarik

    same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions