Skip to content

Conversation

@namgyu-youn
Copy link
Contributor

@namgyu-youn namgyu-youn commented Nov 12, 2025

Summary:
This PR is smaller chunks of #2729. Instead of implementing a linear model in each test code, we want to support its API for developers' utility and consistency. The updated toy model requires device and dtype to help clearly identify.

Test Plan:
benchmarks/benchmark_aq.py
test/dtypes/test_affine_quantized_float.py

Future Plan:
For a full update, we also have to update the following tests, the same as this PR:

Co-authored-by: Jerry Zhang jerryzh168@gmail.com

Co-authored-by: Jerry Zhang <jerryzh168@gmail.com>
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 12, 2025

🔗 Helpful Links

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

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

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

@meta-cla meta-cla 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 Nov 12, 2025
@namgyu-youn
Copy link
Contributor Author

cc @jerryzh168 :)

@namgyu-youn
Copy link
Contributor Author

@pytorchbot label "topic: not user facing" "topic: for developers"

@jerryzh168
Copy link
Contributor

I think we can prioritize [test/quantization/quantize_/workflows/float8/test_float8_tensor.py](https://github.com/pytorch/ao/blob/main/test/quantization/quantize_/workflows/float8/test_float8_tensor.py) others might have to be deprecated

@namgyu-youn
Copy link
Contributor Author

namgyu-youn commented Nov 13, 2025

I think we can prioritize [test/quantization/quantize_/workflows/float8/test_float8_tensor.py](https://github.com/pytorch/ao/blob/main/test/quantization/quantize_/workflows/float8/test_float8_tensor.py) others might have to be deprecated

Actually the order is intentional for the small-to-large process. So the order will be:

  1. Base model: torchao/testing/model_architecture.py
  2. Old api (we are here)
  3. New tensor subclass: Int8Tensor, Float8Tensor
  4. Quantization api integration: test/quantization/test_quant_api.py
  5. Full integration: test/integration/test_integration.py

@jerryzh168
Copy link
Contributor

OK, please check the CI errors

@namgyu-youn
Copy link
Contributor Author

@pytorchbot label "topic: not user facing" "topic: for developers"

@pytorch-bot pytorch-bot bot added topic: for developers Use this tag if this PR is mainly developer facing topic: not user facing Use this tag if you don't want this PR to show up in release notes labels Nov 16, 2025
@namgyu-youn namgyu-youn changed the title update toy model to use api update toy model to use global variants Nov 16, 2025
@namgyu-youn
Copy link
Contributor Author

OK, please check the CI errors

Done, please take a look at this PR.

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. topic: for developers Use this tag if this PR is mainly developer facing topic: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants