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

[Bugfix] Fix PP for ChatGLM and Molmo, and weight loading for Qwen2.5-Math-RM #9422

Merged
merged 6 commits into from
Oct 24, 2024

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Oct 16, 2024

#9242 accidentally removed PP support from ChatGLM. On the other hand, MolmoModel already supports PP but the top-level MolmoForCausalLM does not. This PR fixes both of these issues.

The input processors of these models and Qwen2-VL have also been cleaned up a bit.

Also fixes #9090 (comment)

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 16, 2024
Copy link

👋 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.

🚀

@DarkLight1337
Copy link
Member Author

Sorry for breaking your code! @lixiaolx can you test out this PR and see if you can load Qwen/Qwen2.5-Math-RM-72B now?

Copy link
Collaborator

@Isotr0py Isotr0py left a comment

Choose a reason for hiding this comment

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

GLM4-V and Molmo PP tests all passed on my devices. LGTM once Qwen2-RM is also confirmed to work.

@lixiaolx
Copy link

lixiaolx commented Oct 17, 2024

Sorry for breaking your code! @lixiaolx can you test out this PR and see if you can load Qwen/Qwen2.5-Math-RM-72B now?

@DarkLight1337 , I tried adding lm_head filtering to the model.py file of qwen_rm.
loader = AutoWeightsLoader(self,skip_prefixes=["lm_head"])
Now I can load the model, but the final results of my test reference are all nan #8896. I tried printing the weights of the model, but it seemed that the weights were not loaded correctly.

add print code in
https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/model_loader/loader.py#L413
for name, param in model.named_parameters(): print(f"Parameter '{name}' =====tensor=======: {param}")
image

@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Oct 17, 2024

Sorry for breaking your code! @lixiaolx can you test out this PR and see if you can load Qwen/Qwen2.5-Math-RM-72B now?

@DarkLight1337 , I tried adding lm_head filtering to the model.py file of qwen_rm.
loader = AutoWeightsLoader(self,skip_prefixes=["lm_head"])
Now I can load the model, but the final results of my test reference are all nan #8896. I tried printing the weights of the model, but it seemed that the weights were not loaded correctly.

add print code in
https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/model_loader/loader.py#L413
for name, param in model.named_parameters(): print(f"Parameter '{name}' =====tensor=======: {param}")
image

Can you add print statements inside AutoWeightLoader and list out the weight names in the iterator? This should provide enough information for me to figure out the discrepancies and fix them.

@DarkLight1337
Copy link
Member Author

Sorry for breaking your code! @lixiaolx can you test out this PR and see if you can load Qwen/Qwen2.5-Math-RM-72B now?

@DarkLight1337 , I tried adding lm_head filtering to the model.py file of qwen_rm.
loader = AutoWeightsLoader(self,skip_prefixes=["lm_head"])
Now I can load the model, but the final results of my test reference are all nan #8896. I tried printing the weights of the model, but it seemed that the weights were not loaded correctly.
add print code in
https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/model_loader/loader.py#L413
for name, param in model.named_parameters(): print(f"Parameter '{name}' =====tensor=======: {param}")
image

Can you add print statements inside AutoWeightLoader and list out the weight names in the iterator? This should provide enough information for me to figure out the discrepancies and fix them.

Any update? Otherwise, I'll merge this PR first and fix the model in another PR.

@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Oct 24, 2024

Sorry for breaking your code! @lixiaolx can you test out this PR and see if you can load Qwen/Qwen2.5-Math-RM-72B now?

@DarkLight1337 , I tried adding lm_head filtering to the model.py file of qwen_rm.
loader = AutoWeightsLoader(self,skip_prefixes=["lm_head"])
Now I can load the model, but the final results of my test reference are all nan #8896. I tried printing the weights of the model, but it seemed that the weights were not loaded correctly.
add print code in
https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/model_loader/loader.py#L413
for name, param in model.named_parameters(): print(f"Parameter '{name}' =====tensor=======: {param}")
image

Can you add print statements inside AutoWeightLoader and list out the weight names in the iterator? This should provide enough information for me to figure out the discrepancies and fix them.

Any update? Otherwise, I'll merge this PR first and fix the model in another PR.

I think I fixed the problem, so I'm going to merge this now. Please tell me and share the logs (set the environment variable VLLM_LOGGING_LEVEL=DEBUG) if it still doesn't work.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) October 24, 2024 04:13
@DarkLight1337 DarkLight1337 changed the title [Bugfix] Fix PP for ChatGLM and Molmo [Bugfix] Fix PP for ChatGLM and Molmo, and Qwen2.5-Math-RM weight loading Oct 24, 2024
@DarkLight1337 DarkLight1337 changed the title [Bugfix] Fix PP for ChatGLM and Molmo, and Qwen2.5-Math-RM weight loading [Bugfix] Fix PP for ChatGLM and Molmo, and weight loading for Qwen2.5-Math-RM Oct 24, 2024
@DarkLight1337 DarkLight1337 merged commit 836e8ef into main Oct 24, 2024
61 checks passed
@DarkLight1337 DarkLight1337 deleted the vlm-pp branch October 24, 2024 06:55
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
MErkinSag pushed a commit to MErkinSag/vllm that referenced this pull request Oct 26, 2024
cooleel pushed a commit to cooleel/vllm that referenced this pull request Oct 28, 2024
cooleel pushed a commit to cooleel/vllm that referenced this pull request Oct 28, 2024
FerdinandZhong pushed a commit to FerdinandZhong/vllm that referenced this pull request Oct 29, 2024
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Oct 31, 2024
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Oct 31, 2024
sumitd2 pushed a commit to sumitd2/vllm that referenced this pull request Nov 14, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
tlrmchlsmth pushed a commit to neuralmagic/vllm that referenced this pull request Nov 23, 2024
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.

3 participants