CoolFace
Modelpublic

gokul-a-krishnan/qwen2.5-3b-address-collector-lora

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes11downloads
Model Card

qwen2.5-3b-address-collector-lora

LoRA adapter for Qwen2.5-3B-Instruct fine-tuned to collect user name and mailing address through multi-turn conversation.

Overview

This is a LoRA adapter trained on top of Qwen/Qwen2.5-3B-Instruct for a specialized data collection agent that gathers name + mailing address through natural multi-turn conversation.

Part of a multi-LoRA setup where a single base model serves multiple agents by hot-swapping lightweight adapters at inference time.

Training Details

ParameterValue
Base ModelQwen/Qwen2.5-3B-Instruct (4-bit quantized)
LoRA Rank16
LoRA Alpha16
Target Modulesqproj, kproj, vproj, oproj, gateproj, upproj, down_proj
Epochs3
Learning Rate0.0002
Training FrameworkUnsloth + TRL SFTTrainer

Usage

python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-3B-Instruct",
    torch_dtype="auto",
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")

# Load this LoRA adapter
model = PeftModel.from_pretrained(base_model, "gokul-a-krishnan/qwen2.5-3b-address-collector-lora")

# Chat
messages = [
    {"role": "system", "content": "You are a friendly data collection assistant. Your task is to collect the user's full name and maili..."},
    {"role": "user", "content": "Hello!"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Multi-LoRA Usage

Load multiple adapters on a single base model and switch between them:

python
from peft import PeftModel

# Load base + first adapter
model = PeftModel.from_pretrained(base_model, "gokul-a-krishnan/qwen2.5-3b-email-collector-lora", adapter_name="email_agent")

# Load second adapter
model.load_adapter("gokul-a-krishnan/qwen2.5-3b-address-collector-lora", adapter_name="address_agent")

# Switch between agents
model.set_adapter("email_agent")    # Now collects name + email
model.set_adapter("address_agent")  # Now collects name + address