논문 해설
Typhoon: Thai Large Language Models
Typhoon: 타이어 대규모 언어 모델
- 연구 문제 영어 중심 LLM은 태국어 지식과 문화적 맥락을 충분히 담지 못할 수 있어, Typhoon은 태국어 데이터로 강한 LLM을 지속 사전학습하는 방식을 제시합니다.
- 연구 방법 Mistral-7B의 토크나이저를 태국어 서브워드로 확장하고, 확장된 임베딩과 언어 모델링 헤드를 LoRA로 학습합니다.
- 주요 결과 Typhoon-7B는 ThaiExam과 Thai 벤치마크의 공개 모델 중 가장 높은 성능을 보이며, 토큰 효율은 GPT-4 대비 2.62배로 보고됩니다.
태국어 LLM이 필요한 이유
영어 중심으로 사전학습된 주요 LLM은 태국어 지식과 문화적 맥락이 제한적입니다. 태국어는 Common Crawl에서 0.5% 미만을 차지하고, 태국어 웹 텍스트에는 SEO 문서와 중복이 많아 품질 문제도 있습니다. 이 논문은 이러한 저자원 상황에서 기존 강한 LLM을 태국어 데이터로 추가 사전학습하면 태국어 지식과 토큰 효율을 높일 수 있는지를 다룹니다. 저자들은 다국어 모델의 태국어 데이터 비중이 작아 태국어 지식이 충분하지 않을 수 있다고 주장합니다.
pre-training 데이터 구축
데이터 준비는 수량과 품질을 함께 다룹니다. 저자들은 Common Crawl의 태국어 데이터를 40개 패키지로 확장해 약 3TB의 태국어 텍스트를 확보했습니다. 이후 MinHash와 LSH 기반 중복 제거를 적용하고, 도메인 수준의 웹사이트 선별과 문자 비율, 줄 길이, 문서 길이 같은 휴리스틱 필터링을 수행합니다. 마지막으로 Falcon RefinedWeb에서 무작위로 고른 영어 데이터를 더해 태국어와 영어가 50/50인 이중언어 데이터셋을 만듭니다. 저자들은 영어 데이터 혼합이 기존 영어 지식의 파국적 망각을 줄이는 데 도움이 된다고 설명합니다.
태국어 토크나이저 확장과 효율
기존 byte-level BPE 토크나이저는 여러 언어를 처리할 수 있지만 태국어에서는 효율이 낮습니다. 이 논문은 Mistral-7B 토크나이저에 SentencePiece로 학습한 5,000개 규모의 태국어 서브워드 토크나이저를 통합합니다. 학습에는 MC4 태국어 서브셋에서 무작위로 선택한 약 800만 샘플이 사용되었습니다. 효율은 태국어 텍스트를 표현하는 토큰 수를 GPT-4 토큰 수로 나눈 값으로 정의됩니다. 원문은 이 방식의 Typhoon 토크나이저가 GPT-4 대비 Efficiency 262%로 보고되며 2.62배 효율적이라고 설명합니다. 이 수치는 저자의 측정 결과이며 다른 토크나이저와의 비교도 같은 표에 있습니다.

Table 2 : Token efficiency with respect to GPT-4. *Based on thenewmm tokenizer.
원문 · CC BY 4.0 · Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai · Typhoon: Thai Large Language Models · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.LoRA 기반 지속 pre-training
최종 모델은 Mistral-7B의 확장된 임베딩과 언어 모델링 헤드만 LoRA로 지속 사전학습합니다. 초기 실험에서는 Llama2-7B, Llama2-13B, CodeLlama-34B, Mistral-7B를 perplexity로 비교했고 Mistral-7B가 가장 낮은 perplexity를 보여 기반 모델로 선택되었습니다. 학습 전략 비교에서는 LoRA가 전체 가중치 학습보다 낮은 최종 손실을 보였습니다. 배치 크기는 500k 토큰에서 손실이 불안정했고 2백만 토큰으로 늘렸을 때 안정화되었습니다. 최종 학습은 AdamW 최적화기와 초기 학습률 4e-4의 코사인 스케줄을 사용하고, gradient clipping 임계값은 1.0입니다.
이 설정은 최종 모델의 학습 조건이며 다른 모델이나 과제에 그대로 적용되었다는 근거는 아닙니다.
ThaiExam 평가와 결과
ThaiExam은 태국 고등학생 시험과 투자 전문가 시험에서 만든 객관식 벤치마크입니다. ONET, IC, TGAT, TPAT-1, A-Level로 구성되며 원문은 ONET 170문항, IC 95문항, TGAT 90문항, TPAT-1 116문항, A-Level 175문항을 수집했다고 밝힙니다. Table 3에서 Typhoon-7B는 공개 태국어 모델 중 가장 높은 성능을 보이며, 원문은 ONET, TGAT, TPAT-1에서 평균 인간 평가자보다 높다고 보고합니다. 또한 Typhoon-7B는 GPT-3.5와 비교했을 때 8개 평가 데이터셋 중 4개에서 더 높다고 보고됩니다. 이 결과는 해당 Table 3의 평가 설정에서 얻은 것입니다.

