Instructions to use Locutusque/TinyMistral-248M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/TinyMistral-248M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/TinyMistral-248M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/TinyMistral-248M") model = AutoModelForCausalLM.from_pretrained("Locutusque/TinyMistral-248M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Locutusque/TinyMistral-248M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Locutusque/TinyMistral-248M" # 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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Locutusque/TinyMistral-248M
- SGLang
How to use Locutusque/TinyMistral-248M 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" \ --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", "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" \ --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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Locutusque/TinyMistral-248M with Docker Model Runner:
docker model run hf.co/Locutusque/TinyMistral-248M
Commit History
-
Adding `safetensors` variant of this model (#9)
Verified signature- Adding `safetensors` variant of this model (17f5aa9ea13b0e94e136bbdf7abafeb352d77175) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>e84fb52
-
Update README.md
cd4d2fa -
Upload pytorch_model.bin
6d7e8f9 -
Update README.md
8fd915d -
Update README.md
f142afe -
Upload pytorch_model.bin
83fceca -
Delete model.safetensors
374ce99
-
Adding `safetensors` variant of this model (#5)
- Adding `safetensors` variant of this model (cf0720beb404d3934d6c0e23d4578da4ac1166cc) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>0476603
-
Update config.json
35c56d3 -
Upload 3 files
f7d7325 -
Delete tokenizer.model
9473e24 -
Update README.md
fc9b621 -
Update README.md
78b518e -
Delete model.safetensors
add15ae -
Upload pytorch_model.bin
b6f2288
-
Update README.md
12b1bb9 -
Update README.md
94a2735
-
Update README.md
c768e26
-
Update README.md
90b89d1 -
Update README.md
e64524b -
Update README.md
0623f50 -
Final epoch
4da9ea4
-
Update README.md
125a839 -
increase max_new_tokens
4cb25c7
-
Adding Evaluation Results (#2)
- Adding Evaluation Results (432e77227eeaa008689b2792a1832cc389f6e843) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>10c6d27 -
Update README.md
13a8fa3 -
Update README.md
16a62aa
-
Update README.md
8f03f72
-
Update README.md
70abe95 -
Upload model.safetensors
4413039
-
Update README.md
a8c716f -
Upload model.safetensors
759885c -
Update README.md
1181621
-
Update README.md
24697f6 -
Upload model.safetensors
97e4256 -
Delete model.safetensors
728aea3 -
Update README.md
85dc765 -
Update README.md
393d28d -
Update README.md
0494330 -
Upload 8 files
7cb5a2b -
Update README.md
544cbf0 -
Update README.md
8f970b3 -
initial commit
938bce8