-
Notifications
You must be signed in to change notification settings - Fork 699
Added mse range setting #11857
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
Added mse range setting #11857
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11857
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 Cancelled JobsAs of commit 83dc888 with merge base 2f55193 ( CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D77055545 |
This PR needs a
|
74f00b7 to
f7b1ecf
Compare
Summary: Added option to use MSE range setting algorithm. This algorithm does a linear grid search over scales and selects those which minimizes mean squared error (see the line_search method in the class PerChannelParamsObserver). This method is applied for quantizing weights per channel. On wikitext task: | Model Name | max_seq_len | ptq | range_setting | word_perplexity |----------|----------|----------|-----------|-----------| | Llama 3.2-1B Instruct | 1024 | 16a4w | MinMax | 184.06065814138435 | | Llama 3.2-1B Instruct | 1024 | 16a4w | MSE (grid size 200) | 292.199408962586 | Reviewed By: cccclai Differential Revision: D77055545
|
This pull request was exported from Phabricator. Differential Revision: D77055545 |
Summary: Added option to use MSE range setting algorithm. This algorithm does a linear grid search over scales and selects those which minimizes mean squared error (see the line_search method in the class PerChannelParamsObserver). This method is applied for quantizing weights per channel. On wikitext task: | Model Name | max_seq_len | ptq | range_setting | word_perplexity |----------|----------|----------|-----------|-----------| | Llama 3.2-1B Instruct | 1024 | 16a4w | MinMax | 184.06065814138435 | | Llama 3.2-1B Instruct | 1024 | 16a4w | MSE (grid size 200) | 292.199408962586 | Reviewed By: cccclai Differential Revision: D77055545
f7b1ecf to
83e056f
Compare
Summary: Pull Request resolved: pytorch#11857 Added option to use MSE range setting algorithm. This algorithm does a linear grid search over scales and selects those which minimizes mean squared error (see the line_search method in the class PerChannelParamsObserver). This method is applied for quantizing weights per channel. On wikitext task: | Model Name | max_seq_len | ptq | range_setting | word_perplexity |----------|----------|----------|-----------|-----------| | Llama 3.2-1B Instruct | 1024 | 16a4w | MinMax | 184.06065814138435 | | Llama 3.2-1B Instruct | 1024 | 16a4w | MSE (grid size 200) | 292.199408962586 | Reviewed By: cccclai Differential Revision: D77055545
|
This pull request was exported from Phabricator. Differential Revision: D77055545 |
83e056f to
83dc888
Compare
Differential Revision: D77055545 Pull Request resolved: pytorch#11857
Summary:
Added option to use MSE range setting algorithm. This algorithm does a linear grid search over scales and selects those which minimizes mean squared error (see the line_search method in the class PerChannelParamsObserver). This method is applied for quantizing weights per channel. Accuracy is still poor, but somewhat better than using MinMax.
On wikitext task, with grid size 200:
Reviewed By: cccclai
Differential Revision: D77055545