Skip to content

Conversation

@jerryzh168
Copy link
Contributor

Summary:
Similar to pytorch/ao#3084 we added regex support in transformers so people can use regex to quantize the models.

See pytorch/ao#3084 for docs and precedence of different configurations

Uploaded model: https://huggingface.co/torchao-testing/opt-125m-ModuleFqnToConfig-v1-regex-0.14.0.dev

Test Plan:
pytest tests/quantization/torchao_integration/test_torchao.py -k test_module_fqn_to_config_regex

Reviewers:

Subscribers:

Tasks:

Tags:

@jerryzh168 jerryzh168 marked this pull request as draft October 1, 2025 01:06
@jerryzh168 jerryzh168 changed the title Add regex support for ModuleFqnToConfig [torchao] Add regex support for ModuleFqnToConfig Oct 1, 2025
@Rocketknight1
Copy link
Member

cc @MekkCyber for quantization

@jerryzh168 jerryzh168 force-pushed the working-base branch 2 times, most recently from 3fc0850 to c82e4fa Compare October 3, 2025 22:38
Summary:
Similar to pytorch/ao#3084 we added regex support
in transformers so people can use regex to quantize the models.

See pytorch/ao#3084 for docs and precedence of different
configurations

Uploaded model: https://huggingface.co/torchao-testing/opt-125m-ModuleFqnToConfig-v1-regex-0.14.0.dev

Test Plan:
pytest tests/quantization/torchao_integration/test_torchao.py -k test_module_fqn_to_config_regex

Reviewers:

Subscribers:

Tasks:

Tags:
@jerryzh168 jerryzh168 marked this pull request as ready for review October 4, 2025 00:19
@jerryzh168
Copy link
Contributor Author

also cc @SunMarc please take a look

@github-actions github-actions bot requested review from SunMarc and ydshieh October 4, 2025 00:19
Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

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

Amazing feature ! Would be nice to add it to the docs for visibility

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Nice ! Please add some docs around that also. As we are moving to v5 in the next release, maybe we can bump torchao version to clean a but the code @jerryzh168 ?

@jerryzh168
Copy link
Contributor Author

Nice ! Please add some docs around that also. As we are moving to v5 in the next release, maybe we can bump torchao version to clean a but the code @jerryzh168 ?

yeah we can bump the torchao version, we are preparing for a 0.14 release, we can do it after that I think

@SunMarc
Copy link
Member

SunMarc commented Oct 7, 2025

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

Style bot fixed some files and pushed the changes.

@jerryzh168
Copy link
Contributor Author

@bot /style

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

[For maintainers] Suggested jobs to run (before merge)

run-slow: torchao_integration

@MekkCyber MekkCyber enabled auto-merge (squash) October 8, 2025 10:56
@MekkCyber MekkCyber merged commit 2166e26 into huggingface:main Oct 8, 2025
25 checks passed
AhnJoonSung pushed a commit to AhnJoonSung/transformers that referenced this pull request Oct 12, 2025
* Add regex support for ModuleFqnToConfig

Summary:
Similar to pytorch/ao#3084 we added regex support
in transformers so people can use regex to quantize the models.

See pytorch/ao#3084 for docs and precedence of different
configurations

Uploaded model: https://huggingface.co/torchao-testing/opt-125m-ModuleFqnToConfig-v1-regex-0.14.0.dev

Test Plan:
pytest tests/quantization/torchao_integration/test_torchao.py -k test_module_fqn_to_config_regex

Reviewers:

Subscribers:

Tasks:

Tags:

* Apply style fixes

* add assert for

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Mekkouri <93391238+MekkCyber@users.noreply.github.com>
Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants