Jambavan-hi-100M (जाम्बवान)
A 100.1M-parameter Hindi language model trained from scratch (random initialisation, no pretrained weights) on a single RTX 3060 Laptop GPU with 6 GB VRAM. It is the largest base model in the series so far, trained on about 1B tokens of Hindi Wikipedia and AI4Bharat Sangraha web text.
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 Jambavan, the elder bear-king of the vanara army. He has seen the most and knows the most, and at the shore of the ocean (end of the Kishkindha Kanda) he is the one who reminds Hanuman of his own strength before the leap to Lanka. Jambavan is the "elder" here: more parameters, more data, longer context.
| Parameters | 100.1M (75.5M non-embedding) |
| Validation perplexity | 30.8 (Wikipedia + Sangraha), 44.2 (Wikipedia only) |
| Training tokens seen | 996M (7,600 steps × 131,072 tokens) |
| Context length | 1,024 tokens |
| Language | Hindi (Devanagari) |
| Type | Base model (not instruction-tuned) |
Model details
| Developed by | ashishpatel26 |
| Model family | Ramayana Series |
| Model type | Decoder-only causal language model (Llama architecture, grouped-query attention) |
| 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 |
Uses
Direct use
Hindi base model for research, teaching and as a starting point for fine-tuning. It writes fluent, grammatical Hindi in both encyclopaedic and news/web styles. Facts are often wrong.
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.
Downstream use
- Fine-tuning (SFT / LoRA) for Hindi classification, summarisation or instruction following (a chat version, Angad v2, is planned on top of this model).
- Teaching how pretraining works end to end on consumer hardware.
- A baseline for Hindi tokenizers, data mixes and small-model scaling studies.
Out-of-scope use
- Any setting where factual accuracy matters: news, medical, legal, financial or educational answers.
- Chat assistants or user-facing products without further tuning and safety work.
- Languages other than Hindi, including romanised Hindi.
- Generating content meant to deceive, impersonate or harass.
Usage
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/jambavan-hi-100m"
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()))
Sample outputs
Unedited, seed 0, temperature 0.8, top-p 0.95, repetition penalty 1.15.
भारत की राजधानी नई दिल्ली का नाम भारत की राजधानी के रूप में दर्ज है। इस शहर का इतिहास 700 सालों से भी ज्यादा पुराना है।
हिमालय पर्वत के हिमालय में, बहुत ऊंचे, बहुत ऊँचे, और कई बड़े-बड़े शिखर हैं जो बहुत ऊँचे, और लगभग डेढ़ सौ मील से भी कम ऊंचाई वाले हैं। ये शिखर हिमालय की उत्तरी तलहटी तक फैले हुए हैं।
आज का मौसम है तो मौसम अच्छा रहेगा। आज के दिन आपको अच्छा पैसा लाभ होगा। सेहत अच्छी रहेगी।
The web data in Sangraha shows: the model now writes news and horoscope-style Hindi, not only Wikipedia prose. Grammar is good; facts and numbers are frequently invented (hallucinated).
Comparison within the series
All models scored on the same 120 random 256-token windows (seed 0, float32), so the numbers are directly comparable.
| Model | Params | Train data | Wikipedia val ppl | Wiki + Sangraha val ppl |
|---|---|---|---|---|
| Jatayu-hi-11M | 11.4M | Wikipedia | 107.7 | 185.3 |
| Hanuman-hi-42M | 42.1M | Wikipedia | 47.1 | 87.8 |
| Angad-hi-42M (SFT) | 42.1M | Hanuman + Q&A | 104.7 | 181.9 |
| Jambavan-hi-100M | 100.1M | Wikipedia + Sangraha | 44.2 | 30.8 |
Jambavan wins on both test sets, even on Wikipedia, the only domain Hanuman was trained on. With full 1,024-token context on the mixed set its perplexity drops further to 29.0 (loss 3.368).
Architecture
Llama-style decoder-only transformer (LlamaForCausalLM): pre-norm RMSNorm, SwiGLU MLP, rotary position embeddings (θ = 10,000), SDPA attention, tied input/output embeddings, and grouped-query attention (12 query heads share 4 key/value heads, which cuts the KV cache by 3×).
| Hidden | FFN | Layers | Heads | KV heads | Head dim | Context | Vocab |
|---|---|---|---|---|---|---|---|
| 768 | 2048 | 12 | 12 | 4 | 64 | 1,024 | 32,000 |
Training data
- Sources: Hindi Wikipedia (
wikimedia/wikipedia, config20231101.hi) plus 16 parquet files of Hindi from AI4Bharat Sangraha (verified split: web, PDF and other human-written sources). - Cleaning: Unicode NFC, URL removal, lines ≥ 20 characters, ≥ 80% Devanagari characters, exact MD5 de-duplication.
- Split: every 200th line held out for validation → 1.47B training tokens, 7.4M validation tokens.
- About 0.68 epochs were used (996M tokens seen), so no text was repeated.
Tokenizer
The same SentencePiece Unigram tokenizer as the rest of the series: 32,000 vocab, byte_fallback, character coverage 0.9995. Measured on cleaned Hindi text: 1.33 tokens per word, 4.16 characters per token. Special tokens: <pad>=0, <unk>=1, <s>=2, </s>=3, plus language tags (<hi>, <mr>, …) reserved for the future multilingual model.
Training procedure
| Hardware | 1 × NVIDIA RTX 3060 Laptop, 6 GB |
| Precision | bf16 autocast, gradient checkpointing |
| Optimiser | AdamW (β = 0.9, 0.95), weight decay 0.1, grad clip 1.0 |
| Learning rate | 6e-4 peak → 6e-5, cosine, 760-step linear warmup |
| Batch | 2 × 64 accum × 1,024 = 131,072 tokens/step |
| Steps | 7,600 (996M tokens) |
| Peak VRAM | about 3.3 GB (micro-batch 4 used 5.96 GB and spilled into shared memory on Windows, which is much slower) |
| Packing | Packed uint16 token stream, no padding |
Training was paused and resumed several times. Checkpoints are written atomically (temp file, then rename) and loaded on the CPU when resuming, so a crash or a resume never corrupts or runs out of GPU memory.
Full pipeline code (download → clean → tokenizer → pack → train → generate → push): https://github.com/ashishpatel26/Indian-Language-llm-model
Limitations and risks
- Hallucination: at this scale the model learns how Hindi is written, not what is true. Do not use it as a source of facts.
- Web bias: Sangraha web text adds news, religious, astrology and commercial styles. The model may produce horoscope-like or promotional text and may repeat biases present in Indian web content.
- Repetition: without a repetition penalty, sampling can loop on phrases.
- No alignment: no instruction tuning, no RLHF, no output safety filtering.
- Context: 1,024 tokens.
Recommendations
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.
Evaluation
- Metric: cross-entropy loss and perplexity on two held-out sets, the Wikipedia-only validation set (0.3M tokens) and the Wikipedia + Sangraha validation set (7.4M tokens), 120 random 256-token windows each, float32.
- Results: Wikipedia loss 3.789 / ppl 44.2; Wikipedia + Sangraha loss 3.428 / ppl 30.8; full 1,024-token context loss 3.368 / ppl 29.0.
- Not yet evaluated on downstream Hindi benchmarks such as IndicGLUE or IndicXNLI.
Environmental impact
| Hardware | 1 × RTX 3060 Laptop GPU (power-capped at 30–100 W) |
| Training time | about 32 GPU-hours at ~8,600 tokens/s (spread over several days with pauses) |
| Energy | about 3 kWh (estimated) |
| Location | India, local machine |
Technical specifications
- Framework: PyTorch 2.x (CUDA 12.6), Hugging Face Transformers 5.x, SentencePiece 0.2
- Weights:
model.safetensors(fp32), configconfig.json
Model card authors and contact
ashishpatel26. Questions and issues: https://github.com/ashishpatel26/Indian-Language-llm-model/issues
Citation
@misc{jambavan_hi_100m,
title = {Jambavan-hi-100M: a Hindi language model trained from scratch on a 6 GB GPU},
author = {ashishpatel26},
year = {2026},
url = {https://huggingface.co/ashishpatel26/jambavan-hi-100m}
}