TOBA-3.5B-Multilingual
v1.0 Research Preview · Developed by Bandung Fe Institute
Overview
TOBA (Tokenisasi Optimal Berbasis Aglutinasi) explores language modeling for Indonesia's linguistic and cultural diversity. Inspired by the Gasing Literacy Learning System, its tokenizer uses syllabic-agglutinative representations for Indonesian and regional languages.
For researchers and AI developers, this release supports multilingual QA, translation, cross-lingual QA, and answering from supplied text for culture-oriented and retrieval-augmented applications.
Model at a Glance
| Field | Specification |
|---|---|
| Model name | TOBA-3.5B-Multilingual |
| Version | v1.0 |
| Release status | Research Preview |
| Developed by | Bandung Fe Institute |
| Model type | Instruction-tuned autoregressive language model |
| Architecture | TOBA Transformer with Engram memory |
| Parameters | 3,515,729,024, including Engram |
| Context window | 4,096 tokens |
| Languages covered in training | Indonesian, Batak Toba, Minangkabau, Javanese, Sundanese, Acehnese, Balinese, Makassarese |
| Tokenizer | TOBA syllabic-agglutinative tokenizer |
| Weight format | SafeTensors; FP32 weights and I64 buffers |
| Inference runtime | Native PyTorch; canonical mixed BF16 on CUDA |
Quickstart
This package provides a terminal CLI using native PyTorch, not Transformers AutoModelForCausalLM. The web UI is a separate demo application and is not included.
1. Install dependencies
Download the complete model repository, including all weight shards, and open a terminal there. Use Python 3.10+ with suitable PyTorch/CUDA support; a BF16-capable NVIDIA GPU is recommended.
python -m pip install -r requirements.txt
If python is unavailable, use python3 throughout. Install dependencies and run inference in the same Python environment.
2. Ask your first question
In your terminal, ask a single question without external context:
python inference.py --gpu 0 --prompt "Apa yang dimaksud dengan gotong royong?"
--gpu 0 selects the first visible GPU; adjust the index for your machine. With --prompt or --prompt-file, the CLI answers once and exits.
3. Use the interactive CLI
python inference.py --gpu 0
After loading, type your question at PROMPT>. For multiline input, enter :paste, then paste the passage and question. Type :end on a separate line to submit. These commands are not part of your text. Use :quit to exit.
Requests are independent by default. For follow-up questions, use the multi-turn example.
Capabilities and Usage Examples
Copy the prompts or commands below. Observed in the UI labels recorded demo answers; do not paste these as input.
Context-based QA
Save this complete passage and question in a UTF-8 file named prompt.txt in your model directory:
Candi Borobudur adalah candi Buddha terbesar di dunia yang
terletak di Magelang, Jawa Tengah. Candi ini sempat terbengkalai
selama berabad-abad sebelum akhirnya ditemukan kembali oleh
Sir Thomas Stamford Raffles pada tahun 1814 saat ia menjabat
sebagai Gubernur Jenderal Inggris di Jawa.
Berdasarkan teks, siapa yang menemukan Candi Borobudur?
Then run:
python inference.py --gpu 0 --prompt-file prompt.txt
You can also submit the complete input through interactive multiline mode or the demo UI's message box. For a separate context file, see Advanced Usage.
Cross-lingual QA
The context is Batak Toba; the question and answer are Indonesian. Demo UI: paste the context and question into one message. CLI: save only the context as diponegoro.txt, then run the command below.
Context — Batak Toba
Porang Diponegoro dipatupa mamangke taktik gerilya. Sahat ma i tu titik kritis di taon 1827, di tingki i dipajongjong Bolanda ma 23.000 tentara laho mangalo Diponegoro. Laho mambatasi pardalananna, dibahen Bolanda ma strategi Bentengstelsel (sistem benteng), mambangun benteng di inganan na strategis di sandok Jawa Tengah dohot Jawa Timur na efektif marlingkar di Pangeran Diponegoro.
Question — Indonesian
Berdasarkan konteks di atas, strategi apa yang digunakan Belanda untuk membatasi pergerakan Pangeran Diponegoro?
CLI command
python inference.py --gpu 0 --context-file diponegoro.txt --prompt "Berdasarkan konteks di atas, strategi apa yang digunakan Belanda untuk membatasi pergerakan Pangeran Diponegoro?"
Observed in the UI
bentengstelsel (sistem benteng)

