Text Generation
Transformers
PyTorch
mistral
axolotl
Generated from Trainer
text-generation-inference
conversational
Instructions to use bitext/Mistral-7B-Retail with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bitext/Mistral-7B-Retail with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bitext/Mistral-7B-Retail") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bitext/Mistral-7B-Retail") model = AutoModelForCausalLM.from_pretrained("bitext/Mistral-7B-Retail") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bitext/Mistral-7B-Retail with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bitext/Mistral-7B-Retail" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bitext/Mistral-7B-Retail", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bitext/Mistral-7B-Retail
- SGLang
How to use bitext/Mistral-7B-Retail 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 "bitext/Mistral-7B-Retail" \ --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": "bitext/Mistral-7B-Retail", "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 "bitext/Mistral-7B-Retail" \ --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": "bitext/Mistral-7B-Retail", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bitext/Mistral-7B-Retail with Docker Model Runner:
docker model run hf.co/bitext/Mistral-7B-Retail
Bitext commited on
Update README.md
Browse filesAdd link for public dataset.
README.md
CHANGED
|
@@ -44,7 +44,7 @@ The "Mistral-7B-Retail-v2" uses the `MistralForCausalLM` structure with a `Llama
|
|
| 44 |
|
| 45 |
This model was trained with a dataset specifically designed for retail-related question and answer interactions. The dataset encompasses a comprehensive range of retail intents, ensuring the model is trained to handle diverse customer inquiries and scenarios. It includes 46 distinct intents such as `add_product`, `availability_in_store`, `cancel_order`, `pay`, `refund_policy`, `track_order`, `use_app`, and many more, reflecting common retail transactions and customer service interactions. Each intent contains 1000 examples, which helps in creating responses across various retail situations.
|
| 46 |
|
| 47 |
-
This extensive training dataset ensures that the model can understand and respond to a wide array of retail-related queries, providing support in customer service applications. The dataset follows a structured approach, similar to other datasets published on Hugging Face, but is specifically tailored to cater to the
|
| 48 |
|
| 49 |
## Training Procedure
|
| 50 |
|
|
|
|
| 44 |
|
| 45 |
This model was trained with a dataset specifically designed for retail-related question and answer interactions. The dataset encompasses a comprehensive range of retail intents, ensuring the model is trained to handle diverse customer inquiries and scenarios. It includes 46 distinct intents such as `add_product`, `availability_in_store`, `cancel_order`, `pay`, `refund_policy`, `track_order`, `use_app`, and many more, reflecting common retail transactions and customer service interactions. Each intent contains 1000 examples, which helps in creating responses across various retail situations.
|
| 46 |
|
| 47 |
+
This extensive training dataset ensures that the model can understand and respond to a wide array of retail-related queries, providing support in customer service applications. The dataset follows a structured approach, similar to other datasets published on Hugging Face, but is specifically tailored to cater to the customer support sector: [bitext/Bitext-customer-support-llm-chatbot-training-dataset](https://huggingface.co/datasets/bitext/Bitext-customer-support-llm-chatbot-training-dataset)
|
| 48 |
|
| 49 |
## Training Procedure
|
| 50 |
|