Llama 3.2 Customer Support Assistant (QLoRA)

A QLoRA fine-tuned version of Meta Llama 3.2 3B Instruct designed to generate professional customer support responses for common e-commerce scenarios such as refunds, shipping issues, returns, order tracking, and product exchanges.

This model was developed as an educational and portfolio project demonstrating parameter-efficient fine-tuning (PEFT) using QLoRA.


Base Model

  • Model: Meta Llama 3.2 3B Instruct
  • Architecture: LlamaForCausalLM
  • Fine-Tuning Method: QLoRA (PEFT)
  • Quantization: 4-bit NF4 (BitsAndBytes)

Dataset

Fine-tuned using:

  • bitext/Bitext-customer-support-llm-chatbot-training-dataset

The dataset contains customer support conversations covering common customer service scenarios.


Training Configuration

Parameter Value
Fine-Tuning QLoRA
LoRA Rank 16
Quantization 4-bit NF4
Framework Hugging Face Transformers
Trainer TRL SFTTrainer
Monitoring Weights & Biases

Training Results

Metric Value
Final Training Loss ~0.53
Validation Loss ~0.535
Mean Token Accuracy ~82.47%
Trainable Parameters 9,175,040
Total Parameters 3,221,924,864
Trainable Percentage 0.2848%

Only 0.2848% of the model parameters were trained while keeping the remaining 99.7% frozen.


Adapter Information

This repository contains only the trained LoRA adapter weights.

To use this model, first load the base model (meta-llama/Llama-3.2-3B-Instruct) and then apply the adapter using the PEFT library.


Example

User

My package hasn't arrived.

Assistant

I'm sorry to hear that your package hasn't arrived. Could you please provide your order number or tracking number so I can check the shipping status for you?


Loading the Model

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

BASE_MODEL = "meta-llama/Llama-3.2-3B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)

base_model = AutoModelForCausalLM.from_pretrained(BASE_MODEL)

model = PeftModel.from_pretrained(
    base_model,
    "andref218/llama3.2-customer-support-qlora"
)

Intended Use

This model is intended for:

  • Customer support chatbots
  • Educational purposes
  • Fine-tuning demonstrations
  • PEFT / QLoRA experimentation

Limitations

  • The model was fine-tuned on a customer support dataset and is not intended as a general-purpose assistant.
  • Responses should be reviewed before deployment in production environments.
  • Performance depends on the quality and scope of the fine-tuning dataset.

Technologies

  • Transformers
  • TRL
  • PEFT
  • QLoRA
  • BitsAndBytes
  • PyTorch
  • Hugging Face Datasets
  • Weights & Biases

Author

André Fonseca

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for andref218/llama3.2-customer-support-qlora

Finetuned
(1898)
this model