Skip to content

Add parameter_name support to _int4_weight_only_transform#3901

Merged
jcaip merged 19 commits intomainfrom
gh/jcaip/13/head
Feb 24, 2026
Merged

Add parameter_name support to _int4_weight_only_transform#3901
jcaip merged 19 commits intomainfrom
gh/jcaip/13/head

Conversation

This config was deprecated in favor of Float8DynamicActivationFloat8WeightConfig
with packing_format=Float8PackingFormat.SPARSE_CUTLASS and granularity=PerRow().
Remove the class definition, handler, and all references from imports, tests, and
benchmarks.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
This config was deprecated in favor of Int8DynamicActivationIntxWeightConfig.
Remove the class definition, handler, and all references from imports, tests,
QAT code, benchmarks, and documentation. Update QAT docs to reference
Int4WeightOnlyConfig as the example base config.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
This config was deprecated and scheduled for deletion. Remove the class
definition, handler, and all references from imports, tests, benchmarks,
and documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
Remove the config class, its supporting classes (Float8ObservedLinear,
Float8ObservedSoftmax, Float8QuantizedSoftmax), the handler function,
and all references from imports and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
This config was deprecated and scheduled for deletion. Remove the class
definition, handler, and all references from imports, tests, benchmarks,
and the autoround eval script. This also removes the entire BC import
block from quant_api.py since all prototype configs have been removed.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
This config was deprecated and scheduled for deletion. Remove the class
definition, handler, and all references from imports, tests, benchmarks,
and the autoround eval script. This also removes the entire BC import
block from quant_api.py since all prototype configs have been removed.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
This config was deprecated and scheduled for deletion. Remove the class
definition, handler, and all references from imports, tests, benchmarks,
and the autoround eval script. This also removes the entire BC import
block from quant_api.py since all prototype configs have been removed.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Summary:

This PR removes CUSTOM_PARAM_QUANTIZATION_SUPPORTED_CONFIGS, in favor of
using `inspect.signature` to ensure that the given handler has a
parameter_name kwarg we can use to pass in the param fqn.

Test Plan:
```
pytest test/quantization/test_quant_api -k fqn
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragent@cursor.com>

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 17, 2026

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit 7657f08 with merge base d4c1ba3 (image):

NEW FAILURES - The following jobs have failed:

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

…_only_transform"

Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
…_only_transform"

Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
…_only_transform"

Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
…_only_transform"

Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
@jcaip jcaip added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Feb 19, 2026
@jerryzh168
Copy link
Copy Markdown
Contributor

jerryzh168 commented Feb 19, 2026

any test for this change?

…_only_transform"

Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
Enable parameter-level quantization by accepting a parameter_name kwarg,
using getattr/setattr instead of hard-coded module.weight, and switching
to _module_extra_repr with partial for flexible repr.

Co-authored-by: Cursor <cursoragentcursor.com>

[ghstack-poisoned]
@jcaip jcaip changed the base branch from gh/jcaip/13/base to main February 24, 2026 23:47
@jcaip jcaip merged commit d1fa9a2 into main Feb 24, 2026
33 of 36 checks passed
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. module: 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.

3 participants