[LLM Inference] Support Qwen2_Moe Inference Model#8892
Merged
Conversation
|
Thanks for your contribution! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8892 +/- ##
===========================================
- Coverage 54.05% 53.88% -0.18%
===========================================
Files 650 652 +2
Lines 103884 104356 +472
===========================================
+ Hits 56155 56230 +75
- Misses 47729 48126 +397 ☔ View full report in Codecov by Sentry. |
yuanlehome
reviewed
Aug 27, 2024
| @@ -1,4 +1,4 @@ | |||
| # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |||
| # Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. | |||
yuanlehome
reviewed
Aug 27, 2024
| fused_rms_norm, | ||
| masked_multihead_attention, | ||
| variable_length_memory_efficient_attention, | ||
| fused_moe, |
yuanlehome
reviewed
Aug 27, 2024
Comment on lines
+198
to
+202
| shared_expert_ffn1_weight_attrs=None, | ||
| shared_expert_ffn1_weight_scale_attrs=None, | ||
| shared_expert_ffn2_weight_attrs=None, | ||
| shared_expert_ffn2_weight_scale_attrs=None, | ||
| shared_expert_gate_weight_attrs=None, |
Collaborator
There was a problem hiding this comment.
这些以及下面的shared_expert_intermediate_size都放进MoeConfig里去
yuanlehome
reviewed
Aug 27, 2024
| @@ -0,0 +1,15 @@ | |||
| # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |||
yuanlehome
reviewed
Aug 27, 2024
| token = token.lower() | ||
| if ( | ||
| token != self.unk_token | ||
| if (self.convert_tokens_to_ids(token) == self.convert_tokens_to_ids(self.unk_token) |
yuanlehome
reviewed
Aug 27, 2024
Comment on lines
+2
to
+3
| # Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team. | ||
| # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. |
yuanlehome
approved these changes
Aug 27, 2024
wawltor
reviewed
Aug 28, 2024
| config=config, | ||
| dtype=predictor_args.dtype, | ||
| ) | ||
| model.eval() |
Contributor
There was a problem hiding this comment.
这里代码是不是可以梳理设计下,每新增一个模型都需要增加相关的模型初始化方式
Mangodadada
pushed a commit
to Mangodadada/PaddleNLP
that referenced
this pull request
Sep 10, 2024
Co-authored-by: yuanlehome <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
Models
Description
Support Qwen-Moe Inference Model
TODO: