Data: 18 languages from
CulturaX:
Arabic, German, English, Persian, Finnish, French, Hindi, Italian, Japanese, Korean, Lao,
Russian, Serbian, Swahili, Thai, Turkish, Urdu, Chinese.
Text was first converted to IPA using
Epitran.
This model requires IPA text as input. To use it, convert your text to IPA first using the pipeline described in
ipa-tokenization repository, then tokenize with
the included SentencePiece model.
1from transformers import GPT2LMHeadModel
2from huggingface_hub import hf_hub_download
3import sentencepiece as spm
4import torch
5
6# Load model
7model = GPT2LMHeadModel.from_pretrained("Mikki99/gpt2-ipa-opt")
8model.eval()
9
10# Load SentencePiece tokenizer
11tok_path = hf_hub_download(repo_id="Mikki99/gpt2-ipa-opt", filename="tokenizer.model")
12sp = spm.SentencePieceProcessor()
13sp.Load(tok_path)
14
15# Input must be IPA text (convert using G2P tools first)
16# Example: Text (en) "Stanford" → IPA "stænfɹ̩d"
17ipa_text = "stænfɹ̩d"
18input_ids = torch.tensor([sp.Encode(ipa_text, out_type=int)])
19
20with torch.no_grad():
21 output = model(input_ids)
22 logits = output.logits
This model is a research artifact released alongside an ACL 2026 paper. Its primary
purpose is to allow reproduction of the paper's results. It is not optimized for open-ended text
generation.
1@inproceedings{miletic-etal-2026-phonemes,
2 title = "Phonemes to the Rescue: Multilingual Tokenization Based on International Phonetic Alphabet",
3 author = "Mileti{\'c}, Milan and
4 Kallini, Julie and
5 Shutova, Ekaterina",
6 editor = "Liakata, Maria and
7 Moreira, Viviane P. and
8 Zhang, Jiajun and
9 Jurgens, David",
10 booktitle = "Proceedings of the 64th Annual Meeting of the {A}ssociation for {C}omputational {L}inguistics (Volume 1: Long Papers)",
11 month = jul,
12 year = "2026",
13 address = "San Diego, California, United States",
14 publisher = "Association for Computational Linguistics",
15 url = "https://aclanthology.org/2026.acl-long.1872/",
16 pages = "40323--40349",
17 ISBN = "979-8-89176-390-6",
18 abstract =
19 "Multilingual language models often exhibit performance disparities across languages that can arise as early as the tokenization stage. Widely-used subword tokenization approaches favor high-resource languages, and tokenizer-free methods still yield longer sequences for scripts with a higher bytes-per-character ratio. To address these shortcomings, we propose to use the International Phonetic Alphabet (IPA) as a language-agnostic input representation for multilingual tokenizers. IPA provides a compact symbol inventory, greater cross-lingual character overlap, and a more balanced byte-per-character distribution across languages. We train matched pairs of text vs. IPA subword tokenizers across 24 languages and 14 scripts and demonstrate that IPA tokenizers consistently improve tokenization quality, especially for non-Latin scripts, and generalize more effectively to unseen languages and scripts."
20}