You can train models by modifying scripts/finetune_deepspeed.sh (recommended) or scripts/finetune_torchrun.sh.
Training Workflow
- Projector Training: Set
use_peft=false to train only the projector. - LoRA Fine-tuning: Set
use_peft=true and provide the ckpt_path pointing to the projector weights saved in the previous step.
Configuration Variables
Modify these variables in your shell script:
run_dir: Directory to save the model.train_scp_file_path: Path to training data.dev_scp_file_path: Path to validation data.multitask_prompt_path: Path to multitask.jsonl.projector: Type of projector (e.g., linear).encoder_name: Name of the encoder (e.g., whisper).llm_name: Name of the LLM (e.g., Qwen2.5-7B-Instruct).use_peft: Boolean (true/false) for LoRA training.use_fp16: Boolean (true/false) for half-precision training.freeze_encoder: Boolean (true/false) to freeze the encoder.deepspeed_config: Path to DeepSpeed configuration file.
run_dir= # Directory to save the model
train_scp_file_path= # Path to training data
dev_scp_file_path= # Path to validation data
train_max_frame_length=1500
eval_max_frame_length=1000
multitask_prompt_path= # Path to multitask.jsonl
projector=linear
encoder_name=whisper
llm_name=Qwen2.5-7B-Instruct
use_peft=false
use_fp16=true
freeze_encoder=true
pad_or_trim=true
deepspeed_config= # Path to DeepSpeed configuration file