megatro-swift npu环境 qwen3.5-122b grpo server模式时采样长度直接重复感叹号到最大采样长度

Abierto
#10,595 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start by reading the megatron rlhf GRPO server-mode path and its vLLM server integration, then reproduce with the supplied NPU setup and training command. The report shows completions repeating exclamation marks until the maximum sampling length, but does not identify a file or failing test. Done means finding and fixing the cause so generation produces the expected completion in this setup.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Checklist / 检查清单
  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述

达到最大采样长度:
Image
感叹号效果:
Image

How to Reproduce / 如何复现

npu 910b环境
ms-swift 4.5.3
transformers=5.17.0
训练脚本:
服务1:

ASCEND_RT_VISIBLE_DEVICES=0,1
vllm serve /npu_data/models/Qwen/Qwen3.5-35B-A3B
--host 0.0.0.0
--port 8080
--data_parallel_size 1
--tensor_parallel_size 2
--max_model_len 16384
--gpu_memory_utilization 0.8
--served-model-name Qwen3.5-35B-A3B
--compilation-config '{"cudagraph_capture_sizes": [1, 2, 4, 8, 16, 32, 64]}'
服务2:

ASCEND_RT_VISIBLE_DEVICES=2,3
NPROC_PER_NODE=2
swift rollout
--model /npu_data/models/Qwen/Qwen3.5-35B-A3B
--vllm_data_parallel_size 1
--vllm_tensor_parallel_size 2
--vllm_max_model_len 16384
--vllm_gpu_memory_utilization 0.8
--vllm_engine_kwargs '{"compilation_config": {"cudagraph_capture_sizes": [1, 2, 4, 8, 16, 32, 64]}}'
服务3:

ASCEND_RT_VISIBLE_DEVICES=4,5,6,7
NPROC_PER_NODE=4
MASTER_PORT=29600
GENRM_API_BASE=http://localhost:8080/v1
megatron rlhf
--rlhf_type grpo
--add_version false
--model /npu_data/models/Qwen/Qwen3.5-35B-A3B
--split_dataset_ratio 0.1
--gradient_accumulation_fusion false
--save_safetensors true
--context_parallel_size 1
--tensor_model_parallel_size 1
--pipeline_model_parallel_size 2
--expert_model_parallel_size 2
--recompute_granularity full
--recompute_method uniform
--optimizer_cpu_offload true
--recompute_num_layers 1
--dataset /npu_data/dataset_grpo.jsonl
--num_train_epochs 5
--global_batch_size 16
--micro_batch_size 1
--steps_per_generation 1
--num_generations 8
--external_plugins plugin.py
--use_vllm true
--vllm_mode server
--vllm_server_host 127.0.0.1
--vllm_server_port 8000
--max_length 4096
--max_completion_length 4096
--tuner_type lora
--lr 5e-5
--beta 0.00
--importance_sampling_level sequence
--epsilon 3e-4
--epsilon_high 4e-4
--dynamic_sample false
--overlong_filter true
--loss_type grpo
--sleep_level 2
--finetune
--dataloader_num_workers 8
--dataset_num_proc 8
--no_save_optim
--no_save_rng
--attention_backend flash
--temperature 1.0
--padding_free true
--log_completions true
--logging_steps 1
--eval_steps 2
--save_steps 2
--eval_iters=-1
--save_total_limit 3
--output_dir /npu_data/output_grpo
--reward_funcs async_semantic_genrm
依赖的plugin.py 也可直接使用--reward_funcs accuracy format替代

plugin.py

Additional Information / 补充信息

No response

Lenguaje dominante
Python
Estrellas
16.2k
Forks
1.8k
Merge medio
1 d 14 h
PR fusionados (30 d)
68

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelscope/ms-swift

Todos los issues de modelscope/ms-swift

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.