Downloads · 30 days
5
5% of all-time downloads
Dhruv-2902/fine-tuned-gemma7b-customer-support
fine-tuned-gemma7b-customer-support is a text generation model from Dhruv-2902. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
This model is a fine-tuned version of Google's Gemma 7B model, specifically optimized for customer support chatbot applications. It has been trained using LoRA (Low-Rank Adaptation) on the Bitext customer support data…
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
111
Public
Repo size
64.3 MB
Likes
0
Public
Click a slice to open those files.
.json34.4 MB · 53%
From the Hugging Face model README
This model is a fine-tuned version of Google's Gemma 7B model, specifically optimized for customer support chatbot applications. It has been trained using LoRA (Low-Rank Adaptation) on the Bitext customer support dataset to provide helpful and accurate responses to customer inquiries.
This is a fine-tuned version of Google's Gemma 7B model that has been optimized for customer support tasks. The model uses LoRA (Low-Rank Adaptation) fine-tuning to efficiently adapt the base model for customer service scenarios while maintaining the original model's capabilities. It can handle various customer support queries including payment options, product information, troubleshooting, and general assistance.
This model is designed for customer support chatbot applications. It can be used directly to:
The model can be integrated into:
This model should not be used for:
The model inherits limitations from the base Gemma 7B model and may exhibit:
Users should:
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("Dhruv-2902/fine-tuned-gemma7b-customer-support")
# Load base model with quantization for efficiency
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
base_model = AutoModelForCausalLM.from_pretrained(
"google/gemma-7b",
quantization_config=bnb_config,
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Dhruv-2902/fine-tuned-gemma7b-customer-support")
model.eval()
# Generate response
def generate_response(prompt, max_new_tokens=256):
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
temperature=0.7,
top_p=0.9
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example usage
response = generate_response("help me see your allowed payment options")
print(response)
The model was fine-tuned on the Bitext Customer Support LLM Chatbot Training Dataset. The dataset was preprocessed by combining instruction and response pairs into a single text field with the format:
Instruction: [customer query]
Response: [support response]
The dataset was split 80/20 for training and testing respectively.
The model was evaluated on a held-out test set (20% of the original dataset) consisting of customer support instruction-response pairs from the Bitext dataset.
Standard language modeling metrics were used during training, including:
The model uses LoRA fine-tuning which significantly reduces computational requirements compared to full fine-tuning:
If you use this model, please cite:
BibTeX:
@misc{fine-tuned-gemma7b-customer-support,
author = {Dhruv-2902},
title = {Fine-tuned Gemma 7B for Customer Support},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/Dhruv-2902/fine-tuned-gemma7b-customer-support}
}
Also cite the base model:
@misc{gemma_2024,
title={Gemma: Open Models Based on Gemini Research and Technology},
author={Gemma Team},
year={2024},
publisher={Google}
}
Dhruv-2902
For questions or issues regarding this model, please contact through the Hugging Face model repository.