Overview
RastNus (ڕاستنووس, "correct writing") is a 12-billion-parameter language model specialized in grammar, spelling, and punctuation correction for Central Kurdish (Sorani / کوردیی ناوەندی).
Kurdish is one of the most under-served languages in modern NLP. Everyday written Sorani commonly contains orthographic inconsistencies — missing diacritic letters (ی/ێ, و/ۆ, ر/ڕ), spacing errors, informal punctuation, and mixed loanword usage. RastNus takes raw Sorani text and returns a clean, standardized, correctly written version, while preserving the author's meaning and voice.
RastNus is developed and released by PawanKrd as part of our commitment to bringing state-of-the-art AI to the Kurdish language and its speakers.
Key Capabilities
- Spelling correction — fixes common orthographic errors and non-standard letter usage (e.g.
کتیب → کتێب, زور → زۆر, مروف → مرۆڤ)
- Grammar correction — repairs agreement, morphology, and word-form errors
- Punctuation control — optionally adds and normalizes punctuation, or leaves punctuation untouched, via a dedicated control token
- Pure Kurdish mode — optionally replaces non-Kurdish loanwords with pure Kurdish equivalents, via a dedicated control token
- Meaning-preserving — corrects without paraphrasing, summarizing, or adding content
Model Family
Table with columns: Model, Status| Model | Status |
|---|
| RastNus-Large | Not publicly available - Try it now |
| RastNus-Medium | Under development |
| RastNus-Base | ✅ You are here |
| RastNus-Small | Under development |
| RastNus-Tiny | Under development |
Example
Input
خویندنەوەی کتیب زور گرنگە بو مروف ، چونکە بیروهۆش دەکاتەوە ئەو کەسە ی کتێب دەخوێنەوە؛ ئاستی رۆشنبیری یان بەرز ترە لەوانی تر
Output
خوێندنەوەی کتێب زۆر گرنگە بۆ مرۆڤ، چونکە بیروهۆش دەکاتەوە. ئەو کەسەی کتێب دەخوێنێتەوە، ئاستی ڕۆشنبیرییان بەرزترە لەوانی تر.
Model Details
Table | |
|---|
| Developed by | PawanKrd |
| Model type | Causal decoder-only transformer (Gemma 4 architecture) |
| Base model | Google Gemma 4 12B |
| Parameters | ~12B |
| Language | Central Kurdish / Sorani (ckb), Arabic script |
| Task | Text correction (grammar, spelling, punctuation) |
| Precision | bfloat16 |
RastNus uses a task-specific prompt format with dedicated special tokens (added to the tokenizer vocabulary). The behavior of the model is controlled by two switches:
Table with columns: Token, Effect| Token | Effect |
|---|
<|punct:on|> / <|punct:off|> | Add & normalize punctuation, or leave punctuation untouched |
<|pure:on|> / <|pure:off|> | Replace non-Kurdish loanwords with pure Kurdish equivalents, or keep original vocabulary |
The full sequence layout:
<bos><|task:kurdish_correction|><|punct:on|><|pure:off|><|input|>
{your Kurdish text}
<|output|>
{corrected text}<eos>
You do not need to build this manually — the repository ships with a chat template that handles it (see below). Defaults are punctuationEnabled=True and kurdishPureMode=False.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "PawanKrd/RastNus-Base-12B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
text = "خویندنەوەی کتیب زور گرنگە بو مروف"
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": text}],
tokenize=False,
add_generation_prompt=True,
punctuationEnabled=True,
kurdishPureMode=False,
)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Note: pass add_special_tokens=False when tokenizing — the chat template already emits <bos>.
vLLM (OpenAI-compatible server)
vllm serve PawanKrd/RastNus-Base-12B
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="none")
resp = client.chat.completions.create(
model="PawanKrd/RastNus-Base-12B",
messages=[{"role": "user", "content": "خویندنەوەی کتیب زور گرنگە بو مروف"}],
extra_body={"chat_template_kwargs": {
"punctuationEnabled": True,
"kurdishPureMode": True,
}},
temperature=0.0,
)
print(resp.choices[0].message.content)
Recommended Generation Settings
- Greedy decoding (
do_sample=False / temperature=0) — correction is a deterministic task
max_new_tokens ≈ 1.5 × input token count (the corrected output is roughly the same length as the input)
- For documents longer than ~4,000–5,000 characters, split at sentence/paragraph boundaries, correct each chunk, and rejoin
Intended Use & Limitations
Intended uses: proofreading and standardization of Sorani text in publishing, education, journalism, document processing, writing assistants, and any pipeline that needs clean, orthographically consistent Kurdish.
Limitations:
- The model targets Central Kurdish (Sorani) written in Arabic script. It is not designed for Kurmanji (Latin script), Zazaki, or other Kurdish varieties.
- It is a correction model, not a general chat assistant — it expects the task prompt format above and will not follow open-ended instructions.
- Like all language models, it can occasionally miss errors or over-correct rare proper nouns, dialect-specific spellings, or intentional stylistic choices. Human review is recommended for high-stakes publishing.
- Pure-Kurdish mode applies vocabulary substitutions that may not match every publication's style guide; review its output for terminology-sensitive content.
About PawanKrd
Pawan.Krd (PKRD, LLC) builds AI and cloud infrastructure — LLMs, ASR, TTS, and related APIs — with a focus on reliability and open models. RastNus is part of that work: first-class writing tools for Kurdish, released openly.
License & Attribution
This model is released under the Apache License, Version 2.0. See the LICENSE file for the full text and the NOTICE file for attribution details.
RastNus-Base-12B is a derivative work of Gemma 4 12B by Google LLC / Google DeepMind, which is also licensed under Apache 2.0. In accordance with the license:
- The original Apache 2.0 license text is included in this repository.
- The
NOTICE file carries the required attribution to Google and a prominent statement that the model weights, tokenizer, and chat template have been modified by PawanKrd.
- Gemma is a trademark of Google LLC, used here only to describe the origin of the base model. This project is not affiliated with, endorsed by, or sponsored by Google.
This model is provided "AS IS", without warranties or conditions of any kind. See Sections 7 and 8 of the Apache License for the disclaimer of warranty and limitation of liability.
Citation
@misc{rastnus2026,
title = {RastNus-Base-12B: A Central Kurdish (Sorani) Grammar and Spelling Correction Model},
author = {PawanKrd},
year = {2026},
url = {https://huggingface.co/PawanKrd/RastNus-Base-12B},
note = {Derivative of Google Gemma 4 12B, Apache License 2.0}
}