Instructions to use timothydillan/gemma4-e2b-balinese-mt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use timothydillan/gemma4-e2b-balinese-mt with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="timothydillan/gemma4-e2b-balinese-mt", filename="gemma4-e2b-idban-Q8_0.gguf", )
llm.create_chat_completion( messages = "\"ะะตะฝั ะทะพะฒัั ะะพะปััะณะฐะฝะณ ะธ ั ะถะธะฒั ะฒ ะะตัะปะธะฝะต\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use timothydillan/gemma4-e2b-balinese-mt with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0 # Run inference directly in the terminal: llama cli -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0 # Run inference directly in the terminal: llama cli -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf timothydillan/gemma4-e2b-balinese-mt:Q8_0
Use Docker
docker model run hf.co/timothydillan/gemma4-e2b-balinese-mt:Q8_0
- LM Studio
- Jan
- Ollama
How to use timothydillan/gemma4-e2b-balinese-mt with Ollama:
ollama run hf.co/timothydillan/gemma4-e2b-balinese-mt:Q8_0
- Unsloth Studio
How to use timothydillan/gemma4-e2b-balinese-mt 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 timothydillan/gemma4-e2b-balinese-mt 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 timothydillan/gemma4-e2b-balinese-mt to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for timothydillan/gemma4-e2b-balinese-mt to start chatting
- Atomic Chat new
- Docker Model Runner
How to use timothydillan/gemma4-e2b-balinese-mt with Docker Model Runner:
docker model run hf.co/timothydillan/gemma4-e2b-balinese-mt:Q8_0
- Lemonade
How to use timothydillan/gemma4-e2b-balinese-mt with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull timothydillan/gemma4-e2b-balinese-mt:Q8_0
Run and chat with the model
lemonade run user.gemma4-e2b-balinese-mt-Q8_0
List all available models
lemonade list
llm.create_chat_completion(
messages = "\"ะะตะฝั ะทะพะฒัั ะะพะปััะณะฐะฝะณ ะธ ั ะถะธะฒั ะฒ ะะตัะปะธะฝะต\""
)Gemma 4 E2B โ Balinese โ Indonesian (v0)
A LoRA-SFT fine-tune of Gemma 4 E2B for Indonesian โ Balinese translation, built as part of Open Indonesia Models โ open language/speech models for Indonesian regional languages, starting with Balinese.
On-device first: ships as a q8_0 GGUF (4.6 GB) runnable in Ollama / llama.cpp / LM Studio.
Results (chrF++, 100 held-out NusaX-MT pairs, greedy)
| Direction | Base Gemma-4-E2B | This model (q8_0) | ฮ |
|---|---|---|---|
| Indonesian โ Balinese | 29.33 | 51.88 | +22.6 |
| Balinese โ Indonesian | 34.46 | 60.93 | +26.5 |
Fine-tuning roughly doubles chrF++. Trained on 1,200 clean NusaX-MT pairs (2 epochs, Unsloth LoRA SFT, final loss 0.328). This is a v0 translation baseline, not a general assistant โ expect occasional lexical slips.
Usage (Ollama)
# Build from the GGUF (Modelfile uses Gemma-4's <|turn> template):
ollama create oim-bali -f Modelfile
ollama run oim-bali "Translate from Indonesian to Balinese.
Selamat pagi, semoga harimu menyenangkan."
Prompt format follows training: Translate from Indonesian to Balinese.\n\n<text>
(or ... to Indonesian.). Register conditioning where available:
Translate from Indonesian to Balinese (register=Alus Sor).\n\n<text>.
Files
gemma4-e2b-idban-Q8_0.ggufโ the runnable on-device model (q8_0, PLE-safe).adapter/โ the LoRA adapter (apply ontogoogle/gemma-4-E2B-it).Modelfileโ Ollama Modelfile with the correct Gemma-4 chat template.
Notes
- Quant: q8_0 (NOT q4_k_m). Gemma 4 E2B uses Per-Layer Embeddings (PLE) which
are highly quant-sensitive; q8_0 keeps them lossless. Exported via llama.cpp
convert_hf_to_gguf.py --outtype q8_0(stock mlx-lm fails on the multimodal arch).
Attribution & license
- Base: Gemma 4 (Google) โ Gemma Terms of Use.
- Training data: NusaX-MT (IndoNLP), CC BY-SA 4.0 โ Winata et al., NusaX, EACL 2023 (arXiv:2205.15960). Redistribution of data derivatives must preserve attribution + ShareAlike.
- Built for non-commercial use and open sharing.
- Downloads last month
- 25
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="timothydillan/gemma4-e2b-balinese-mt", filename="gemma4-e2b-idban-Q8_0.gguf", )