gokul-a-krishnan/qwen2.5-3b-address-collector-lora
011
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
Usage
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:
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