huggingface / huggingface/open-r1

Fine-tuning got stuck in the beginning

Open
#331 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26.5k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I use lora to run stf.py with Bespoke-Stratos-17k. And I use 5 3090s in total, but it seems that the training got stuck as following:

Image

And the gpus still have memory ,

Image

what leads to that? Attached is my training parameters and zero3.yaml

CUDA_VISIBLE_DEVICES=3,4,5,6,7 accelerate launch --config_file=recipes/accelerate_configs/zero3.yaml src/open_r1/sft.py \
--model_name_or_path Qwen/Qwen2___5-1___5B-Instruct \
--dataset_name HuggingFaceH4/Bespoke-Stratos-17k \
--learning_rate 2.0e-5 \
--num_train_epochs 1 \
--packing \
--max_seq_length 4096 \
--per_device_train_batch_size 1 \
--gradient_accumulation_steps 13 \
--gradient_checkpointing \
--bf16 \
--logging_steps 5 \
--eval_strategy steps \
--eval_steps 150 \
--output_dir data/Qwen2.5-1.5B-Open-R1-Distill

zero3.yaml:
compute_environment: LOCAL_MACHINE
debug: false
deepspeed_config:
deepspeed_multinode_launcher: standard
offload_optimizer_device: none
offload_param_device: none
zero3_init_flag: true
zero3_save_16bit_model: true
zero_stage: 3
distributed_type: DEEPSPEED
downcast_bf16: 'no'
machine_rank: 0
main_training_function: main
mixed_precision: bf16
num_machines: 1
num_processes: 5
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.