Skip to content

[a16-support] Add asymmetric A16 fake quantization - #4924

Open
insoochung wants to merge 4 commits into
gh/insoochung/19/basefrom
gh/insoochung/19/head
Open

insoochung wants to merge 4 commits into
gh/insoochung/19/basefrom
gh/insoochung/19/head

Conversation

@insoochung

@insoochung insoochung commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

The static A16W4 stack supports signed symmetric activations. Add an optional logical UINT16 asymmetric mode that:

  • accepts explicit per-tensor quantization bounds through an INT32 carrier;
  • uses zero-preserving range selection that matches current Quanty;
  • applies the same behavior during direct fake quantization and calibration finalization; and
  • covers the asymmetric calibration-to-training workflow in tests.

Existing configurations retain dtype-derived bounds and behavior.

Previous GitHub review: #4891
@exported-using-ghexport

Differential Revision: D117934172

NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!

Differential Revision: D117934172

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4924

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit bddf3a4 with merge base 12a3afd (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@insoochung

Copy link
Copy Markdown
Contributor Author

This PR continues #4891. The asymmetric A16 implementation is unchanged. This re-export places it on the cleaned stack and removes the obsolete documentation dependency.

@insoochung insoochung added question module: qat quantize_ api qat flow and removed question labels Sep 19, 2026
[ghstack-poisoned]
insoochung pushed a commit that referenced this pull request Sep 19, 2026
Pull Request resolved: #4924

The static A16W4 stack supports signed symmetric activations. Add an optional logical UINT16 asymmetric mode that:
- accepts explicit per-tensor quantization bounds through an INT32 carrier;
- uses zero-preserving range selection that matches current Quanty;
- applies the same behavior during direct fake quantization and calibration finalization; and
- covers the asymmetric calibration-to-training workflow in tests.

Existing configurations retain dtype-derived bounds and behavior.

Previous GitHub review: #4891
ghstack-source-id: 432723624
@exported-using-ghexport

Differential Revision: [D117934172](https://our.internmc.facebook.com/intern/diff/D117934172/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D117934172/)!
[ghstack-poisoned]
insoochung pushed a commit that referenced this pull request Sep 19, 2026
Pull Request resolved: #4924

The static A16W4 stack supports signed symmetric activations. Add an optional logical UINT16 asymmetric mode that:
- accepts explicit per-tensor quantization bounds through an INT32 carrier;
- uses zero-preserving range selection that matches current Quanty;
- applies the same behavior during direct fake quantization and calibration finalization; and
- covers the asymmetric calibration-to-training workflow in tests.

Existing configurations retain dtype-derived bounds and behavior.

Previous GitHub review: #4891
ghstack-source-id: 432727745
@exported-using-ghexport

Differential Revision: [D117934172](https://our.internmc.facebook.com/intern/diff/D117934172/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D117934172/)!

@andrewor14 andrewor14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the remaining comments from #4891, looks good otherwise

[ghstack-poisoned]
insoochung pushed a commit that referenced this pull request Sep 22, 2026
Pull Request resolved: #4924

The static A16W4 stack supports signed symmetric activations. Add an optional logical UINT16 asymmetric mode that:
- accepts explicit per-tensor quantization bounds through an INT32 carrier;
- uses zero-preserving range selection that matches current Quanty;
- applies the same behavior during direct fake quantization and calibration finalization; and
- covers the asymmetric calibration-to-training workflow in tests.

Existing configurations retain dtype-derived bounds and behavior.

Previous GitHub review: #4891
ghstack-source-id: 433395647
@exported-using-ghexport

Differential Revision: [D117934172](https://our.internmc.facebook.com/intern/diff/D117934172/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D117934172/)!
insoochung pushed a commit that referenced this pull request Sep 22, 2026
Pull Request resolved: #4924

The static A16W4 stack supports signed symmetric activations. Add an optional logical UINT16 asymmetric mode that:
- accepts explicit per-tensor quantization bounds through an INT32 carrier;
- uses zero-preserving range selection that matches current Quanty;
- applies the same behavior during direct fake quantization and calibration finalization; and
- covers the asymmetric calibration-to-training workflow in tests.

Existing configurations retain dtype-derived bounds and behavior.

Previous GitHub review: #4891
ghstack-source-id: 433395647
@exported-using-ghexport

Differential Revision: [D117934172](https://our.internmc.facebook.com/intern/diff/D117934172/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D117934172/)!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported module: qat quantize_ api qat flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants