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 ·
b4fc013
1
Parent(s): 4a9949e
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,6 +17,8 @@ inference:
|
|
| 17 |
widget:
|
| 18 |
- text: >-
|
| 19 |
TITLE: Dirichlet density QUESTION [5 upvotes]: How to solve the following exercise: Let $q$ be prime. Show that the set of primes p for which $p \equiv 1\pmod q$ and $$2^{(p-1)/q} \equiv 1 \pmod p$$ has Dirichlet density $\dfrac{1}{q(q-1)}$. I want to show that $X^q-2$ (mod $p$) has a solution and $q$ divides $p-1$ , these two conditions are simultaneonusly satisfied iff p splits completely in $\Bbb{Q}(\zeta_q,2^{\frac{1}{q}})$. $\zeta_q $ is primitive $q^{th}$ root of unity. If this is proved the I can conclude the result by Chebotarev density theorem. REPLY [2 votes]:
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
# Training
|
| 22 |
This model was trained on two datasets, shown in this model page.
|
|
|
|
| 17 |
widget:
|
| 18 |
- text: >-
|
| 19 |
TITLE: Dirichlet density QUESTION [5 upvotes]: How to solve the following exercise: Let $q$ be prime. Show that the set of primes p for which $p \equiv 1\pmod q$ and $$2^{(p-1)/q} \equiv 1 \pmod p$$ has Dirichlet density $\dfrac{1}{q(q-1)}$. I want to show that $X^q-2$ (mod $p$) has a solution and $q$ divides $p-1$ , these two conditions are simultaneonusly satisfied iff p splits completely in $\Bbb{Q}(\zeta_q,2^{\frac{1}{q}})$. $\zeta_q $ is primitive $q^{th}$ root of unity. If this is proved the I can conclude the result by Chebotarev density theorem. REPLY [2 votes]:
|
| 20 |
+
- text: >-
|
| 21 |
+
An emerging clinical approach to treat substance abuse disorders involves a form of cognitive-behavioral therapy whereby addicts learn to reduce their reactivity to drug-paired stimuli through cue-exposure or extinction training. It is, however,
|
| 22 |
---
|
| 23 |
# Training
|
| 24 |
This model was trained on two datasets, shown in this model page.
|