Elamur Research⌕
☰
home / papers / 2024 / 語彙置換継続事前学習による日英バイリンガルモデルの構築と評価

語彙置換継続事前学習による日英バイリンガルモデルの構築と評価

Summary

The authors, from Ricoh, addressed the following problem: the English-centric LLM Llama 2 has a tokenizer that is poorly suited to Japanese. On average, one token covers less than one Japanese character, which makes training and inference in Japanese more expensive and means the context window holds less text. To fix this, they continued pretraining Llama 2 13B Chat using a vocabulary replacement method. The vocabulary size remained the same, but rarely used tokens were replaced with Japanese ones. The new tokens were obtained via BPE in SentencePiece trained on a Japanese–English corpus. The model was then trained on public Japanese and English data using two types of curriculum learning: the first takes data quality into account, the second the language ratio. The resulting model was named Ricoh-13B. On the Japanese llm-jp-eval benchmarks, it achieved the highest average score among the compared 13B models with Japanese-adapted tokenizers. At the same time, English performance degraded somewhat due to forgetting. The work shows that, with relatively modest resources, an English-centric model can be efficiently adapted to a lower-resource language. This also applies to Ukrainian.

Key points

  • Tokenizer: the vocabulary was kept at 32,000 tokens. The Japanese portion grew from roughly 1k to 17k, while the English portion shrank from 28k to 14k. LPT (average number of characters per token) for Japanese rose from 0.85 to 2.01, while for English it barely changed: 4.01 → 3.99.
  • Data: Japanese corpora Wikipedia (ja), CC100 (ja), OSCAR (ja) and mC4 (ja). English: subsets of RedPajama v1: Wikipedia (en), Book, Stack Exchange and C4.
  • Curriculum: by quality, the order is as follows: first a small amount of high-quality data, then a large mass of lower-quality data, and finally high-quality data again. By language, English dominates at the beginning, and Japanese in the second half of training.
  • Training: 64 AWS Trn1 nodes (trn1.32xlarge) on AWS Neuron NeMo Megatron, batch size of 4M tokens, learning rate 8.0×10⁻⁵, AdamW optimizer. At each data switch, the learning rate was warmed up again (warmup).
  • Results: on llm-jp-eval, the average score increased by 8–9 points compared with Llama 2 13B (58.9) and Llama 2 13B Chat (57.9). Ricoh-13B outperformed PLaMo-13B, LLM-jp-13B, Swallow-13B and ELYZA-japanese-Llama-2-13b-fast. In English (lm-evaluation-harness), results are lower: GLUE 62.1 versus 63.0 for Llama 2 13B, Open LLM Leaderboard average 51.9 versus 55.4.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Linguistics & languages

Cite

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{2024,
  title = {{語彙置換継続事前学習による日英バイリンガルモデルの構築と評価}},
  author = {麻場直喜 and 野崎雄太 and 中島大 and 佐藤諒 and 池田純一 and 伊藤真也 and 近藤宏 and 小川武士 and 坂井昭一朗 and 川村晋太郎},
  booktitle = {言語処理学会 第30回年次大会 発表論文集 (NLP2024)},
  year = {2024},
  url = {https://www.anlp.jp/proceedings/annual_meeting/2024/#A4-5}
}

References

9 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Edunov, Thomas Scialom. Llama 2: Open Foundation and Fine-Tuned Chat Models. arXiv preprint arXiv:2307.09288, 2023. find
  2. [5] 130 億パラメータの「Llama 2」をベースとした 日本語 LLM「ELYZA-japanese-Llama-2-13b」を 公 開 し ま し た ( 商 用 利 用 可 ) . https://note.com/elyza/n/n5d42686b60b7, 2023. ↗
  3. [6] Swallow: LLaMA-2 日本語継続事前学習モデル. https://zenn.dev/tokyotech_lm/articles/d6cb3a8fdfc 907, 2023 ↗
  4. [7] 野崎雄太, 中島大, 佐藤諒, 伊藤真也, 近藤宏, 麻場直喜, 川村晋太郎. 大規模言語モデルに対 する語彙置換継続事前学習の有効性の検証. 言 語処理学会第 30 回年次大会, 2024. find
  5. [8] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, 2017. find
  6. [9] 中島大, 野崎雄太, 佐藤諒, 麻場直喜, 川村晋 太郎. BPE を用いたトークナイザーの性能に対 する, 言語・語彙数・データセットの影響. 言語 処理学会第 30 回年次大会, 2024. find
  7. [10] Taku Kudo and John Richardson. SentencePiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv preprint arXiv:1808.06226, 2018. find our card
  8. [11] Together Computer. RedPajama: An Open Source Recipe to Reproduce LLaMA training dataset. https://github.com/togethercomputer/RedPajama-Data, 2023. ↗
  9. [12] 佐藤諒, 麻場直喜, 野崎雄太, 中島大, 川村晋 find

This page in Markdown → https://md.research.elamur.ai/free/papers/asaba-2024-building-evaluating-japanese-english/