For QA without supplied context, state the desired answer language in the prompt.
Indonesian-to-Batak Toba translation
CLI: pass only the text to translate as --prompt. The flags select Indonesian (id) to Batak Toba (bbc):
python inference.py --gpu 0 --translate-from id --translate-to bbc --prompt "Saya tinggal di Balige."
Demo UI: enter the translation instruction and text together:
Terjemahkan dari Indonesia ke Batak Toba:
Saya tinggal di Balige.
Observed in the UI
au tinggal di balige.

All eight language codes are listed in Advanced Usage.
Multi-turn context-based QA
Demo UI: before the first message, enable Memory (Memori). Keep both turns in the same conversation.
CLI: start an interactive session with history enabled:
python inference.py --gpu 0 --history
Submit the first message using multiline mode (:paste → text → :end). After the answer, type the follow-up at the next PROMPT> without restarting.
First user message — Batak Toba context and an Indonesian question
Kuil Borobudur ima sada kuil Budha na maringanan di Borobudur, Magelang, Jawa
Tengah, Indonesia. Dipajongjong alak Budha Mahayana sakitar abad pa-8 i maso
pamarentahan dinasti Sailendra. Tugu on tardiri tingon onom teras persegi na i
puncakna adong tolu peron na marlingkar. Bagas joro on tartinggal saliaos marratus
taon andorang so didapot Sir Thomas Stamford Raffles muse di taon 1814 tingki ibana
martugas gabe Gubernur Jenderal Inggris di Jawa. Sada proyek pemulihan na balga
diulahon antara taon 1975 sahat tu 1982.
siapa yang membangun candi borobudur?
Observed in the UI — first answer
alak budha
Follow-up question in the same conversation
candi itu ditemukan oleh siapa ya?
Observed in the UI — follow-up answer
sir thomas stamford raffles

Use :new to clear CLI history before changing topics. Session history is conversation context, not Engram memory, and does not change model weights.
RAG proof of concept
The separate RAG demo uses Tavily web retrieval and text-based context (TXT). The application retrieves and prepares evidence; TOBA answers from it. The standalone CLI does not require Tavily and does not perform web searches by itself.
The context-based examples above demonstrate answering from provided evidence, not the quality of web retrieval.
Training Summary
Training uses cultural and general-language text, followed by instruction tuning with question-answering examples, translation pairs, and context-based instructions across the eight languages listed above.
Limitations and Intended Use
Output quality varies across languages, tasks, and input contexts. Responses may contain factual or interpretation errors, or depart from the requested language or format. Review is recommended when precise source alignment, cultural nuance, names, or numbers are important.
This Research Preview is intended for research and application development. For high-stakes applications, use independent verification and human oversight.
Advanced Usage
Optional reference for file input, language codes, and runtime settings:
Context in a separate file
Save only the Borobudur passage as UTF-8 context.txt, and pass the question separately:
python inference.py --gpu 0 --context-file context.txt --prompt "Berdasarkan teks, siapa yang menemukan Candi Borobudur?"
--prompt-file sends the complete file as one prompt. --context-file uses a context-QA instruction with separate context and question labels. Both use the same checkpoint, but their input formatting differs.
History retention
Follow the multi-turn example to start a session with history. The CLI retains only turns that finish with EOS; history is cleared when the process exits.
| CLI code | Language |
|---|---|
id | Indonesian |
bbc | Batak Toba |
min | Minangkabau |
sun | Sundanese |
jav | Javanese |
ban | Balinese |
ace | Acehnese |
mak | Makassarese |
Use both --translate-from and --translate-to, with different source and target codes. Translation mode cannot be combined with --history or --context-file.
Keep the weight shards, tokenizer, Engram assets, and model configuration together in the downloaded model directory.
The 4,096-token window includes the prompt, role/language tags, optional history, and generated response. The CLI does not silently truncate input. Generation continues until EOS or the remaining context budget; --max-new-tokens sets an optional upper bound.
CPU inference is available by replacing --gpu 0 with --device cpu; it requires substantial RAM and is slower than the recommended CUDA runtime.