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

[LLM] Add pipeline and flashmask for Qwen2Moe and Deepseek #9827

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

DrownFish19
Copy link
Collaborator

Before submitting

  • Lint code. If there are lint issues, please format the code first.
# Install and register `pre-commit` in the project folder
pip install pre-commit && pre-commit install

# Process previous code files separately
pre-commit run --file XXXX.py
  • Add test cases into tests folder. If there are codecov issues, please add tests cases first.

PR types

New features

PR changes

Models

Description

  1. Add pipeline and flashmask for Qwen2Moe and Deepseek.

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 33.39318% with 371 lines in your changes missing coverage. Please review.

Project coverage is 52.16%. Comparing base (bad2240) to head (3a320cb).
Report is 2 commits behind head on develop.

Current head 3a320cb differs from pull request most recent head 47628e4

Please upload reports for the commit 47628e4 to get more accurate results.

Files with missing lines Patch % Lines
paddlenlp/transformers/deepseek_v2/modeling_pp.py 23.60% 123 Missing ⚠️
paddlenlp/transformers/qwen2_moe/modeling_pp.py 23.12% 123 Missing ⚠️
paddlenlp/transformers/qwen2_moe/modeling.py 58.06% 52 Missing ⚠️
paddlenlp/transformers/deepseek_v2/modeling.py 17.54% 47 Missing ⚠️
paddlenlp/transformers/moe_gate.py 38.70% 19 Missing ⚠️
paddlenlp/trl/llm_utils.py 0.00% 3 Missing ⚠️
paddlenlp/transformers/deepseek_v3/modeling.py 0.00% 2 Missing ⚠️
paddlenlp/transformers/llama/fusion_ops.py 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (33.39%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (52.16%) is below the target coverage (58.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9827      +/-   ##
===========================================
+ Coverage    51.45%   52.16%   +0.70%     
===========================================
  Files          737      733       -4     
  Lines       119471   116187    -3284     
===========================================
- Hits         61472    60604     -868     
+ Misses       57999    55583    -2416     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

paddle-bot bot commented Feb 5, 2025

Thanks for your contribution!

assert self.e_score_correction_bias is not None, "e_score_correction_bias is None"
scores = scores.reshape([bsz_seq_len, -1]) + self.e_score_correction_bias.unsqueeze(0)
group_scores = scores.reshape([bsz_seq_len, self.n_group, -1]).topk(2, axis=-1)[0].sum(axis=-1) # [n, n_group]
group_idx = paddle.topk(group_scores, k=topk_group, axis=-1, sorted=False)[1] # [n, top_k_group]
Copy link
Contributor

Choose a reason for hiding this comment

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

这边sorted=False对gpu不生效, 应该怎么修改呀?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants