Instructions to use pankajpandey-dev/gemma-3-1b-hindi-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use pankajpandey-dev/gemma-3-1b-hindi-instruct with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pankajpandey-dev/gemma-3-1b-hindi-instruct to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pankajpandey-dev/gemma-3-1b-hindi-instruct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pankajpandey-dev/gemma-3-1b-hindi-instruct to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="pankajpandey-dev/gemma-3-1b-hindi-instruct", max_seq_length=2048, )
๐ฎ๐ณ 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