Skip to content

Commit 807aaf0

Browse files
author
weijinqian_v1
committed
[Feature]Moe alltoallv communication optimization for unquantized RL training sence & alltoallv support dpo
Signed-off-by: weijinqian_v1 <weijinqian@huawei.com>
1 parent a4126f3 commit 807aaf0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

vllm_ascend/models/deepseek_dbo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def __init__(
172172
top_k=config.num_experts_per_tok,
173173
hidden_size=config.hidden_size,
174174
intermediate_size=config.moe_intermediate_size,
175-
reduce_results=True,
175+
reduce_results=False,
176176
renormalize=config.norm_topk_prob,
177177
quant_config=quant_config,
178178
use_grouped_topk=True,
@@ -190,7 +190,7 @@ def __init__(
190190
intermediate_size=intermediate_size,
191191
hidden_act=config.hidden_act,
192192
quant_config=quant_config,
193-
reduce_results=True,
193+
reduce_results=True if not envs_ascend.VLLM_ASCEND_ENABLE_MOE_ALL2ALL_SEQ else False,
194194
prefix=f"{prefix}.shared_experts",
195195
)
196196
CustomDeepseekDBOMoE.top_k = config.num_experts_per_tok

vllm_ascend/worker/model_runner_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def _check_dbo_is_valid(self, query_lens: torch.Tensor,
603603
]:
604604
return False
605605
# considering the case that one dp rank may enable dbo while others may not
606-
if not self.vllm_config.model_config.use_mla or not envs_ascend.VLLM_ASCEND_ENABLE_DBO:
606+
if not envs_ascend.VLLM_ASCEND_ENABLE_DBO:
607607
return False
608608
# TODO: remove it if token-level microbatch is enabled
609609
[token_index,

0 commit comments

Comments
 (0)