Skip to content
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

[Model] [Bugfix] Fix loading of fine-tuned models based on Phi-3-Small #12689

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

mgtk77
Copy link
Contributor

@mgtk77 mgtk77 commented Feb 3, 2025

We have a fine-tuned model based on Phi-3-Small and loading it fails due to this issue.
It's an official model, created by a team in Microsoft, that handles financial reports.
Model information exists here: https://ai.azure.com/explore/models/financial-reports-analysis/version/2/registry/azureml

The error we get:

...site-packages/vllm/model_executor/models/phi3_small.py", line 477, in load_weights
[rank0]:     param = params_dict[name]
[rank0]: KeyError: 'lm_head.weight'
Loading safetensors checkpoint shards:  75% Completed | 3/4 [00:01<00:00,  2.00it/s]

This fix was verified by successfully loading the model.

We also saw the exact same fix for other models: commandr.py, gemma.py, gpt_bigcode.py and jais.py.

Copy link

github-actions bot commented Feb 3, 2025

👋 Hi! Thank you for contributing to the vLLM project.
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 can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@mgtk77 mgtk77 force-pushed the dev/mgreenbaum/fixPhi3FT branch from ab8ca5d to 0fcd244 Compare February 3, 2025 11:01
Signed-off-by: Michael Greenbaum <[email protected]>
Signed-off-by: Michael Greenbaum <[email protected]>
Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 4, 2025 08:08
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 4, 2025
@youkaichao youkaichao disabled auto-merge February 4, 2025 12:58
@youkaichao youkaichao merged commit 6469038 into vllm-project:main Feb 4, 2025
22 of 36 checks passed
fxmarty-amd pushed a commit to fxmarty-amd/vllm that referenced this pull request Feb 7, 2025
…project#12689)

Signed-off-by: Michael Greenbaum <[email protected]>
Co-authored-by: Michael Greenbaum <[email protected]>
Signed-off-by: Felix Marty <[email protected]>
ShangmingCai pushed a commit to ShangmingCai/vllm that referenced this pull request Feb 10, 2025
panf2333 pushed a commit to yottalabsai/vllm that referenced this pull request Feb 18, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants