已合并
2.2.0资料修改 #766
NIE SHIYU创建于 2025年11月28日
2.2.0资料修改 #766
已合并
共 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 | """ |
| 4 | Note that we don't combine the main with trainer as trainer is used by other main. | 3 | Note 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 | """ |
| 4 | Note that we don't combine the main with trainer as trainer is used by other main. | 3 | Note 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 | """ |
| 4 | Note that we don't combine the main with trainer as trainer is used by other main. | 3 | Note 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 | ||
| 15 | export TASK_QUEUE_ENABLE=2 | 15 | export TASK_QUEUE_ENABLE=2 |
| 16 | export HCCL_IF_BASE_PORT=24703 | 16 | export 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 | ||
| 18 | NNODES=1 | 22 | NNODES=1 |
| 19 | NPUS_PER_NODE=16 | 23 | NPUS_PER_NODE=16 |
| @@ -12,7 +12,8 @@ mkdir logs | |||
| 12 | 12 | ||
| 13 | export TASK_QUEUE_ENABLE=2 | 13 | export TASK_QUEUE_ENABLE=2 |
| 14 | export HCCL_IF_BASE_PORT=24703 | 14 | export HCCL_IF_BASE_PORT=24703 |
| 15 | -export LD_PRELOAD=/usr/local/lib/libjemalloc.so.2 | 15 | +# 请确认该文件存在(可通过 find /usr -name libjemalloc.so.2 确认) |
| 16 | +export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2 | ||
| 16 | export MALLOC_MMAP_THRESHOLD_=512768 | 17 | export MALLOC_MMAP_THRESHOLD_=512768 |
| 17 | export LCAL_COMM_ID=127.0.0.1:27001 | 18 | export LCAL_COMM_ID=127.0.0.1:27001 |
| 18 | 19 | ||
| @@ -1,5 +1,4 @@ | |||
| 1 | # coding=utf-8 | 1 | # 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-8 | 1 | # 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 | class PretrainingSampler: | 4 | class PretrainingSampler: |
| @@ -1,5 +1,4 @@ | |||
| 1 | # coding=utf-8 | 1 | # 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 | import os | 4 | import 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. |
| 3 | import time | 2 | import 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 | ||
| 4 | import os | 3 | import os |
| 5 | import re | 4 | import re |
| @@ -1,7 +1,6 @@ | |||
| 1 | #!/usr/bin/env python | 1 | #!/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. | ||
| 5 | import sys | 4 | import sys |
| 6 | from unittest.mock import MagicMock | 5 | from unittest.mock import MagicMock |
| 7 | from datetime import timedelta | 6 | from 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 | ||
| 3 | from functools import partial | 3 | from functools import partial |
| 4 | import copy | 4 | import copy |