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")# 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
metadata
license: apache-2.0
language:
- en
pipeline_tag: text-generation
datasets:
- Skylion007/openwebtext
- Locutusque/TM-DATA
inference:
parameters:
do_sample: true
temperature: 0.7
top_p: 0.2
top_k: 14
max_new_tokens: 250
repetition_penalty: 1.16
widget:
- text: >-
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]:
- text: >-
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,
- text: >-
\begin{document} \begin{frontmatter} \author{Mahouton Norbert
Hounkonnou\corref{cor1}${}^1$}
\cortext[cor1]{norbert.hounkonnou@cipma.uac.bj} \author{Sama
Arjika\corref{cor2}${}^1$} \cortext[cor2]{rjksama2008@gmail.com} \author{
Won Sang Chung\corref{cor3}${}^2$ } \cortext[cor3]{mimip4444@hanmail.net}
\title{\bf New families of $q$ and $(q;p)-$Hermite polynomials }
\address{${}^1$International Chair of Mathematical Physics and
Applications \\ (ICMPA-UNESCO Chair), University of Abomey-Calavi,\\ 072
B. P.: 50 Cotonou, Republic of Benin,\\ ${}^2$Department of Physics and
Research Institute of Natural Science, \\ College of Natural Science, \\
Gyeongsang National University, Jinju 660-701, Korea } \begin{abstract} In
this paper, we construct a new family of $q-$Hermite polynomials denoted
by $H_n(x,s|q).$ Main properties and relations are established and
Training
This model was trained on two datasets, shown in this model page.
- Skylion007/openwebtext: 1,000,000 examples at a batch size of 32-4096 (1 epoch)
- Locutusque/TM-DATA: All examples at a batch size of 12288 (3 epochs) Training took approximately 500 GPU hours on a single Titan V.
Metrics
You can look at the training metrics here: https://wandb.ai/locutusque/TinyMistral-V2/runs/g0rvw6wc
🔥 This model performed excellently on TruthfulQA, outperforming models more than 720x its size. These models include: mistralai/Mixtral-8x7B-v0.1, tiiuae/falcon-180B, berkeley-nest/Starling-LM-7B-alpha, upstage/SOLAR-10.7B-v1.0, and more. 🔥