vllm - ✅(Solved) Fix [Transformers v5] NemotronParseForConditionalGeneration [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#38740Fetched 2026-04-08 02:22:58
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Author
Assignees
Timeline (top)
commented ×2cross-referenced ×2labeled ×2assigned ×1

Error Message

$ pytest tests/models/multimodal/generation/test_nemotron_parse.py::test_models[5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-v1.1] ... ValueError: not enough values to unpack (expected 2, got 1)

Fix Action

Fixed

PR fix notes

PR #38748: [Transformers v5] Fix NemotronParse image_size tuple unpack

Description (problem / solution / changelog)

Fixes #38740 (part of #38379)

Transformers v5 changed image_size to scalar int for this model config. vllm was unpacking it as a (height, width) tuple in 3 places which caused ValueError on init.

Fixed by normalizing image_size to a 2-tuple wherever its used, same approach as interns1_vit.py already does.

Test:

pytest tests/models/multimodal/generation/test_nemotron_parse.py::test_models[5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-v1.1]

Changed files

  • vllm/model_executor/models/nemotron_parse.py (modified, +17/-3)

Code Example

$ pytest tests/models/multimodal/generation/test_nemotron_parse.py::test_models[5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-v1.1]
...
ValueError: not enough values to unpack (expected 2, got 1)

---

# Or your fork
git clone https://github.com/huggingface/transformers.git
git clone https://github.com/vllm-project/vllm.git

cd vllm
VLLM_USE_PRECOMPILED=1 uv pip install -e .
uv pip install -e ../transformers
RAW_BUFFERClick to expand / collapse

This is a sub-issue forming part of the work in https://github.com/vllm-project/vllm/issues/38379, please read the description of this issue before beginning to work on this one.

Which test is failing?

$ pytest tests/models/multimodal/generation/test_nemotron_parse.py::test_models[5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-v1.1]
...
ValueError: not enough values to unpack (expected 2, got 1)

How to configure my environment?

It's very important that you install both vLLM and Transformers from source so that your test results reflect the current state of both libraries.

# Or your fork
git clone https://github.com/huggingface/transformers.git
git clone https://github.com/vllm-project/vllm.git

cd vllm
VLLM_USE_PRECOMPILED=1 uv pip install -e .
uv pip install -e ../transformers

extent analysis

TL;DR

  • The ValueError: not enough values to unpack (expected 2, got 1) suggests a mismatch in the expected and actual number of values returned by a function, which needs to be investigated and corrected in the test_nemotron_parse.py test.

Guidance

  • Review the test_nemotron_parse.py file, specifically the test_models function with the parameter [5-bfloat16-nvidia/NVIDIA-Nemotron-Parse-v1.1], to identify where the ValueError is being raised.
  • Check the function call that is causing the error to ensure it is returning the expected number of values.
  • Verify that the environment is correctly configured by installing vLLM and Transformers from source as described, to ensure the test results reflect the current state of both libraries.
  • Consider adding error handling or debugging statements to understand the values being returned and why they do not match the expected number.

Example

  • Without the specific code causing the error, a generic example of how to handle such an error might involve checking the length of the returned values before attempting to unpack them:
returned_values = some_function()
if len(returned_values) == 2:
    value1, value2 = returned_values
else:
    # Handle the case where the number of returned values is not 2
    print("Error: Expected 2 values, got", len(returned_values))

Notes

  • The fix will depend on the specific code causing the ValueError, which is not provided in the issue description.
  • Ensuring the environment is set up as described is crucial for reproducing and fixing the issue.

Recommendation

  • Apply workaround: The best course of action seems to be to apply a workaround by modifying the code to handle the variable number of returned values or to correct the function call to return the expected number of values, as the root cause of the issue is not explicitly stated and may require further investigation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING