MerahModels — Indonesian Texting Normalizer

Turn messy Indonesian texting (bahasa gaul, alay, WhatsApp & marketplace shorthand) into clean, readable Indonesian — fast, offline, and on plain CPU.
An Apache-2.0, CPU-ready dual-mode text normalizer by MerahModels.

What This Model Does

Everyday Indonesian messages on WhatsApp, marketplace chats (Tokopedia/Shopee), and customer support are packed with vowel-dropped shorthand (bsk, ga, bs, krn), number-2 reduplications (org2, hati2), merged words (gatau, dirumah), stretched spelling (makasiiihh), and Jaksel Indonesian–English mixing.

Flat dictionary lookup tables (kamus alay) break on real text because the same abbreviation means completely different words depending on context — bkn can mean bukan ("not") or bikin ("make"), sm can mean sama ("with"), semua ("all"), or semoga ("hopefully"), and dr can mean dari ("from"), dokter ("doctor"), or daripada ("than"). Dictionaries also corrupt entities like flight numbers (GA-412 → TIDAK-412) and honorifics (dr. Agus → dari. Agus). On the other hand, calling a hosted LLM for every chat message is slow and expensive.

This model reads the full sentence on plain CPU in tens of milliseconds and rewrites it cleanly in two controllable modes — no system prompt required, just a short prefix:

  • <norm> (Clean Readable Indonesian): Expands shorthand, 2-reduplications, merged words, and stretched spellings while keeping casual tone (gue, lu, banget, nih, dong, kak) and intentional English (Jaksel) words intact.
  • <formal> (Standard Bahasa Baku): Rewrites informal Indonesian into polite, standard Bahasa Baku (gw/gue/aku → saya, lu → Anda/kamu, bgt → sangat, lg → sedang, udh → sudah), matching the STIF-Indonesia formal register.
What the input looks like Mode Reconstructed output (int8 ONNX + production guard)
bsk gw ga bs mampir k bengkel krn lg ribet bgt sm pindahan, maaf yaa <norm> Besok gue tidak bisa mampir ke bengkel karena sedang ribet banget sama pindahan, maaf ya
bsk gw ga bs mampir k bengkel krn lg ribet bgt sm pindahan, maaf yaa <formal> Besok saya tidak dapat mampir ke bengkel karena sedang sangat rumit dengan pindahan, mohon maaf
sm peserta udah hadir, sm acaranya lancar ya pak, pulang sm rekan kerja <norm> Semua peserta sudah hadir, semoga acaranya lancar ya Pak, pulang dengan rekan kerja
bkn sy yg bkn kesalahan invoice itu, tlg cek ulang resi JNE90817263 ya kak <formal> Bukan saya yang menyebabkan kesalahan invoice tersebut, mohon periksa ulang resi JNE90817263 ya, Kak
literally msh nunggu review design dr tim product nih, otw balik 🚗💨🙏 <norm> Literally masih nunggu review design dari tim product nih, otw balik 🚗💨🙏
TOLONG CEK PESANAN SY KRN BLM SAMPE D RUMAH <norm> Mohon cek pesanan saya karena belum sampai di rumah
SELECT order_id, status FROM shipments WHERE weight_kg <= 25; <norm> / <formal> SELECT order_id, status FROM shipments WHERE weight_kg <= 25; (unchanged)

(All showcase examples above were authored outside both benchmark suites and all prompt templates.)

