๐Ÿ‡ฎ๐Ÿ‡ณ Gemma-3-1B Hindi Instruct

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.

Quickstart

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.

Available formats

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

Training

  • Base: google/gemma-3-1b-it (text-only path)
  • Method: LoRA (r=32, ฮฑ=32, all attn+MLP projections), response-only loss
  • Data: AI4Bharat indic-instruct-data-v0.1 โ€” anudesh + dolly (Hindi), chrFโ‰ฅ50 filtered, balanced 6k
  • Schedule: 2 epochs, LR 2e-4, effective batch 8 ยท single T4 (Kaggle, free), fp32, ~167 min ยท Unsloth + TRL

Recommended decoding: temperature=0.4, top_p=0.9, repetition_penalty=1.3.

Evaluation

เคชเฅเคฐเคถเฅเคจ: เคเค• เค›เฅ‹เคŸเฅ‡ เคฌเคšเฅเคšเฅ‡ เค•เฅ‹ เค—เฅเคฐเฅเคคเฅเคตเคพเค•เคฐเฅเคทเคฃ เคธเคฐเคฒ เคนเคฟเค‚เคฆเฅ€ เคฎเฅ‡เค‚ เคธเคฎเคเคพเค‡เคเฅค เค‰เคคเฅเคคเคฐ: PASTE_YOUR_BEST_CLEAN_OUTPUT_HERE

Limitations

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.

Credits

Base model ยฉ Google, used under the Gemma license. Data: AI4Bharat. Fine-tuning: Unsloth.

Downloads last month
37
Safetensors
Model size
1.0B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for pankajpandey-dev/gemma-3-1b-hindi-instruct

Adapter
(223)
this model
Quantizations
1 model

Collection including pankajpandey-dev/gemma-3-1b-hindi-instruct