YellowMIST-Punct-1.0-ET

YellowMIST Punct puts back the punctuation and capitals in text that has none, such as speech-to-text output or quick chat messages. It writes each language's own marks: the danda (।) for Hindi, ። and ፣ for Amharic, ، and ؟ for Arabic script, and so on. It is a tiny on-device model, one per script or region group. This one covers Ethiopic (Ge'ez) script: 2 languages tested.

  • Built on olaverse/YellowMIST-Encoder-15M-ET, a 15M-parameter character encoder, with two small heads: the punctuation mark after each character (none, full stop, comma, question mark, exclamation mark), and whether the character is a capital.
  • It reads characters, so unusual spellings and missing tone marks do not break a tokenizer.

Results

Held-out web documents from the YellowMIST corpus, never used in training. The input is the text lowercased with its punctuation removed; the model has to put both back. Punctuation F1 counts a mark as right only if it is the right mark in the right place.

  • Mean punctuation F1: 70.5%
  • Mean capitals F1 (no cased scripts): –

Against a large multilingual model

The same held-out text, on the languages both models cover, against 1-800-BAD-CODE/xlm-roberta_punctuation_fullstop_truecase, an XLM-RoBERTa model about 18 times larger.

Language this model, punctuation XLM-R, punctuation this model, capitals XLM-R, capitals
amh_Ethi 62.0% 55.1% – –
Every language tested
Language punctuation F1 capitals F1 marks in test
tir_Ethi 83.1% – 1398
amh_Ethi 57.9% – 1369

Training

  • 40,000 steps of 64 pieces of up to 256 characters from the YellowMIST corpus (about 20M characters per language), with the punctuation removed and the text lowercased.
  • Languages are drawn in proportion to the size of their text (to the power 0.3).
  • ; and : are learnt as commas (except the Greek question mark). Quotes, brackets and dashes are left as they are.

Use

With the yellowmist library (recommended)

pip install yellowmist        # or: npm install yellowmist
import yellowmist as ym
ym.punct("your text without punctuation or capitals", "amh_Ethi")
import * as ym from "yellowmist";
await ym.punct("your text without punctuation or capitals", "amh_Ethi");
yellowmist punct "your text" --lang amh_Ethi

The library downloads this model the first time it is needed, picks the right region for each language, and runs it with ONNX Runtime on the CPU. Output is the text with this language's own punctuation marks and, where the script has them, capitals.

Without the library (ONNX Runtime)

import json, unicodedata, numpy as np, onnxruntime as ort
from huggingface_hub import snapshot_download

d = snapshot_download("olaverse/YellowMIST-Punct-1.0-ET", allow_patterns=["onnx.json", "vocab.json", "punct.json", "model.int8.onnx"])
meta, pj = json.load(open(f"{d}/onnx.json")), json.load(open(f"{d}/punct.json"))
ids = {t: i for i, t in enumerate(json.load(open(f"{d}/vocab.json"))["vocab"])}
sess = ort.InferenceSession(f"{d}/model.int8.onnx")

lang = "amh_Ethi"
names = ["none", "period", "comma", "question", "exclaim"]
glyph = {1: ".", 2: ",", 3: "?", 4: "!"}           # this language's own marks override these
glyph.update({(int(k) if str(k).isdigit() else names.index(k)): v for k, v in pj.get("glyphs", {}).get(lang, {}).items()})
cased = lang in pj.get("cased", [])

text = unicodedata.normalize("NFC", "your text without punctuation or capitals").lower()   # up to 255 characters
seq = [ids[f"<|lang:{lang}|>"]] + [ids.get(c, 1) for c in text]                    # 1 = <unk>
x = np.zeros((1, meta["length"]), np.int64); m = np.zeros((1, meta["length"]), np.float32)
x[0, :len(seq)] = seq; m[0, :len(seq)] = 1
p, c = (o[0, 1:len(seq)].argmax(-1) for o in sess.run(None, {"ids": x, "mask": m}))
print("".join((ch.upper() if cased and c[k] == 1 else ch) + (glyph[int(p[k])] if p[k] else "") for k, ch in enumerate(text)))

Longer text: cut it at spaces into pieces of at most 255 characters. The library also settles capitals word by word.

Fine-tune your own

The fine-tuning notebook (open in Colab) walks through continuing pretraining on your own text, fine-tuning a task, exporting to ONNX and sharing it. In short:

from yellowmist import train
import yellowmist as ym

enc = train.Encoder.load("ET")                       # this region's base encoder
model = train.finetune_punct(enc, {"amh_Ethi": paragraphs})   # your own punctuated text
model.save("my-model")                           # weights + ONNX, ready for the library
ym.register("punct", "my-model")                        # your model now serves its languages

pip install "yellowmist[train]" for training (PyTorch and Dew).

More: documentation · GitHub · playground · fine-tuning notebook

Limits

  • This group's scripts have no capital letters, so only punctuation is restored.
  • The scores are on written web text. Speech transcripts and chat are punctuated differently; expect some drop.
  • Long text is cut into pieces of about 256 characters at spaces, so a mark right at a cut can be missed.

Licence

Apache-2.0.

Citation

@misc{yellowmist-punct-1.0-et,
  title  = {YellowMIST-Punct-1.0-ET: tiny on-device punctuation and capitals restoration},
  author = {Olaverse},
  year   = {2026},
  url    = {https://huggingface.co/olaverse/YellowMIST-Punct-1.0-ET}
}
Downloads last month
-
Safetensors
Model size
15M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for olaverse/YellowMIST-Punct-1.0-ET

Finetuned
(2)
this model

Collection including olaverse/YellowMIST-Punct-1.0-ET