[论文解读] Impact of Tokenization on Language Models: An Analysis for Turkish
本研究在土耳其语语言建模任务中评估了五种分词方法——字符级、BPE、WordPiece、形态学级和词级——通过训练不同词汇量的RoBERTa-TR-medium模型进行比较。结果表明,形态学级分词在性能上与BPE和WordPiece相当,且增加词汇量对形态学级和词级分词器的性能提升效果优于事实上的标准方法(BPE/WordPiece),最优参数比例分别为20%(事实方法)和40%(其他方法)。
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.
研究动机与目标
- 探究不同分词粒度对土耳其语语言建模性能的影响。
- 评估词汇量对不同分词方法下模型性能的影响。
- 基于词汇参数比例,提供模型大小与性能之间的实用权衡指南。
- 公开发布采用多种分词器的RoBERTa-TR-medium模型,供研究与应用使用。
- 探讨预训练过程中可能存在的环境与伦理影响,包括碳足迹与公平性问题。
提出的方法
- 在土耳其OSCAR语料库上预训练中等规模的RoBERTa模型,采用五种分词方法:字符级、BPE、WordPiece、形态学级和词级。
- 在相同数据上训练每种分词器,并在六个下游自然语言处理任务上微调所得模型。
- 采用RoBERTa预训练流程,控制超参数以确保不同分词器之间的公平比较。
- 通过下游任务的标准指标测量性能,并应用统计检验验证结果显著性。
- 利用本地转换因子估算能耗与二氧化碳排放量,以评估碳足迹。
- 提出词汇参数与总模型参数之间经验性比例关系(BPE/WordPiece为20%,形态学/词级为40%),以实现性能与效率的最优平衡。
实验结果
研究问题
- RQ1RQ-1:不同分词方法对土耳其语语言建模及下游任务性能有何影响?
- RQ2RQ-2:在不同分词方法下,模型性能如何随词汇量变化?
- RQ3RQ-3:词汇参数与总模型参数之间的最优比例是多少,以实现模型大小与性能的平衡?
- RQ4RQ-4:不同分词方法对能耗与碳足迹有何影响?
- RQ5RQ-5:在可能存在偏见的语料库上进行预训练,其公平性与伦理影响是什么?
主要发现
- 形态学级分词器的性能可与BPE和WordPiece相媲美,显示出在土耳其等形态丰富的语言中具有强大潜力。
- 增加词汇量对形态学级和词级分词器的性能提升效果,显著优于BPE和WordPiece。
- 词汇参数与总模型参数之间的最优比例经实证确定为:BPE/WordPiece为20%,形态学/词级分词器为40%。
- RoBERTa-TR-medium模型在参数量约为大尺寸SOTA模型的三分之一时,性能达到其97%。
- 微调自然语言推理任务耗能最高(17.5 kWh),而情感分析任务耗能最低(1.25 kWh)。
- 预训练的碳足迹估计范围为18.15至28.875 kWh(相当于1.8至3.0 kg CO₂),单次实验的最低社会成本为117.42美元。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。