Skip to content

[main][Quant] Remove unused rotation functions and parameters from W4A4 LAOS quantization#6648

Merged
zzzzwwjj merged 1 commit intovllm-project:mainfrom
SlightwindSec:w4a4_laos
Feb 11, 2026
Merged

[main][Quant] Remove unused rotation functions and parameters from W4A4 LAOS quantization#6648
zzzzwwjj merged 1 commit intovllm-project:mainfrom
SlightwindSec:w4a4_laos

Conversation

@SlightwindSec
Copy link
Copy Markdown
Contributor

@SlightwindSec SlightwindSec commented Feb 10, 2026

Summary

  • Remove unused set_rotation_config and apply_rotation methods from AscendW4A4LaosDynamicLinearMethod
  • Remove unused rotation_type field and associated conditional quantization parameters (heads_rotation, kronecker_rotation_n, kronecker_rotation_m)

These rotation-related functions and parameters are never called in the current W4A4 LAOS dynamic quantization workflow.

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @SlightwindSec, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refining the W4A4 LAOS dynamic quantization implementation by excising dead code. The changes streamline the codebase and improve efficiency by removing functions and parameters related to rotation that were never invoked in the current workflow, thereby also reducing memory footprint.

Highlights

  • Code Cleanup: Removed the set_rotation_config and apply_rotation methods from AscendW4A4LaosDynamicLinearMethod as they were unused.
  • Parameter Removal: Eliminated the rotation_type field and associated conditional quantization parameters (heads_rotation, kronecker_rotation_n, kronecker_rotation_m) which were never utilized.
  • Memory Optimization: Reduced unnecessary memory allocation by removing the unused rotation matrices, which could be up to 160x160 float32.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • vllm_ascend/quantization/methods/w4a4_laos_dynamic.py
    • Removed the rotation_type attribute initialization from the __init__ method.
    • Deleted the set_rotation_config method.
    • Eliminated conditional initialization of heads_rotation, kronecker_rotation_n, and kronecker_rotation_m parameters within get_perchannel_param.
    • Removed the apply_rotation method.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes unused rotation-related functions and parameters from the AscendW4A4LaosDynamicLinearMethod. The changes simplify the codebase by removing dead code, which is a good improvement for maintainability. The changes are correct and I have no further comments on the code.

Following the repository's style guide, I've provided suggestions for the PR title and summary:

Suggested PR Title:

[main][Quant][Refactor] Remove unused rotation logic in W4A4 LAOS quantization

Suggested PR Summary:

### What this PR does / why we need it?

This PR refactors the `AscendW4A4LaosDynamicLinearMethod` by removing unused rotation-related code. The following components are removed:
- The `set_rotation_config` and `apply_rotation` methods.
- The `rotation_type` instance variable.
- Unused quantization parameters: `heads_rotation`, `kronecker_rotation_n`, and `kronecker_rotation_m`.

These components are not utilized in the current W4A4 LAOS dynamic quantization workflow. Their removal simplifies the codebase and eliminates unnecessary memory allocation for large rotation matrices, improving maintainability and efficiency.

### Does this PR introduce _any_ user-facing change?

No, this is an internal refactoring and does not introduce any user-facing changes.

### How was this patch tested?

CI is expected to pass with existing unit tests.

@weijinqian0 weijinqian0 added ready read for review ready-for-test start test by label for PR labels Feb 10, 2026
@zzzzwwjj zzzzwwjj merged commit 53b494b into vllm-project:main Feb 11, 2026
57 checks passed
@SlightwindSec SlightwindSec deleted the w4a4_laos branch February 11, 2026 10:23
mikequan0425 pushed a commit to taoyao1221/vllm-ascend that referenced this pull request Feb 11, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
Signed-off-by: mikequan0425 <mikequan0425@foxmail.com>
845473182 pushed a commit to 845473182/vllm-ascend that referenced this pull request Feb 12, 2026
…to qwen3next_rebase

* 'main' of https://github.com/vllm-project/vllm-ascend:
  [Docs] Fix GLM-5 deploy command (vllm-project#6711)
  [npugraph_ex]enable npugraph_ex by default (vllm-project#6664)
  [doc]add GLM5.md (vllm-project#6709)
  [Model] GLM5 adaptation (vllm-project#6642)
  [Bugfix] Update target probs to target logits in rejection sample (vllm-project#6685)
  [Main][Ops] Make triton rope support index_selecting from cos_sin_cache (vllm-project#5450)
  [CI]fix nightly multi node test error for wait for pod ready (vllm-project#6675)
  [main  to main] upgrade main 0210 (vllm-project#6673)
  [main][Quant] Remove unused rotation functions and parameters from W4A4 LAOS quantization (vllm-project#6648)
  [Test][BugFix] Fix torch.rand usage in triton penalty test (vllm-project#6680)
  Add Worker Interface:check_health (vllm-project#6681)
chenchuw886 pushed a commit to chenchuw886/vllm-ascend that referenced this pull request Feb 12, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
Signed-off-by: momochenchuw <chenchuw@huawei.com>
banxiaduhuo pushed a commit to banxiaduhuo/vllm-ascend that referenced this pull request Feb 26, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Feb 28, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
maoxx241 pushed a commit to maoxx241/vllm-ascend that referenced this pull request Mar 2, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Mar 4, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
LCAIZJ pushed a commit to LCAIZJ/vllm-ascend that referenced this pull request Mar 7, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
yangzhe-2026 pushed a commit to yangzhe-2026/vllm-ascend that referenced this pull request May 6, 2026
…A4 LAOS quantization (vllm-project#6648)

## Summary
- Remove unused `set_rotation_config` and `apply_rotation` methods from
`AscendW4A4LaosDynamicLinearMethod`
- Remove unused `rotation_type` field and associated conditional
quantization parameters (`heads_rotation`, `kronecker_rotation_n`,
`kronecker_rotation_m`)

These rotation-related functions and parameters are never called in the
current W4A4 LAOS dynamic quantization workflow.

- vLLM version: v0.15.0
- vLLM main:
vllm-project/vllm@d7e17aa

Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:quantization ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants