Barong 50M: A language model for the Balinese language
2 min readupdated
Barong is a compact 50.6-million-parameter decoder-only language model trained from scratch on a laptop for bidirectional translation between Balinese (in the Latin alphabet) and Indonesian. The project features a custom architecture and tokenizer, using no third-party weights. The model targets researchers of low-resource languages and developers working with local dialects of the Indonesian region.
Key features
- Compact size: just 50.6 million parameters (34.2 million excluding embeddings), trained on a single laptop GPU
- Text translation: specializes in Balinese-to-Indonesian and Indonesian-to-Balinese translation pairs
- Open stack: distributed under the Apache-2.0 license, with weights available in safetensors and GGUF formats
- High speed: delivers hundreds of tokens per second on a CPU thanks to its small parameter count
What you can do
- Apply it in Python scripts via the transformers library to translate sentences
- Run it on a mobile device or laptop via llama.cpp using the ready-to-use GGUF Q8_0 file
- Use the architecture and training notes to experiment with other low-resource languages
- Test everyday phrase translation quality and compare it with benchmark results on FLORES-200 and NusaX-MT
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "sixletra/barong"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True).eval()
text = "Saya pergi ke pasar membeli sayur."
print(text)
Read more
DetailsBenchmarks: on the NusaX-MT test for the Balinese-to-Indonesian direction, the model scores 48.5 (chrF++).
Hardware requirements: trained and run on an RTX 3050 Ti consumer graphics card (4 GB VRAM).
Limitations: the model is prone to hallucinations on long texts, does not support transliteration into traditional Balinese script, and requires translation verification by native speakers.










Comments