ai4bharat/indic-instruct-data-v0.1
Viewer โข Updated โข 404k โข 286 โข 26
How to use pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e4b-it-unsloth-bnb-4bit")
model = PeftModel.from_pretrained(base_model, "pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora")How to use pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora with Unsloth Studio:
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-4-e4b-hindi-instruct-lora to start chatting
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-4-e4b-hindi-instruct-lora to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora",
max_seq_length=2048,
)LoRA adapter (r=16) for Hindi instruction-tuning of Gemma 4 E4B. Apply on top of the base model, or use the ready-made merged / GGUF builds.
Part of my Hindi LLM Series.
from transformers import AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-E4B-it", device_map="auto")
model = PeftModel.from_pretrained(base, "pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora")
Or with Unsloth:
from unsloth import FastModel
model, tok = FastModel.from_pretrained("pankajpandey-dev/gemma-4-e4b-hindi-instruct-lora")
| Base model | unsloth/gemma-4-E4B-it |
| Method | LoRA (r=16, ฮฑ=16), response-only loss |
| Framework | Unsloth |
| Data | ~10k Hindi instruction pairs (AI4Bharat indic-instruct: anudesh + dolly, hi splits) |
| Epochs | 2 |
| LR / schedule | 1e-4, cosine |
| Precision | bf16 (4-bit QLoRA base) |
| Hardware | Single NVIDIA L4 (24 GB) |
| Final train loss | ~0.29 |
pankajpandey-dev/gemma-4-e4b-hindi-instructpankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUFMixed-license lineage โ review all before redistribution or commercial use:
You are responsible for complying with the Gemma, Llama 2, and CC-BY-SA terms.
Base model by Google (Gemma 4). Data by AI4Bharat. Fine-tuning with Unsloth. ๐