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] support QWen1.5-Moe #8338

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

Conversation

DrownFish19
Copy link
Collaborator

@DrownFish19 DrownFish19 commented Apr 28, 2024

PR types

New features

PR changes

Models

Description

  1. add QWen1.5 Moe model.
  2. support same prefix for different models, such as QWen and QWen2Moe with same prefix QWen. The longest name will match each model name before others.
  3. support sft and lora.

Copy link

paddle-bot bot commented Apr 28, 2024

Thanks for your contribution!

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 66.44370% with 301 lines in your changes are missing coverage. Please review.

Project coverage is 54.08%. Comparing base (0087c4a) to head (d57a5b1).

Current head d57a5b1 differs from pull request most recent head bfb65a1

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

Files Patch % Lines
paddlenlp/transformers/qwen2moe/modeling.py 72.29% 197 Missing ⚠️
paddlenlp/transformers/qwen2moe/tokenizer.py 22.38% 104 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8338      +/-   ##
===========================================
+ Coverage    53.96%   54.08%   +0.12%     
===========================================
  Files          618      622       +4     
  Lines        96827    97722     +895     
===========================================
+ Hits         52256    52857     +601     
- Misses       44571    44865     +294     

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

@ZHUI ZHUI closed this May 24, 2024
@ZHUI ZHUI reopened this May 24, 2024
# See the License for the specific language governing permissions and
# limitations under the License.

from .configuration import QWen2MoeConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

QWen2MoEConfig会不会更好,把Moe都改成MoE。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

@@ -0,0 +1,1580 @@
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2023 -> 2024,都改掉吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

{
"model_name_or_path": "qwen/Qwen1.5-MoE-A2.7B",
"dataset_name_or_path": "./data",
"output_dir": "./checkpoints/qwen2moe_lora_ckpts",
Copy link
Contributor

Choose a reason for hiding this comment

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

确认是否ok,并同步更新 readme 文档

Comment on lines 15 to 17
from .configuration import QWen2MoeConfig
from .modeling import QWen2MoeForCausalLM
from .tokenizer import QWen2MoeTokenizer
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from .configuration import QWen2MoeConfig
from .modeling import QWen2MoeForCausalLM
from .tokenizer import QWen2MoeTokenizer
from .configuration import *
from .modeling import *
from .tokenizer import*

Comment on lines 297 to 299
from .qwen2moe.modeling import *
from .qwen2moe.configuration import *
from .qwen2moe.tokenizer import *
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from .qwen2moe.modeling import *
from .qwen2moe.configuration import *
from .qwen2moe.tokenizer import *
from .qwen2moe import *

@@ -0,0 +1,13 @@
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

这个文件需要吗?

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.

None yet

3 participants