Why Use It

  • Fast on plain CPU (no GPU needed): Ships as a 160.22 MiB (168.01 MB) dynamic int8 ONNX export with KV-cache (onnx/) alongside full PyTorch (safetensors) weights (69.23M parameters). Runs in ~23 ms p50 on an idle Apple Silicon laptop CPU (36.1 ms p50 under heavy shared CPU load) at 4 threads.
  • Disambiguates by context instead of flat regex: Reaches 92.63% (176/190) accuracy across 19 ambiguous Indonesian shorthand keys on the held-out suite — vs. 37.89% for the MIT regex+dictionary baseline and 33.93% for zero-shot Qwen3-1.7B on dev.
  • Beats classical baselines on real human customer-service text: Scores 75.85 chrF++ / 53.62 BLEU on untouched human STIF-Indonesia test (+3.15 chrF++ / +6.06 BLEU over the MIT baseline, 5,000-resample paired bootstrap win rate 1.0000).
  • Production safety wrapper included in the companion repo: Pairs the neural weights with deterministic chunking, entity/currency/date/time/code/URL/emoji preservation, and SQL/CLI/code pass-through (tssandor/indonesian-text-normalizer), achieving 100.0% (194/194) verbatim entity preservation and 0.00% (0/70) identity false-edits on the holdout suite.
  • Apache-2.0 open weights and open benchmark: Published alongside the Apache-2.0 holdout + dev benchmark suite at tssandor/indonesian-text-normalizer-bench.

Where It Fits (and When Not to Use It)

  • Great for: Preprocessing Indonesian chats before search/RAG indexing, CRM/helpdesk normalization, analytics/classification pipelines, and cleaning noisy user inputs offline on CPU.
  • Use the companion guard (IndonesianNormalizer) in production: Raw seq2seq inference handles single short messages (<= 320 tokens) well, but multi-sentence chats, payments, URLs, emojis, and code/SQL snippets should go through IndonesianNormalizer.
  • Not a regional-language translator: Covers mainstream Indonesian texting, Jakarta/Jaksel slang, and common everyday borrowings, but is not a Javanese, Sundanese, or Balinese translator.

Quickstart

1. Standalone Python ONNX Runtime (optimum[onnxruntime] — Zero Repo Files)

Runs directly against this Hugging Face repository on plain CPU (no PyTorch checkpoint download required):

import onnxruntime as ort
from optimum.onnxruntime import ORTModelForSeq2SeqLM
from transformers import AutoTokenizer

REPO = "tssandor/indonesian-text-normalizer"

sess_opts = ort.SessionOptions()
sess_opts.intra_op_num_threads = 4
sess_opts.inter_op_num_threads = 1

tokenizer = AutoTokenizer.from_pretrained(REPO)
model = ORTModelForSeq2SeqLM.from_pretrained(
    REPO,
    subfolder="onnx",
    provider="CPUExecutionProvider",
    session_options=sess_opts,
    encoder_file_name="encoder_model.onnx",
    decoder_file_name="decoder_model.onnx",
    decoder_with_past_file_name="decoder_with_past_model.onnx",
)

def normalize_raw(text: str, mode: str = "norm") -> str:
    enc = tokenizer(
        f"<{mode}> {text.strip()}",
        max_length=320,
        truncation=True,
        return_token_type_ids=False,
        return_tensors="pt",
    )
    cap = min(224, max(int(len(text.split()) * 3.5) + 40, int(len(text.encode("utf-8")) * 1.2) + 32))
    out = model.generate(**enc, max_new_tokens=cap, do_sample=False, num_beams=1)
    return tokenizer.decode(out[0], skip_special_tokens=True).strip()

print(normalize_raw("bsk gw ga bs mampir k bengkel krn lg ribet bgt sm pindahan, maaf yaa", mode="norm"))
print(normalize_raw("bkn sy yg bkn kesalahan invoice itu, tlg cek ulang resi JNE90817263 ya kak", mode="formal"))

2. Python — PyTorch (transformers)

import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

REPO = "tssandor/indonesian-text-normalizer"
tokenizer = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForSeq2SeqLM.from_pretrained(REPO).eval()

text = "sm peserta udah hadir, sm acaranya lancar ya pak, pulang sm rekan kerja"
enc = tokenizer(f"<norm> {text}", max_length=320, truncation=True, return_tensors="pt")
with torch.no_grad():
    out = model.generate(**enc, max_new_tokens=128, do_sample=False, num_beams=1)
