CKTN-EKECTRA is a vocabulary-extended version of
google/rembert
adapted for three low-resource Southeast Asian languages:
Khmer,
Cham, and
Tày-Nùng.
The model was produced by injecting 4,213 new subword pieces directly into the SentencePiece
Unigram model via Protobuf surgery, followed by Fast Vocabulary Transfer (FVT) embedding
initialization. It is released as a Stage 1 checkpoint — vocabulary has been extended and
embeddings initialized, but continued pre-training (MLM) on the target corpora is still required
for the new tokens to reach full representational quality.
-
Greedy fragmentation — SPM Unigram's Viterbi finds the globally optimal segmentation.
Greedily pre-matching a substring destroys that optimality for the surrounding context,
causing leftover fragments to fall back to character-level tokenization and spiking fertility.
-
▁ prefix mismatch — add_tokens() stores pieces like ▁word as literal strings.
The greedy matcher looks for the Unicode ▁ character in raw text, but raw text only
contains ASCII spaces — so new word-start tokens never fire.
-
Continuation ratio inflation — pieces stored without ▁ fail the
startswith("▁") check in _build_word_start_ids(), causing every match to be
miscounted as a continuation token.
Evaluated on held-out lines from each corpus using the methodology of
Rust et al. (ACL 2021).
1from transformers import AutoTokenizer, AutoModel
2
3tokenizer = AutoTokenizer.from_pretrained("ducanhdinh/CKTN-EKECTRA", use_fast=False)
4model = AutoModel.from_pretrained("ducanhdinh/CKTN-EKECTRA")
5
6# Khmer example
7text = "សួស្តី"
8inputs = tokenizer(text, return_tensors="pt")
9outputs = model(**inputs)
10print(outputs.last_hidden_state.shape) # [1, seq_len, 1152]
New tokens were selected from the following corpora (minimum frequency threshold: 50):
A SentencePiece Unigram model (vocab size 8,000, character coverage 0.9999) was trained
on all three corpora jointly. Candidate tokens were filtered to remove punctuation, control
characters, and single-byte non-script characters before frequency thresholding.
1@inproceedings{gee-etal-2022-fast,
2 title = {Fast Vocabulary Transfer for Language Model Compression},
3 author = {Gee, Leonidas and Ghassemi, Mohammad and Nikita, Yulia},
4 booktitle = {Proceedings of EMNLP 2022},
5 year = {2022},
6 url = {https://aclanthology.org/2022.emnlp-main.802/},
7}
8
9@inproceedings{rust-etal-2021-good,
10 title = {How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Models},
11 author = {Rust, Phillip and Pfeiffer, Jonas and Vulic, Ivan and Ruder, Sebastian and Gurevych, Iryna},
12 booktitle = {Proceedings of ACL 2021},
13 year = {2021},
14 url = {https://aclanthology.org/2021.acl-long.571/},
15}
16
17@article{chung-etal-2020-rembert,
18 title = {Rethinking Embedding Coupling in Pre-trained Language Models},
19 author = {Chung, Hyung Won and Févry, Thibault and Tsai, Henry and Johnson, Melvin and Ruder, Sebastian},
20 journal = {arXiv preprint arXiv:2010.12821},
21 year = {2020},
22}