Skip to content
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 test for save load weight only quantized state_dict #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jerryzh168
Copy link
Contributor

Summary:
It works with normal torch.load, but failed in a specific way of calling torch.load as shown in test, torchtune is using torch.load in this way.

Test Plan:
python test/quantization/test_quant_api.py -k test_wo_int4_save_load

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:
It works with normal torch.load, but failed in a specific way of calling torch.load
as shown in test, torchtune is using torch.load in this way.

Test Plan:
python test/quantization/test_quant_api.py -k test_wo_int4_save_load

Reviewers:

Subscribers:

Tasks:

Tags:
@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 27, 2024
@@ -248,5 +248,21 @@ def test_gptq_quantizer_gpt_fast(self):
with torch.no_grad():
compiled(inputs[0].values[0], inputs[1].values[0])

def test_wo_int4_save_load(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this needs a version guard as well

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants