Text Generation
Transformers
Safetensors
English
llama
Sales
FAQ
ECommerce
conversational
text-generation-inference
Instructions to use Alkyema/FAQ_ChatBot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alkyema/FAQ_ChatBot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alkyema/FAQ_ChatBot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Alkyema/FAQ_ChatBot") model = AutoModelForCausalLM.from_pretrained("Alkyema/FAQ_ChatBot", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alkyema/FAQ_ChatBot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alkyema/FAQ_ChatBot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alkyema/FAQ_ChatBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Alkyema/FAQ_ChatBot
- SGLang
How to use Alkyema/FAQ_ChatBot with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Alkyema/FAQ_ChatBot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alkyema/FAQ_ChatBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Alkyema/FAQ_ChatBot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alkyema/FAQ_ChatBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Alkyema/FAQ_ChatBot with Docker Model Runner:
docker model run hf.co/Alkyema/FAQ_ChatBot
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,27 +1,77 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
-
- **
|
| 22 |
-
- **
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
- **License:** [More Information Needed]
|
| 26 |
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- Sales
|
| 5 |
+
- FAQ
|
| 6 |
+
- ECommerce
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
+
metrics:
|
| 11 |
+
- accuracy
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
| 15 |
# Model Card for Model ID
|
| 16 |
|
| 17 |
+
# FAQ Chatbot for Online Orders and Website Queries
|
|
|
|
| 18 |
|
| 19 |
+
This model is a large language model (LLM) based on the LLaMA 3 architecture, fine-tuned to handle frequently asked questions (FAQ) related to online orders and website queries. It is designed to provide accurate and helpful responses to common customer inquiries.
|
| 20 |
|
| 21 |
## Model Details
|
| 22 |
|
| 23 |
+
- **Model Name:** FAQ Chatbot for Online Orders and Website Queries
|
| 24 |
+
- **Architecture:** LLaMA 3
|
| 25 |
+
- **Training Data:** This model was trained on a dataset consisting of typical customer queries related to online orders, such as order status, payment issues, returns and refunds, shipping information, and general website navigation.
|
| 26 |
+
- **Usage:** The model is intended to be used as a customer support assistant, capable of addressing a wide range of questions about online shopping and website functionality.
|
| 27 |
+
|
| 28 |
+
## Features
|
| 29 |
+
|
| 30 |
+
- **Natural Language Understanding:** The model can understand and process natural language input, making it user-friendly for customers.
|
| 31 |
+
- **Contextual Responses:** Provides responses that are contextually relevant to the user's query.
|
| 32 |
+
- **Scalable Support:** Can handle a high volume of queries simultaneously, improving customer service efficiency.
|
| 33 |
+
|
| 34 |
+
## Example Queries
|
| 35 |
+
|
| 36 |
+
Here are some example queries that the model can handle:
|
| 37 |
+
|
| 38 |
+
1. **Order Status:** "Can you tell me the status of my order #12345?"
|
| 39 |
+
2. **Payment Issues:** "I'm having trouble processing my payment. Can you help?"
|
| 40 |
+
3. **Returns and Refunds:** "How can I return a product I bought?"
|
| 41 |
+
4. **Shipping Information:** "When will my order be delivered?"
|
| 42 |
+
5. **Website Navigation:** "How do I find the size chart on your website?"
|
| 43 |
+
|
| 44 |
+
## How to Use
|
| 45 |
+
|
| 46 |
+
To use this model, you can integrate it into your customer support system or chatbot framework. Here's a basic example using the Hugging Face `transformers` library:
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 50 |
+
|
| 51 |
+
# Load the model and tokenizer
|
| 52 |
+
model_name = "your-hugging-face-username/faq-chatbot-online-orders"
|
| 53 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 54 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 55 |
+
|
| 56 |
+
# Example query
|
| 57 |
+
query = "Can you tell me the status of my order #12345?"
|
| 58 |
+
|
| 59 |
+
# Tokenize the input
|
| 60 |
+
inputs = tokenizer(query, return_tensors="pt")
|
| 61 |
+
|
| 62 |
+
# Generate response
|
| 63 |
+
outputs = model.generate(**inputs)
|
| 64 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 65 |
+
|
| 66 |
+
print(response)
|
| 67 |
+
|
| 68 |
|
|
|
|
| 69 |
|
| 70 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 71 |
|
| 72 |
+
- **Developed by:** Satwik Kishore
|
| 73 |
+
- **Model type:** Text Generation
|
| 74 |
+
- **Language(s) (NLP):** English
|
|
|
|
|
|
|
| 75 |
- **License:** [More Information Needed]
|
| 76 |
- **Finetuned from model [optional]:** [More Information Needed]
|
| 77 |
|