Skip to content

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. add Qwen2 model.
  3. 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.
  4. support sft and lora.

support models are listed as follows:

Model (qwen-1.5)
Qwen/Qwen1.5-0.5B
Qwen/Qwen1.5-0.5B-Chat
Qwen/Qwen1.5-1.8B
Qwen/Qwen1.5-1.8B-Chat
Qwen/Qwen1.5-4B
Qwen/Qwen1.5-4B-Chat
Qwen/Qwen1.5-7B
Qwen/Qwen1.5-7B-Chat
Qwen/Qwen1.5-14B
Qwen/Qwen1.5-14B-Chat
Qwen/Qwen1.5-32B
Qwen/Qwen1.5-32B-Chat
Qwen/Qwen1.5-72B
Qwen/Qwen1.5-72B-Chat
Qwen/Qwen1.5-110B
Qwen/Qwen1.5-110B-Chat
Qwen/Qwen1.5-MoE-A2.7B
Qwen/Qwen1.5-MoE-A2.7B-Chat
Model (qwen2)
Qwen/Qwen2-0.5B
Qwen/Qwen2-0.5B-Instruct
Qwen/Qwen2-1.5B
Qwen/Qwen2-1.5B-Instruct
Qwen/Qwen2-7B
Qwen/Qwen2-7B-Instruct
Qwen/Qwen2-72B
Qwen/Qwen2-72B-Instruct
Qwen/Qwen2-57B-A14B
Qwen/Qwen2-57B-A14B-Instruct

@paddle-bot
Copy link

paddle-bot bot commented Apr 28, 2024

Thanks for your contribution!

@codecov
Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 40.33276% with 1040 lines in your changes missing coverage. Please review.

Project coverage is 54.42%. Comparing base (909be01) to head (48ae2ab).
Report is 240 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/transformers/qwen2/modeling.py 14.41% 588 Missing ⚠️
paddlenlp/transformers/qwen2_moe/modeling.py 72.29% 197 Missing ⚠️
paddlenlp/transformers/qwen2/modeling_pp.py 0.00% 112 Missing ⚠️
paddlenlp/transformers/qwen2/tokenizer.py 22.38% 104 Missing ⚠️
paddlenlp/transformers/qwen2/configuration.py 13.33% 39 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8338      +/-   ##
===========================================
- Coverage    54.67%   54.42%   -0.26%     
===========================================
  Files          624      632       +8     
  Lines        97709    99450    +1741     
===========================================
+ Hits         53427    54128     +701     
- Misses       44282    45322    +1040     

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

{
"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.

这个文件需要吗?

ZHUI
ZHUI previously approved these changes Jun 11, 2024
@DrownFish19 DrownFish19 changed the title [LLM] support QWen1.5-Moe [LLM] support QWen2 Jun 11, 2024
@DrownFish19 DrownFish19 changed the title [LLM] support QWen2 [LLM] support Qwen2 Jun 11, 2024
Copy link
Contributor

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@wawltor wawltor merged commit 4609d07 into PaddlePaddle:develop Jun 11, 2024
@DrownFish19 DrownFish19 deleted the dev_add_qwen1.5-moe branch June 12, 2024 01:42
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.

4 participants