ms-swift icon indicating copy to clipboard operation
ms-swift copied to clipboard

使用vllm_mode colocate 做grpo训练,在启动时关于temperature的warning

Open houleisai opened this issue 1 year ago • 1 comments

grpo的过程中,在启动的时候遇到以下的warning WARNING 10-10 13:45:26 [sampling_params.py:311] temperature 1e-06 is less than 0.01, which may cause numerical errors nan or inf in tensors. We have maxed it out to 0.01.

我的脚本为CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
NPROC_PER_NODE=8
swift rlhf
--rlhf_type grpo
--model checkpoint-19500
--reward_funcs news type
--reward_weights 1.0 1.0
--multi_turn_scheduler 4_scheduler
--loss_scale last_round
--max_turns 4
--train_type full
--freeze_vit False
--freeze_aligner False
--torch_dtype bfloat16
--use_vllm true
--vllm_mode colocate
--offload_optimizer true
--offload_model true
--vllm_gpu_memory_utilization 0.5
--sleep_level 1
--external_plugins plugin.py
--dataset train_dialog.jsonl
--val_dataset val_dialog.jsonl
--vllm_max_model_len 30000
--max_completion_length 10000
--num_train_epochs 1
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 1e-6
--gradient_accumulation_steps 4
--save_only_model False
--eval_steps 1000000
--save_steps 3000
--save_total_limit 2
--logging_steps 5
--output_dir rl_test
--warmup_ratio 0.05
--dataloader_num_workers 8
--dataset_num_proc 8
--num_generations 4
--temperature 1.0
--beta 0.001
--async_generate false
--deepspeed zero3
--attn_impl flash_attn
--report_to tensorboard

我的temperature 设置的是1.0 ,但是出现的以上的warning,所以不是很理解,辛苦麻烦解答一下

ms_swift==3.8.2 torch==2.7.1 GPU A100 CUDA==12.4 vllm== 0.10.1.1

Additional context Add any other context about the problem here(在这里补充其他信息)

houleisai avatar Oct 11 '25 03:10 houleisai

https://github.com/modelscope/ms-swift/issues/3696

hjh0119 avatar Oct 11 '25 07:10 hjh0119