Figure 1 : Performance of Typhoon and other open-source Thai large language models on Thai Exam- inations (left) and Thai instruction-following (right). Details about ThaiExam and Thai instruction- following evaluation are provided in Section 3.4, and Section 4.2, respectively.
원문 · CC BY 4.0 · Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai · Typhoon: Thai Large Language Models · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.지시 fine-tuning과 LLM 평가자 기반 win-rate
지시 fine-tuning에서는 영어 지시 데이터를 태국어로 번역하고, Self-Instruct로 생성한 태국어 지시 데이터를 함께 사용해 Typhoon-7B-Instruct를 지도 미세조정합니다. 평가 데이터는 Thai AlpacaEval 105개, Thai OASST 166개, 번역 MT-Bench 68개, Sea-bench 태국어 부분 100개입니다. GPT-4(gpt-4-1106)를 평가자로 사용하고 GPT-3.5(gpt-3.5-turbo-0613)를 기준 모델로 두며, 각 쌍을 대칭적으로 두 번 비교합니다. 결과가 다르면 0.5점으로 처리하고, 기준 모델에 대한 win-rate를 계산합니다. Table 4에서 Typhoon-7B-Instruct는 Thai AlpacaEval과 번역 MT-Bench에서 GPT-3.5와 비슷하지만 Thai OASST와 Sea-bench에서는 낮게 보고됩니다.

Table 4 : Instruction-following evaluation (Score in %) based on Thai AlpacaEval, Thai OASST, translated MT-Bench and Sea-bench. Each model is compared against GPT-3.5 using GPT-4 as the judge, and the metric is win-rate defined as the number of times that the judge prefers the responses from the model over the responses from the reference model using symmetric pairwise comparison.
원문 · CC BY 4.0 · Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai · Typhoon: Thai Large Language Models · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.번역·요약·질의응답 제로샷 평가
번역, 요약, 질의응답은 제로샷 조건에서 평가됩니다. 영어에서 태국어로의 번역은 FLORES-200에서 BLEU와 chrF로 측정되고, XLSum과 CrossSum 요약은 newmm 토크나이저를 사용한 ROUGE-1/2/L로 측정됩니다. XQuAD 질의응답은 word-overlap F1을 0-shot과 1-shot 설정에서 사용합니다. Table 5에서 원문은 Typhoon-7B-Instruct가 대부분의 NLP 과제에서 가장 좋은 시스템이라고 보고합니다. 이 결과는 각 표에 기재된 과제별 지표와 설정 범위 안에서 해석해야 합니다.
![Table 5: Zero-shot performance on NLP tasks. Machine translation is evaluated on FLORES-200
using BLEU [39] and chrF [44]. Summarization is evaluated on XLSum…](/papers/c5800be3-0221-4d9c-b244-124eccc2a2e5/figures/figure-e3ff7c035b04a4741717d219382ec9fa.png?thumb=512)
Table 5 : Zero-shot performance on NLP tasks. Machine translation is evaluated on FLORES-200 using BLEU [39] and chrF [44]. Summarization is evaluated on XLSum (Thai-to-Thai) and CrossSum (English-to-Thai) using ROUGE-1/2/L [ 22] with the newmm tokenizer. Question-Answering is evaluated on XQuAD using word-overlap F1 metric in 0-shot and 1-shot settings, respectively.
원문 · CC BY 4.0 · Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai · Typhoon: Thai Large Language Models · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.위험과 적용 범위
저자들은 Typhoon이 사실과 다른 응답을 만들 수 있고, 반복된 단어나 문장을 생성하며, 유해하거나 부적절한 응답을 낼 수 있다고 밝힙니다. 또한 이 연구는 사용 가능한 태국어 데이터의 일부로 모델을 적응시킨 결과이며, 더 많은 태국어 데이터와 더 큰 기반 모델은 향후 과제로 남아 있습니다. 지시 fine-tuning의 정렬 개선도 추가 연구 대상입니다.
논문 정보
- 저자
- Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2023년 12월 21일
- 등록일
- 2026년 11월 5일
- 수정일
- 2023년 12월 21일
- 버전
- v1
- arXiv
- 2312.13951
- 분류
- cs.CL · cs.AI
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Typhoon is a series of Thai large language models (LLMs) developed specifically for the Thai language. This technical report presents challenges and insights in developing Thai LLMs, including data preparation, pretraining, instruction-tuning, and evaluation. As one of the challenges of low-resource languages is the amount of pretraining data, we apply continual training to transfer existing world knowledge from a strong LLM. To evaluate the Thai knowledge encapsulated in each model from the pretraining stage, we develop ThaiExam, a benchmark based on examinations for high-school students and investment professionals in Thailand. In addition, we fine-tune Typhoon to follow Thai instructions, and we evaluate instruction-tuned models on Thai instruction datasets as well as translation, summarization, and question-answering tasks. Experimental results on a suite of Thai benchmarks show that Typhoon outperforms all open-source Thai language models, and its performance is on par with GPT-3.5 in Thai while having only 7 billion parameters and being 2.62 times more efficient in tokenizing Thai text.
원문 인용
Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant, Kasima Tharnpipitchai (2023). Typhoon: Thai Large Language Models. arXiv:2312.13951v1. https://arxiv.org/abs/2312.13951v1
BibTeX
@misc{pipatanakul2023typhoon,
title = {{Typhoon: Thai Large Language Models}},
author = {Kunat Pipatanakul and Phatrasek Jirabovonvisut and Potsawee Manakul and Sittipong Sripaisarnmongkol and Ruangsak Patomwong and Pathomporn Chokchainant and Kasima Tharnpipitchai},
year = {2023},
eprint = {2312.13951},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2312.13951v1}
}