# Nazo-LFM3-1.7B

A Pashto-focused instruction-tuned model for vocabulary understanding, semantic interpretation, and linguistic reasoning, built on LiquidAI/LFM3-1.7B.

## Model Details

- **Developed by:** nassimjp
- **License:** apache-2.0
- **Finetuned from model:** LiquidAI/LFM3-1.7B
- **Model size:** 1.7B parameters
- **Precision:** 16-bit (FP16)
- **Training data:** [nassimjp/nazo-istadlal-beta](https://huggingface.co/datasets/nassimjp/nazo-istadlal-beta) (single-turn samples only; 40,320 rows, ~239 MB)
- **Training framework:** [Unsloth](https://github.com/unslothai/unsloth) + Hugging Face TRL
- **Languages:** Pashto (ps), English (en)

## Intended Use

Nazo-LFM3-1.7B is intended as a **drafting and explanation aid** for Pashto vocabulary, terminology, semantics, and linguistic reasoning. It is best suited for:

- Single-turn Pashto word/term definition and explanation.
- Pashto vocabulary and collocation lookup with contextual examples.
- Drafting child-friendly explanations of Pashto terms.
- Instruction-following in Pashto on well-scoped, self-contained questions.
- Research on low-resource Pashto NLP and instruction tuning.

It is **not** recommended as an autonomous source of authoritative Pashto grammar rules or example sentences without native-speaker verification (see Limitations).

## Evaluation Summary

The model was evaluated through (a) a long multi-turn Pashto grammar conversation covering interrogative pronouns, relative pronouns, pronominal clitics, and the possessive «خپل», and (b) a single-turn terminology query on the Pashto letter «ښ».

**Observed strengths**

- Produces well-structured, sectioned Pashto explanations with headings and bullet lists.
- Correctly recalls core rules when they are in-context or supplied: direct vs. oblique case (څوک / چا), count vs. mass interrogatives (څو / څومره), place vs. time vs. reason vs. manner adverbs (چېرې / کله / ولې / څنګه).
- Acknowledges corrections and revises terminology (e.g., «خپل» as a possessive pronoun, not a "suffix pronoun").
- On a self-contained single-turn definitional query, produces usable, mostly accurate Pashto.

**Observed weaknesses**

- **Example-sentence validity:** repeatedly generates ungrammatical or meaningless example sentences and labels them as correct (e.g., «چا راغلل؟», «پر چک باندې څښتې», «هغه خپله کور ته ځي»).
- **Contradictory self-correction:** in the same turn, labels a sentence both "wrong" and "correct."
- **Multi-turn consistency:** under correction pressure, introduces new meaningless examples and meta-commentary that contradicts earlier turns; does not reliably converge.
- **Invented terminology:** produces non-standard terms that must be corrected externally.
- **Phonetic/orthographic imprecision:** single-turn «ښ» answer is broadly correct but imprecise on articulation and does not flag dialect variation.

**Interpretation:** quality is substantially higher on **single-turn** tasks than on **multi-turn revision/self-audit** tasks. This is consistent with the training set containing single-turn samples only. The dominant failure mode — meaningless examples surviving correction — is the highest-leverage target for the next data iteration.

## Limitations

- **Single-turn training distribution.** The model has no learned policy for multi-turn correction, deletion of bad examples, or consistency across turns.
- **Example generation is unreliable.** Generated Pashto example sentences must be verified by a native speaker before use.
- **No dialect tagging.** The model does not distinguish southern vs. northern Pashto realizations (e.g., /ʂ/ ~ /ʃ/ ~ /x/ for ښ) and may present one realization as universal.
- **Not a grammar authority.** Rule statements and terminology should be cross-checked against a standard Pashto grammar reference.
- **Reasoning traces.** Some training samples include `<think>` sections; downstream users should inspect and decide whether to retain or strip them.

## Training Procedure

This LFM3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face's TRL library.

- **Base model:** LiquidAI/LFM3-1.7B
- **Fine-tuning data:** nassimjp/nazo-istadlal-beta
- **Output precision:** FP16
- **Data format:** JSONL conversational samples (`messages` with system/user/assistant roles; `meta` with generation fields)

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "nassimjp/Nazo-LFM3-1.7B"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="float16",
    device_map="auto",
)

messages = [
    {"role": "system", "content": "ته د پښتو ژبې یو ماهر او مسلکي ډیجیټل مرستیال یې."},
    {"role": "user", "content": "د 'ښ' توری څه مانا لري او له عربي 'ش' سره یې توپیر څه دی؟"},
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(
    inputs,
    max_new_tokens=512,
    do_sample=True,
    temperature=0.6,
    top_p=0.9,
)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))

Recommendations for Downstream Users

  1. Verify every example sentence with a native speaker before publication.
  2. Prefer single-turn prompts. For multi-turn work, re-state the task in each turn and explicitly instruct the model to delete — not rewrite — invalid examples.
  3. Cross-check terminology (ضمیر vs. ضمیره، ملکیتي ضمیر، حرف اضافه) against a standard reference.
  4. Tag dialect in prompts when the distinction matters (e.g., «په جنوبي/شمالي پښتو کې…»).
  5. Strip or retain <think> traces deliberately depending on whether reasoning output is desired.

Roadmap

  • Expand the training corpus with a multi-turn correction subset (bad example → delete → replace with verified example).
  • Add a verified phonetic/orthographic reference block for the 8 special Pashto letters, including dialect notes.
  • Add dialect tags to training metadata and instruction patterns that prompt the model to flag variation.
  • Add a small intrinsic evaluation set with native-speaker agreement scores.
  • Update the dataset card for nazo-istadlal to document its relationship to nazo-istadlal-beta, a quality protocol, and the single-turn limitation.

Citation

@misc{nazo_lfm3_1_7b,
  author       = {Nassim (nassimjp)},
  title        = {Nazo-LFM3-1.7B},
  year         = {2025},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/nassimjp/Nazo-LFM3-1.7B}},
  note         = {Fine-tuned from LiquidAI/LFM3-1.7B on nassimjp/nazo-istadlal-beta}
}

Acknowledgements

Downloads last month
435
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 nassimjp/Nazo-LFM3-1.7B

Finetuned
(116)
this model

Dataset used to train nassimjp/Nazo-LFM3-1.7B