-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[BugFix] Pass config_format via try_get_generation_config #25912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 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 You ask your reviewers to trigger select CI tests on top of 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 If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
@acisseJZhong has exported this pull request. If you are a Meta employee, you can view the originating diff in D83405333. |
There was a problem hiding this 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.
config = try_get_generation_config( | ||
self.generation_config, | ||
trust_remote_code=self.trust_remote_code, | ||
config_format=self.config_format, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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, | |
) |
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
2574fba
to
5b869d9
Compare
@acisseJZhong has exported this pull request. If you are a Meta employee, you can view the originating diff in D83405333. |
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Fixed a bug when using customized config parser: we need to pass in
self.config_format
.