🇮🇳 Hindi LLM Series
Collection
10 items • Updated • 1
Lightweight 1B Hindi instruction-tuned model from google/gemma-3-1b-it, fine-tuned with LoRA. Fluent Hindi on edge hardware — CPU, Ollama, Raspberry Pi.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("pankajpandey-dev/gemma-3-1b-hindi-instruct")
model = AutoModelForCausalLM.from_pretrained("pankajpandey-dev/gemma-3-1b-hindi-instruct", torch_dtype=torch.float32)
msgs = [{"role": "user", "content": "एक छोटे बच्चे को गुरुत्वाकर्षण सरल हिंदी में समझाइए।"}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=256, temperature=0.4, top_p=0.9, repetition_penalty=1.3)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Part of my 🇮🇳 Hindi LLM Series — weekly experiments adapting small models to Indian languages.
| Repo | Format | Use |
|---|---|---|
...-hindi-instruct |
Merged 16-bit | Transformers |
...-hindi-instruct-GGUF |
Q4_K_M / Q5_K_M / Q8_0 | Ollama, llama.cpp, CPU |
...-hindi-instruct-lora |
LoRA adapter | Method artifact |
google/gemma-3-1b-it (text-only path)indic-instruct-data-v0.1 — anudesh + dolly (Hindi), chrF≥50 filtered, balanced 6kRecommended decoding: temperature=0.4, top_p=0.9, repetition_penalty=1.3.
प्रश्न: एक छोटे बच्चे को गुरुत्वाकर्षण सरल हिंदी में समझाइए। उत्तर: PASTE_YOUR_BEST_CLEAN_OUTPUT_HERE
A 1B model — Hindi fluency is solid; coherence/factual reliability are bounded by scale. Best for short instructions, simple Q&A, and edge/demo use. A Gemma-3-4B Hindi version is the planned next step.
Base model © Google, used under the Gemma license. Data: AI4Bharat. Fine-tuning: Unsloth.