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

Reduce SmoothQuant Repr #1289

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Reduce SmoothQuant Repr #1289

wants to merge 1 commit into from

Conversation

kylesayrs
Copy link
Collaborator

Purpose

  • Reduce verbosity when debugging SmoothQuantModifier

Changes

resolved_mappings_: Optional[List] = Field(default=None, repr=False)
scales_: Optional[Dict] = Field(default=None, repr=False)

Testing

Before

SmoothQuantModifier(index=0, group='DEFAULT', start=None, end=None, update=None, initialized_=False, finalized_=False, st
arted_=False, ended_=False, smoothing_strength=0.8, ignore=[], num_calibration_steps=None, calibration_function=None, res
olved_mappings_=[SmoothQuantMapping(smooth_name='model.layers.0.input_layernorm', smooth_layer=LlamaRMSNorm((4096,), eps=
1e-05), balance_layers=[Linear(in_features=4096, out_features=4096, bias=False), Linear(in_features=4096, out_features=10
24, bias=False), Linear(in_features=4096, out_features=1024, bias=False)]),  ...

After

SmoothQuantModifier(index=0, group='DEFAULT', start=None, end=None, update=None, initialized_=False, finalized_=False, started_=False, ended_=False, smoothing_strength=0.8, mappings=[LayerMap(balance_layers=['re:.*q_proj', 're:.*k_proj', 're:.*v_proj'], smooth_layers='re:.*input_layernorm'), LayerMap(balance_layers=['re:.*gate_proj', 're:.*up_proj'], smooth_layers='re:.*post_attention_layernorm')], ignore=[], num_calibration_steps=None, calibration_function=None, scales_=None)

Signed-off-by: Kyle Sayers <[email protected]>
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@kylesayrs kylesayrs added the ready When a PR is ready for review label Mar 27, 2025
Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants