NIRVLab β€” MorpheL Tokenizer for Chinese XNLI

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.

Algorithm

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 -free encoding.

Training Config

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

Evaluation Metrics (vs Baselines, vocab_size=32000, same corpus)

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.

Usage

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_word returns [word] for all Hanzi tokens (no cuts). Downstream training uses temperature=1.0 for stochastic segmentation; inference uses temperature=0 (deterministic).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train NIRVLab/xnli-morphel-zh-32k