Skip to content

Add Stochastic downcasting to MX4 Quantization #2899

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

Closed
wants to merge 1 commit into from

Conversation

jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Jul 25, 2024

Summary:
This diff adds stochastic noise injection when using the newstochastic_casting argument during mx4 quantization. This is an experimental feature that defaults to being off. Experimentally, it may worsen results and increase runtime.

I did my best to optimize the random noise generation with optimal philox generation but it still is fairly costly. It brings the runtime from ~3000ms to ~3500ms.

Differential Revision: D59835478

Summary:
This diff adds stochastic noise injection when using the new`stochastic_casting` argument during mx4 quantization. This is an experimental feature that defaults to being off. Experimentally, it may worsen results and increase runtime.

I did my best to optimize the random noise generation with optimal philox generation but it still is fairly costly. It brings the runtime from ~3000ms to ~3500ms.

Differential Revision: D59835478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59835478

Copy link

netlify bot commented Jul 25, 2024

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit be3d489
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/66a2b45cb308eb00081c2518
😎 Deploy Preview https://deploy-preview-2899--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 53cd5c8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants