[Paper Review] Impact of Tokenization on Language Models: An Analysis for Turkish
This study evaluates five tokenization methods—character-level, BPE, WordPiece, morphological-level, and word-level—on Turkish language modeling, training RoBERTa-TR-medium models with varying vocabulary sizes. Results show that morphological-level tokenization performs competitively with BPE and WordPiece, and increasing vocabulary size benefits morphological and word-level tokenizers more than de facto methods, with optimal parameter ratios of 20% for de facto and 40% for others.
Tokenization is an important text preprocessing step to prepare input tokens for deep language models. WordPiece and BPE are de facto methods employed by important models, such as BERT and GPT. However, the impact of tokenization can be different for morphologically rich languages, such as Turkic languages, where many words can be generated by adding prefixes and suffixes. We compare five tokenizers at different granularity levels, i.e. their outputs vary from smallest pieces of characters to the surface form of words, including a Morphological-level tokenizer. We train these tokenizers and pretrain medium-sized language models using RoBERTa pretraining procedure on the Turkish split of the OSCAR corpus. We then fine-tune our models on six downstream tasks. Our experiments, supported by statistical tests, reveal that Morphological-level tokenizer has challenging performance with de facto tokenizers. Furthermore, we find that increasing the vocabulary size improves the performance of Morphological and Word-level tokenizers more than that of de facto tokenizers. The ratio of the number of vocabulary parameters to the total number of model parameters can be empirically chosen as 20% for de facto tokenizers and 40% for other tokenizers to obtain a reasonable trade-off between model size and performance.
Motivation & Objective
- To investigate the impact of different tokenization granularity levels on Turkish language modeling performance.
- To assess how vocabulary size affects model performance across tokenization methods.
- To provide a practical trade-off guideline between model size and performance based on vocabulary parameter ratios.
- To release publicly available RoBERTa-TR-medium models with diverse tokenizers for research and application.
- To examine environmental and ethical implications of pretraining, including carbon footprint and fairness.
Proposed method
- Pretrain medium-sized RoBERTa models on the Turkish OSCAR corpus using five tokenization methods: character-level, BPE, WordPiece, morphological-level, and word-level.
- Train each tokenizer on the same data and fine-tune the resulting models on six downstream NLP tasks.
- Use the RoBERTa pretraining procedure with controlled hyperparameters to ensure fair comparison across tokenizers.
- Measure performance using standard metrics on downstream tasks and apply statistical tests to validate significance.
- Estimate energy consumption and CO₂ emissions using local conversion factors to assess carbon footprint.
- Propose empirical ratios of vocabulary parameters to total model parameters (20% for BPE/WordPiece, 40% for morphological/word-level) for optimal trade-off.
Experimental results
Research questions
- RQ1RQ-1: What is the impact of different tokenization methods on Turkish language modeling and downstream task performance?
- RQ2RQ-2: How does model performance vary with vocabulary size across different tokenization methods?
- RQ3RQ-3: What is the optimal ratio of vocabulary parameters to total model parameters for balancing model size and performance?
- RQ4RQ-4: How do different tokenization methods affect energy consumption and carbon footprint?
- RQ5RQ-5: What are the fairness and ethical implications of pretraining on potentially biased corpora?
Key findings
- The morphological-level tokenizer achieves performance comparable to BPE and WordPiece, demonstrating strong potential for morphologically rich languages like Turkish.
- Increasing vocabulary size improves performance more significantly for morphological-level and word-level tokenizers than for BPE and WordPiece.
- The optimal ratio of vocabulary parameters to total model parameters is empirically 20% for BPE/WordPiece and 40% for morphological/word-level tokenizers.
- The RoBERTa-TR-medium models achieve 97% of the performance of larger state-of-the-art models while being approximately three times smaller in size.
- Fine-tuning for natural language inference consumed the most energy (17.5 kWh), while sentiment analysis required the least (1.25 kWh).
- The estimated carbon footprint for pretraining ranges from 18.15 to 28.875 kWh (equivalent to 1.8–3.0 kg CO₂), with a lower bound social cost of $117.42 per experiment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.