[NPU] Add qwen3-4b fully_async script#368
Conversation
Signed-off-by: flb <floatlibai@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request adds a new bash script, run-qwen3-4B-fully_async-npu.sh, to run a fully-async GRPO example using Qwen3-4B-Instruct on NPUs. Feedback on the script includes double-quoting the bash array expansions to prevent word splitting and correcting the ASCEND_RT_VISIBLE_DEVICES variable to align with the 4-GPU configuration mentioned in the script's header.
| ${MODEL_ARGS[@]} \ | ||
| ${CKPT_ARGS[@]} \ | ||
| ${ROLLOUT_ARGS[@]} \ | ||
| ${OPTIMIZER_ARGS[@]} \ | ||
| ${GRPO_ARGS[@]} \ | ||
| ${PERF_ARGS[@]} \ | ||
| ${VLLM_ARGS[@]} \ | ||
| ${MISC_ARGS[@]} |
There was a problem hiding this comment.
Array expansions in Bash should be double-quoted (e.g., "${CKPT_ARGS[@]}") to prevent word splitting and glob expansion on the array elements. This is especially important if any of the paths or arguments contain spaces.
| ${MODEL_ARGS[@]} \ | |
| ${CKPT_ARGS[@]} \ | |
| ${ROLLOUT_ARGS[@]} \ | |
| ${OPTIMIZER_ARGS[@]} \ | |
| ${GRPO_ARGS[@]} \ | |
| ${PERF_ARGS[@]} \ | |
| ${VLLM_ARGS[@]} \ | |
| ${MISC_ARGS[@]} | |
| "${MODEL_ARGS[@]}" \ | |
| "${CKPT_ARGS[@]}" \ | |
| "${ROLLOUT_ARGS[@]}" \ | |
| "${OPTIMIZER_ARGS[@]}" \ | |
| "${GRPO_ARGS[@]}" \ | |
| "${PERF_ARGS[@]}" \ | |
| "${VLLM_ARGS[@]}" \ | |
| "${MISC_ARGS[@]}" |
| set -ex | ||
|
|
||
| export PYTHONUNBUFFERED=1 | ||
| export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
There was a problem hiding this comment.
The script header states it is designed to run on a single 4-GPU node, but ASCEND_RT_VISIBLE_DEVICES is configured with 16 devices (0-15). It should be restricted to 0,1,2,3 to align with the 4-GPU design and avoid potential runtime issues on 4-GPU systems.
| export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | |
| export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3 |
Documentation build overview
48 files changed ·
|
Add qwen3-4b fully_async script.
Test result see #358