[ModelOpt] Load w13/w2_input_scale for all experts, nvfp4#26135
[ModelOpt] Load w13/w2_input_scale for all experts, nvfp4#26135mgoin merged 4 commits intovllm-project:mainfrom
Conversation
|
This pull request has merge conflicts that must be resolved before it can be |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
49543bd to
cbfdd6d
Compare
Signed-off-by: Shu Wang <shuw@nvidia.com>
cbfdd6d to
597672d
Compare
Signed-off-by: Shu Wang. <shuw@nvidia.com>
|
For the server (TP4):
client:
server (DP4):
client:
|
Signed-off-by: Shu Wang. <shuw@nvidia.com>
| # Case input scale: input_scale loading is only supported for fp8 | ||
| if "input_scale" in weight_name: | ||
| # this is needed for compressed-tensors only |
There was a problem hiding this comment.
Nit: looks like these comments are out of date
| allow_flashinfer = getattr(self.quant_method, "allow_flashinfer", False) | ||
| moe_backend = getattr(self.quant_method, "flashinfer_moe_backend", None) | ||
|
|
||
| use_global_sf = ( | ||
| allow_flashinfer | ||
| and is_flashinfer_supporting_global_sf(moe_backend) | ||
| and "input_scale" in weight_name | ||
| and quant_method_name == "ModelOptNvFp4FusedMoE" | ||
| ) |
There was a problem hiding this comment.
Would be good to put these three lines together and leave a comment on what use_global_sf means in this case since we are in fused_moe/layer.py
mgoin
left a comment
There was a problem hiding this comment.
LGTM, although checking for local attrs in fused_moe/layer.py doesn't feel good to keep doing I don't have a better option atm
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
…ct#26135) Signed-off-by: Shu Wang <shuw@nvidia.com> Signed-off-by: Shu Wang. <shuw@nvidia.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
This matches trt-llm usage. Use all experts' input scales to compute alpha and quantize. This change doesn't affect perf.
Purpose
Test Plan
Test Result
After change: