Skip to content

[CI][Bugfix] ColPali miss hidden_size - #62627

Merged
ZJY0516 merged 1 commit into
vllm-project:mainfrom
wenjinhust:dev2610/fix_ci/fix_text_config
Oct 20, 2026
Merged

ZJY0516 merged 1 commit into
vllm-project:mainfrom
wenjinhust:dev2610/fix_ci/fix_text_config

Conversation

@wenjinhust

@wenjinhust wenjinhust commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Fix CI failures where ColPali model loading crashes with AttributeError: 'dict' object has no attribute 'hidden_size' because recent Transformers versions expose text_config as a plain dict. Handle both the dict and config-object forms when extracting the text hidden size.

Related: #60823 (ported ColPali configs/processors to upstream Transformers, which surfaced this issue).

Claims

  • Fixes AttributeError: 'dict' object has no attribute 'hidden_size' in ColPaliModel.__init__ when loading vidore/colpali-v1.3-hf with recent Transformers versions, restoring model initialization.
  • Restores the ColPali CI coverage that regressed: model initialization tests and late-interaction pooling entrypoint tests on NVIDIA and AMD MI355.
  • Preserves backward compatibility with the config-object form of text_config used by older Transformers versions.

Validation

Before this fix, CI build 96076 failed with the same traceback across the following jobs:

  • nvidia-h200-mig-35gb-basic-models-extra-initialization-shard-4
    • tests/models/test_initialization.py::test_can_initialize_large_subset[ColPaliForRetrieval]
  • nvidia-h200-mig-35gb-entrypoints-integration-pooling-shard-3-slash-3
    • tests/entrypoints/pooling/scoring/test_late_interaction_offline_vision.py::test_query_text_vs_docs_image
  • amd-mi355-dpx-entrypoints-integration-pooling-shard-1-slash-2 / -shard-2-slash-2
    • test_query_image_vs_docs_text, test_query_text_vs_docs_image, test_query_text_vs_docs_mix

Failure (vllm/model_executor/models/colpali.py:123, before fix):

AttributeError: 'dict' object has no attribute 'hidden_size'
    hidden_size = config.text_config.hidden_size

Steps to reproduce / validate:

pytest tests/models/test_initialization.py -k ColPaliForRetrieval
pytest tests/entrypoints/pooling/scoring/test_late_interaction_offline_vision.py

The affected jobs above are re-run in CI to confirm the fix.

Details

Root cause. ColPaliModel.__init__ reads the text hidden size from the top-level config and falls back to config.text_config.hidden_size when hidden_size is absent. After #60823 switched ColPali to the upstream Transformers ColPaliConfig, recent Transformers versions can leave text_config as a plain dict (e.g. when loading vidore/colpali-v1.3-hf), so the attribute access raises AttributeError and model loading aborts during LLM initialization.

Fix. In vllm/model_executor/models/colpali.py, read text_config["hidden_size"] when text_config is a dict, otherwise fall back to getattr(text_config, "hidden_size", None). The existing ValueError fallback is kept for the case where neither form yields a hidden size.

Tradeoffs / limitations. Minimal one-place change with no behavioral impact on the config-object path. No new tests are added; the regression is covered by the existing initialization and late-interaction entrypoint tests listed above.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@wenjinhust wenjinhust changed the title fix CI: ColPali miss hidden_size [CI][Bugfix] ColPali miss hidden_size Oct 20, 2026
@mergify mergify Bot added the bug Something isn't working label Oct 20, 2026
@wenjinhust

Copy link
Copy Markdown
Contributor Author

/pr-checklist

Signed-off-by: wenjinhust <wenjin.sh@huawei.com>
@wenjinhust
wenjinhust force-pushed the dev2610/fix_ci/fix_text_config branch from 8d8f72b to 5a12ceb Compare October 20, 2026 07:12
@ZJY0516 ZJY0516 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 20, 2026
@ZJY0516

ZJY0516 commented Oct 20, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ @wenjinhust, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Run commands test your branch with every commit currently on its upstream target branch. If it is behind, the bot merges the target branch into it first (pull before pushing again). Append --allow-stale to a run command to test an outdated branch as is, at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #96090 for commit 5a12ceb5e0ef.

@ZJY0516
ZJY0516 enabled auto-merge (squash) October 20, 2026 07:37
@ZJY0516
ZJY0516 merged commit 0d00d8b into vllm-project:main Oct 20, 2026
113 of 114 checks passed
@hmellor

hmellor commented Oct 20, 2026

Copy link
Copy Markdown
Member

While this fix works, it is not correct and will only work for existing ColPali checkpoints which define the top level text_config in config.json.

For all supported versions of Transformers the correct location of hidden_size is config.vlm_config.text_config.hidden_size. The Transformers upgrade simply removed the BC that duplicated the text config to the top level. This PR only works because the test checkpoint is old and still contains text_config at the top level of config.json, this will not be the case for new checkpoints.

Correct fix is in #62714

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

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants