-
Notifications
You must be signed in to change notification settings - Fork 903
Description
Describe the bug
What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图)
CUDA_VISIBLE_DEVICES=0,1,2,3
nproc_per_node=4
MAX_POSITIVE_SAMPLES=30
MAX_NEGATIVE_SAMPLES=50
LISTWISE_RERANKER_TEMPERATURE=0.8
LISTWISE_RERANKER_MIN_GROUP_SIZE=10
NPROC_PER_NODE=$nproc_per_node
swift sft
--model qwen3_reranker_0_6B
--model_type qwen3_reranker
--task_type generative_reranker
--loss_type listwise_generative_reranker
--train_type full
--dataset val_dataset.jsonl
--split_dataset_ratio 0.05
--eval_strategy steps
--output_dir output
--eval_steps 100
--num_train_epochs 1
--save_steps 200
--save_total_limit 5
--save_only_model true
--per_device_train_batch_size 2
--per_device_eval_batch_size 2
--gradient_accumulation_steps 8
--learning_rate 6e-6
--dataloader_drop_last true
[rank1]: File "/usr/local/lib/python3.11/site-packages/transformers/trainer.py", line 5265, in
[rank1]: num_items_in_batch = sum([(batch["labels"].ne(-100)).sum() for batch in batch_samples])
[rank1]: ~~~~~^^^^^^^^^^
[rank1]: KeyError: 'labels'
Your hardware and system info
Write your system info like CUDA version/system/GPU/torch version here(在这里给出硬件信息和系统信息,如CUDA版本,系统,GPU型号和torch版本等)
L40
| NVIDIA-SMI 535.216.01 Driver Version: 535.216.01 CUDA Version: 12.2
torch 2.6.0
Additional context
Add any other context about the problem here(在这里补充其他信息)