print(tokenizer.decode(out[0], skip_special_tokens=True))

3. Production Guarded API & Local Two-Textbox Test Page (Recommended)

Clone the companion code repository tssandor/indonesian-text-normalizer for the deterministic IndonesianNormalizer wrapper (chunking, verbatim masking, SQL/CLI/code bypass, and protected-span post-verification) and the local two-textbox web test page:

from normalizer import IndonesianNormalizer

norm = IndonesianNormalizer("tssandor/indonesian-text-normalizer", num_threads=4)
print(norm.normalize("bsk gw ga bs mampir k bengkel krn lg ribet bgt sm pindahan, maaf yaa", mode="norm"))
print(norm.normalize("bsk gw ga bs mampir k bengkel krn lg ribet bgt sm pindahan, maaf yaa", mode="formal"))
# Launch the local two-textbox test page at http://127.0.0.1:8785
uv run --extra eval python demo_server.py

JavaScript / @huggingface/transformers status: Not supported in v0.1. Testing with @huggingface/transformers@4.3.2 confirmed that the JS Unigram tokenizer does not implement byte_fallback (mapping emojis to <unk>) and requires a merged decoder export. Python ONNX Runtime (optimum[onnxruntime]) and PyTorch (transformers) are the verified v0.1 runtimes; JS/WASM support is tracked for v0.2.


Technical Details & Benchmarks

Model Summary

  • Architecture: Vocab-pruned google/mt5-small (8 encoder / 8 decoder layers, d_model=512, d_ff=1024, 69.23M parameters, tie_word_embeddings=false).
  • Tokenizer: 24,576-token SentencePiece Unigram vocabulary with native ByteFallback (pruned from 250,100 strictly on Indonesian + English training tokens, ASCII, and 256 byte tokens; fp32 hidden-state pruning parity verified at 0.0 max diff in data/mt5_id_en_tok_v5/parity_check.json).
  • Artifacts in this repo:
    • onnx/ (T5-safe dynamic QUInt8, /wo/ FFN output projections excluded — 8 nodes × 3 graphs): 160.22 MiB (168.01 MB) (encoder_model.onnx 42.27 MiB, decoder_model.onnx 60.50 MiB, decoder_with_past_model.onnx 57.46 MiB).
    • Root PyTorch checkpoint (model.safetensors): 264.10 MiB (276.93 MB) fp32 weights + tokenizer.json (1.77 MiB) + spiece.model (594 KiB).
  • Latency (4 CPU threads, Apple Silicon Mac, holdout 5–30w slice):
    • Guarded ONNX (int8): 36.1 ms p50 generation-only under shared host CPU contention (37.3 ms mean, 52.7 ms p95 across 418 non-bypassed calls / 209 distinct sources; 36.0 ms p50 e2e across 442 calls incl. 24 bypassed; 1.877 ms/step, 0.543 ms/UTF-8 byte over 9,565 generated decoding steps; ~23 ms p50 on an idle laptop, consistent with the 22.9 ms idle raw ONNX run).
    • Raw ONNX (int8 vs fp32 idle): 22.9 ms p50 (int8) vs. 41.8 ms p50 (fp32, 492.74 MiB).

1. Holdout Suite (tssandor/indonesian-text-normalizer-bench holdout, 460 Calls = 230 Sources × 2 Modes)

Frozen read-only (0o444, SHA-256 BLIND_MANIFEST.json) prior to v05 training and physically excluded from the Colab training upload. Covers all 19 ambiguous shorthand keys (gold self-check: 189/190) plus ALL-CAPS, Title-Case, emojis, 360–520 char paragraphs, extreme amounts (Rp 100000000000, $180.49), full-width URLs, NFKC symbols (m², ½, ™, <s>50rb</s>), and SQL/CLI/code/Arabic identity cases.

