HuggingFaceH4/no_robots
Viewer • Updated • 10k • 23.1k • 565
How to use canbingol/Qwen2.5-3B-Instruct-tool-call-en-mixed_data with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
model = PeftModel.from_pretrained(base_model, "canbingol/Qwen2.5-3B-Instruct-tool-call-en-mixed_data")LoRA fine-tune of Qwen/Qwen2.5-3B-Instruct for function/tool calling.
apply_chat_templater=32, lora_alpha=64, lora_dropout=0.05, target_modules=all-linear, bias=none, task_type=CAUSAL_LM
lr=2e-4, epochs=1, per_device_batch=8, grad_accum=16 (effective 128), warmup_ratio=0.03, max_grad_norm=0.3, bf16=True, attn_implementation=sdpa, loss_type=nll
train_loss=0.360, val_loss=0.174, mean_token_accuracy=0.956, runtime≈3h47m (A100)