LFM3-1.7B-chv v2
Chuvash–Russian translation model: a full bf16 fine-tune of LiquidAI/LFM3-1.7B, trained on the largest public Chuvash parallel corpora. Chuvash (чӑвашла) is a low-resource Turkic language (~800K speakers); this is, to our knowledge, the strongest openly available ru↔chv translation model.
Results
chrF++ (sacrebleu, corpus-level) on a fixed held-out Chuvash–Russian test set (identical protocol for every row: 500-sentence slice, greedy decoding):
| Model | Engine | ru→chv | chv→ru |
|---|---|---|---|
| MarianMT baseline | — | 23.28 | — |
| LFM3-1.7B-chv v2 (bf16) | transformers | 34.89 | 35.10 |
| LFM3-1.7B-chv v2 (Q4_K_M) | llama.cpp | 30.03 | — |
Note on quantization: the hybrid conv/attention LFM3 architecture loses ~2.6–4.9 chrF at Q4_K_M compared to bf16 — noticeably more than dense transformers usually do. Use the bf16 weights for evaluation/benchmarking and the GGUF for serving on modest hardware.
Training
Two-stage full fine-tune in bf16 on a single RTX 4090 (base tokenizer unchanged):
- Stage 1 — CPT: ~93M tokens of Chuvash monolingual text, 5,046 steps (~9 h)
- Stage 2 — SFT: ~2.87M raw translation pairs formatted as translation instructions, 89,722 steps (~20.4 h)
Prompt format
Переведи на чувашский язык.
{russian text}
Перевод:
(and symmetrically Переведи на русский язык. for chv→ru). The chat template
applies this format automatically.
Training data
- chuvash-ai/chuvash-ru-parallel — 1.46M pairs, primarily the CC0 corpus of Alexander Antonov / Chuvash Language Laboratory plus OPUS ChuBiCo
- curated Chuvash–Russian dictionaries (Sergeev's dictionary, a phrasebook, samahsar.chv.su)
Usage
The model is a completion-style translator: feed the prompt format above
directly (requires trust_remote_code=True — custom LFM3 architecture code
ships with the repo — and a recent transformers):
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "chuvash-ai/LFM3-1.7B-chv-v2"
tok = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
)
prompt = "Переведи на чувашский язык.\n\nПривет, как дела?\n\nПеревод:\n"
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Note: the chat template shipped in the repo files is inherited from the base LFM3 and does not match the training format. Don't use
apply_chat_templatewith this model.
llama.cpp / LM Studio
For chat apps use chuvash-ai/LFM3-1.7B-chv-v2-GGUF —
same quantized weights with a translator chat template (direction controlled
by the system prompt). The lfm3-chv-v2-Q4_K_M.gguf in this repo is intended
for raw /completion prompts.
Limitations
- Unseen vocabulary is the weak spot: on a dictionary-word probe the model fully misses ~40% of unseen words and sometimes copies the source verbatim. Dictionary-injection experiments for the next version are in progress.
- The parallel data is partly auto-aligned; expect ~2–5% noisy pairs.
- Trained for ru↔chv translation; general chat ability was not a target.
License
The weights are a derivative of LiquidAI/LFM3-1.7B
and inherit the LFM Open License v1.0 (see LICENSE): commercial use is
permitted below a $10M annual-revenue threshold, with attribution requirements.
Training data is CC0.
Organization
Part of chuvash-ai — open Chuvash language resources: parallel corpora and translation models.