[high risk]Speedup 2.5-6X moe tuning and pin ngram to cpu - #2303
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into fix_moe_loading
for more information, see https://pre-commit.ci
…into suport_fuse_moe
main branch026-09-04 15:16:39 INFO replace_modules.py L390: Found 40 modules to replace This call originates from: torch._dynamo.utils.warn_once(msg) current(autoround) wenhuach@mlp-dgx-01:~/auto-round$ CUDA_VISIBLE_DEVICES=2 python3 -m auto_round /models/Qwen3.6-35B-A3B --output_dir "/data2/wenhuach" --tasks lambada_openai |
|
accuracy is not matched for now |
for more information, see https://pre-commit.ci
…into suport_fuse_moe
for more information, see https://pre-commit.ci
…into suport_fuse_moe
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…into suport_fuse_moe
for more information, see https://pre-commit.ci
|
(autoround) wenhuach@mlp-dgx-01:~/auto-round$ CUDA_VISIBLE_DEVICES=6 python3 -m auto_round /models/Qwen3.6-35B-A3B/ --tasks mmlu --format fake --output_dir /data4/wenhuach --eval_bs 4 |
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
please have a review |
|
nemetron still has issues, trackign here #2324 |
|
merge first, will fix issues in other prs |
Description
This PR introduces a new grouped-GEMM MoE experts forward path intended to significantly speed up MoE tuning, and adds mechanisms to keep very large ngram/PLE embedding tables off accelerators (CPU-pinned or GPU-sharded) to prevent VRAM/RAM blowups during per-block dispatch and tuning.
Changes:
Add a CUDA-focused grouped experts implementation (linear_grouped) with batched fake-quantization to reduce per-expert overhead during tuning.Add ngram embedding placement controls (AR_NGRAM_DEVICE) plus helpers to pin/shard ngram tables and to avoid relocating pinned/self-managed subtrees.Extend disk-stream materialization to handle wildcard shard concatenation and broader converter-driven weight reconstruction for newer checkpoint layouts.
Type of Change
Bug fix
Related Issues
Fixes or relates to #
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.TODO
check v2 has imatrix