LLaMA-Factory
LLaMA-Factory copied to clipboard
[model][WIP]Support InternVL2_5 series
What does this PR do?
may Fix #6322 #6432 #6236 #3802
- But this PR built upon the PR in Transformers. yonigozlan:add-intern-vl
- The integration of this model into Transformers is still incomplete and may undergo further modifications.
- The current code has been validated on 1B small size model and demo data.
Before submitting
- [x] Did you read the contributor guideline?
- [x] Did you write any new necessary tests?
some demo experiment on InternVL2_5-1B-MPO-hf
- video lora sft
### model
model_name_or_path: ../InternVL2_5-1B-MPO-hf
trust_remote_code: true
### method
stage: sft
do_train: true
finetuning_type: lora
lora_rank: 8
lora_target: all
### dataset
dataset: mllm_video_demo
# dataset: mllm_demo #, #identity,alpaca_en_demo # video: mllm_video_demo
template: intern_vl
cutoff_len: 100000
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 4
### output
output_dir: saves/internvl-1b/lora/sft-test-demo-video
logging_steps: 1
save_steps: 500
plot_loss: true
overwrite_output_dir: true
### train
per_device_train_batch_size: 2
gradient_accumulation_steps: 1
learning_rate: 1.0e-4
num_train_epochs: 30.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000
### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500
- mix data full sft
### model
model_name_or_path: /data_train/code/mllm/kuangdd/workspace/work/models/InternVL2_5-1B-MPO-hf
trust_remote_code: true
### method
stage: sft
do_train: true
finetuning_type: full
### dataset
dataset: mllm_demo, dentity, alpaca_en_demo # video: mllm_video_demo
template: intern_vl
cutoff_len: 100000
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 4
### output
output_dir: saves/internvl-1b/full/sft-test-demo
logging_steps: 1
save_steps: 500
plot_loss: true
overwrite_output_dir: true
### train
per_device_train_batch_size: 2
gradient_accumulation_steps: 1
learning_rate: 1.0e-4
num_train_epochs: 30.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000
### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500
@hiyouga @BUAADreamer