已关闭
[ignore] [test-ci] Good case #71
hanboyou创建于 2025年12月16日关闭于 2025年12月24日
[ignore] [test-ci] Good case #71
已关闭
hanboyou创建于 2025年12月16日关闭于 2025年12月24日
3 个文件变更+9-9
@@ -5,7 +5,7 @@
5- [2025/10] DeepSeek-R1、Qwen2.5模型样例首次上线。5- [2025/10] DeepSeek-R1、Qwen2.5模型样例首次上线。
6 6 
7## 🎉概述7## 🎉概述
8-cann-recipes-train仓库旨在针对LLM与多模态模型训练业务中的典型模型、算法,提供基于CANN平台的优化样例,方便开发者简单、快速、高效地使用CANN平台进行模型训练。8+cann-recipes-train仓库旨在针对LLM与多模态模型训练业务中的典型模型、算法,提供基于CANN平台的优化样例,方便开发者简单、快速、高效地使用CANN平台进行模型训练。j
9 9 
10 10 
11## ✨实践列表11## ✨实践列表
@@ -159,7 +159,7 @@ bash ray_start_npu.sh TRAIN_SCRIPT ENV_SCRIPT
159### 文件说明159### 文件说明
160|上级目录|文件路径|说明|160|上级目录|文件路径|说明|
161|-------|--------|--------|161|-------|--------|--------|
162-|megatron|[0001-megatron-bugfix-state_ten-verification.patch](patches/megatron/0001-megatron-bugfix-state_ten-verification.patch)|在处理优化器状态时新增空值判断,避免因空值导致的运行异常|162+|megatron|[0001-megatron-bugfix-state_ten_verification.patch](patches/megatron/0001-megatron-bugfix-state_ten_verification.patch)|在处理优化器状态时新增空值判断,避免因空值导致的运行异常|
163|megatron|[0002-megatron-feature-enable_hdp.patch](patches/megatron/0002-megatron-feature-enable_hdp.patch)|在ROPE中增加HDP相关处理逻辑,`USE_HDP`开启时,使能HDP功能|163|megatron|[0002-megatron-feature-enable_hdp.patch](patches/megatron/0002-megatron-feature-enable_hdp.patch)|在ROPE中增加HDP相关处理逻辑,`USE_HDP`开启时,使能HDP功能|
164|mindspeed|[0001-mindspeed-bugfix-builder.patch](patches/mindspeed/0001-mindspeed-bugfix-builder.patch)|兼容openeuler24.03版本下编译头文件缺失|164|mindspeed|[0001-mindspeed-bugfix-builder.patch](patches/mindspeed/0001-mindspeed-bugfix-builder.patch)|兼容openeuler24.03版本下编译头文件缺失|
165|mindspeed|[0002-mindspeed-feature-enable_hdp.patch](patches/mindspeed/0002-mindspeed-feature-enable_hdp.patch)|在Ring Attention中增加HDP相关处理逻辑,`USE_HDP`开启时,使能HDP功能|165|mindspeed|[0002-mindspeed-feature-enable_hdp.patch](patches/mindspeed/0002-mindspeed-feature-enable_hdp.patch)|在Ring Attention中增加HDP相关处理逻辑,`USE_HDP`开启时,使能HDP功能|
@@ -173,7 +173,7 @@ bash ray_start_npu.sh TRAIN_SCRIPT ENV_SCRIPT
173|verl|[0008-verl-bugfix-enable_compile.patch](patches/verl/0008-verl-bugfix-enable_compile.patch)|NPU上MindSpeed训练框架会无效化torch.compile规避训练侧的compile失败,在推理时开启compile|173|verl|[0008-verl-bugfix-enable_compile.patch](patches/verl/0008-verl-bugfix-enable_compile.patch)|NPU上MindSpeed训练框架会无效化torch.compile规避训练侧的compile失败,在推理时开启compile|
174|verl|[0009-verl-feature-support_EPLB.patch](patches/verl/0009-verl-feature-support_EPLB.patch)|`VLLM_ENABLE_EPLB`开启时,使能推理的EPLB|174|verl|[0009-verl-feature-support_EPLB.patch](patches/verl/0009-verl-feature-support_EPLB.patch)|`VLLM_ENABLE_EPLB`开启时,使能推理的EPLB|
175|verl|[0010-verl-feature-enable_hdp.patch](patches/verl/0010-verl-feature-enable_hdp.patch)|`USE_HDP`开启时,使能HDP功能|175|verl|[0010-verl-feature-enable_hdp.patch](patches/verl/0010-verl-feature-enable_hdp.patch)|`USE_HDP`开启时,使能HDP功能|
176-|verl|[0011-verl-feature-enable-rollout-rebalance.patch](patches/verl/0011-verl-feature-enable-rollout-rebalance.patch)|`ROLLOUT_REBALANCE_ENABLE`开启时,使能Rollout Rebalance功能,详细说明可参考[RL On-Policy 推理场景的序列级均衡调度引擎](patches/verl/features/rollout_optimize/README.md)|176+|verl|[0011-verl-feature-enable_rollout_rebalance.patch](patches/verl/0011-verl-feature-enable_rollout_rebalance.patch)|`ROLLOUT_REBALANCE_ENABLE`开启时,使能Rollout Rebalance功能,详细说明可参考[RL On-Policy 推理场景的序列级均衡调度引擎](patches/verl/features/rollout_optimize/README.md)|
177|verl|[0012-verl-feature-enabled_sam_spec_decode.patch](patches/verl/0012-verl-feature-enabled_sam_spec_decode.patch)|SAM投机推理适配verl框架:允许通过脚本配置项开关SAM投机推理并配置相关参数|177|verl|[0012-verl-feature-enabled_sam_spec_decode.patch](patches/verl/0012-verl-feature-enabled_sam_spec_decode.patch)|SAM投机推理适配verl框架:允许通过脚本配置项开关SAM投机推理并配置相关参数|
178|verl|[0013-verl-bugfix-dataProto_concat.patch](patches/verl/0013-verl-bugfix-dataProto_concat.patch)|合并DataProto数据时,避免因不同节点的`data['timing']['generate_sequences']`存在细微差异导致报错|178|verl|[0013-verl-bugfix-dataProto_concat.patch](patches/verl/0013-verl-bugfix-dataProto_concat.patch)|合并DataProto数据时,避免因不同节点的`data['timing']['generate_sequences']`存在细微差异导致报错|
179|verl|[0014-verl-feature-dapo_data_rebalance.patch](patches/verl/0014-verl-feature-dapo_data_rebalance.patch)|`data_rebalance` DAPO算法适配|179|verl|[0014-verl-feature-dapo_data_rebalance.patch](patches/verl/0014-verl-feature-dapo_data_rebalance.patch)|`data_rebalance` DAPO算法适配|
@@ -186,13 +186,13 @@ bash ray_start_npu.sh TRAIN_SCRIPT ENV_SCRIPT
186|vllm_ascend|[0003-vllm_ascend-feature-enable_zero_tp_to_ep.patch](patches/vllm_ascend/0003-vllm_ascend-feature-enable_zero_tp_to_ep.patch)|零冗余TP转EP通信方案,将o_proj的AllReduce算子替换为ReduceScatter算子,减少冗余通信|186|vllm_ascend|[0003-vllm_ascend-feature-enable_zero_tp_to_ep.patch](patches/vllm_ascend/0003-vllm_ascend-feature-enable_zero_tp_to_ep.patch)|零冗余TP转EP通信方案,将o_proj的AllReduce算子替换为ReduceScatter算子,减少冗余通信|
187|vllm_ascend|[0004-vllm_ascend-feature-dummy_run_load_balance.patch](patches/vllm_ascend/0004-vllm_ascend-feature-dummy_run_load_balance.patch)| 在dummy_run阶段强制负载均衡,优化内存分配|187|vllm_ascend|[0004-vllm_ascend-feature-dummy_run_load_balance.patch](patches/vllm_ascend/0004-vllm_ascend-feature-dummy_run_load_balance.patch)| 在dummy_run阶段强制负载均衡,优化内存分配|
188|vllm_ascend|[0005-vllm_ascend-feature-support_EPLB.patch](patches/vllm_ascend/0005-vllm_ascend-feature-support_EPLB.patch) | `VLLM_ENABLE_EPLB`开启时,使能推理的EPLB|188|vllm_ascend|[0005-vllm_ascend-feature-support_EPLB.patch](patches/vllm_ascend/0005-vllm_ascend-feature-support_EPLB.patch) | `VLLM_ENABLE_EPLB`开启时,使能推理的EPLB|
189-|vllm_ascend|[0006-vllm_ascend-feature-chunk-moe-eager.patch](patches/vllm_ascend/0006-vllm_ascend-feature-chunk-moe-eager.patch) | 针对MoE计算场景分块处理优化,解决prefill阶段可能引起的峰值内存过高,单算子模式实现|189+|vllm_ascend|[0006-vllm_ascend-feature-chunk_moe_eager.patch](patches/vllm_ascend/0006-vllm_ascend-feature-chunk_moe_eager.patch) | 针对MoE计算场景分块处理优化,解决prefill阶段可能引起的峰值内存过高,单算子模式实现|
190|vllm_ascend|[0007-vllm_ascend-bugfix-disabled_fia.patch](patches/vllm_ascend/0007-vllm_ascend-bugfix-disabled-fia.patch)|取消vllm_ascend的特殊逻辑,投机推理的算子从FusedInferAttention算子回调为PagedAttention算子,避免性能劣化|190|vllm_ascend|[0007-vllm_ascend-bugfix-disabled_fia.patch](patches/vllm_ascend/0007-vllm_ascend-bugfix-disabled-fia.patch)|取消vllm_ascend的特殊逻辑,投机推理的算子从FusedInferAttention算子回调为PagedAttention算子,避免性能劣化|
191|vllm_ascend|[0008-vllm_ascend-feature-bs_threshold_for_spec_decode.patch](patches/vllm_ascend/0008-vllm_ascend-feature-bs_threshold_for_spec_decode.patch)|增加投机推理特性自动开关,解决投机推理特性在batch_size过高时性能劣化的问题|191|vllm_ascend|[0008-vllm_ascend-feature-bs_threshold_for_spec_decode.patch](patches/vllm_ascend/0008-vllm_ascend-feature-bs_threshold_for_spec_decode.patch)|增加投机推理特性自动开关,解决投机推理特性在batch_size过高时性能劣化的问题|
192|vllm_ascend|[0009-vllm_ascend-feature-rewrote_rejection_sampler.patch](patches/vllm_ascend/0009-vllm_ascend-feature-rewrote-rejection-sampler.patch)|重写vllm_ascend的rejectionsampler实现,优化性能|192|vllm_ascend|[0009-vllm_ascend-feature-rewrote_rejection_sampler.patch](patches/vllm_ascend/0009-vllm_ascend-feature-rewrote-rejection-sampler.patch)|重写vllm_ascend的rejectionsampler实现,优化性能|
193|vllm_ascend|[0010-vllm_ascend-feature-enabled_sam_spec_decode.patch](patches/vllm_ascend/0010-vllm_ascend-feature-enabled_sam_spec_decode.patch)|SAM投机推理适配vllm_ascend框架:适配vllm框架的改动|193|vllm_ascend|[0010-vllm_ascend-feature-enabled_sam_spec_decode.patch](patches/vllm_ascend/0010-vllm_ascend-feature-enabled_sam_spec_decode.patch)|SAM投机推理适配vllm_ascend框架:适配vllm框架的改动|
194|vllm_ascend|[spec_decode/sam_proposer.py](patches/vllm_ascend/spec_decode/sam_proposer.py)|SAM投机推理适配vllm_ascend框架:实现`SAMProposer`类,作为vllm调用SAM投机推理能力的接口|194|vllm_ascend|[spec_decode/sam_proposer.py](patches/vllm_ascend/spec_decode/sam_proposer.py)|SAM投机推理适配vllm_ascend框架:实现`SAMProposer`类,作为vllm调用SAM投机推理能力的接口|
195-|patches|[0001-feature-model-converter.patch](patches/0001-feature-model-converter.patch) | 新增`USE_ALLTOALL_OVERLAP`开启时hf2mcore权重转换逻辑|195+|patches|[0001-feature-model_converter.patch](patches/0001-feature-model_converter.patch) | 新增`USE_ALLTOALL_OVERLAP`开启时hf2mcore权重转换逻辑|
196 196 
197### 手动准备环境197### 手动准备环境
198 198 
@@ -6,13 +6,13 @@ Subject: [PATCH] Fix DataProto concat bug
6DataProto concat bug when timing generate_sequences is sightly different6DataProto concat bug when timing generate_sequences is sightly different
7https://github.com/volcengine/verl/pull/40307https://github.com/volcengine/verl/pull/4030
8---8---
9- rl_train/qwen3/verl/protocol.py | 25 ++++++++++++++++++++++++-9+ /qwen3/verl/protocol.py | 25 ++++++++++++++++++++++++-
10 1 file changed, 24 insertions(+), 1 deletion(-)10 1 file changed, 24 insertions(+), 1 deletion(-)
11 11 
12-diff --git a/rl_train/qwen3/verl/protocol.py b/rl_train/qwen3/verl/protocol.py12+diff --git a/llm_rl/qwen3/verl/protocol.py b/llm_rl/qwen3/verl/protocol.py
13index e0b1aff..fda1e7c 10064413index e0b1aff..fda1e7c 100644
14---- a/rl_train/qwen3/verl/protocol.py14+--- a/llm_rl/qwen3/verl/protocol.py
15-+++ b/rl_train/qwen3/verl/protocol.py15++++ b/llm_rl/qwen3/verl/protocol.py
16@@ -940,6 +940,24 @@ class DataProto:16@@ -940,6 +940,24 @@ class DataProto:
17 for key, val in non_tensor_batch.items():17 for key, val in non_tensor_batch.items():
18 non_tensor_batch[key] = np.concatenate(val, axis=0)18 non_tensor_batch[key] = np.concatenate(val, axis=0)