[NVIDIA] Fix BF16 FlashInfer TRTLLM MoE RL weight update - #25692
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
During the e2e testing, we find a more fundamental issue of the flashinfer_trtllm path. This issue actually affects the inference accuracy as well. Basically, the destination param shard will be padded to 128 rows for the flashinfer_trtllm kenrel, while the checkpoint tensor is still unpadded. Previously, the loader used the padded destination shard size to slice the source checkpoint tensor, so higher TP ranks loaded the wrong rows. Example:
The new commit fix it. And in a pure SGLang fresh-load GSM8K-200 run with Qwen3-30B-A3B on B200 |
|
I cannot reproduce the inference accuracy drop with Could you share the command you are using? |
|
Another data points: Tried RL training with this fix. Compared to the triton backend (baseline), the accuracy matches and perf is >10% better:
Note: For the flashinfer_trtllm, we ran the test for 3 times with no @yueming-yuan to review. |
|
Finally, I figured out the issue. The previous IMA was not related to this PR. It was caused by my local experiment setup: I did not patch SGLang correctly inside the Miles container. After fixing the setup, training runs cleanly. I tested 8xB200 Qwen3-30B RL training with this script in two configurations:
Both configurations run without issues. The raw reward curves match the Triton baseline, and FlashInfer shows about a 10% improvement in rollout_time. @yueming-yuan can you take another look? |
|
cc. @nvpohanh |
279831e to
008ad87
Compare







Summary
Fix BF16 FlashInfer TRTLLM MoE hot weight update.
With this change:
Pure inference is unchanged:
load_weights -> process_weights_after_loading -> packed params -> inferRL rollout update changes from the broken flow:
packed params -> load canonical update weights into packed layout -> ERRORto:
packed params -> restore canonical shape -> load canonical update weights -> process_weights_after_loading -> packed paramsChanges
process_weights_after_loading().w13loading when destination halves have padding.Test