-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add AffineQuantizedTensor
based workflow doc and examples
#277
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/277
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit accdb3d with merge base 6dd63b8 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
torchao/quantization/README.md
Outdated
|
||
|
||
# benchmark to see the speedup | ||
from torch.utils.benchmark import Timer |
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.
We have a benchmark util now https://github.com/pytorch/ao/blob/main/torchao/utils.py#L4
Mind if we update it in case yours is subtly different?
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.
sure, but we probably need to follow up and enable benchmark for cpu and mps as well for that, created an issue here: #287
torchao/quantization/README.md
Outdated
# optional filtering for module name, shape etc. | ||
# quantization activation (needed by dynamic quantization) | ||
# m.weight = nn.Parameter(to_laq(m.weight, device=..., layout=..., ...)) | ||
m.weight = nn.Parameter(to_aq(m.weight, device=..., layout=..., ...)) |
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.
Can we make this a real snippet people can copy paste?
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.
yeah sure
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.
Some minor feedback but thank you for writing this!
Summary: att Test Plan: . Reviewers: Subscribers: Tasks: Tags:
Add special case for zero-temperature sampling. For stories15M on my devserver, seems to improve tokens/sec as follows: before: 189, 180, 166 after: 264, 285, 285
Summary:
att
Test Plan:
.
Reviewers:
Subscribers:
Tasks:
Tags: