Downloads · 30 days
22
14% of all-time downloads
pankajpandey-dev/gemma-4-e4b-hindi-instruct
gemma-4-e4b-hindi-instruct is a text generation model from pankajpandey-dev. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
A Hindi instruction-tuned fine-tune of Gemma 4 E4B. This is the merged 16-bit model for use with 🤗 Transformers / vLLM / further fine-tuning.
Downloads · 30 days
22
14% of all-time downloads
All-time downloads
155
Public
Parameters
8B
16 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors16 GB · 100%
From the Hugging Face model README
A Hindi instruction-tuned fine-tune of Gemma 4 E4B. This is the merged 16-bit model for use with 🤗 Transformers / vLLM / further fine-tuning.
For local CPU/edge use, see the GGUF build.
Part of my Hindi LLM Series — small, openly-documented Indic models that actually follow instructions in Hindi and run on your own machine.
from transformers import AutoModelForCausalLM, AutoProcessor
import torch
model_id = "pankajpandey-dev/gemma-4-e4b-hindi-instruct"
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
proc = AutoProcessor.from_pretrained(model_id)
msgs = [{"role": "user", "content": [{"type": "text", "text": "मशीन लर्निंग को आसान शब्दों में समझाओ।"}]}]
inputs = proc.apply_chat_template(msgs, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, use_cache=True)
print(proc.decode(out[0], skip_special_tokens=True))
Prompt: भारत के बारे में एक रोचक तथ्य बताओ।
भारत दुनिया में सबसे अधिक भाषाओं वाले देशों में से एक है — 22 आधिकारिक भाषाएँ और 1,000 से अधिक बोलियाँ। हिंदी एक इंडो-आर्यन भाषा है, जबकि तमिल एक द्रविड़ भाषा है।
| 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 |
Trained text-only (vision layers frozen), single-BOS chat template to avoid double-BOS corruption.
pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUFpankajpandey-dev/gemma-4-e4b-hindi-instruct-loraMixed-license lineage — review all before redistribution or commercial use:
databricks-dolly-15k, CC-BY-SA-3.0.Raw training data is not redistributed here. 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. 🙏