Loading…
Loading…
A 11.4M-parameter Hindi language model trained from scratch (random initialisation, no pretrained weights) on a single RTX 3060 Laptop GPU with 6 GB VRAM.
Part of the Ramayana Series, small Indic LLMs where each model is named after a figure from the Ramayana. 🌐 Website: https://ashishpatel26.github.io/ramayana-llm/
Named after Jatayu, the vulture who fought Ravana to save Sita despite being far smaller. This is the smallest model in the series: the first proof that the whole pipeline works on a 6 GB GPU.
| Parameters | 11.4M |
| Validation loss / perplexity | 4.678 / 107.5 |
| Training tokens seen | 33M |
| Context length | 256 tokens |
| Language | Hindi (Devanagari) |
| Type | Base model (not instruction-tuned) |
| Developed by | ashishpatel26 |
| Model family | Ramayana Series |
| Model type | Decoder-only causal language model (Llama architecture) |
| Language | Hindi (hi), Devanagari script |
| License | Apache-2.0 |
| Fine-tuned from | None. Trained from random initialisation |
| Release | November 2026 |
| Status | Static base model trained on an offline dataset |
Smoke-test / baseline model. Writes grammatical Hindi but invents most facts. For learning and comparison, not for real use.
This is a base model: it continues text, it does not follow instructions or answer questions. Write the beginning of a sentence, not a question.
The tokenizer is a SentencePiece model stored in this repo (spm.model). Prompts must start with the language tag <hi>.
# pip install torch transformers sentencepiece huggingface_hub
import torch, sentencepiece as spm
from huggingface_hub import hf_hub_download
from transformers import LlamaForCausalLM
repo = "ashishpatel26/jatayu-hi-11m"
model = LlamaForCausalLM.from_pretrained(repo)
sp = spm.SentencePieceProcessor(model_file=hf_hub_download(repo, "spm.model"))
x = torch.tensor([sp.encode("<hi>हिमालय पर्वत")])
y = model.generate(x, max_new_tokens=100, do_sample=True, top_p=0.95,
temperature=0.8, repetition_penalty=1.15,
eos_token_id=sp.eos_id(), pad_token_id=sp.pad_id())
print(sp.decode(y[0].tolist()))
Unedited, temperature 0.8, top-p 0.95, repetition penalty 1.15. Prompts: भारत की राजधानी नई दिल्ली, महात्मा गांधी, हिमालय पर्वत, गंगा नदी.
भारत की राजधानी नई दिल्ली का एक क्षेत्र है। यह शहर भारत के लिए सबसे बड़ा राज्य राजधानी बन गया है।
महात्मा गांधी ने राष्ट्रीय फिल्म से शादी की और उनकी सबसे बड़ी फ़िल्म भी निभाई।
हिमालय पर्वत से लेकर दक्षिण और पश्चिम की ओर से लगभग सभी देशों में मिलते हैं, जो देश को उत्तर भारत के लिए विभिन्न दिशाओं में बांटा गया है। इन नदियों द्वारा बहती थी।
गंगा नदी के किनारे स्थित यह नदी बहुत बड़े ही छोटे-छोटे क्षेत्र का निर्माण कर रहा है।
The grammar is correct; the facts are frequently invented (hallucinated).
| Model | Params | Val loss | Perplexity |
|---|---|---|---|
| Jatayu-hi-11M | 11.4M | 4.678 | 107.5 |
| Hanuman-hi-42M | 42.1M | 3.838 | 46.4 |
Perplexity measured on 100 batches of held-out Hindi Wikipedia text (every 200th line, never trained on).
Llama-style decoder-only transformer (LlamaForCausalLM): RMSNorm, SwiGLU MLP, rotary position embeddings, SDPA attention, tied input/output embeddings.
| Hidden | FFN | Layers | Heads | KV heads | Context | Vocab |
|---|---|---|---|---|---|---|
| 256 | 704 | 4 | 4 | 4 | 256 | 32,000 |
wikimedia/wikipedia config 20231101.hi (163k articles, 608 MB raw).SentencePiece Unigram, 32,000 vocab, byte_fallback, character coverage 0.9995, trained on the cleaned corpus. About 1.1 tokens per Hindi word, far fewer than English-centric tokenizers need for Devanagari. Special tokens: <pad>=0, <unk>=1, <s>=2, </s>=3, plus language tags (<hi>, <mr>, …) reserved for future multilingual models.
| Hardware | 1 × NVIDIA RTX 3060 Laptop, 6 GB |
| Precision | bf16 autocast |
| Optimiser | AdamW (β = 0.9, 0.95), weight decay 0.1, grad clip 1.0 |
| Learning rate | 6e-4 peak → 6e-5, cosine, linear warmup |
| Batch | 16 × 4 accum × 256 = 16,384 tokens/step |
| Steps | 2,000 (33M tokens, ~0.6 epochs) |
| Packing | Packed uint16 token stream, no padding |
Full pipeline code (download → clean → tokenizer → pack → train → generate → push): https://github.com/ashishpatel26/Indian-Language-llm-model
Treat every output as unverified text. Keep a human in the loop, fact-check anything you publish, and fine-tune with curated data before building anything user-facing.
| Hardware | 1 × RTX 3060 Laptop GPU (power-capped at 30–100 W) |
| Training time | ~1.2 hours (estimated, wall clock) |
| Energy | under 1.5 kWh (estimated) |
| Location | India, local machine |
model.safetensors (fp32), config config.jsonashishpatel26. Questions and issues: https://github.com/ashishpatel26/Indian-Language-llm-model/issues
@misc{jatayu_hi_11m,
title = {Jatayu-hi-11M: a Hindi language model trained from scratch on a 6 GB GPU},
author = {ashishpatel26},
year = {2026},
url = {https://huggingface.co/ashishpatel26/jatayu-hi-11m}
}