Repository navigation
[high risk]Speedup 2.5-6X moe tuning and pin ngram to cpu - #2303
Conversation
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 |
|
(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 |
|
@wenhuach21 Your test is based on eager mode, for compile mode, your fix is even worse, I will fix it by skipping compile for MOE 下面是同模型、同一层(
**要点:**当前版本的 Eager steady 相比 PR 前约快 1.80x(core)/ 1.50x(wall)。Compile steady 的 core 基本持平,PR 前为 36.03s、当前为 35.61s;wall 则分别为 54.06s 和 60.63s,单次测量的差距不宜认定为稳定收益。Compile warmup 成本都较高,尤其当前版本这组。 |
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