-
Notifications
You must be signed in to change notification settings - Fork 227
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
[aoti] Remove need for -l in cmake call #1159
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1159
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 75908b8 with merge base de2507b (): NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
937ab9a
to
f285434
Compare
34259d4
to
23f96d4
Compare
f285434
to
2c8b7b5
Compare
b9d6ef5
to
eae63fe
Compare
93e6727
to
5cd2862
Compare
@angelayi The rebase on this looks like a rough, wanna recreate? |
23f96d4
to
b2b93c5
Compare
torchchat/export.py
Outdated
@@ -39,6 +39,7 @@ def export_for_server( | |||
output_path: str = "model.pt2", | |||
dynamic_shapes: bool = False, | |||
package: bool = True, | |||
metadata: Optional[Dict[str, str]] = None, |
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.
metadata: Optional[Dict[str, str]] = None, | |
metadata: Dict[str, str] = {}, |
We can delete metadata = metadata or {}
torchchat/export.py
Outdated
tokenizer_type = "0" | ||
if tokenizer_args is not None: | ||
tokenizer_type = "2" if tokenizer_args.is_sentencepiece else "3" |
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.
tokenizer_type = "0" | |
if tokenizer_args is not None: | |
tokenizer_type = "2" if tokenizer_args.is_sentencepiece else "3" | |
if tokenizer_args is None: | |
tokenizer_type = "0" | |
elif tokenizer_args.is_sentencepiece: | |
tokenizer_type = "2" # Corresponding to llama2 | |
else: | |
tokenizer_type = "3" # Corresponding to llama3 |
nit: easier to add more options
7146029
to
7330b17
Compare
path = package_aoti(output_path, path) | ||
|
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.
sorry, somehow my editor added on a bunch of formatting changes here.. hope it's not too confusing otherwise I can try to remove them.
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.
No worries, these are good lint fixes
7330b17
to
247fd20
Compare
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.
Legit thanks for the updates
Removes the need for the
-l
in the cmake call by storing the tokenizer type during export time in the PT2.Stacked on top of #896