This repository was archived by the owner on Dec 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Merged
Mixtral enablement. #120
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c5c0772
Initial Mixtral enablement.
wang2yn84 277b02c
Adds the mistral tokenizer model.
wang2yn84 8be8c36
Updates the convert checkpoint file to handle mistral model.
wang2yn84 ab8c802
Renames the typo of the model name.
wang2yn84 98fdf71
Fixing checkpoing loading. Still has some issue. Push to debug.
wang2yn84 aa78dbd
Running on CPU working, temporarily disable the generate jit to see i…
wang2yn84 1846cf9
Fix checkpoint loading issue. Right now loading from the gpt-fast con…
wang2yn84 8be6cfc
Fix the ckpt conversion script for mistral model. Fix the freqs_cis f…
wang2yn84 e6c5696
Add quantized layer for moe
qihqi 518f758
Add the huggingface download script. Improved the convert checkpoints…
wang2yn84 147cef4
Clean up and fix lint errors.
wang2yn84 2ed3e0e
Missing cleanups.
wang2yn84 14d6672
Add instructions for Mixtral.
wang2yn84 b2a6a18
Renames everything from mistral to mixtral.
wang2yn84 c004adc
Fix more lint errors.
wang2yn84 a206374
Removes the unnecessary checkpoint name mapping from the original Mix…
wang2yn84 d18f8c3
Fix the model calling arg sequence; Fix the checkpoint convert script.
wang2yn84 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
|
|
||
| # Sharding config for mixtral | ||
| # Sharding should either be an int between 0 and rank - 1 | ||
| # signifying the axis to shard or -1 / null signifying replicated | ||
|
|
||
|
|
||
| freqs_cis : -1 # torch.complex64 (2048, 64) | ||
| tok_embeddings.weight : 1 # torch.float32 (vocab_size, 4096) | ||
| tok_embeddings.weight_scaler : 0 # torch.bfloat16 (4096,) | ||
| layers.*.attention.wo.weight : 1 # torch.int8 (4096, 4096) | ||
| layers.*.attention.wo.weight_scaler : -1 # torch.bfloat16 (4096,) | ||
| layers.*.attention.wq.weight : 0 # torch.int8 (4096, 4096) | ||
| layers.*.attention.wq.weight_scaler : 0 # torch.bfloat16 (4096,) | ||
| layers.*.attention.wk.weight : 0 # torch.int8 (4096, 4096) | ||
| layers.*.attention.wk.weight_scaler : 0 # torch.bfloat16 (4096,) | ||
| layers.*.attention.wv.weight : 0 # torch.int8 (4096, 4096) | ||
| layers.*.attention.wv.weight_scaler : 0 # torch.bfloat16 (4096,) | ||
| layers.*.attention.wqkv.weight : 0 # torch.int8 (4096, 4096) | ||
| layers.*.attention.wqkv.weight_scaler : 0 # torch.bfloat16 (4096,) | ||
| layers.*.block_sparse_moe.gate.weight: -1 | ||
| layers.*.block_sparse_moe.gate.weight_scaler: -1 | ||
| layers.*.block_sparse_moe.cond_ffn.w1: 1 | ||
| layers.*.block_sparse_moe.cond_ffn.w1_scaler: 1 | ||
| layers.*.block_sparse_moe.cond_ffn.w2: 2 | ||
| layers.*.block_sparse_moe.cond_ffn.w2_scaler: -1 | ||
| layers.*.block_sparse_moe.cond_ffn.w3: 1 | ||
| layers.*.block_sparse_moe.cond_ffn.w3_scaler: 1 | ||
| layers.*.ffn_norm.weight : -1 # torch.float32 (4096,) | ||
| layers.*.attention_norm.weight : -1 # torch.float32 (4096,) | ||
| norm.weight : -1 # torch.float32 (4096,) | ||
| output.weight : 0 # torch.float32 (vocab_size, 4096) | ||
| output.weight_scaler : 0 # torch.float32 (4096,) |
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
Empty file.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like only these weight name are difference, can we only store the the different name in the map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, removed