Downloads · 30 days
0
TigreGotico/rawi-v3
rawi-v3 is a machine learning model from TigreGotico. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A lightweight Arabic diacritizer (tashkeel) that internalizes the gate into a single network. Successor to TigreGotico/rawi-v2.
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2026
Repo size
22 MB
Likes
0
Public
Click a slice to open those files.
.onnx12.2 MB · 55%
From the Hugging Face model README
A lightweight Arabic diacritizer (tashkeel) that internalizes the gate into a
single network. Successor to TigreGotico/rawi-v2.
A shared bidirectional LSTM encoder feeds two heads:
Linear(512 → 1), sigmoid) — decides where a mark goes
(the gate);Linear(512 → 75), argmax) — decides which mark, given one.Embedding(236, 128) → 2-layer BiLSTM(256) → {presence, value}. At inference a
mark is applied to a letter only where sigmoid(presence) > 0.5, then the value
head's class is attached. This is the single-network form of the two-model
"gate + value" ensemble (rawi-v2 gating rawi-v1) — one pass instead of two.
Normalization is NFD with symbols (So) dropped; the value head's 75 NFD-based
classes restore hamzas and the superscript alef. Vocabulary is identical to V2.
| file | what |
|---|---|
rawi_v3.onnx | fp32 ONNX — two outputs presence (B,T) and value (B,T,75) |
rawi_v3.int8.onnx | INT8 dynamic quantization (~2.5 MB) |
rawi_v3.vocab.json | char_to_idx / diac_to_idx (shared with V2) |
diacritization_model_lstm_3.pth | original PyTorch checkpoint |
rawi_v3_train.ipynb | training notebook (two-stage model) |
from text2tashkeel import Diacritizer # pip install text2tashkeel
Diacritizer("rawi-v3").diacritize("بسم الله الرحمن الرحيم")
# بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
text2tashkeel bundles this model and runs it in pure onnxruntime (no PyTorch at
inference); full benchmarks and the where/which gating analysis are in that repo.