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

First-word accuracy and latency of the models in Pretype's catalog

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 Strip step.

License

Apache-2.0, the license of the base model and of the distillation teacher.

Downloads last month
325
Safetensors
Model size
2B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

5-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for nikimoriOne/EuroLLM-1.7B-Pretype-5bit

Finetuned
(8)
this model