# Typhoon: Thai Large Language Models

Typhoon: 타이어 대규모 언어 모델

Kunat Pipatanakul, Phatrasek Jirabovonvisut, Potsawee Manakul, Sittipong Sripaisarnmongkol, Ruangsak Patomwong, Pathomporn Chokchainant 외 1명 · arXiv · 2023년 12월 21일

- **연구 문제** 영어 중심 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](https://refivu.com/papers/c5800be3-0221-4d9c-b244-124eccc2a2e5/figures/figure-e5f257abc9341dd3a93b192e555b5a4c.png?thumb=512)

**Table 2** : Token efficiency with respect to GPT-4. \*Based on thenewmm tokenizer.

[원문](https://arxiv.org/abs/2312.13951v1) · [CC BY 4.0](https://creativecommons.org/licenses/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…](https://refivu.com/papers/c5800be3-0221-4d9c-b244-124eccc2a2e5/figures/figure-038c7e31cce5eac65846ada90363c585.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2312.13951v1) · [CC BY 4.0](https://creativecommons.org/licenses/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…](https://refivu.com/papers/c5800be3-0221-4d9c-b244-124eccc2a2e5/figures/figure-fb782fe8cce2b0173cd80023876db51d.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2312.13951v1) · [CC BY 4.0](https://creativecommons.org/licenses/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…](https://refivu.com/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.

[원문](https://arxiv.org/abs/2312.13951v1) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2312.13951v1) · [원문 PDF ↗](https://arxiv.org/pdf/2312.13951v1)

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}
}
```

## 이 논문의 용어

- [LoRA](https://refivu.com/terms/84da7a415b66-low-rank-adaptation-lora)
- [Perplexity](https://refivu.com/terms/2b204e513801-perplexity)
- [BLEU](https://refivu.com/terms/42cd9b97719e-bleu)
- [GPT-4](https://refivu.com/terms/1e2d0d2cdc44-gpt-4)
- [catastrophic forgetting](https://refivu.com/terms/0039a430b4e3-catastrophic-forgetting)
- [GPT-3.5](https://refivu.com/terms/30414fb33dba-gpt-3-5)
- [Mistral-7B](https://refivu.com/terms/b89deef91181-mistral-7b)
- [SentencePiece](https://refivu.com/terms/acec043085a4-sentencepiece)
- [efficiency](https://refivu.com/terms/da4a2b6858a2-efficiency)
- [FLoRes-200](https://refivu.com/terms/f0aa02d56ae3-flores-200)
- [AdamW optimizer](https://refivu.com/terms/390ee6da73bf-adamw-optimizer)
- [chrF](https://refivu.com/terms/2eaec49d4616-chrf)
- [Self-Instruct](https://refivu.com/terms/599304dadef6-self-instruct)
- [win-rate](https://refivu.com/terms/89bb97501ed8-win-rate)
- [xQuAD](https://refivu.com/terms/c3a26de3765d-xquad)
- [Low-rank Adaption (LoRA)](https://refivu.com/terms/313bf229c5a2-low-rank-adaption-lora)

## 다른 논문 해설

- [Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models](https://refivu.com/papers/d5c4a8f5-f8ec-46d3-beca-87fab1f92792-mixture-of-experts-meets-instruction-tuning-a-winning.md)
- [Psychometric Predictive Power of Large Language Models](https://refivu.com/papers/3dae4c85-92da-4f9f-9a3b-8d150373620c-psychometric-predictive-power-of-large-language-models.md)
- [Tuna: Instruction Tuning using Feedback from Large Language Models](https://refivu.com/papers/a59ac188-09a8-4988-94cd-fcf6752c44b4-tuna-instruction-tuning-using-feedback-from-large-language.md)
- [CycleDistill: Bootstrapping Machine Translation using LLMs with Cyclical Distillation](https://refivu.com/papers/50523ad6-077b-4964-b2a3-de0dc35430a9-cycledistill-bootstrapping-machine-translation-using-llms.md)
- [LexMatcher: Dictionary-centric Data Collection for LLM-based Machine Translation](https://refivu.com/papers/10d9cdf2-0131-4ba8-868f-abe7e1622924-lexmatcher-dictionary-centric-data-collection-for-llm-based.md)
- [What do Large Language Models Need for Machine Translation Evaluation?](https://refivu.com/papers/69007024-125c-404d-9a1f-73237ec547d8-what-do-large-language-models-need-for-machine.md)
- [Comparative Evaluation of Machine Translation Systems on Images with Text](https://refivu.com/papers/52af9e2b-9167-45ec-a459-39a4099b6eb6-comparative-evaluation-of-machine-translation-systems-on.md)
- [KazParC: Kazakh Parallel Corpus for Machine Translation](https://refivu.com/papers/adaa707f-d821-424c-83ee-af93c4f100b4-kazparc-kazakh-parallel-corpus-for-machine-translation.md)
- [Machine Translation Testing via Syntactic Tree Pruning](https://refivu.com/papers/241ef6bc-d9e5-4762-b817-d6fe146888f6-machine-translation-testing-via-syntactic-tree-pruning.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/c5800be3-0221-4d9c-b244-124eccc2a2e5-typhoon-thai-large-language-models)
