Downloads · 30 days
0
NIRVLab/xnli-morphel-zh-32k
xnli-morphel-zh-32k is a machine learning model from NIRVLab. 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.
MorpheL: MI-Guided Stochastic Segmentation tokenizer for morphologically rich low-resource languages (Proposal: MorpheL: Morphology-Aware Tokenizer Adaptation for Pretrained Models in Low-Resource Languages).
Downloads · 30 days
0
Access
Public
Updated Jul 12, 2026
Repo size
2.3 MB
Likes
0
Public
Click a slice to open those files.
.pkl2.3 MB · 61%
From the Hugging Face model README
MorpheL: MI-Guided Stochastic Segmentation tokenizer for morphologically rich low-resource languages (Proposal: MorpheL: Morphology-Aware Tokenizer Adaptation for Pretrained Models in Low-Resource Languages).
Trained on the Chinese (zh) subset of
facebook/xnli — all splits.
MorpheL scores candidate intra-word boundaries via pointwise mutual information (MI) between prefix and suffix substrings, then stochastically selects the number of cuts via Gumbel perturbation (Eq. 6–8).
Chinese-specific design choice: ZH_VOWELS = ∅ (empty set). The vowel-consonant
transition heuristic (Proposal §5.1 Step 1) returns False for all positions in
pure Hanzi text, so B(w) = ∅ for all Hanzi words → segment_word returns [word]
(no cuts). This is correct: Chinese Hanzi do not have a Latin vowel/consonant
distinction to exploit for morpheme boundary detection. The vocabulary is built
from whole-token Hanzi sequence frequencies (32k slots), plus a character-level
overflow alphabet for guaranteed <unk>-free encoding.
| Parameter | Value |
|---|---|
| Algorithm | MorpheL (MI + Gumbel) |
| Vocabulary size | 34,276 |
| top_k | 4 |
| temperature (T) | 1.0 (vocab induction: T=0) |
| mi_threshold | 0.0 (keep MI > 0) |
| min_frequency | 2 |
| Special tokens | <s>, <pad>, </s>, <unk>, <mask> |
| Corpus | facebook/xnli/zh — all splits (800,404 sentences) |
| Vowel set | Empty (ZH_VOWELS=∅) — no boundary detection for Hanzi |
| Metric | BPE | WordPiece | Unigram | MorpheL |
|---|---|---|---|---|
| Fertility ↓ | — | — | — | 12.5866 |
| Tokens/char ↓ | — | — | — | 0.6031 |
| Avg seq len ↓ | — | — | — | 17.01 |
| Vocab coverage ↑ | — | — | — | 1.0000 |
| OOV rate ↓ | — | — | — | 0.0000 |
Fill baseline columns after running baseline notebooks.
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("NIRVLab/xnli-morphel-zh-32k")
Note: MorpheL segments words before passing to the tokenizer. For Chinese,
segment_wordreturns[word]for all Hanzi tokens (no cuts). Downstream training usestemperature=1.0for stochastic segmentation; inference usestemperature=0(deterministic).