CALI Indonesian-English Translation Model

A lightweight 121M-parameter translation model fine-tuned from Sandroeth/cali-0.1B for bilingual translation between Indonesian and English.

Capabilities

The model performs well on everyday sentences, casual conversations, and general-purpose translation between Indonesian and English. Its small size makes it suitable for applications that require low latency and lightweight deployment.

However, there are some limitations:

  • Very short inputs (1–2 words) may produce irrelevant translations.
  • Technical or specialized domains such as machine learning, medicine, or law are less reliable.
  • Long passages (over approximately 200 words) may gradually drift and lose consistency.

Training Data

  • Total samples: 179,999 bilingual sentence pairs
  • Training set: 161,999 samples
  • Evaluation set: 18,000 samples
  • Indonesian samples: 89,999
  • English samples: 90,000
  • Training epochs: 3
  • Learning rate: 5e-5

Prompt Format

The model was fine-tuned using a fixed prompt template. For the best results, use the following formats.

Indonesian → English:

[id→en]
{input text}
→

English → Indonesian:

[en→id]
{input text}
→

Usage

Inference example:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch, re

model_id = "Sandroeth/cali-id-en-translate"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    device_map="auto"
)
model.eval()

def translate(text, locale):
    direction = "[id→en]" if locale == "id" else "[en→id]"
    prompt = f"{direction}\n{text}\n→"

    inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

    with torch.no_grad():
        out = model.generate(
            **inputs,
            max_new_tokens=64,
            do_sample=False,
            repetition_penalty=1.5,
            no_repeat_ngram_size=3,
            pad_token_id=tokenizer.eos_token_id,
            use_cache=False,
        )

    gen = out[0][inputs["input_ids"].shape[1]:]
    result = tokenizer.decode(gen, skip_special_tokens=True).strip()

    return re.split(r'(?<=[.!?])\s+', result)[0]

print(translate("Dia pergi ke pasar setiap pagi.", "id"))
print(translate("The weather is very cold today.", "en"))

Example Outputs

Input Direction Output
Saya makan nasi. id→en I eat rice.
Dia pergi ke pasar setiap pagi. id→en He goes to the market every morning.
She is happy. en→id Dia bahagia.
The weather is very cold today. en→id Cuacanya sangat dingin hari ini.
Pemerintah sedang membangun infrastruktur baru. id→en The government is building new infrastructure.

Citation

If you use or reference this model in your research or projects, please cite:

@article{cali2026,
  title        = {CALI 0.1B},
  author       = {Sandroeth},
  year         = {2026},
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/Sandroeth/cali-0.1B}
}

Author

Sandroeth

License

Apache License 2.0

Downloads last month
16
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Model tree for Sandroeth/cali-id-en-translate

Finetuned
(1)
this model

Collection including Sandroeth/cali-id-en-translate