已合并
2.2.0资料修改 #766
NIE SHIYU创建于 2025年11月28日
2.2.0资料修改 #766
已合并
NIE SHIYU创建于 2025年11月28日
13 个文件变更+10-15
@@ -1,5 +1,4 @@
1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
2-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3"""2"""
4Note that we don't combine the main with trainer as trainer is used by other main.3Note that we don't combine the main with trainer as trainer is used by other main.
5"""4"""
@@ -1,5 +1,4 @@
1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
2-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3"""2"""
4Note that we don't combine the main with trainer as trainer is used by other main.3Note that we don't combine the main with trainer as trainer is used by other main.
5"""4"""
@@ -1,5 +1,4 @@
1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
2-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3"""2"""
4Note that we don't combine the main with trainer as trainer is used by other main.3Note that we don't combine the main with trainer as trainer is used by other main.
5"""4"""
@@ -204,23 +204,22 @@ rl_config:
204| `e2e_tps` | 端到端的tokens/p/s指标 |204| `e2e_tps` | 端到端的tokens/p/s指标 |
205| `update_tps` | 训练的tokens/p/s指标 |205| `update_tps` | 训练的tokens/p/s指标 |
206| `vllm_tps` | 推理的tokens/p/s指标 |206| `vllm_tps` | 推理的tokens/p/s指标 |
207- 
208* e2e_tps计算方式207* e2e_tps计算方式
209 208 
210$$209$$
211-(\text{response_length_mean} + \text{prompt_length_mean}) \times \text{global_batch_size} \times \text{n_samples_per_prompt} / \text{world_size} \ / \text{time_all}210+(\text{response\_length\_mean} + \text{prompt\_length\_mean}) \times \text{global\_batch\_size} \times \text{n\_samples\_per\_prompt} / \text{world\_size} \ / \text{time\_all}
212$$211$$
213 212 
214* update_tps计算方式213* update_tps计算方式
215 214 
216$$215$$
217-(\text{response_length_mean} + \text{prompt_length_mean}) \times \text{global_batch_size} \times \text{n_samples_per_prompt} / \text{world_size} \ / \text{time_update}216+(\text{response\_length\_mean} + \text{prompt\_length\_mean}) \times \text{global\_batch\_size} \times \text{n\_samples\_per\_prompt} / \text{world\_size} \ / \text{time\_update}
218$$217$$
219 218 
220* vllm_tps计算方式219* vllm_tps计算方式
221 220 
222$$221$$
223-(\text{response_length_mean} + \text{prompt_length_mean}) \times \text{global_batch_size} \times \text{n_samples_per_prompt} / \text{world_size} \ / \text{time_rollout}222+(\text{response\_length\_mean} + \text{prompt\_length\_mean}) \times \text{global\_batch\_size} \times \text{n\_samples\_per\_prompt} / \text{world\_size} \ / \text{time\_rollout}
224$$223$$
225 224 
226注: 以上计算公式中 ` time_all``time_update``time_rollout``response_length_mean``prompt_length_mean` 即分别对应于指标说明里的`timing/all``timing/update``timing/rollout``response_length/mean``prompt_length/mean`,此处名字修改是为了区别于公式里的`/`计算符号;225注: 以上计算公式中 ` time_all``time_update``time_rollout``response_length_mean``prompt_length_mean` 即分别对应于指标说明里的`timing/all``timing/update``timing/rollout``response_length/mean``prompt_length/mean`,此处名字修改是为了区别于公式里的`/`计算符号;
@@ -14,6 +14,10 @@ mkdir logs
14 14 
15export TASK_QUEUE_ENABLE=215export TASK_QUEUE_ENABLE=2
16export HCCL_IF_BASE_PORT=2470316export HCCL_IF_BASE_PORT=24703
17+# 请确认该文件存在(可通过 find /usr -name libjemalloc.so.2 确认)
18+export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2
19+export MALLOC_MMAP_THRESHOLD_=512768
20+export LCAL_COMM_ID=127.0.0.1:27001
17 21 
18NNODES=122NNODES=1
19NPUS_PER_NODE=1623NPUS_PER_NODE=16
@@ -12,7 +12,8 @@ mkdir logs
12 12 
13export TASK_QUEUE_ENABLE=213export TASK_QUEUE_ENABLE=2
14export HCCL_IF_BASE_PORT=2470314export HCCL_IF_BASE_PORT=24703
15-export LD_PRELOAD=/usr/local/lib/libjemalloc.so.215+# 请确认该文件存在(可通过 find /usr -name libjemalloc.so.2 确认)
16+export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2
16export MALLOC_MMAP_THRESHOLD_=51276817export MALLOC_MMAP_THRESHOLD_=512768
17export LCAL_COMM_ID=127.0.0.1:2700118export LCAL_COMM_ID=127.0.0.1:27001
18 19 
@@ -1,5 +1,4 @@
1# coding=utf-81# coding=utf-8
2-# Copyright (c) 2020; NVIDIA CORPORATION. All rights reserved.
3# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.2# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
4#3#
5# Licensed under the Apache License, Version 2.0 (the "License");4# Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,5 +1,4 @@
1# coding=utf-81# coding=utf-8
2-# Copyright (c) 2020; NVIDIA CORPORATION. All rights reserved.
3# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.2# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
4 3 
5class PretrainingSampler:4class PretrainingSampler:
@@ -1,5 +1,4 @@
1# coding=utf-81# coding=utf-8
2-# Copyright (c) 2020; NVIDIA CORPORATION. All rights reserved.
3# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.2# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
4 3 
5import os4import os
@@ -1,4 +1,3 @@
1-# Copyright (c) 2022; NVIDIA CORPORATION. All rights reserved.
2# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
3import time2import time
4 3 
@@ -1,5 +1,4 @@
1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.1# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
2-# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
3 2 
4import os3import os
5import re4import re
@@ -1,7 +1,6 @@
1#!/usr/bin/env python1#!/usr/bin/env python
2# -*- coding: utf-8 -*-2# -*- coding: utf-8 -*-
3# Copyright (c) Huawei Technologies Co., Ltd.2023-2025. All rights reserved.3# Copyright (c) Huawei Technologies Co., Ltd.2023-2025. All rights reserved.
4-# Copyright (c) 2025, NVIDIA CORPORATION. All rights reversed.
5import sys4import sys
6from unittest.mock import MagicMock5from unittest.mock import MagicMock
7from datetime import timedelta6from datetime import timedelta
@@ -1,4 +1,4 @@
1-# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.1+# Copyright (c) 2025, HUAWEI CORPORATION. All rights reserved.
2 2 
3from functools import partial3from functools import partial
4import copy4import copy