Skip to content

fix: replay all experts during bypass-mode AWQ scale search (#4223) - #4261

Merged
Qubitium merged 1 commit into
mainfrom
pr/4223
Nov 16, 2026
Merged

Qubitium merged 1 commit into
mainfrom
pr/4223

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

With MoEConfig(routing=ExpertsRoutingBypass()), AWQ's reference replay of module2inspect still used native routing, so unrouted experts looked unobserved and the coverage guard fell the whole expert group back to RTN (64/64 gate/up rows "not applicable").

What Changed

  • gptqmodel/looper/awq_processor.py: in bypass mode the replay temporarily wraps the MoE block forward so every expert in the scale group actually executes on the block input (mirroring the all-experts lifecycle), then the routed forward produces the output. Coverage is genuine, not guard-relaxed.
  • Added tests/test_awq_moe_bypass_4223.py.

Tests

pytest tests/test_awq_moe_bypass_4223.py   tests/test_tiny_moe_quant_smoke.py::test_tiny_qwen3_moe_awq_routing_override_scales_every_expert -q
# passed (~57 s CPU)

Repro before: RAISED 1, FALLBACK 64; after: RAISED 0, FALLBACK 0.

Fixes #4223

Model Support / Module Plan

N/A — no new model types or registry entries.

Verification environment

No compiled GPTQModel extensions are built in this environment (Machete/Marlin/QQQ-CUDA unavailable), so hardware-specific paths are called out explicitly above. The 19 fix branches from this sprint merge cleanly into one integration branch; the combined run was 195 passed, 2 skipped, ruff check clean.

@Qubitium
Qubitium merged commit 13f2fdc into main Nov 16, 2026
7 of 9 checks passed
@Qubitium
Qubitium deleted the pr/4223 branch November 16, 2026 06:25
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.

[BUG] Follow-up on #4151/#4154: MoEConfig(routing=ExpertsRoutingBypass()) still makes AWQ drop every MoE expert gate/up group to RTN fallback

1 participant