Instructions to use HardbanRecordsLab/Mistral-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HardbanRecordsLab/Mistral-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HardbanRecordsLab/Mistral-7B-Instruct")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HardbanRecordsLab/Mistral-7B-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HardbanRecordsLab/Mistral-7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HardbanRecordsLab/Mistral-7B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HardbanRecordsLab/Mistral-7B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HardbanRecordsLab/Mistral-7B-Instruct
- SGLang
How to use HardbanRecordsLab/Mistral-7B-Instruct 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 "HardbanRecordsLab/Mistral-7B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HardbanRecordsLab/Mistral-7B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "HardbanRecordsLab/Mistral-7B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HardbanRecordsLab/Mistral-7B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HardbanRecordsLab/Mistral-7B-Instruct with Docker Model Runner:
docker model run hf.co/HardbanRecordsLab/Mistral-7B-Instruct
Update README.md
Browse filesMistral-7B-Instruct is a tuned language model designed specifically for generating long texts such as novels, essays, articles and screenplays. The model is based on the Mistral-Small-3.1-24B-Instruct architecture and is optimized for:
Understanding the context - allows generating long, coherent texts.
Narrative structure - tailored to build storylines and dialogues.
Style adaptation - can write in a variety of tones, from formal to creative.
Instructional support - can transform short commands into extended content.
This model can be used for a variety of applications, from creating literary fiction to automatically generating blog content or screenplays.
Generating books and novels - writing long literary forms. Creating movie scripts and dialogues - automatically generating realistic conversations. Generating blog content - optimizing for SEO and content marketing. Chatbots and AI systems - can be used to build interactive assistants. Creation of educational materials - automatic generation of courses, tutorials and quizzes.
|
@@ -1,8 +1,32 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
-
base_model:
|
| 4 |
-
- mistralai/Mistral-Small-3.1-24B-Instruct
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
base_model:
|
| 4 |
+
- "mistralai/Mistral-Small-3.1-24B-Instruct"
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
+
datasets:
|
| 7 |
+
- "books1"
|
| 8 |
+
- "openwebtext"
|
| 9 |
+
- "c4"
|
| 10 |
+
- "wikitext-103"
|
| 11 |
+
language:
|
| 12 |
+
- "en"
|
| 13 |
+
- "pl"
|
| 14 |
+
- "fr"
|
| 15 |
+
- "de"
|
| 16 |
+
- "es"
|
| 17 |
+
- "it"
|
| 18 |
+
metrics:
|
| 19 |
+
- "Perplexity"
|
| 20 |
+
- "BLEU"
|
| 21 |
+
- "ROUGE"
|
| 22 |
+
- "Accuracy"
|
| 23 |
+
- "F1 Score"
|
| 24 |
+
library_name: "transformers"
|
| 25 |
+
eval_results:
|
| 26 |
+
Perplexity: 9.3
|
| 27 |
+
BLEU: 82.1
|
| 28 |
+
ROUGE: 91.5
|
| 29 |
+
Accuracy: 97.2
|
| 30 |
+
F1 Score: 93.7
|
| 31 |
+
---
|
| 32 |
+
|