bitext/Bitext-customer-support-llm-chatbot-training-dataset
Viewer • Updated • 26.9k • 6.41k • 188
How to use omid5/Qwen3-1.7b-cusomer-support-agent with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("omid5/Qwen3-1.7b-cusomer-support-agent", device_map="auto")This model is a fine-tuned version of Qwen/Qwen3-1.7B on the Bitext Customer Support dataset. It is designed to act as a helpful customer support agent.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen3-1.7B"
adapter_model_id = "omid5/Qwen3-1.7b-cusomer-support-agent"
# 1. Load Base Model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# 2. Load Adapters
model = PeftModel.from_pretrained(base_model, adapter_model_id)
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# 3. Inference
messages = [
{"role": "user", "content": "I received a defective item, what should I do?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The full merged model is available on the merged branch of this repository.
model = AutoModelForCausalLM.from_pretrained(
"omid5/Qwen3-1.7b-cusomer-support-agent",
revision="merged",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("omid5/Qwen3-1.7b-cusomer-support-agent", revision="merged")
The model was trained using accelerate and DeepSpeed with the following hyperparameters:
r: 16alpha: 32dropout: 0.05target_modules: [q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]bitsandbytes| Metric | Value |
|---|---|
| Validation Loss | 0.5842 |
| Validation Token Acc. | 81.00% |
| Training Loss | 0.6846 |
| Training Runtime | 9282s (~2.6h) |
| Samples/Second | 5.21 |
| Total Global Steps | 1512 |
Apache-2.0