File size: 979 Bytes
bdde690 56365df |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
---
library_name: transformers
tags: []
---
%%bash
CUDA_VISIBLE_DEVICES=0 \
MAX_PIXELS=1003520 \
swift rlhf \
--rlhf_type grpo \
--model 'Mihaiii/Ovis2-4B' \
--model_type ovis2 \
--external_plugins './plugin.py' \
--reward_funcs external_db_accuracy \
--train_type lora \
--lora_rank 8 \
--lora_alpha 32 \
--target_modules all-linear \
--torch_dtype bfloat16 \
--dataset 'Mihaiii/OCRBenchv2-other-cols-2' \
--use_hf 1 \
--max_completion_length 1024 \
--num_train_epochs 1 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--learning_rate 1e-5 \
--gradient_accumulation_steps 1 \
--eval_steps 50 \
--save_steps 250 \
--save_total_limit 2 \
--logging_steps 5 \
--max_length 2048 \
--output_dir output \
--warmup_ratio 0.05 \
--dataloader_num_workers 4 \
--dataset_num_proc 4 \
--num_generations 4 \
--temperature 0.9 \
--split_dataset_ratio 0 |