Aion-1.0-Instruct-2.3B-Polish

Microsoft Aion-1.0-Instruct-2.3B does not officially support Polish: it understands it but writes it badly. This is a research adaptation: 190M tokens of Polish continued pretraining, SFT on judged synthetic data and one round of SFT on the model's own answers corrected by a stronger model. Unofficial, not affiliated with Microsoft.

Results

polish-writing-eval, 456 everyday writing prompts, greedy decoding, judge DeepSeek V4.1 Flash. Lower errors are better; 95% bootstrap interval over prompts.

model language errors / 100 words fluency 1–5 task 1–5 loops
Mistral Small 4 1.03 4.29 4.20 1%
Ministral 8B 1.63 3.46 3.53 4%
this model 2.48 (2.27–2.71) 3.05 2.80 28%
Ministral 3B 2.81 2.88 2.93 8%
Aion 2.3B, original 5.35 ¹ 1.88 ¹ 1.79 ¹ 37% ¹

¹ core 116 prompts. For calibration, original Aion writes German, a supported language, at 1.96 errors / 100 words and fluency 3.52.

FLORES-200 devtest, nats per passage relative to English (how much more expensive Polish is for the model than the same text in English): original 1.72 → this model 1.36. Supported languages of the base model sit at 1.12–1.30.

Recipe

step data result (errors / 100 words)
SFT only, no pretraining polish-sft-synthetic sft + 2.9k English rows 4.40
CPT 98M tokens, then the same SFT FineWeb-2 Polish 85% + FineWeb-Edu English 15% 3.16
CPT +92M tokens, then the same SFT Polish DynaWord, resampled toward conversation, speech and literature 2.94
+ SFT on own corrected answers 3,000 own answers fixed with minimal edits (corrections, round 3) 2.48

CPT: full model except embeddings, LR 2e-5 cosine, 65k tokens per step, sequence 2048. SFT: full model, 2 epochs, LR 1e-5. Correction SFT: LR 5e-6, the fixes plus 1,500 replay rows.

What we learned on the way:

  • Continued pretraining is necessary. SFT alone barely moves the language (FLORES 1.72 → 1.68); the first 98M CPT tokens cut writing errors by 28%.
  • Returns fall fast. The second 92M tokens gave −0.24 errors / 100 words, not significant (paired interval −0.56 to +0.10); the first gave −1.23.
  • Self-correction is the cheapest lever: about $0.5 of API calls per round, −0.84 on the 98M model and −0.43 on this one. A second round on top plateaued.
  • DPO on the same pairs was weaker than SFT on the fixes (the chosen answers' log-probability fell by 20 nats).
  • Loops come from greedy decoding. Repetition penalty 1.1 halves them (28% → 12%) but raises errors to 3.10; sampling and n-gram blocking are worse.

Usage

The model uses the base model's custom code (trust_remote_code=True) and its tokenizer and chat template.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
m = "shefowl/Aion-1.0-Instruct-2.3B-Polish"
tok = AutoTokenizer.from_pretrained(m, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(m, trust_remote_code=True, dtype=torch.bfloat16).to("cuda" if torch.cuda.is_available() else "cpu")
msgs = [{"role": "user", "content": "Napisz krótką wiadomość do sąsiada z prośbą o przyciszenie muzyki po 22."}]
x = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
y = model.generate(**x, max_new_tokens=500, do_sample=False)
print(tok.decode(y[0, x["input_ids"].shape[1]:], skip_special_tokens=True))

GGUF files for llama.cpp (Q8_0 to Q4_K_M, Polish importance matrix; they need llama.cpp with an Aion port) are in Aion-1.0-Instruct-2.3B-Polish-GGUF.

Limitations

  • Still makes grammar errors, about one in 40 words; the vocative is a common one (Szanowny Panie Tomasz instead of Tomaszu).
  • Loops in about a quarter of answers with greedy decoding; keep max_new_tokens modest.
  • Facts are weak, as in the base model at this size.
  • No extra safety tuning beyond the base model's. A research artifact, not a product.

License

MIT, as the base model. Training data: FineWeb-2 and FineWeb-Edu (ODC-By), Polish DynaWord (per-document source licenses), JohnTdi/polish-llm-sft-en (Apache 2.0) and our synthetic data (CC BY 4.0).

Downloads last month
59
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for shefowl/Aion-1.0-Instruct-2.3B-Polish

Finetuned
(5)
this model
Quantizations
1 model

Datasets used to train shefowl/Aion-1.0-Instruct-2.3B-Polish

Collection including shefowl/Aion-1.0-Instruct-2.3B-Polish