Downloads · 30 days
4
14% of all-time downloads
DDoo1204/Day21-Track3-2A202601564-PhamQuyDo-LoRA
Day21-Track3-2A202601564-PhamQuyDo-LoRA is a text generation model from DDoo1204. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains the fine-tuned LoRA adapter for unsloth/Qwen3.5-4B, specialized in classifying Vietnamese customer support tickets into structured 4-field JSON (intent, urgency, product, sentiment).
Downloads · 30 days
4
14% of all-time downloads
All-time downloads
28
Public
Repo size
150 MB
Likes
0
Public
Click a slice to open those files.
.safetensors130 MB · 87%
From the Hugging Face model README
This repository contains the fine-tuned LoRA adapter for unsloth/Qwen3.5-4B, specialized in classifying Vietnamese customer support tickets into structured 4-field JSON (intent, urgency, product, sentiment).
unsloth/Qwen3.5-4Br=16, lora_alpha=32, all 12 linear modules targeted)supervised_fraction ~41.5%)from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "unsloth/Qwen3.5-4B"
adapter_id = "DDoo1204/Day21-Track3-2A202601564-PhamQuyDo-LoRA"
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
model = PeftModel.from_pretrained(model, adapter_id)
model.eval()
prompt = "Khách hàng: Shop ơi, mình đặt áo khoác gió mã đơn VN613097. Bị rách tay áo. Đổi giúp mình với."
messages = [
{"role": "user", "content": prompt}
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))