Instructions to use HuggingFaceTB/SmolVLM-Instruct-DPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HuggingFaceTB/SmolVLM-Instruct-DPO with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolVLM-Instruct") model = PeftModel.from_pretrained(base_model, "HuggingFaceTB/SmolVLM-Instruct-DPO") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files78 unmodified lines7980818283848578 unmodified lines### Training Procedure```bashaccelerate launch --config_file examples/accelerate_configs/multi_gpu.yaml examples/scripts/dpo_vlm.py --dataset_name HuggingFaceH4/rlaif-v_formatted --model_name_or_path HuggingFaceTB/SmolVLM-Instruct --per_device_train_batch_size 8 --gradient_accumulation_steps 32 --dataset_num_proc 32 --output_dir dpo_smolvlm_rlaif-v --bf16 --torch_dtype bfloat16 --use_peft --lora_target_modules=all-linear exit```### Framework versions78 unmodified lines79808182838485868788899091929394959678 unmodified lines### Training Procedure```bashaccelerate launch --config_file examples/accelerate_configs/multi_gpu.yaml \examples/scripts/dpo_vlm.py \--dataset_name HuggingFaceH4/rlaif-v_formatted \--model_name_or_path HuggingFaceTB/SmolVLM-Instruct \--per_device_train_batch_size 8 \--gradient_accumulation_steps 32 \--dataset_num_proc 32 \--output_dir dpo_smolvlm_rlaif-v \--bf16 \--torch_dtype bfloat16 \--use_peft \--lora_target_modules=all-linear exit```### Framework versions
README.md+12-1