IndoLM-L-v0.1
IndoLM-L-v0.1 is a 148.7M-parameter Indonesian base language model trained from scratch on 8.0 billion tokens of curated Indonesian text (IndoCorpus-v3.0). It uses a standard Hugging Face LlamaForCausalLM architecture with Grouped-Query Attention (14 query / 2 KV heads) and a 2,048-token context window.
Base model notice: This is a pretrained text-completion model, not an instruction-tuned or chat model. It continues text rather than answering questions, and frequently hallucinates facts. Released for research, SFT experimentation, and as the target model for
IndoLM-M → IndoLM-Lspeculative decoding.
Model Details
| Specification | IndoLM-M-v0.2 | IndoLM-L-v0.1 |
|---|---|---|
| Architecture | Llama-like GPT (MHA) | LlamaForCausalLM (GQA) |
| Parameters (tied embeddings) | 69.98M | 148.67M |
| Hidden size / Layers | 640 / 12 | 896 / 16 |
Attention heads / KV heads (head_dim) | 10 / 10 (64) | 14 / 2 (64) |
| SwiGLU MLP hidden size | 1,728 | 2,432 |
| Context length | 1,024 | 2,048 |
| KV cache / token (bf16) | 30 KiB | 8 KiB |
Vocabulary (IndoLM-tok-v0.1, byte-level BPE) | 16,384 | 16,384 |
| Training corpus | IndoCorpus-v2.0 (1.02B unique) | IndoCorpus-v3.0 (2.10B unique) |
| Training tokens | 4.0B (3.9 epochs) | 8.0B (3.8 epochs, 53.8 tok/param) |
| LR schedule | WSD (1−sqrt cooldown) | WSD (1.5e-3 → 1.5e-4, 1−sqrt cooldown) |
| Weights precision (in repo) | — | fp32 (model.safetensors, 594.7 MB) |
| License | — | CC BY-SA 4.0 |
The tokenizer (IndoLM-tok-v0.1, 16,384 byte-level BPE with individual digit splitting) is kept identical to IndoLM-M-v0.2 so both models share the exact same vocabulary for speculative decoding and fair bits-per-byte comparisons.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "Trentz/IndoLM-L-v0.1"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
dtype=torch.bfloat16,
device_map="auto",
)
prompt = "Indonesia adalah"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(
**inputs,
max_new_tokens=80,
do_sample=True,
temperature=0.8,
top_k=50,
)
print(tokenizer.decode(out[0], skip_special_tokens=False))
generation_config.json automatically masks unused special tokens (ids 1..15) and stops on <|endoftext|> (id 0).
Evaluation
Evaluated with bits-per-byte (bpb, lower is better) on frozen, decontaminated Indonesian held-out sets (IndoEval-heldout-v2: 3,387 documents, 2.34M tokens; IndoEval-heldout-v1: 1,707 documents, 1.69M tokens). For a fair comparison against IndoLM-M-v0.2 (1,024 context), IndoLM-L-v0.1 is scored at both 1,024 and its native 2,048 context window:
| Evaluation Set (window) | IndoLM-L-v0.1 | IndoLM-M-v0.2 | Diff (95% CI, 2,000× doc bootstrap) |
|---|---|---|---|
| IndoEval-heldout-v2 (1,024) | 0.8723 | 0.9254 | −0.0531 (−0.0559 … −0.0507) |
| — Wikipedia ID (891 docs) | 0.9554 | 0.9815 | −0.0261 (−0.0276 … −0.0245) |
— FineWeb2 ind_Latn (2,496 docs) | 0.8533 | 0.9126 | −0.0593 (−0.0624 … −0.0566) |
| IndoEval-heldout-v2 (2,048, native) | 0.8602 | — | −0.0121 vs L @ 1,024 (−0.0127 … −0.0114) |
| — Wikipedia ID (2,048) | 0.9412 | — | −0.0142 vs L @ 1,024 |
— FineWeb2 ind_Latn (2,048) | 0.8417 | — | −0.0116 vs L @ 1,024 |
| IndoEval-heldout-v1 (1,024) | 0.8995 | 0.9464 | −0.0469 (−0.0499 … −0.0441) |
| IndoEval-heldout-v1 (2,048, native) | 0.8870 | — | — |
- Conversion parity (verified across all 3,387 docs of
IndoEval-heldout-v2, fp32): HFLlamaForCausalLMmatches the native PyTorch implementation within−3.67e-10bpb (0.860114vs0.860114), withmax |Δ logits| < 1e-4and 100% argmax agreement. - Unconditional sampling (200 samples × 200 tokens): 0 gambling/spam terms detected (
slot,togel,gacor,maxwin,judi,casino,kasino,poker,advertisement).
Training Data & Limitations
- Data sources:
IndoCorpus-v3.0combines Indonesian Wikipedia (wikimedia/wikipedia20231101.id, ~9.4% of train tokens, CC BY-SA 3.0 / GFDL) and filtered FineWeb2 Indonesian (HuggingFaceFW/fineweb-2ind_Latn, ~90.6% of train tokens, ODC-By 1.0 + Common Crawl Terms of Use), deduplicated and decontaminated against held-out sets. - Not instruction-tuned: Chat special tokens (
<|user|>,<|assistant|>,<|end|>) exist in the vocabulary but have not been trained yet. - Unreliable factuality: At 148.7M parameters, the model frequently fabricates dates, names, numbers, and historical events. Do not use its outputs as a factual source.
- Web noise & safety: Filtered web text still contains residual promotional/SEO noise (~20.7% in manual/AI-assisted audit) and no post-training safety alignment has been applied.
- No downstream benchmarks yet: Only bits-per-byte and sample inspections have been evaluated so far.
License
Released under CC BY-SA 4.0 (inherited from Indonesian Wikipedia).