Skip to content

Resolve continuous batching config against the text config for composite models - #48299

Merged
remi-or merged 3 commits into
mainfrom
fix-cb-vlm-text-config
Aug 26, 2026
Merged

Resolve continuous batching config against the text config for composite models#48299
remi-or merged 3 commits into
mainfrom
fix-cb-vlm-text-config

Conversation

@qgallouedec

@qgallouedec qgallouedec commented Aug 25, 2026

Copy link
Copy Markdown
Member

CPU CI GPU run-slow

What does this PR do?

Fixes #48298. Part of #48294.

Change: the three call sites in ContinuousBatchingManager that read decoder attributes (resolve_continuous_batching_config, PagedAttentionCache, ContinuousBatchProcessor) pass self.model.config.get_text_config() instead of self.model.config. get_text_config() returns self for text-only configs, so the existing paths are untouched.

Validation: text-only generate_batch on Qwen3-VL-4B-Instruct works with this change and crashes without it (Qwen3.5-style hybrids then hit their separate linear-attention limitation, tracked in its own issue).

Who can review?

@remi-or (continuous batching)

…ite models

PagedAttentionCache and the CB config resolution read decoder attributes (num_key_value_heads,
num_hidden_layers, head_dim, ...) from the top-level config, which does not carry them for
composite configs (vision-language models keep them on text_config). Continuous batching on any
ForConditionalGeneration model crashed with 'num_key_value_heads or num_attention_heads could
not be found in the config'. Resolve against config.get_text_config(), a no-op for text-only
configs.
@qgallouedec
qgallouedec force-pushed the fix-cb-vlm-text-config branch from eb55b42 to e3bd6f8 Compare August 25, 2026 15:34
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 32874865885:1
Result: success | Jobs: 2 | Tests: 25 | Failures: 0 | Duration: 2m 44s

@remi-or remi-or left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A bit drastic, but since we don't support multimodal models for now this works fine. Thanks!

@remi-or
remi-or added this pull request to the merge queue Aug 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 26, 2026
@remi-or
remi-or added this pull request to the merge queue Aug 26, 2026
Merged via the queue into main with commit 598d8ba Aug 26, 2026
112 checks passed
@remi-or
remi-or deleted the fix-cb-vlm-text-config branch August 26, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Continuous batching crashes on every VLM: config attributes read from the top-level config

3 participants