LFM3-1.7B-Kazakh

LiquidAI/LFM3-1.7B fine-tuned to understand and answer in Kazakh, a language the base model does not support.

Given a Kazakh prompt, the base model reasons in English, misidentifies the language as Ukrainian or Kyrgyz, and usually never answers. This finetune answers directly in Kazakh.

Setting Value
Data AmanMussa/kazakh-instruction-v2 (52,123 train rows, 50 held out)
Method LoRA SFT with TRL, merged into full weights
LoRA rank / alpha 16 / 32, all linear layers
Epochs / LR 1 / 2e-4
Hardware 1x A100 (Colab), about 1 hour

Usage

from transformers import pipeline

pipe = pipeline("text-generation", model="RedBullet12/LFM3-1.7B-Kazakh", trust_remote_code=True)
out = pipe([{"role": "user", "content": "Қазақстанның астанасы қай қала?"}],
           do_sample=True, temperature=0.3, top_p=0.9, repetition_penalty=1.15,
           no_repeat_ngram_size=4, max_new_tokens=512)
print(out[0]["generated_text"][-1]["content"].replace("</think>", "").strip())

Use these generation settings. With weaker repetition control the model can loop.

Limitations

  • Fluent Kazakh, but weak at math and multi-step reasoning: fine-tuning on answer-only data removed the base model's thinking step.
  • Can fall into repetition loops without the settings above.
  • Training data is machine-translated Alpaca with manual fixes, so phrasing can read as translated, and some answers are factually wrong.
  • v1. Next: continued pretraining on native Kazakh text before SFT.
  • Do not use for factual questions. v1 gives fluent Kazakh but frequently wrong facts (in testing it named Beijing as Kazakhstan's capital). Fine-tuning overwrote knowledge the base model had. Use it with retrieval (RAG) for facts, or wait for v2. Released under the LFM Open License v1.0, inherited from the base model.
Downloads last month
512
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Model tree for RedBullet12/LFM3-1.7B-Kazakh

Finetuned
(56)
this model
Quantizations
1 model

Dataset used to train RedBullet12/LFM3-1.7B-Kazakh