Skip to content

Conversation

@minettekaum
Copy link
Contributor

Description

Added torchao_autoquant alogrithm.

  • You can find the torchao_autoquant algorithm in src/pruna/algorithms/torchao_autoquant.py
  • You can find the test in tests/algorithms/testers/autoquant.py

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The algorithm has been tested by the test in tests/algorithms/testers/autoquant.py

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Comment @cursor review or bugbot run to trigger another review on this PR

model.transformer = working_model
else:
model = working_model

Copy link

Choose a reason for hiding this comment

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

Bug: Autoquant assumes model.transformer always exists

model_check_fn returns True for any torch.nn.Module, but _apply unconditionally reads model.transformer. For valid inputs that are torch.nn.Module instances without a transformer attribute (or when the input is itself a diffusers transformer module), this triggers an attribute error and breaks applying torchao_autoquant.

Additional Locations (1)

Fix in Cursor Fix in Web

@minettekaum minettekaum changed the title feat/quantizer-algorithm: torchao_autoquant alogrithm added feat: add quantizer-algorithm Dec 19, 2025
@minettekaum minettekaum changed the title feat: add quantizer-algorithm feat: add quantizer algorithm Dec 19, 2025
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.

2 participants