support baichuan model:#4721
Merged
mrwyattii merged 11 commits intodeepspeedai:masterfrom Dec 18, 2023
Merged
Conversation
Contributor
baodii
commented
Nov 23, 2023
- fix Baichuan meta data error
- add BaichuanLayer and DecoderLayer to glmtype when prepare tp fused qkvw
- add get_alibi_mask function for Baichuan to enable TP
* fix Baichuan meta data error * add BaichuanLayer and DecoderLayer to glmtype when prepare tp fused qkvw * add get_alibi_mask function for Baichuan to enable TP
Contributor
Author
25 tasks
Collaborator
|
Hi @RezaYazdaniAminabadi, this PR contains fixes for AutoTP to allow Baichuan model running with DeepSpeed AutoTP, can you review this PR for any comments? Thanks! |
RezaYazdaniAminabadi
approved these changes
Nov 28, 2023
Contributor
RezaYazdaniAminabadi
left a comment
There was a problem hiding this comment.
all LGTM, thanks :)
loadams
reviewed
Nov 28, 2023
loadams
reviewed
Dec 8, 2023
| if hasattr(self.module.transformer, 'build_mpt_alibi_tensor'): | ||
| self.module.transformer.build_mpt_alibi_tensor_orig = self.module.transformer.build_mpt_alibi_tensor | ||
| self.module.transformer.__class__.build_mpt_alibi_tensor = build_mpt_alibi_tensor | ||
| if hasattr(self.module, 'model'): |
Collaborator
There was a problem hiding this comment.
@baodii - would it be possible to add a unit test for this model support?
Contributor
Author
Collaborator
There was a problem hiding this comment.
I think we should add autoTP tests with a seperate workflow in a seperate PR, there are several reasons:
- Current autotp coverage in inference UT is not adequate (marian, codegen only), many popular model are not tested
- Popular model has large disk/memory requirement, put them in a seperate workflow allows us to isolate the hardware requirements
- It is suggested to test these autotp test with
deepspeedlauncher rather thanpytestdistributed launcher, this could avoid additional complexity and as close to user environment as possible.
I think we can open an issue for this task and explore in a seperate task.
loadams
approved these changes
Dec 8, 2023
mrwyattii
added a commit
that referenced
this pull request
Jan 10, 2024
This [PR](#4721) added the "DecoderLayer":glmtype. It will cause the Falcon model to choose "glmtype" fused_qkv_type. Falcon model (including Falcondecoderlayer) needs to choose 'bloomtype' explicitly. Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.com>
mauryaavinash95
pushed a commit
to mauryaavinash95/DeepSpeed
that referenced
this pull request
Feb 17, 2024
* fix Baichuan meta data error * add BaichuanLayer and DecoderLayer to glmtype when prepare tp fused qkvw * add get_alibi_mask function for Baichuan to enable TP --------- Co-authored-by: Lai, Yejing <yejing.lai@intel.com> Co-authored-by: Reza Yazdani <44502768+RezaYazdaniAminabadi@users.noreply.github.com> Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com> Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.com>
mauryaavinash95
pushed a commit
to mauryaavinash95/DeepSpeed
that referenced
this pull request
Feb 17, 2024
This [PR](deepspeedai#4721) added the "DecoderLayer":glmtype. It will cause the Falcon model to choose "glmtype" fused_qkv_type. Falcon model (including Falcondecoderlayer) needs to choose 'bloomtype' explicitly. Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.com>
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.