Instructions to use pankajpandey-dev/gemma-3-1b-hindi-instruct-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use pankajpandey-dev/gemma-3-1b-hindi-instruct-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-3-1b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "pankajpandey-dev/gemma-3-1b-hindi-instruct-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use pankajpandey-dev/gemma-3-1b-hindi-instruct-lora 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-lora 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-lora 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-lora 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-lora", max_seq_length=2048, )
🇮🇳 Gemma-3-1B Hindi Instruct — LoRA Adapter
LoRA adapter (r=32) for google/gemma-3-1b-it — the method artifact behind
pankajpandey-dev/gemma-3-1b-hindi-instruct. To run, load the base model and apply this adapter;
for direct use prefer the merged model or GGUF.
Apply
from peft import PeftModel
from transformers import AutoModelForCausalLM
base = AutoModelForCausalLM.from_pretrained("google/gemma-3-1b-it")
model = PeftModel.from_pretrained(base, "pankajpandey-dev/gemma-3-1b-hindi-instruct-lora")
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
- 20