Skip to content

refactor: extract extensible shared smoothing engine - #2452

Draft
changwangss wants to merge 3 commits into
intel:mainfrom
changwangss:refactor/shared-smoothing
Draft

changwangss wants to merge 3 commits into
intel:mainfrom
changwangss:refactor/shared-smoothing

Conversation

@changwangss

Copy link
Copy Markdown
Contributor

Description

AWQ and SVDQuant maintain separate smoothing workflows. Extract an algorithm-independent SmoothEngine, SmoothGroup, and structural SmoothStrategy interface, and route both algorithms through the shared engine. New algorithms supply preparation, candidates, scoring, application, and cleanup without adding algorithm branches to the engine.

Preserve AWQ's activation/weight means, ratio/duo grid, QDQ loss, folding, and clipping synchronization; preserve SVDQuant's absmax statistics, Alpha/Beta grid, deployed-scale precision, and low-rank-aware scoring. Keep smoothing optional for SVDQuant and retain its search-all-groups-before-installation order. Existing configuration and SVDQuant smooth imports remain available.

Both algorithms now keep the first exact tie and share numerical-invalid candidate handling, logging, trial-state restoration, and cleanup. Execution errors, including OOM, propagate. AWQ retains its no-valid-candidate skip fallback; SVDQuant retains its error behavior. Joint AWQ + SVDQuant execution and broader model support remain follow-up work.

Type of Change

Refactor

Related Issues

Closes #2451

Validation

  • 78 focused tests passed: 55 smoothing/strategy/SVDQuant pipeline tests and 23 existing AWQ replay/mapping and MXFP4/W4A16/Nunchaku compatibility tests.
  • Runs used PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 and --noconftest to isolate self-contained tests; this is not a full repository test run.
  • All pre-commit checks passed for changed files.
  • Static comparison confirms extracted AWQ candidate/scoring closures and SVDQuant scoring preserve the original code apart from owner naming.

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed.

@changwangss
changwangss force-pushed the refactor/shared-smoothing branch from aac0d02 to 8e5e924 Compare October 8, 2026 14:05
Signed-off-by: changwangss <chang1.wang@intel.com>
@changwangss
changwangss force-pushed the refactor/shared-smoothing branch from 8e5e924 to 7d58d64 Compare October 20, 2026 07:30
Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.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.

[Feature]: Extract an extensible shared smoothing engine for AWQ and SVDQuant

1 participant