Downloads · 30 days
45
68% of all-time downloads
litert-community/gemma-4-E2B-it-nepali-lora
gemma-4-E2B-it-nepali-lora is a machine learning model from litert-community. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter for google/gemma-4-E2B-it that answers in Nepali even when prompted in English, with no system prompt required at inference time.
Downloads · 30 days
45
68% of all-time downloads
All-time downloads
66
Public
Repo size
129 MB
Likes
0
Public
Click a slice to open those files.
.safetensors96.7 MB · 75%
From the Hugging Face model README
A LoRA adapter for google/gemma-4-E2B-it that answers in Nepali even when prompted in English,
with no system prompt required at inference time.
The base model already produces fluent Nepali when given the system prompt "You are a helpful AI assistant that answers in Nepali.", and English without it. This adapter distills that system prompt into the weights, so the behaviour is unconditional. The point is on-device efficiency: a system prompt costs prefill tokens on every request, and training it in once removes that cost permanently.
OpenAssistant/oasst1, English conversation openers (Apache-2.0, human-written)google/gemma-4-E2B-it itself with the system prompt aboveOn 60 held-out English prompts, with no system prompt, mean fraction of Devanagari characters in the response:
| Devanagari | |
|---|---|
base google/gemma-4-E2B-it | 0.000 |
| base + this adapter | 0.814 |
| Setting | Value |
|---|---|
| rank / alpha / dropout | 16 / 32 / 0.05 |
| target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (205 modules, text decoder only) |
| epochs | 3 |
| effective batch size | 16 |
| learning rate | 0.0002 |
| max sequence length | 768 |
| precision | bf16 base, fp32 LoRA |
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("google/gemma-4-E2B-it", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "litert-community/gemma-4-E2B-it-nepali-lora")
tok = AutoTokenizer.from_pretrained("google/gemma-4-E2B-it")
For on-device deployment with LiteRT-LM, see the companion conversion notebook.
This repository contains an educational demonstration artifact created for the LiteRT-LM fine-tuning Colab tutorial to illustrate end-to-end LoRA fine-tuning and .litertlm conversion. It is provided 'AS IS' without warranty of any kind and is not an official general-purpose benchmark or production model release.