Skip to content

feat:[AutoDeploy] Support Quantized MoE matcher - #4361

Closed
Fridah-nv wants to merge 7 commits into
NVIDIA:mainfrom
nv-auto-deploy:fridah/moe-quant2
Closed

feat:[AutoDeploy] Support Quantized MoE matcher#4361
Fridah-nv wants to merge 7 commits into
NVIDIA:mainfrom
nv-auto-deploy:fridah/moe-quant2

Conversation

@Fridah-nv

Copy link
Copy Markdown
Collaborator

Description

  • Step 1: update moe pattern matcher to handle fp8_linear in addition to linear. Also, add the corresponding torch_fp8_moe.
  • Update FP4 for the same
  • Update EP sharding with quantized ops
  • Step 2: Handle patched case. For this, update quantize() to be able to map torch_moe to torch_fp8_moe and torch_fp4_moe based on the information in the hf_quant_config.json
  • Step 3: update fuse_moe to map torch_{fp4, fp8}moe to trtllm{fp4, fp8}_moe

tests

E2E run

python build_and_run_ad.py --config '{"world_size":8, "model":"/home/fridahou/models/Mixtral-8x7B-Instruct-v0.1-FP8", "attn_backend
":"FlashInfer", "compile_backend":"torch-simple", "benchmark": false}'  --model-kwargs '{}'

Test Coverage

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]

Launch build/test pipelines. All previously running jobs will be killed.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-[Post-Merge]-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-[Post-Merge]-1, xxx".

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

… with LCA

Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
…nit tests

Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
…cc issue and e2e mixtral fp4 has kernel error wo moe matching

Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
@Fridah-nv
Fridah-nv marked this pull request as draft May 15, 2025 16:37
@Fridah-nv Fridah-nv self-assigned this May 15, 2025
@Fridah-nv Fridah-nv moved this from Backlog to In progress in AutoDeploy Board May 15, 2025
@Fridah-nv Fridah-nv added the AutoDeploy <NV> AutoDeploy Backend label May 19, 2025
@Fridah-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@Fridah-nv

Copy link
Copy Markdown
Collaborator Author

Step 1 and 2 merged in :nv-auto-deploy#68
Will open another PR for step 3

@Fridah-nv Fridah-nv closed this Jul 11, 2025
@github-project-automation github-project-automation Bot moved this from In progress to Done in AutoDeploy Board Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoDeploy <NV> AutoDeploy Backend

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant