Instructions to use Locutusque/TinyMistral-248M-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/TinyMistral-248M-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/TinyMistral-248M-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/TinyMistral-248M-v2") model = AutoModelForCausalLM.from_pretrained("Locutusque/TinyMistral-248M-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Locutusque/TinyMistral-248M-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Locutusque/TinyMistral-248M-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Locutusque/TinyMistral-248M-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Locutusque/TinyMistral-248M-v2
- SGLang
How to use Locutusque/TinyMistral-248M-v2 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 "Locutusque/TinyMistral-248M-v2" \ --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": "Locutusque/TinyMistral-248M-v2", "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 "Locutusque/TinyMistral-248M-v2" \ --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": "Locutusque/TinyMistral-248M-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Locutusque/TinyMistral-248M-v2 with Docker Model Runner:
docker model run hf.co/Locutusque/TinyMistral-248M-v2
Commit History
-
Update README.md
0f57b17
-
Update README.md
0d48d48 -
Update README.md
10c60e4 -
Update README.md
07a01ca -
Update README.md
937ed7a -
Adding `safetensors` variant of this model (#2)
- Adding `safetensors` variant of this model (b90de178e47f1b80f9071a4a1bbc83e75e0b9aa7) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>08f3b43 -
Update README.md
d2938f5 -
Update README.md
de3db9a -
Update README.md
b4fc013 -
Update README.md
4a9949e -
Update README.md
c725fa0 -
Update README.md
51fce0d -
Full release - 1667 steps
7fad8c9 -
Update README.md
bad82eb
-
Update README.md
de5fb0a
-
Update README.md
879e2ee
-
Update README.md
e420d9f
-
Update README.md
29bb759 -
Update README.md
94a43b2
-
Update README.md
5a59d07 -
Update README.md
715cc61 -
Update README.md
0a79c0e -
step-20000 (#1)
- Upload pytorch_model.bin (32b72921283a26556967a7ca607c3298d56cf04b)b5cc773 -
Update README.md
4e4bea5 -
Update README.md
d09c542 -
Update README.md
8fedded -
Create README.md
8c0999a -
initial commit
ec37caf