Optimizing Language Augmentation for Multilingual Large Language Models: A Case Study on Korean

Bllossom: Korean vocabulary expansion, bilingual pretraining and Korean LIMA instruction tuning for Llama2

LREC-COLING 2024

ChangSu Choi1,‡, Yongbin Jeong3,‡, Seoyoon Park2,‡, Inho Won1, HyeonSeok Lim1, SangMin Kim1, Yejee Kang3, Chanhyuk Yoon3, Jaewan Park3, Yiseul Lee3, HyeJin Lee4, Younggyun Hahm3, Hansaem Kim2, KyungTae Lim1,†

1SeoulTech 2Yonsei University 3Teddysum 4KISTI

‡These authors contributed equally   †Corresponding author

Diagram of the Bllossom model. The embedding layer combines the Llama2 vocabulary with the KoBERT vocabulary (1, vocabulary expansion). English and Korean pretraining data are used for (2) bilingual pretraining, and English and Korean LIMA data for (3) instruction tuning (SFT). The LM head, embedding tokens and a LoRA adapter on the query, key and value projections are trainable, while the rest of the LLM is frozen.
Figure 1 (paper). Architecture of Bllossom. (1) The Llama2 vocabulary (32,000 tokens) is merged with the KoBERT vocabulary, adding 7,478 Korean tokens; (2) the model is pretrained on English and Korean data; (3) it is instruction-tuned on English and Korean LIMA data. Red parts (embeddings, LM head, LoRA adapter on query/key/value) are trained and blue parts are frozen, so 5.977% of the Llama2 parameters are updated.

Abstract

Large language models (LLMs) use pretraining to predict the subsequent word; however, their expansion requires significant computing resources. Numerous big tech companies and research institutes have developed multilingual LLMs (MLLMs) to meet current demands, overlooking less-resourced languages (LRLs). This study proposed three strategies to enhance the performance of LRLs based on the publicly available MLLMs. First, the MLLM vocabularies of LRLs were expanded to enhance expressiveness. Second, bilingual data were used for pretraining to align the high- and less-resourced languages. Third, a high-quality small-scale instruction dataset was constructed and instruction-tuning was performed to augment the LRL. The experiments employed the Llama2 model and Korean was used as the LRL, which was quantitatively evaluated against other developed LLMs across eight tasks. Furthermore, a qualitative assessment was performed based on human evaluation and GPT4. Experimental results showed that our proposed Bllossom model exhibited superior performance in qualitative analyses compared to previously proposed Korean monolingual models.

Keywords Bllossom Korean LLM Less-resourced languages Vocabulary expansion Bilingual pretraining Instruction tuning Korean LIMA Llama2 LoRA GPT-4 preference evaluation

Method

Llama2 saw only 0.06% Korean data during pretraining, and its SentencePiece tokenizer falls back to UTF-8 bytes for most Korean syllables: the phrase 햄버거를 먹는 공룡 (“a dinosaur eating a hamburger”) becomes 21 tokens, mostly byte tokens such as <0xED>, whereas the expanded tokenizer produces 8. Bllossom augments Korean in three steps:

  1. Vocabulary expansion. The Llama2 vocabulary (32,000 entries) is merged with the morpheme-aware KoBERT vocabulary (8,002 entries), giving 39,478 entries; the 7,478 new embeddings are randomly initialized.
  2. Bilingual pretraining. The expanded model is further pretrained with causal language modeling on 33.09 GB of Korean and English text (22.41 GB public Korean news/web data, 0.76 GB Korean Wikipedia, 9.92 GB English Wikipedia) for one epoch, to link Korean with the model's mostly English knowledge.
  3. Korean LIMA instruction tuning. The 1,030 English LIMA examples are machine-translated, reviewed by native speakers, and adapted to Korean culture (named entities replaced, topics changed); the model is tuned on Korean (and English) LIMA data.

