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

Update pull.yml to test snapshot saving and loading #1486

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

Conversation

mikekgfb
Copy link
Contributor

test snapshot saving and loading

Copy link

pytorch-bot bot commented Jan 31, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1486

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

❌ 1 New Failure

As of commit e733606 with merge base 083fdaf (image):

NEW FAILURE - The following job has failed:

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 Meta Open Source bot. label Jan 31, 2025
Fixed typos.
cuda-32.json because somebody would rather fail a job than accept a partil group
@mikekgfb
Copy link
Contributor Author

mikekgfb commented Feb 8, 2025

@jerryzh168 @Jack-Khuu can you please have a look what happens with reloading of the Int4 quantized Linear class from torchao?

https://hud.pytorch.org/pr/pytorch/torchchat/1486#36825796920 shows this:

2025-02-07T02:27:59.4429304Z Traceback (most recent call last):
2025-02-07T02:27:59.4429938Z   File "/pytorch/torchchat/torchchat/cli/builder.py", line 653, in _initialize_model
2025-02-07T02:27:59.4430764Z     model = torch.load(builder_args.snapshot_path, weights_only=False)
2025-02-07T02:28:01.1584442Z Traceback (most recent call last):
2025-02-07T02:28:01.1585203Z   File "/home/ec2-user/actions-runner/_work/torchchat/torchchat/test-infra/.github/scripts/run_with_env_secrets.py", line 102, in <module>
2025-02-07T02:28:01.1585907Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-07T02:28:01.1586450Z   File "/opt/conda/lib/python3.11/site-packages/torch/serialization.py", line 1478, in load
2025-02-07T02:28:01.1586943Z     return _load(
2025-02-07T02:28:01.1587161Z            ^^^^^^
2025-02-07T02:28:01.1587709Z   File "/opt/conda/lib/python3.11/site-packages/torch/serialization.py", line 1971, in _load
2025-02-07T02:28:01.1588217Z     result = unpickler.load()
2025-02-07T02:28:01.1588484Z              ^^^^^^^^^^^^^^^^
2025-02-07T02:28:01.1588987Z   File "/opt/conda/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1938, in __getattr__
2025-02-07T02:28:01.1589534Z     raise AttributeError(
2025-02-07T02:28:01.1589913Z AttributeError: 'Linear' object has no attribute '_linear_extra_repr'

pull / test-gpu-aoti-bfloat16 (cuda, stories15M) / linux-job (gh)
AttributeError: 'Linear' object has no attribute '_linear_extra_repr'

Remove fp16 and fp32 int4 quantized models for now.  
@jerryzh168 Not sure why these dtypes are not compatible with int4 quantization?
@Jack-Khuu
Copy link
Contributor

Thanks for the find, it's using cuda so it should be using the new subclass APIs too hmmm

if (device == "cuda" or device == "xpu") and quantizer == "linear:int4":
quantize_(model, int4_weight_only(q_kwargs["groupsize"]))
if not support_tensor_subclass:
unwrap_tensor_subclass(model)

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 Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants