Instructions to use nikimoriOne/EuroLLM-1.7B-Pretype-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nikimoriOne/EuroLLM-1.7B-Pretype-5bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("nikimoriOne/EuroLLM-1.7B-Pretype-5bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use nikimoriOne/EuroLLM-1.7B-Pretype-5bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "nikimoriOne/EuroLLM-1.7B-Pretype-5bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "nikimoriOne/EuroLLM-1.7B-Pretype-5bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nikimoriOne/EuroLLM-1.7B-Pretype-5bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
EuroLLM-1.7B-Pretype, 5-bit MLX
One small model for two jobs: it completes the sentence that you type, and it fixes typos without a rewrite. It is a fine-tune of EuroLLM-1.7B for Pretype, a macOS autocomplete app that runs on your Mac.
| Size | 1.1 GB, one file for both jobs |
| Speed | 22 ms for each suggestion, M4 Max |
| Energy | 715 mJ for each suggestion, 33% less than Gemma 4 E2B 4-bit |
| Languages | Best on English, Russian and Danish. Measured on 20 languages. |
| License | Apache-2.0 |
Quick start
Install mlx-lm on a Mac with Apple silicon.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load("nikimoriOne/EuroLLM-1.7B-Pretype-5bit")
greedy = make_sampler(temp=0.0)
Complete text. Send raw text, without the chat template. Keep the first line of the answer.
text = "We will get back to you as soon as"
print(generate(model, tokenizer, prompt=text, max_tokens=12, sampler=greedy))
# possible.
Fix a typo. Use the chat template. The model repeats the text with the mistakes fixed.
directive = (
"Correct only the real spelling, typo, capitalization and punctuation mistakes in the text "
"below. Keep every already-correct word exactly as written โ do NOT rephrase, reword, reorder, "
'translate, change the style, or otherwise "improve" it. Preserve the original meaning, '
"language and formatting. If there are no mistakes, return the text unchanged. Reply with "
"ONLY the corrected text โ no quotes, no explanations."
)
text = "Thsi is a sentense with two typos."
messages = [{"role": "user", "content": f"{directive}\n\n{text}"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=64, sampler=greedy))
# This is a sentence with two typos.
Limitations
Do not use this model for the tasks in this list.
- Chat, replies, translation and rewriting. The fix training taught the model to repeat its input. On a reply prompt, it copied the prompt on 17% of conversations without a draft and on 43% with a draft. On a rewrite instruction, it returned the text almost unchanged on 8 of 8 examples.
- Hebrew. The vocabulary has 34 tokens with Hebrew letters. The first word was right on 6 of 255 suggestions. Pretype shows no suggestions in Hebrew on this model.
Know these weak points before you select it.
- Russian reads less natural than the comparison model. A blind judge accepted 83% against 95% for Gemma 4 E2B 4-bit (p=0.004). The first-word score ties.
- English is 3 points below Gemma 4 E2B 4-bit: 24.6% against 27.5% (p=0.015, a trend). It is the lowest of the downloadable models in Pretype.
- Long suggestions are short: 6.5 words, where the other models write 10 to 11.
Results
Pretype's evaluation harness, 2026-10-30 and 2026-10-31. Greedy decoding. Paired McNemar tests on the same rows. The comparison model is Gemma 4 E2B 4-bit (2.5 GB) for autocomplete and its instruct build (3.0 GB) for fixes.
| Measure | Comparison | This model |
|---|---|---|
| Autocomplete: first word right, 5,649 rows, 17 languages | 20.8% | 20.3% (p=0.44, not significant) |
| Autocomplete: first word right, English | 27.5% | 24.6% (p=0.015, trend) |
| Fix: typo line restored exactly, 510 rows | 49% | 64% (p<0.001) |
| Fix: change proposed on a clean line | 52 of 170 | 8 of 170 (p<0.001) |
| Energy for each suggestion, one run each | 1064 mJ | 715 mJ |
| Time for each suggestion, median | 34 ms | 22 ms |
| Download | 5.5 GB | 1.1 GB |
A blind judge read 300 rows in English, Russian and Danish. It accepted 90% of this model's continuations, 93% of the comparison model's, and 93% of the original text. This difference is not significant. On 150 rows of sentence-long continuations, the judge accepted 85% [78โ90], against 87% for the original text.
Energy is the CPU, GPU and Neural Engine load from powermetrics, less idle, on an M4 Max. With
any choice of idle baseline, the model uses 31โ37% less. We did not measure the energy of a fix.
First word right, % of all rows, by language:
| en | ru | da | de | es | fr | it | nl | pl | pt |
|---|---|---|---|---|---|---|---|---|---|
| 25 | 23 | 26 | 25 | 27 | 23 | 23 | 24 | 24 | 23 |
| ro | sv | uk | cs | tr | zh | ar | ko | ja | he |
|---|---|---|---|---|---|---|---|---|---|
| 22 | 21 | 19 | 14 | 12 | 15 | 10 | 8 | 9 | 2 |
How it was made
Base: EuroLLM-1.7B bf16, with the two chat tokens and the chat template of EuroLLM-1.7B-Instruct.
Training: LoRA, rank 16, scale 20, 24 layers, 3750 iterations, batch 8, learning rate 2e-5 with cosine decay, fused into the weights.
Data, 30,000 rows:
- 12,000 fix rows with synthetic typos, on sentences from OpenSubtitles (OPUS);
- about 10,000 messages in English, Russian and Danish, written for this purpose by Gemma 4 E4B-it (Apache-2.0);
- about 8,000 plain text rows from OpenSubtitles (OPUS).
We dropped sentences equal to evaluation text. No user data is in the training set.
Distillation: on the plain text rows, 70% of the loss follows the top 16 tokens of EuroLLM-9B at 8 bits.
Conversion:
mlx_lm.convert -q --q-bits 5 --q-group-size 64(mlx-lm 0.31.3, affine).Tokenizer: the base tokenizer without the decoder's
Stripstep.
License
Apache-2.0, the license of the base model and of the distillation teacher.
- Downloads last month
- 325
5-bit
Model tree for nikimoriOne/EuroLLM-1.7B-Pretype-5bit
Base model
utter-project/EuroLLM-1.7B