Text Generation
Transformers
PyTorch
Safetensors
English
mistral
pretrained
mistral-common
text-generation-inference
Instructions to use mistralai/Mistral-7B-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mistralai/Mistral-7B-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mistralai/Mistral-7B-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1") model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mistralai/Mistral-7B-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Install mistral-common: pip install --upgrade mistral-common # Start the vLLM server: vllm serve "mistralai/Mistral-7B-v0.1" --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mistralai/Mistral-7B-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mistralai/Mistral-7B-v0.1
- SGLang
How to use mistralai/Mistral-7B-v0.1 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 "mistralai/Mistral-7B-v0.1" \ --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": "mistralai/Mistral-7B-v0.1", "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 "mistralai/Mistral-7B-v0.1" \ --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": "mistralai/Mistral-7B-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mistralai/Mistral-7B-v0.1 with Docker Model Runner:
docker model run hf.co/mistralai/Mistral-7B-v0.1
Install & run mistralai/Mistral-7B-v0.1 easily using llmpm
#240 opened 2 months ago
by
sarthak-saxena
Request: DOI
#239 opened 8 months ago
by
VelveNova0005
Request: DOI
#238 opened 8 months ago
by
denish4848
Request: DOI
#237 opened 8 months ago
by
hacker-niki
"I’m building a personal Python project for educational / research purpose."
#236 opened 10 months ago
by
Deekshith0213
Request: DOI
#235 opened 11 months ago
by
secret-chord
Request: DOI
#234 opened 11 months ago
by
Neky2334
llm-testing
#233 opened 11 months ago
by
sreekolla
predictspend
#232 opened 11 months ago
by
sreekolla
spendpredict
#231 opened 11 months ago
by
sreekolla
LLM-PredictSpend
#230 opened 11 months ago
by
sreekolla
https://huggingface.co/mistralai/Mistral-7B-v0.1/resolve/main/generation_config.json
#229 opened 11 months ago
by
kaanyldrm1
Upload tokenizer.model.v3
#228 opened 12 months ago
by
AchrafB67
Request: DOI
#227 opened 12 months ago
by
Redbuddit
Request: DOI
#226 opened 12 months ago
by
AdrienGe
Request: DOI
#225 opened 12 months ago
by
jdraghuveer
Update README.md
#224 opened about 1 year ago
by
princetyagi
Request: DOI
#223 opened about 1 year ago
by
suhail0318
Request: DOI
#221 opened about 1 year ago
by
leonardoalvessantana
Request : DOI
#219 opened about 1 year ago
by
wajeenpc
Request: DOI
#218 opened about 1 year ago
by
khushiuttamani
Request: DOI
#217 opened about 1 year ago
by
yash226
Request: DOI
#216 opened about 1 year ago
by
daniyalsperspective
Request: DOI
#215 opened about 1 year ago
by
olukotunjosh
Request: DOI
#214 opened about 1 year ago
by
taus23
Request: DOI
#213 opened about 1 year ago
by
Eliksh
Request: DOI
#212 opened about 1 year ago
by
Soobb
Do you have which datasets used to train the model?
#211 opened about 1 year ago
by
vpadaraju25
Request: DOI
#210 opened about 1 year ago
by
ORIGINAICEO
Request: DOI
👍 2
#209 opened about 1 year ago
by
ZainYasir
Request: DOI
#208 opened about 1 year ago
by
Seekmila
Request: DOI
#207 opened about 1 year ago
by
AdityaBansode123
Request Access
6
#206 opened about 1 year ago
by
Sakshi1047
Request: DOI
#205 opened about 1 year ago
by
developer052
Request: DOI
#203 opened about 1 year ago
by
Mbatran2030
Request: DOI
#202 opened about 1 year ago
by
Avondetade
ad_mistral_PR
#201 opened over 1 year ago
by
ajd060974
Update README.md
#200 opened over 1 year ago
by
ysadek
Request: DOI
#199 opened over 1 year ago
by
Vishwajit-29
Access Request
1
#198 opened over 1 year ago
by
hashleyjr
Access Request
2
#197 opened over 1 year ago
by
Liones245
Request: Access
1
#196 opened over 1 year ago
by
Paulabad
Request: DOI
#195 opened over 1 year ago
by
Paulabad
Request: DOI
#194 opened over 1 year ago
by
hamida-abdaoui
Request DOI
🚀 1
#193 opened over 1 year ago
by
Islahmed
Request: DOI
#192 opened over 1 year ago
by
Ziyan89
Request: access
#191 opened over 1 year ago
by
Anushe2004
Mistral giving random outputs when hit consequently multiple times
#190 opened over 1 year ago
by
parthhdikshit
Request: DOI
#189 opened over 1 year ago
by
Andrew285