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

qwen3.5-9b grpo训练问题

Open shylockasr opened this issue 7 months ago • 2 comments

Checklist / 检查清单

  • [x] I have searched existing issues, and this is a new question or discussion topic. / 我已经搜索过现有的 issues,确认这是一个新的问题与讨论。

Question Description / 问题描述

您好,我们在训练qwen3.5-9b grpo训练出现如下问题,请问如何解决:

[rank0]: ValueError: The following model_kwargs are not used by the model: ['solutions', 'solution', 'prompt_id', 'request_id'] (note: typos in the generate arguments will also show up in this list)

我们训练grpo 训练代码如下: #!/bin/bash

SYSTEM_PROMPT="""You are a helpful math assistant. Solve the problem step by step and put your final answer within \boxed{}."""

PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True'
NPROC_PER_NODE=4
IMAGE_MAX_TOKEN_NUM=1024
VIDEO_MAX_TOKEN_NUM=128
FPS_MAX_FRAMES=12
CUDA_VISIBLE_DEVICES=0,1,2,3
swift rlhf
--rlhf_type grpo
--model /tmp/Qwen3.5-9B
--reward_funcs external_r1v_acc
--reward_weights 1
--max_completion_length 4096
--dataset 'train_one_vision.jsonl'
--val_dataset 'test_mathvista_1k.jsonl'
--load_from_cache_file true
--tuner_type lora
--torch_dtype bfloat16
--num_train_epochs 1
--per_device_train_batch_size 16
--per_device_eval_batch_size 32
--learning_rate 1e-5
--lora_rank 16
--lora_alpha 32
--target_modules all-linear
--external_plugins ms-swift/examples/train/grpo/plugin/plugin.py
--max_completion_length 4096
--freeze_vit true
--freeze_aligner false
--gradient_accumulation_steps 16
--eval_steps 10
--save_steps 20
--save_total_limit 10
--logging_steps 5
--max_length 4096
--output_dir output/qwen3_5_9b_rl
--warmup_ratio 0.05
--deepspeed zero2
--dataset_num_proc 64
--dataloader_num_workers 4
--num_generations 4
--temperature 0.1
--log_completions true
--async_generate false
--gradient_checkpointing true
--enable_thinking false
--system "$SYSTEM_PROMPT"
--deepspeed zero2 \

shylockasr avatar Apr 16 '26 03:04 shylockasr

i meet with the same problem, #9131 may give you some help

wolfvoid avatar Apr 16 '26 16:04 wolfvoid

Thank you for following up on our issue. The testing issue has now been resolved.

shylockasr avatar Apr 17 '26 02:04 shylockasr