-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[CPU] support the case where num_attention_heads or intermediate_size is not divisible by the TP size #6771
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
Merged
Merged
Changes from 30 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
c5d2c5e
Support the case where `num_attention_heads` is not divisible by the …
chunyuan-w 0871a3a
pad intermediate_size (#32)
chunyuan-w d039ce7
FP8: update MoE padding value and support TP=6 (#53)
chunyuan-w 8e34004
fix issue after rebase in commit: not divisible by the TP size
chunyuan-w 8f2a6ea
fix issue after rebase in commit: MoE padding
chunyuan-w 3232e35
fix issue after rebase in commit: FP8
chunyuan-w df59cfa
refactor narrow and reset part into a util function
chunyuan-w df1a274
use util function in MergedColumnParallelLinear
chunyuan-w 3cc1042
use util function in RowParallelLinear
chunyuan-w 187a099
remove unused import
chunyuan-w 1fb220e
use util func in moe _load_w2
chunyuan-w 407aec8
use util func in moe _load_w13
chunyuan-w 85b7eca
remove unused import in moe
chunyuan-w 91e41b3
use util func in FP8 _ColumnvLLMParameter
chunyuan-w 6c73063
do not overwrite self.data
chunyuan-w 201785f
use util func in FP8 _ColumnvLLMParameter merged column weight
chunyuan-w ed200db
use util func in FP8 RowvLLMParameter
chunyuan-w 8fa4539
revert unintended change
chunyuan-w 25bb617
fix the case where actual_shard_size = 0
chunyuan-w 0079fcc
add narrow logic in QKVParallelLinear
chunyuan-w 85ea205
only update embedding padding_size for CPU
chunyuan-w cbe7591
use the use_cpu() API from #6614
chunyuan-w edc3953
fix FP8 TP=3
chunyuan-w f8dc8c4
fix the init of weight_block_size
chunyuan-w e3aefac
change _use_cpu to _is_cpu
chunyuan-w 971db2b
fix head_dim in qwen2 when num_attention_heads is padded (#82)
chunyuan-w ac3d715
add padding if total_num_kv_heads % tp_size != 0
chunyuan-w 32b711e
llama4: use original num heads and kv heads when permute loaded weight
chunyuan-w 0b6e45d
llama4: add is_cpu() when getting num heads
chunyuan-w d2f768a
fix format and remove unused import
chunyuan-w 4a0a2cc
move functions to srt/configs/update_config.py and srt/model_loader/w…
chunyuan-w 96f00ba
add update_config.py
chunyuan-w 40be63a
Merge branch 'main' into chunyuan/pr_tp
zhyncs d09e60f
Merge branch 'main' into chunyuan/pr_tp
zhyncs 21deb40
make original_total_num_kv_heads available if _is_cpu; change attr name
chunyuan-w ff7a2c6
Merge branch 'main' into chunyuan/pr_tp
zhyncs a8c32b9
Merge branch 'main' into chunyuan/pr_tp
zhyncs b4dc9a8
Merge branch 'main' into chunyuan/pr_tp
zhyncs f5fe517
only call cuda_graph_mem_usage if not _is_cpu
chunyuan-w 4129599
Merge branch 'main' into chunyuan/pr_tp
Alcanderian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.