This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
pip install "transformers==4.48.*"
|
||||
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2-Audio-7B-Instruct \
|
||||
--dataset 'speech_asr/speech_asr_aishell1_trainsets:validation#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 16 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 2048 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4
|
||||
@@ -0,0 +1,30 @@
|
||||
# 22GiB
|
||||
# You can refer to `https://github.com/QwenLM/Qwen2.5-VL` for the meaning of the `MAX_PIXELS` parameter.
|
||||
# 1003520 = 1280 * 28 * 28
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'modelscope/coco_2014_caption:validation#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 16 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 2048 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4
|
||||
@@ -0,0 +1,30 @@
|
||||
# 20GiB
|
||||
# You can refer to `https://github.com/QwenLM/Qwen2.5-VL` for the meaning of the `MAX_PIXELS` parameter.
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2-VL-7B-Instruct \
|
||||
--dataset 'AI-ModelScope/coco#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 16 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--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
|
||||
@@ -0,0 +1,8 @@
|
||||
# Perform inference using the validation set from the training phase.
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift infer \
|
||||
--adapters output/vx-xxx/checkpoint-xxx \
|
||||
--stream true \
|
||||
--load_data_args true \
|
||||
--max_new_tokens 2048
|
||||
@@ -0,0 +1,8 @@
|
||||
# If the weights have been merged, please use `--model`.
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
swift infer \
|
||||
--adapters output/vx-xxx/checkpoint-xxx \
|
||||
--stream true \
|
||||
--load_data_args true \
|
||||
--temperature 0 \
|
||||
--max_new_tokens 2048
|
||||
@@ -0,0 +1,12 @@
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
swift export \
|
||||
--adapters output/vx-xxx/checkpoint-xxx \
|
||||
--merge_lora true
|
||||
|
||||
# CUDA_VISIBLE_DEVICES=0 \
|
||||
# swift infer \
|
||||
# --model output/vx-xxx/checkpoint-xxx-merged \
|
||||
# --stream true \
|
||||
# --load_data_args true \
|
||||
# --temperature 0 \
|
||||
# --max_new_tokens 2048
|
||||
@@ -0,0 +1,34 @@
|
||||
# lora_llm_full_vit: 23GiB
|
||||
# lora: 21.6GiB
|
||||
NPROC_PER_NODE=4 \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'tany0699/garbage265#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora_llm \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 4 \
|
||||
--per_device_eval_batch_size 4 \
|
||||
--learning_rate 1e-4 \
|
||||
--vit_lr 1e-5 \
|
||||
--aligner_lr 1e-5 \
|
||||
--lora_rank 16 \
|
||||
--lora_alpha 32 \
|
||||
--gradient_accumulation_steps 1 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 8192 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4 \
|
||||
--deepspeed zero2 \
|
||||
--num_labels 265 \
|
||||
--task_type seq_cls \
|
||||
--save_only_model true
|
||||
@@ -0,0 +1,32 @@
|
||||
# 4 * 22GiB
|
||||
# vit/merger lr 1e-5; llm lora lr 1e-4
|
||||
NPROC_PER_NODE=4 \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'AI-ModelScope/coco#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora_llm \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--vit_lr 1e-5 \
|
||||
--aligner_lr 1e-5 \
|
||||
--lora_rank 16 \
|
||||
--lora_alpha 32 \
|
||||
--gradient_accumulation_steps 4 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 8192 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4 \
|
||||
--deepspeed zero2 \
|
||||
--save_only_model true
|
||||
@@ -0,0 +1,28 @@
|
||||
# 20GB
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'AI-ModelScope/LaTeX_OCR:human_handwrite#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 16 \
|
||||
--eval_steps 50 \
|
||||
--save_steps 50 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4
|
||||
@@ -0,0 +1,10 @@
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
VIDEO_MAX_PIXELS=50176 \
|
||||
FPS_MAX_FRAMES=12 \
|
||||
MAX_PIXELS=1003520 \
|
||||
ENABLE_AUDIO_OUTPUT=0 \
|
||||
swift infer \
|
||||
--adapters output/vx-xxx/checkpoint-xxx \
|
||||
--stream true \
|
||||
--load_data_args true \
|
||||
--max_new_tokens 2048
|
||||
@@ -0,0 +1,40 @@
|
||||
# 4*35GB
|
||||
# A demo for four modalities that can be run directly
|
||||
nproc_per_node=4
|
||||
|
||||
# If using zero3, please set `ENABLE_AUDIO_OUTPUT=0`.
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
ENABLE_AUDIO_OUTPUT=1 \
|
||||
NPROC_PER_NODE=$nproc_per_node \
|
||||
VIDEO_MAX_PIXELS=50176 \
|
||||
FPS_MAX_FRAMES=12 \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-Omni-7B \
|
||||
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#2000' \
|
||||
'AI-ModelScope/LaTeX_OCR:human_handwrite#2000' \
|
||||
'speech_asr/speech_asr_aishell1_trainsets:validation#2000' \
|
||||
'swift/VideoChatGPT:all#2000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
||||
--eval_steps 50 \
|
||||
--save_steps 50 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 2048 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--deepspeed zero2
|
||||
@@ -0,0 +1,34 @@
|
||||
# 4 * 50GiB
|
||||
nproc_per_node=4
|
||||
|
||||
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
NPROC_PER_NODE=$nproc_per_node \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift rlhf \
|
||||
--rlhf_type dpo \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'swift/RLAIF-V-Dataset#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type full \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-5 \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--deepspeed zero3 \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4 \
|
||||
--rpo_alpha 0.1 \
|
||||
--save_only_model true
|
||||
@@ -0,0 +1,37 @@
|
||||
# 4 * 50GiB
|
||||
# You can refer to `https://github.com/QwenLM/Qwen2.5-VL` for the meaning of the `MAX_PIXELS` parameter.
|
||||
# --rlhf_type cpo/orpo/simpo/rm are also supported
|
||||
nproc_per_node=2
|
||||
|
||||
CUDA_VISIBLE_DEVICES=0,1 \
|
||||
NPROC_PER_NODE=$nproc_per_node \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift rlhf \
|
||||
--rlhf_type dpo \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'swift/RLAIF-V-Dataset#20000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--deepspeed zero2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--rpo_alpha 0.1 \
|
||||
--dataset_num_proc 4
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
export teacher_model='OpenGVLab/InternVL3-8B'
|
||||
|
||||
NPROC_PER_NODE=4 \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
swift infer \
|
||||
--model $teacher_model \
|
||||
--infer_backend vllm \
|
||||
--val_dataset 'modelscope/coco_2014_caption:validation#5000' \
|
||||
--vllm_gpu_memory_utilization 0.9 \
|
||||
--vllm_max_model_len 8192 \
|
||||
--max_new_tokens 2048 \
|
||||
--write_batch_size 1000 \
|
||||
--result_path new_coco_dataset.jsonl
|
||||
|
||||
|
||||
# 4 * 42GiB, 3.05s/it
|
||||
NPROC_PER_NODE=4 \
|
||||
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
swift rlhf \
|
||||
--rlhf_type gkd \
|
||||
--model OpenGVLab/InternVL3-2B-Pretrained \
|
||||
--teacher_model $teacher_model \
|
||||
--tuner_type full \
|
||||
--dataset 'new_coco_dataset.jsonl' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 4 \
|
||||
--per_device_eval_batch_size 4 \
|
||||
--learning_rate 1e-5 \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 1 \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--save_only_model true \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4 \
|
||||
--deepspeed zero2 \
|
||||
--padding_free true \
|
||||
--attn_impl flash_attn \
|
||||
--lmbda 0
|
||||
@@ -0,0 +1,34 @@
|
||||
# 4 * 45GiB, 10.29s/it
|
||||
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
MASTER_PORT=29501 \
|
||||
NPROC_PER_NODE=4 \
|
||||
swift rlhf \
|
||||
--rlhf_type gkd \
|
||||
--model OpenGVLab/InternVL3-2B-Pretrained \
|
||||
--teacher_model OpenGVLab/InternVL3-8B \
|
||||
--dataset 'modelscope/coco_2014_caption:validation#2000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type full \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 4 \
|
||||
--per_device_eval_batch_size 4 \
|
||||
--learning_rate 1e-5 \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps 1 \
|
||||
--eval_steps 50 \
|
||||
--save_steps 50 \
|
||||
--save_total_limit 2 \
|
||||
--deepspeed zero2 \
|
||||
--attn_impl flash_attn \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--max_completion_length 512 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4 \
|
||||
--save_only_model true
|
||||
@@ -0,0 +1,35 @@
|
||||
# Due to the absence of a multi-modal open-source dataset for kto,
|
||||
# we will use a pure text kto dataset as an example here.
|
||||
nproc_per_node=2
|
||||
|
||||
CUDA_VISIBLE_DEVICES=0,1 \
|
||||
NPROC_PER_NODE=$nproc_per_node \
|
||||
MAX_PIXELS=1003520 \
|
||||
swift rlhf \
|
||||
--rlhf_type kto \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset 'AI-ModelScope/ultrafeedback-binarized-preferences-cleaned-kto#10000' \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--deepspeed zero2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 4096 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--dataset_num_proc 4
|
||||
@@ -0,0 +1,34 @@
|
||||
# 2*24GB
|
||||
# You can refer to `https://github.com/QwenLM/Qwen2.5-VL` for the meaning of the `VIDEO_MAX_PIXELS` parameter.
|
||||
nproc_per_node=2
|
||||
|
||||
CUDA_VISIBLE_DEVICES=0,1 \
|
||||
NPROC_PER_NODE=$nproc_per_node \
|
||||
VIDEO_MAX_PIXELS=50176 \
|
||||
FPS_MAX_FRAMES=12 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset swift/VideoChatGPT:all \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type lora \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 1 \
|
||||
--per_device_eval_batch_size 1 \
|
||||
--learning_rate 1e-4 \
|
||||
--lora_rank 8 \
|
||||
--lora_alpha 32 \
|
||||
--target_modules all-linear \
|
||||
--freeze_vit true \
|
||||
--freeze_aligner true \
|
||||
--gradient_accumulation_steps $(expr 16 / $nproc_per_node) \
|
||||
--eval_steps 50 \
|
||||
--save_steps 50 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 2048 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--deepspeed zero2
|
||||
@@ -0,0 +1,37 @@
|
||||
# gc true, vgc true: 48GiB, 2.45s/it
|
||||
# gc true, vgc false: 62GiB 2.32s/it
|
||||
# gc false, vgc true: 56GiB 2.16s/it
|
||||
# gc false, vgc false: 77GiB 1.95s/it
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
NPROC_PER_NODE=4 \
|
||||
VIDEO_MAX_PIXELS=50176 \
|
||||
FPS_MAX_FRAMES=12 \
|
||||
swift sft \
|
||||
--model Qwen/Qwen2.5-VL-7B-Instruct \
|
||||
--dataset swift/VideoChatGPT:all \
|
||||
--load_from_cache_file true \
|
||||
--split_dataset_ratio 0.01 \
|
||||
--tuner_type full \
|
||||
--torch_dtype bfloat16 \
|
||||
--num_train_epochs 1 \
|
||||
--per_device_train_batch_size 4 \
|
||||
--per_device_eval_batch_size 4 \
|
||||
--learning_rate 1e-5 \
|
||||
--freeze_vit false \
|
||||
--freeze_aligner false \
|
||||
--gradient_accumulation_steps 1 \
|
||||
--gradient_checkpointing true \
|
||||
--vit_gradient_checkpointing true \
|
||||
--eval_steps 100 \
|
||||
--save_steps 100 \
|
||||
--save_total_limit 2 \
|
||||
--logging_steps 5 \
|
||||
--max_length 2048 \
|
||||
--output_dir output \
|
||||
--warmup_ratio 0.05 \
|
||||
--dataloader_num_workers 4 \
|
||||
--deepspeed zero3 \
|
||||
--use_liger_kernel true \
|
||||
--attn_impl flash_attn \
|
||||
--padding_free true \
|
||||
--save_only_model true
|
||||
Reference in New Issue
Block a user