Downloads · 30 days
6
9% of all-time downloads
ShenghaoYummy/TinyLlama-ECommerce-Chatbot
TinyLlama-ECommerce-Chatbot is a text generation model from ShenghaoYummy. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 for e-commerce customer service chatbot applications.
Downloads · 30 days
6
9% of all-time downloads
All-time downloads
68
Public
Repo size
50.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors50.5 MB · 93%
From the Hugging Face model README
This is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 for e-commerce customer service chatbot applications.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
tokenizer = AutoTokenizer.from_pretrained("ShenghaoYummy/TinyLlama-ECommerce-Chatbot")
# Load the fine-tuned model
model = PeftModel.from_pretrained(base_model, "ShenghaoYummy/TinyLlama-ECommerce-Chatbot")
# Generate response
def generate_response(prompt):
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.8)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example usage
prompt = "<|system|>\nYou are a helpful e-commerce assistant.<|im_end|>\n<|user|>\nWhat's your return policy?<|im_end|>\n<|assistant|>\n"
response = generate_response(prompt)
print(response)
This model was fine-tuned using:
If you use this model, please cite: @misc{ecommerce-chatbot-tinyllama, title={Fine-tuned TinyLlama for E-commerce Customer Service}, author={Your Name}, year={2024}, url={https://huggingface.co/ShenghaoYummy/TinyLlama-ECommerce-Chatbot} }