Holdout independence disclosure: blind_ambiguous (190, v05 scores 176/190 = 92.63%, source-cluster 95% CI [87.37%, 96.84%], fp32 92.11%) and blind_whatsapp_jaksel (130) are freshly authored unseen contexts. blind_fidelity_and_identity (140) shares procedural generator families with build_v5_package.py, 2 of its 35 identity sources also appear in wrapper unit tests, and 16 identity sources (32/70 identity calls; 38 generated) are handled by the conservative wrapper bypass. build_v5_package.py read data/eval_blind/ solely for pre-training decontamination.

System (4 CPU threads) Params ONNX Size (MiB / MB) Mac CPU p50 (gen non-byp / e2e all; p95) blind_ambiguous (190) blind_wa_jaksel <norm> / <formal> Jaksel EN (79) Entity Canon / Verbatim (194, unexp) Identity False-Edit (70)
MIT Regex + Dict (baseline.py) 0 — < 1 ms 37.89% 85.53 / 54.40 97.47% 91.75% / 90.72% (4) 25.71% (18/70)
v05-mt5-small-pruned Guarded (this model, int8) 69.2M 160.22 / 168.01 **36.1 gen (418c) / 36.0 e2e (442c, 24 byp; 52.3 p95)**† 92.63% (176/190) 91.30 / 67.86 92.41% 100.0% / 100.0% (0) 0.00% (0/70)
v05-mt5-small-pruned Raw (int8) 69.2M 160.22 / 168.01 22.9 gen / 23.1 e2e (442c; 32.9 p95) 92.63% (176/190) 90.73 / 67.33 92.41% 93.81% / 93.81% (8)* 12.86% (9/70)
v05-mt5-small-pruned Raw (fp32) 69.2M 492.74 / 516.68 41.8 gen / 42.0 e2e (442c; 60.8 p95) 92.11% (175/190) 91.09 / 67.80 93.67% 93.81% / 93.81% (8)* 12.86% (9/70)
v02-byt5-small Guarded (internal teacher, int8) 300M 666.85 / 699.24 219.0 gen (418c) / 220.2 e2e (442c, 24 byp; 332.4 p95)† 91.05% (173/190) 90.06 / 67.64 98.73% 100.0% / 99.48% (0) 0.00% (0/70)
v03-mbart-bbpe-8e3d Guarded (internal edge, int8) 39.9M 78.29 / 82.09 **20.5 gen (418c) / 20.6 e2e (442c, 24 byp; 35.5 p95)**† 82.63% (157/190) 88.75 / 62.02 98.73% 100.0% / 100.0% (0) 0.00% (0/70)

