Skip to content

Conversation

acisseJZhong
Copy link
Contributor

@acisseJZhong acisseJZhong commented Sep 29, 2025

Fixed a bug when using customized config parser: we need to pass in self.config_format.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@facebook-github-bot
Copy link

@acisseJZhong has exported this pull request. If you are a Meta employee, you can view the originating diff in D83405333.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds support for specifying config_format when loading a model's generation configuration. The changes propagate the config_format from ModelConfig down to the configuration loading utilities. While the implementation is mostly correct, I've found one issue where the model revision is not consistently passed when loading a generation configuration from a separate source, which could lead to loading an incorrect version of the config. My review includes a suggestion to fix this.

Comment on lines 1340 to 1344
config = try_get_generation_config(
self.generation_config,
trust_remote_code=self.trust_remote_code,
config_format=self.config_format,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The revision parameter is not being passed to try_get_generation_config in this else block. If self.generation_config refers to a model on the Hugging Face Hub, this will cause it to always use the default revision (e.g., main branch), ignoring the revision specified for the main model. This could lead to loading an incorrect or incompatible generation configuration. You should pass self.revision here for consistency with the if block.

Suggested change
config = try_get_generation_config(
self.generation_config,
trust_remote_code=self.trust_remote_code,
config_format=self.config_format,
)
config = try_get_generation_config(
self.generation_config,
trust_remote_code=self.trust_remote_code,
revision=self.revision,
config_format=self.config_format,
)

@acisseJZhong acisseJZhong changed the title test with config parser Fix small bug when using customized config parser Sep 29, 2025
Summary:

test llama4x with shardist config parser

Test Plan:
buck test //vllm/fb/tests\:test_llama4x_hf -- --print-passing-details
https://www.internalfb.com/intern/testinfra/testconsole/testrun/1970325152656551/

buck test 'fbcode//mode/opt' fbcode//vllm/fb/plugins/tests:test_shardist_loader -- --exact 'vllm/fb/plugins/tests:test_shardist_loader - test_shardist_model_loading (vllm.fb.plugins.tests.test_shardist_loader.TestShardistLoader)' --run-disabled
https://www.internalfb.com/intern/testinfra/testconsole/testrun/844425379106729/

Differential Revision: D83405333
@facebook-github-bot
Copy link

@acisseJZhong has exported this pull request. If you are a Meta employee, you can view the originating diff in D83405333.

@22quinn 22quinn enabled auto-merge (squash) September 30, 2025 03:27
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 30, 2025
@22quinn 22quinn changed the title Fix small bug when using customized config parser [BugFix] Pass config_format via try_get_generation_config Sep 30, 2025
@22quinn 22quinn disabled auto-merge September 30, 2025 03:29
@22quinn 22quinn enabled auto-merge (squash) September 30, 2025 03:29
@22quinn 22quinn added the rl Related to RL workflows label Sep 30, 2025
@22quinn 22quinn merged commit e47433b into vllm-project:main Sep 30, 2025
45 checks passed
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed rl Related to RL workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants