Skip to content

Defer resolution of the default value of arguments used by quantize #2738

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 2 commits into from

Conversation

Jack-Khuu
Copy link
Contributor

@Jack-Khuu Jack-Khuu commented Mar 28, 2024

Summary:
Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.

  • For example, previously the default value of calibration tasks was [], which is not something Int8DynActInt4WeightGPTQQuantizer handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

Differential Revision: D55458866

Copy link

pytorch-bot bot commented Mar 28, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2738

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

✅ No Failures

As of commit 0bdf70f with merge base 45c2557 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 28, 2024
@facebook-github-bot
Copy link
Contributor

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

"-G",
"--group_size",
type=int,
default=256,
Copy link
Contributor

Choose a reason for hiding this comment

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

since group_size doesn't make sense for other settings like fp, maybe default to None as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should probably do the same for the GPTQ specific args then (calibration_*)

I'll change this PR to update all of them and the lower one to just plumbing and keeping None

@Jack-Khuu Jack-Khuu changed the title Change the default argument for Calibration Tasks for GPTQ Defer resolution of the default value of arguments used by quantize Mar 28, 2024
@facebook-github-bot
Copy link
Contributor

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

Jack-Khuu added a commit to Jack-Khuu/executorch-1 that referenced this pull request Mar 28, 2024
…ytorch#2738)

Summary:
Pull Request resolved: pytorch#2738

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

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

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

@facebook-github-bot
Copy link
Contributor

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

Jack-Khuu added a commit to Jack-Khuu/executorch-1 that referenced this pull request Mar 28, 2024
…ytorch#2738)

Summary:
Pull Request resolved: pytorch#2738

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

Differential Revision: D55458866
Jack-Khuu added a commit to Jack-Khuu/executorch-1 that referenced this pull request Mar 28, 2024
…ytorch#2738)

Summary:

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

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

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

Jack-Khuu added a commit to Jack-Khuu/executorch-1 that referenced this pull request Mar 28, 2024
…ytorch#2738)

Summary:

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

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

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

Jack-Khuu added a commit to Jack-Khuu/executorch-1 that referenced this pull request Mar 28, 2024
…ytorch#2738)

Summary:

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

Reviewed By: jerryzh168

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

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

Summary:

Previously group size wasn't being passed properly to 4b quant. This just passes it through

Reviewed By: mergennachin

Differential Revision: D55458352
…ytorch#2738)

Summary:

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

Reviewed By: jerryzh168

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 57e3449.

dbort pushed a commit to dbort/executorch that referenced this pull request Mar 30, 2024
…ytorch#2738)

Summary:
Pull Request resolved: pytorch#2738

Quantize() (specifically GPTQ) is the sole user of the many params, but default values are introduced early and in multiple places. This is bug prone and confusing.
* For example, previously the default value of calibration tasks was [], which is not something `Int8DynActInt4WeightGPTQQuantizer` handles gracefully.

This diff defers default value resolution to quantize() since that is the direct call that uses them.

Reviewed By: jerryzh168

Differential Revision: D55458866

fbshipit-source-id: 1afc5a62d214409f31c43c07be66bfd69712bb74
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. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants