Repository navigation
[CI][Bugfix] ColPali miss hidden_size - #62627
Merged
ZJY0516 merged 1 commit intoOct 20, 2026
Merged
Conversation
Contributor
Author
|
/pr-checklist |
Signed-off-by: wenjinhust <wenjin.sh@huawei.com>
wenjinhust
force-pushed
the
dev2610/fix_ci/fix_text_config
branch
from
October 20, 2026 07:12
8d8f72b to
5a12ceb
Compare
Member
|
/ci run |
|
✅ @wenjinhust, CI is now available for this PR.
|
|
✅ Triggered Buildkite CI #96090 for commit |
5 of 6 tasks
ZJY0516
approved these changes
Oct 20, 2026
ZJY0516
enabled auto-merge (squash)
October 20, 2026 07:37
DarkLight1337
approved these changes
Oct 20, 2026
Isotr0py
approved these changes
Oct 20, 2026
6 tasks done
6 tasks done
Member
|
While this fix works, it is not correct and will only work for existing ColPali checkpoints which define the top level For all supported versions of Transformers the correct location of Correct fix is in #62714 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fix CI failures where ColPali model loading crashes with
AttributeError: 'dict' object has no attribute 'hidden_size'because recent Transformers versions exposetext_configas 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
AttributeError: 'dict' object has no attribute 'hidden_size'inColPaliModel.__init__when loadingvidore/colpali-v1.3-hfwith recent Transformers versions, restoring model initialization.text_configused 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-4tests/models/test_initialization.py::test_can_initialize_large_subset[ColPaliForRetrieval]nvidia-h200-mig-35gb-entrypoints-integration-pooling-shard-3-slash-3tests/entrypoints/pooling/scoring/test_late_interaction_offline_vision.py::test_query_text_vs_docs_imageamd-mi355-dpx-entrypoints-integration-pooling-shard-1-slash-2/-shard-2-slash-2test_query_image_vs_docs_text,test_query_text_vs_docs_image,test_query_text_vs_docs_mixFailure (
vllm/model_executor/models/colpali.py:123, before fix):Steps to reproduce / validate:
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 toconfig.text_config.hidden_sizewhenhidden_sizeis absent. After #60823 switched ColPali to the upstream TransformersColPaliConfig, recent Transformers versions can leavetext_configas a plain dict (e.g. when loadingvidore/colpali-v1.3-hf), so the attribute access raisesAttributeErrorand model loading aborts duringLLMinitialization.Fix. In
vllm/model_executor/models/colpali.py, readtext_config["hidden_size"]whentext_configis a dict, otherwise fall back togetattr(text_config, "hidden_size", None). The existingValueErrorfallback 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-checklistskill. (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.