How to use from
Docker Model Runner
docker model run hf.co/pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF:
Quick Links

๐Ÿ‡ฎ๐Ÿ‡ณ Gemma-4-E4B-Hindi-Instruct โ€” GGUF

A Hindi instruction-tuned fine-tune of Gemma 4 E4B, quantized to GGUF for local / CPU / edge use via llama.cpp, LM Studio, and llama-cpp-python.

The smallest quant is ~5.3 GB and runs on an 8 GB laptop โ€” CPU or GPU, fully offline. No API, no cloud. Part of my ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi LLM Series โ€” small, openly-documented Indic models that actually follow instructions in Hindi.

โ–ถ๏ธ Try it live (no install, runs on free CPU): pankajpandey-dev/gemma-4-e4b-hindi-demo

This is the GGUF build. The 16-bit model and LoRA adapter are in separate repos.


โœ… What the fine-tune actually changes (honest eval)

I ran a side-by-side on 25 Hindi prompts โ€” base gemma-4-E4B-it vs. this fine-tune, same prompts, same settings. The pattern was consistent:

Behaviour Base gemma-4-E4B-it This fine-tune
Stays in Hindi Often code-switches to English โ€” e.g. เคธเค‚เคคเฅเคฒเคฟเคค เค†เคนเคพเคฐ (Eat a Balanced Diet) Clean, native Devanagari Hindi
Follows the ask "3 tips" โ†’ a long essay; "short message" โ†’ a menu of options "3 tips" โ†’ exactly 3; "short message" โ†’ one short message
Length Verbose (~1,200-character answers) Concise and to the point

๐Ÿ” Where the base still wins โ€” being honest: vanilla gemma-4-E4B is more detailed and broader in general knowledge. This is not a "smarter" model โ€” it's a focused, Hindi-native, edge-friendly one. If you want maximum detail and don't mind Hindi-English mixing, the base may actually suit you better.

๐Ÿ“„ The full 25-prompt comparison is written up in the announcement post.


๐Ÿš€ Quick start

โš ๏ธ Ollama note: Gemma 4 E4B GGUFs currently fail to load in Ollama (upstream architecture bug, ollama#15447). Use llama.cpp, LM Studio, or llama-cpp-python below โ€” all work today. (Retest Ollama as it updates; recent llama.cpp builds added gemma4 support.)

llama.cpp

./llama-cli -hf pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF:Q4_K_M \
  -p "เคญเคพเคฐเคค เค•เฅ‡ เคฌเคพเคฐเฅ‡ เคฎเฅ‡เค‚ เคเค• เคฐเฅ‹เคšเค• เคคเคฅเฅเคฏ เคฌเคคเคพเค“เฅค"

Or run a local OpenAI-compatible server with a web UI:

./llama-server -hf pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF:Q4_K_M

LM Studio / Jan

Search for pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF, pick a quant (start with Q4_K_M), and chat. ๐Ÿพ

llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
    repo_id="pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF",
    filename="gemma-4-e4b-it.Q4_K_M.gguf",
)
out = llm.create_chat_completion(
    messages=[{"role": "user", "content": "เคฎเคถเฅ€เคจ เคฒเคฐเฅเคจเคฟเค‚เค— เค•เฅ‹ เค†เคธเคพเคจ เคถเคฌเฅเคฆเฅ‹เค‚ เคฎเฅ‡เค‚ เคธเคฎเคเคพเค“เฅค"}]
)
print(out["choices"][0]["message"]["content"])

๐Ÿ’ก This is a text-only model. You do not need any mmproj file โ€” just the single quant .gguf.


๐Ÿ“ฆ Pick your quant

File Quant Size Vibe
gemma-4-e4b-it.Q4_K_M.gguf Q4_K_M ~5.3 GB โญ Recommended โ€” best size/quality balance
gemma-4-e4b-it.Q5_K_M.gguf Q5_K_M ~5.8 GB A notch higher quality
gemma-4-e4b-it.Q8_0.gguf Q8_0 ~8.0 GB Near-lossless

๐Ÿ“ Size note: Gemma 4 E4B runs at 4B speed but carries **8B total parameters** (Matformer / per-layer embeddings), so the files are sized like an 8B model. Q4_K_M still fits comfortably on a laptop with 8 GB+ RAM, CPU or GPU.


๐Ÿงฎ Will it run?

Rough guidance (model + a working context window). Drop a quant if you're tight, or use a q4_0 KV cache to roughly double your context headroom. Max context is 128K.

Your free RAM / VRAM What to run
8 GB ๐ŸŸข Q4_K_M โ€” the sweet spot
12 GB ๐Ÿ”ต Q5_K_M, or Q8_0 with a modest context
16 GB+ โšช Q8_0 at full quality, with long context

๐Ÿ’ก Apple Silicon / integrated GPUs with unified memory count too โ€” same sizes, just slower than a discrete GPU. And yes, this all works on plain CPU with system RAM (just slower than GPU).


๐Ÿ’ฌ Example outputs

Prompt: เคญเคพเคฐเคค เค•เฅ‡ เคฌเคพเคฐเฅ‡ เคฎเฅ‡เค‚ เคเค• เคฐเฅ‹เคšเค• เคคเคฅเฅเคฏ เคฌเคคเคพเค“เฅค

