-
Notifications
You must be signed in to change notification settings - Fork 601
[vl]remove duplicated load logic #2744
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
Thanks for your contribution! |
a6690a6
to
05b4eda
Compare
70afc2c
to
c64018b
Compare
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.
Pull Request Overview
This PR removes duplicated distributed environment initialization logic from the vision-language model runner by reusing the centralized loading logic from worker_process.py
. The main purpose is to consolidate configuration initialization and reduce code duplication across the codebase.
Key changes include:
- Extracted common parallel configuration initialization into reusable functions
- Replaced custom model building logic in VL model runner with centralized configuration initialization
- Updated function signatures to accept rank parameters for proper distributed setup
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
fastdeploy/worker/worker_process.py | Extracted distributed initialization and parallel config setup into reusable functions, updated function signatures |
fastdeploy/worker/vl_gpu_model_runner.py | Removed duplicated model building logic and reused centralized initialization from worker_process.py |
fastdeploy/rl/rollout_config.py | Updated function call to pass required rank parameters |
fastdeploy/model_executor/models/utils.py | Added new expert ID placeholders for text and image experts |
fastdeploy/model_executor/models/tp_utils.py | Enhanced key expansion logic to handle new expert types and improved error handling |
fastdeploy/model_executor/models/ernie4_5_vl/modeling_resampler.py | Added prefix name support and custom state dict loading |
fastdeploy/model_executor/models/ernie4_5_vl/ernie4_5_vl_moe.py | Restructured model initialization and added tensor parallel mappings |
fastdeploy/model_executor/models/ernie4_5_vl/dfnrope/modeling.py | Added prefix name support and custom state dict loading |
fastdeploy/model_executor/models/ernie4_5_moe.py | Updated tensor parallel mapping function calls |
fastdeploy/model_executor/model_loader.py | Added VL model support to model registry |
fastdeploy/config.py | Updated type annotations for MoE configuration fields |
Comments suppressed due to low confidence (1)
fastdeploy/worker/vl_gpu_model_runner.py:159
- Missing space after comma in parameter list - should be '_init_image_preprocess(self, vision_config)'
def _init_image_preprocess(self,vision_config) -> None:
fastdeploy/model_executor/models/ernie4_5_vl/ernie4_5_vl_moe.py
Outdated
Show resolved
Hide resolved
fastdeploy/model_executor/models/ernie4_5_vl/ernie4_5_vl_moe.py
Outdated
Show resolved
Hide resolved
fastdeploy/model_executor/models/ernie4_5_vl/ernie4_5_vl_moe.py
Outdated
Show resolved
Hide resolved
d95f493
to
b7c1c5f
Compare
Reuse the loading logic from fastdeploy/worker/worker_process.py