*On raw unguarded v05 (182/194), the 12 misses are 8 SentencePiece NFKC rewrites (https://example.id/A?x=①, 45 m², ½, Studio™), 2 lost <s>50rb</s> tags, and 2 dropped 40rb replacement prices (mid-sentence drop after unmasked <s>50rb</s> on blind_fid_024). Guarded IndonesianNormalizer eliminates all 12 with 0 fallbacks across all 460 calls. †Refreshed guarded runs were timed under shared host CPU contention; idle Apple Silicon laptop p50 is ~`23 msforv05, ~161 msforv02, and ~13 msforv03`, consistent with the idle raw runs.

2. Untouched Human test_stif_real (363 MIT Pairs) & Legacy Dev/Regression Suite (dev, 624 Items — Non-Blind)

  • test_stif_real (363 official MIT pairs from haryoa/stif-indonesia test, detokenized): 75.85 chrF++ / 53.62 BLEU guarded (75.81 / 53.50 raw) — +3.15 chrF++ (95% CI: [+2.26, +4.11]) / +6.06 BLEU ([+4.44, +7.76], 5,000-resample bootstrap win rate 1.0000) over the MIT regex+dict baseline (72.70 / 47.56), and +1.71 ([+0.77, +2.70], win rate 0.9998) even with case and punctuation completely stripped.
System Latency (5–30w, gen non-byp / e2e all, 4 thr) test_stif_real Detok chrF++ / BLEU Dev ambiguous (224) Dev wa_jaksel <norm> / <formal> (EN) Dev Entity Canon / Verbatim (296, unexp) Dev Identity False-Edit (100)
MIT Regex + Dict (baseline.py) < 1 ms 72.70 / 47.56 37.95% 86.28 / 49.13 (97.76%) 93.24% / 90.54% (4) 12.00% (12/100)
Qwen/Qwen3-0.6B (0-shot, GPU) GPU 46.26 / 18.43 9.82% 56.83 / 38.23 (77.61%) 96.62% / 91.22% (12) 53.00% (53/100)
Qwen/Qwen3-1.7B (0-shot, GPU) GPU 54.50 / 24.19 33.93% 69.06 / 50.02 (91.04%) 95.61% / 92.23% (13) 24.00% (24/100)
v05-mt5-small-pruned Guarded (int8) **38.1 gen (969c) / 38.5 e2e (971c, 2 byp)**† 75.85 / 53.62 (win 1.0000 vs base) 89.73% 90.22 / 62.55 (93.28%) 100.0% / 100.0% (0) 0.00% (0/100)
v05-mt5-small-pruned Raw (int8) 24.0 gen / 24.2 e2e (971c) 75.81 / 53.50 (win 1.0000 vs base) 89.73% 90.22 / 62.55 (93.28%) 100.0% / 99.32% (0) 1.00% (1/100)
v02-byt5-small Raw (int8) 173.6 gen / 176.9 e2e (971c) 73.77 / 49.42 (win 0.9902 vs base) 91.52% 90.43 / 65.17 (97.76%) 99.66% / 99.66% (0) 0.00% (0/100)
v03-mbart-bbpe-8e3d Raw (int8) 13.2 gen / 13.4 e2e (971c) 70.39 / 45.03 86.61% 87.70 / 56.47 (97.01%) 96.96% / 94.93% (8) 8.00% (8/100)

Preservation Scope (Guarded vs. Raw)

  • Deterministically verified by IndonesianNormalizer (companion repo normalizer.py + metrics.py): signed & prefix/suffix currencies (-Rp 20.000, Rp 100000000000, $180.49, 100 USD, ¥1200, €1200, uppercase RM 12), numeric & month-name dates (1 Mar 2027, 31/12/2027), times with combined time-of-day + timezone (jam 7 malam WIB, 7 malam WIB, jam 7WIB, jam 7mlm → jam 7 malam), phone numbers, case-preserved order/tracking IDs & universal digit-bearing alphanumeric codes (JNE90817263, JP1234567890, HEMAT50, 123jkt, 081234567890jkt, 12aB, 4G, HEMAT2, Ab2, A12, B7; lowercase & Title-Case Indonesian 2-reduplications like temen2ku/Sama2/Hati2 remain normalizable unless introduced by kode/voucher/kupon), standalone >=4-letter ALL-CAPS tokens in mixed-case text (kodenya HEMATBGT, kupon diskonnya SERBUHEMAT, pswd wifinya RUMAHKITA) & kode/voucher/kupon-introduced codes in both mixed-case and ALL-CAPS shouting (taking precedence over shorthand/reduplication rules, including stacked introducers and short codes like PAKE KODE VOUCHER BSK YA KAK, PAKE KODE VOUCHER ONGKIR YA KAK, kode voucher Hemat2), uppercase Indonesian license plates (in mixed-case text AB 4321 KL or plat/nopol/stnk-introduced in ALL-CAPS shouting CEK PLAT AB 4321 HR YA KAK; unintroduced plates in ALL-CAPS shouting are not masked), URLs (including Unicode/full-width paths), emails, @handles, HTML/special tags (<div ...>, </s>), numbers + dosage/quantity/duration units (2 mg vs 2 g, 5 km vs 5 meter, 2 jam 5 menit, 10mnt, 5km, 4jam, 3org, 2 juta, -5), non-ASCII/accented words (São, Łódź, ¿, ¡), emojis, and NFKC symbols (m², ½, ™). Violations trigger fallback-to-source (default) or NormalizationGuardError (on_guard_failure="raise").
  • Model-normalized (not deterministically verified without NER): unannotated free-text personal names, street addresses, and semantic paraphrases are trained for fidelity but are not regex-verifiable by the post-guard.
  • Conservative pass-through: common SQL statements (SELECT ..., SELECT upper(...), SHOW TABLES;, TRUNCATE TABLE ..., etc.), CommonMark fenced Markdown code blocks (0–3 leading spaces, matching backtick/tilde char & length), CLI commands (requiring syntax signals for ambiguous words like cat/return/helm), code statements (print(...), console.log(...), if ...:, class FooBar:), pure HTML lines, non-Latin lines, multi-space quoted literals ('A B'), and overlength unbroken tokens pass through unchanged.

Training Data, Split Hygiene Disclosure & Quantization

Trained for 6 epochs (data/train_pkg_v5/: 214,490 total rows, 184,436 literal distinct (mode, source, target) triples, 184,072 literal distinct (mode, source) pairs [178,415 normalized triples], 4,405 val rows; bf16, AdamW lr=4e-4, cosine warmup 6%, batch_size=64, best_val_loss=0.2099):

  1. Layer 1 (MIT Human Anchor): haryoa/stif-indonesia (train, 1,922 pairs, MIT; 2× weighted across raw + detok) + haryoa/indo-collex (MIT).
  2. Layer 2 (Empirical + Back-Translation + Mined Ambiguity): HuggingFaceFW/fineweb-2 (ind_Latn, ODC-By 1.0 database license; subject to Common Crawl Terms of Use & ODC-By §2.4 — passages are used solely for training/distillation and are not redistributed) corrupted via IndoCollex (31,597 pairs), STIF reverse back-translator (12,352 pairs), and 9,259 ambiguous shorthand contexts mined from fineweb_id_clean.jsonl.
  3. Layer 3 (Apache-2.0 Teacher + Procedural Hardening & Augmentations): Qwen/Qwen3-32B-AWQ / Qwen/Qwen3-32B-FP8 (Apache-2.0) validated triplets (48,694 upweighted rows after leak filtering), procedural entity hardening (3,888), clean identity twins (13,298 ID, 7,678 EN from HuggingFaceFW/fineweb-edu ODC-By 1.0, 1,038 procedural SQL/CLI/code), ALL-CAPS (3,018) & Title-Case (3,005) augmentations, 300–480 char multi-sentence paragraphs (3,719), and everyday slang (136).
  4. Sequence-Level Knowledge Distillation: 68,537 entity-verified dual-mode pseudo-labels from v02-byt5-small on fineweb_id_distill.jsonl.

Historical train_pkg_v5 split-hygiene disclosure: Exact source, target, and cluster-string overlap between train.jsonl and val.jsonl is 0, and exact overlap with all data/eval and data/eval_blind rows is 0. Post-training independent review identified four residual artifacts in v05's packaged training set: (1) inconsistent cluster-prefix stripping across layers (dom_ vs fwdom_ / fwen_) left 213 shared FineWeb hostnames (1,015/4,405 val rows) and 18,221 KD rows sharing hostnames with fineweb_id_clean.jsonl, (2) 50 concatenated long-paragraph augmentations contained a validation target sentence that was later pruned standalone, (3) a word-count fuzzy prefilter missed 1 STIF test substring (stif_test_0312 preceded by a greeting, ratio 83.67, upweighted 2×) and ls -la /var/log vs /var/log/nginx (83.33), and (4) PACKAGE_MANIFEST.json recorded pre-pruning train_unique_rows: 185255 instead of post-pruning 184,436. All four issues are fixed in build_v5_package.py for v0.2; v05 weights were not retrained.

T5-Safe ONNX Quantization & Parity: Exported via the single canonical exporter (infer_onnx.py --export-model-dir, manifest in onnx_export_manifest.json), excluding only the gated-GELU FFN output projections (/wo/, 8 nodes per graph) from dynamic QUInt8 quantization. This reduces ONNX graph size from 492.74 MiB (516.68 MB) fp32 to 160.22 MiB (168.01 MB) int8 and speeds up Mac CPU latency from 41.8 ms to 22.9 ms p50 (raw idle; 36.1 ms guarded under shared host load). Dynamic QUInt8 changes exact string output on 12.97% (128/987) of data/eval rows compared to PyTorch bf16/fp32 (with slightly higher STIF 75.81/53.50 vs 75.50/53.04 and slightly higher holdout disambiguation 92.63% vs fp32 92.11%); it is not bit-exact with fp32.

Limitations & Known Failure Modes

  • Input length & chunking: Trained on inputs up to ~480 chars (max_length=320 tokens). The raw model degrades if given unbounded text; always use IndonesianNormalizer (which splits lines into <= 220-char chunks) for multi-sentence messages.
  • Short 2–4 word fragments: Very short incomplete fragments (e.g., sy blm) can occasionally prompt model-side continuation beyond the input words; the guard passes these when no protected entity or repetition rule is violated.
  • Unverified semantic / free-text edits: While deterministic guards protect numbers, signed/prefix/suffix currencies, dates, times + time-of-day + timezones, order/tracking/alphanumeric codes, kode/voucher/kupon-introduced & standalone mixed-case ALL-CAPS codes, uppercase license plates in mixed-case text or plat/nopol/stnk-introduced in ALL-CAPS shouting (unintroduced plates in ALL-CAPS shouting are not masked), URLs, emails, and non-ASCII spans, the underlying seq2seq model can still produce occasional semantic errors on unguarded prose — for example, dl (dulu) over-mapped to tenggat waktu in <formal>, gpp inverted in certain long formal complaints, lusa gw plg adding lebih awal, diskon 50% s/d ... substituting Konfirmasi, casual English phrases (ok thanks) edited in <formal>, or casual <norm> shifting gue/lo to aku/kamu on already-clean input.
  • Rare sentence-initial English words in <norm>: v05 preserves 92.41% (73/79) of holdout Jaksel English tokens (93.28% on dev).
  • Guard trade-off: When IndonesianNormalizer detects a protected-span violation, repetition/clause loop, or leaked placeholder, default on_guard_failure="fallback" returns the original chunk unmodified (or raises NormalizationGuardError with on_guard_failure="raise").

License & Attribution

Apache-2.0 — see LICENSE and NOTICE. Code, documentation, and local test page live at github.com/tssandor/indonesian-text-normalizer; Apache-2.0 benchmark slices live at huggingface.co/datasets/tssandor/indonesian-text-normalizer-bench.

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

Model tree for tssandor/indonesian-text-normalizer

Base model

google/mt5-small
Quantized
(200)
this model

Datasets used to train tssandor/indonesian-text-normalizer

Evaluation results

  • Ambiguous Shorthand Disambiguation Accuracy on tssandor/indonesian-text-normalizer-bench
    self-reported
    92.630
  • WhatsApp/Jaksel <norm> chrF++ on tssandor/indonesian-text-normalizer-bench
    self-reported
    91.300
  • WhatsApp/Jaksel <formal> chrF++ on tssandor/indonesian-text-normalizer-bench
    self-reported
    67.860
  • Verbatim Entity Preservation (Guarded) on tssandor/indonesian-text-normalizer-bench
    self-reported
    100.000
  • Identity False-Edit Rate (Guarded) on tssandor/indonesian-text-normalizer-bench
    self-reported
    0.000
  • Detokenized chrF++ (Guarded) on haryoa/stif-indonesia
    test set self-reported
    75.850
  • Detokenized BLEU (Guarded) on haryoa/stif-indonesia
    test set self-reported
    53.620