You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MoE offload: decode overhead from padding masks (#83) and padding counted as expert 0 #89
−5.7% mean, −3.0% median. Generated text is identical.
A one-off adaptive run (--adapt-every 48) shows the same gap: 11.07 → 10.21.
Likely cause: OffloadedLayer.forward now runs two compares, an and, a clamp and a mul on every call (about 5 kernel launches × 48 layers per token).
_counts_d and the tier counts use the clamped ids, so padded rows count as expert 0.
Scope
Skip the mask/clamp when padding cannot occur, or fold it into the existing routing copy.
Count routing with the unclamped ids masked by valid.
In opt_grouped_mm, start from torch.zeros instead of hidden*0, so an inf in hidden does not become NaN.
Make tests/ skip, instead of fail, model families that the installed transformers does not have (on 4.46.2: solar_open, qwen3_moe, qwen3_next; rope_parameters).
Done when
Throughput is back within noise of 41cfb2d on the setup above, with identical text.
Padding no longer changes routing counts (test).
pytest opt_prime/tests on torch 2.5.1 + transformers 4.46.2 has no failures, only skips.
Activity
accel.moe: drop padding ids through the routing tables; padding not c…
gspark-etri commentedon Oct 30, 2026
Fixed by #288, squash-merged into optimus-rm (A/B: +6.5% mean tok/s on Qwen3-30B-A3B, see the PR).