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 filesFix scope for retail
README.md
CHANGED
|
@@ -65,12 +65,12 @@ This extensive training dataset ensures that the model can understand and respon
|
|
| 65 |
|
| 66 |
## Limitations and Bias
|
| 67 |
|
| 68 |
-
- The model is fine-tuned on a domain-specific dataset and may not perform well outside the scope of
|
| 69 |
-
- Users should be aware of potential biases in the training data, as the model's responses may inadvertently reflect these biases. This model has been trained with a dataset that answers general
|
| 70 |
|
| 71 |
## Ethical Considerations
|
| 72 |
|
| 73 |
-
This model should be used responsibly, considering ethical implications of automated financial advice. As it is a base model for this
|
| 74 |
|
| 75 |
## Acknowledgments
|
| 76 |
|
|
|
|
| 65 |
|
| 66 |
## Limitations and Bias
|
| 67 |
|
| 68 |
+
- The model is fine-tuned on a domain-specific dataset and may not perform well outside the scope of retail advice.
|
| 69 |
+
- Users should be aware of potential biases in the training data, as the model's responses may inadvertently reflect these biases. This model has been trained with a dataset that answers general retail questions, so potential biases may exist for specific use cases.
|
| 70 |
|
| 71 |
## Ethical Considerations
|
| 72 |
|
| 73 |
+
This model should be used responsibly, considering ethical implications of automated financial advice. As it is a base model for this retail field, it is crucial to ensure that the model's advice complements human expertise and adheres to relevant retail regulations.
|
| 74 |
|
| 75 |
## Acknowledgments
|
| 76 |
|