Hikmet58/tr-appointment-qlora-dataset
Preview • Updated • 37
How to use Hikmet58/tr-appointment-qlora-v2-adapter with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
model = PeftModel.from_pretrained(base_model, "Hikmet58/tr-appointment-qlora-v2-adapter")This repository contains the qlora-v2 LoRA adapter trained on top of Qwen/Qwen2.5-7B-Instruct for a Turkish clinic appointment assistant with tool-calling behavior.
The target behavior is:
Qwen/Qwen2.5-7B-InstructHeld-out eval results for the qlora-v2 setup:
100.0%97.0%91.0%91.0%100.0%This repository contains an adapter, not a fully merged model. Load it on top of the base model:
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_name = "Qwen/Qwen2.5-7B-Instruct"
adapter_name = "Hikmet58/tr-appointment-qlora-v2-adapter"
quant = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
quantization_config=quant,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_name)
model.eval()
Training and evaluation files are published separately at:
Hikmet58/tr-appointment-qlora-dataset