Training uses LoRA on the attention query/key/value projections plus the expanded embeddings (5.977% of the parameters), which fits on a single A6000 GPU. Models are compared on eight Korean benchmarks (KLUE NLI, STS and YNAT; Ko-SBI; KoBEST BoolQ, HellaSwag, SentiNeg and COPA) and by human and GPT-4 preference on 300 LIMA test prompts translated into Korean.

Main Results

  • Best 8-task average. Bllossom-ko reaches an average of 58.9, above Llama2-ko without vocabulary expansion (57.1, +1.8 points) and the Polyglot-Ko based monolingual models (56.2, 53.8, 52.1).
  • Vocabulary expansion helps sentence-pair tasks. On NLI and STS, Bllossom-ko outperforms Llama2-ko by 9.15 points; Llama2-ko is better on SBI by 8.8 points.
  • Bilingual pretraining. Bllossom-ko (58.9) and Bllossom-bi (58.6) score similarly, but Bllossom-bi is 11.6 points better on SBI and avoids answering in Korean when queried in English.
  • GPT-4 preference. Bllossom’s answers were preferred in 94% of comparisons against Ko-Platypus2, 86% against Komt and 75% against Kullm; GPT-4 itself was preferred over Bllossom in 84%.
  • Bilingual SFT. Bllossom-bi-biSFT wins against Bllossom-bi-koSFT in 67% (Korean) and 95% (English) of LIMA test comparisons.
Table 1. Korean LLM benchmark results: accuracy (ACC) or F1 on eight Korean tasks and their average. All models are 12.8B/13B. Bold marks the best score per column as in the paper (Table 6 in the paper).
ModelNLI
ACC
STS
ACC
SBI
F1
YNAT
ACC
BoolQ
F1
H-Swag
F1
S-Neg
F1
COPA
F1
AVG
polyglot-ko-12.8b35.550.148.631.059.448.895.781.056.2
KoAlpaca-Polyglot-12.8b38.042.748.426.066.444.484.880.053.8
kullm-polyglot-12.8b-v233.944.852.524.644.248.389.879.352.1
Llama244.045.856.025.473.840.778.160.953.1
Ko-Platypus2-13B50.559.937.128.972.041.485.163.854.8
Komt-Llama-2-13b-hf33.451.648.724.252.639.762.464.247.1
Llama2-koSFT (ours)44.550.638.523.171.741.277.360.550.9
Llama2-ko (ours)41.547.461.732.672.843.589.168.457.1
Bllossom-ko (ours)49.457.852.933.173.048.687.969.058.9
Bllossom-bi (ours)48.846.664.532.874.038.093.271.258.6
Bllossom-bi-koSFT (ours)49.654.955.033.974.240.092.068.458.5
Bllossom-bi-biSFT (ours)45.746.463.436.069.439.189.970.057.5

BibTeX

@inproceedings{choi-etal-2024-optimizing,
    title = "Optimizing Language Augmentation for Multilingual Large Language Models: A Case Study on {K}orean",
    author = "Choi, ChangSu  and
      Jeong, Yongbin  and
      Park, Seoyoon  and
      Won, Inho  and
      Lim, HyeonSeok  and
      Kim, SangMin  and
      Kang, Yejee  and
      Yoon, Chanhyuk  and
      Park, Jaewan  and
      Lee, Yiseul  and
      Lee, HyeJin  and
      Hahm, Younggyun  and
      Kim, Hansaem  and
      Lim, KyungTae",
    editor = "Calzolari, Nicoletta  and
      Kan, Min-Yen  and
      Hoste, Veronique  and
      Lenci, Alessandro  and
      Sakti, Sakriani  and
      Xue, Nianwen",
    booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation ({LREC}-{COLING} 2024)",
    month = may,
    year = "2024",
    address = "Torino, Italia",
    publisher = "ELRA and ICCL",
    url = "https://aclanthology.org/2024.lrec-main.1095/",
    pages = "12514--12526"
}
More projects from KAIST MLP Lab →