เคญเคพเคฐเคค เคฆเฅเคจเคฟเคฏเคพ เคฎเฅ‡เค‚ เคธเคฌเคธเฅ‡ เค…เคงเคฟเค• เคญเคพเคทเคพเค“เค‚ เคตเคพเคฒเฅ‡ เคฆเฅ‡เคถเฅ‹เค‚ เคฎเฅ‡เค‚ เคธเฅ‡ เคเค• เคนเฅˆ โ€” 22 เค†เคงเคฟเค•เคพเคฐเคฟเค• เคญเคพเคทเคพเคเค เค”เคฐ 1,000 เคธเฅ‡ เค…เคงเคฟเค• เคฌเฅ‹เคฒเคฟเคฏเคพเคเฅค เค‰เคฆเคพเคนเคฐเคฃ เค•เฅ‡ เคฒเคฟเค เคนเคฟเค‚เคฆเฅ€ เคเค• เค‡เค‚เคกเฅ‹-เค†เคฐเฅเคฏเคจ เคญเคพเคทเคพ เคนเฅˆ, เคœเคฌเค•เคฟ เคคเคฎเคฟเคฒ เคเค• เคฆเฅเคฐเคตเคฟเคกเคผ เคญเคพเคทเคพ เคนเฅˆเฅค

Prompt: เคฎเคถเฅ€เคจ เคฒเคฐเฅเคจเคฟเค‚เค— เค•เฅ‹ เค†เคธเคพเคจ เคถเคฌเฅเคฆเฅ‹เค‚ เคฎเฅ‡เค‚ เคธเคฎเคเคพเค“เฅค

เคฎเคถเฅ€เคจ เคฒเคฐเฅเคจเคฟเค‚เค— เคเค• เคชเฅเคฐเค•เคพเคฐ เค•เฅ€ เค•เฅƒเคคเฅเคฐเคฟเคฎ เคฌเฅเคฆเฅเคงเคฟเคฎเคคเฅเคคเคพ เคนเฅˆ เคœเฅ‹ เค•เค‚เคชเฅเคฏเฅ‚เคŸเคฐ เค•เฅ‹ เคธเฅเคชเคทเฅเคŸ เคฐเฅ‚เคช เคธเฅ‡ เคชเฅเคฐเฅ‹เค—เฅเคฐเคพเคฎ เค•เคฟเค เคฌเคฟเคจเคพ เคกเฅ‡เคŸเคพ เคธเฅ‡ เคธเฅ€เค–เคจเฅ‡ เคฆเฅ‡เคคเฅ€ เคนเฅˆ โ€ฆ เคœเฅˆเคธเฅ‡ เค•เคฟเคธเฅ€ เคฌเคšเฅเคšเฅ‡ เค•เฅ‹ เคธเฅ‡เคฌ เค”เคฐ เคธเค‚เคคเคฐเฅ‡ เค•เฅ‡ เคšเคฟเคคเฅเคฐ เคฆเคฟเค–เคพเค•เคฐ เค…เค‚เคคเคฐ เค•เคฐเคจเคพ เคธเคฟเค–เคพเคจเคพเฅค

(Real outputs from testing, lightly trimmed for length.)


๐Ÿ› ๏ธ Training details

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). The Gemma chat template is applied with a single BOS token to avoid double-BOS corruption.


๐Ÿ”— The series & related repos

๐Ÿ’š Found it useful, or hit a rough edge? Open a discussion with a Hindi prompt โ€” feedback shapes the next model in the series.


๐Ÿ“š Provenance & license (please read)

This is a research / educational fine-tune with a mixed-license lineage โ€” review all of the following before any redistribution or commercial use:

  • Model weights derive from Gemma 4 and are released under the Gemma Terms of Use. Google's Gemma usage restrictions apply to this derivative.
  • Training data is from AI4Bharat indic-instruct-data-v0.1:
    • Dolly split โ€” derived from databricks-dolly-15k, licensed CC-BY-SA-3.0.
    • Anudesh split โ€” prompts paired with responses generated by Llama-2-70B, so the Llama 2 Community License applies to that portion.

I do not redistribute the raw training data here. If you build on this model, you are responsible for complying with the Gemma, Llama 2, and CC-BY-SA terms above.


โš ๏ธ Limitations

  • ~8B-class model: strong Hindi fluency and instruction-following, but it can still hallucinate facts and occasionally repeat phrasing on open-ended generation (e.g. long poems).
  • Tuned primarily on single-turn Hindi instructions; long multi-turn chat is not the focus.
  • Not safety-aligned for production. Add your own guardrails.

๐Ÿ™ Acknowledgements

Base model by Google (Gemma 4). Training data by AI4Bharat. Fine-tuning with Unsloth.

Downloads last month
1,054
GGUF
Model size
8B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

5-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ 2 Ask for provider support

Model tree for pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF

Quantized
(21)
this model

Dataset used to train pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF

Space using pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF 1

Collections including pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF

Article mentioning pankajpandey-dev/gemma-4-e4b-hindi-instruct-GGUF