-
Notifications
You must be signed in to change notification settings - Fork 248
[aoti] Remove need for -l in cmake call #1159
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. ⏳ No Failures, 1 PendingAs of commit 062dd87 with merge base 654bb03 ( 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
| 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 {}
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.
general advice is to not have mutable structures as default args because they survive invocations =>
https://docs.python-guide.org/writing/gotchas/
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
75908b8 to
e0299ff
Compare
e0299ff to
062dd87
Compare
Removes the need for the
-lin the cmake call by storing the tokenizer type during export time in the PT2.Stacked on top of #896