This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
migrate PR [LLM Runtime]Magicoder graph #41
Merged
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f219d29
migrate [LLM Runtime]Magicoder graph
intellinjun ed3cc6e
fix format error
intellinjun 215031d
change convert gptj script
intellinjun be2a785
fix format error
intellinjun 8106c6f
delete other convert script
intellinjun 8744a35
fix format error
intellinjun a6ca108
Merge branch 'main' into magicoder_graph
intellinjun 7d1ef1c
add two other magicoder pr 1082&1100
intellinjun dc936ad
fix format error
intellinjun 7359bbd
rm mistral folder
intellinjun 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -151,6 +151,7 @@ class Params: | |
ffn_hidden_size: int | ||
rms_norm_eps: float | ||
rope_theta: float | ||
rope_scale: float | ||
|
||
@staticmethod | ||
def guessed(model: 'LazyModel') -> 'Params': | ||
|
@@ -179,6 +180,8 @@ def loadHFTransformerJson(model: 'LazyModel', config_path: Path) -> 'Params': | |
ffn_hidden_size = config["intermediate_size"] | ||
rms_norm_eps = config["rms_norm_eps"] | ||
rope_theta = config["rope_theta"] if "rope_theta" in config else 10000 | ||
rope_scale = config["factor"] if "factor" in config else 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mistral should align to llama There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please help update convert convert_quantized_llama.py and convert_quantized_mistral.py |
||
|
||
|
||
return Params( | ||
n_vocab=n_vocab, | ||
|
@@ -1057,6 +1060,7 @@ def write_file_header(self, params: Params, file_type: NEFileType) -> None: | |
self.fout.write(struct.pack("i", 0)) | ||
self.fout.write(struct.pack("f", params.rms_norm_eps)) | ||
self.fout.write(struct.pack("f", params.rope_theta)) | ||
self.fout.write(struct.pack("f", params.rope_scale)) | ||
|
||
self.fout.write( | ||
struct.pack("i", 1) | ||
|
This file contains 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 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 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 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.
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.
please check whether "rope_scaling" in config