File size: 4,031 Bytes
b42b196
 
 
 
 
 
 
 
7fa81b6
 
 
 
881b671
 
b42b196
 
 
6abea8d
b42b196
 
 
1c51a05
b42b196
 
 
1c51a05
b42b196
 
 
1c51a05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f0b351c
6abea8d
b42b196
1c51a05
b42b196
6abea8d
b42b196
6abea8d
 
 
 
 
 
 
 
 
 
6c240f6
6abea8d
b42b196
 
 
 
7fa81b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
library_name: transformers
base_model: airesearch/wangchanberta-base-att-spm-uncased
tags:
- generated_from_trainer
model-index:
- name: finetune_iapp_thaiqa
  results: []
license: mit
datasets:
- phoner45/iapp_thaiqa
pipeline_tag: question-answering
language:
- th
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# finetune_iapp_thaiqa

his model is a fine-tuned version of [airesearch/wangchanberta-base-att-spm-uncased](https://huggingface.co/airesearch/wangchanberta-base-att-spm-uncased) on the ipp_thaiqa dataset.

## Model description

โมเดลนี้ได้รับการออกแบบมาเพื่อทำงานในงานถามตอบ (Question Answering) สำหรับภาษาไทย โดยใช้สถาปัตยกรรม WangchanBERTa ซึ่งเป็นโมเดลภาษาไทยที่มีประสิทธิภาพสูง มาจากการปรับแต่งโมเดล BERT แบบไม่แยกตัวพิมพ์เล็กและพิมพ์ใหญ่ และใช้ SentencePiece Tokenizer โมเดลนี้เน้นที่การทำงานกับคำถามและคำตอบภาษาไทยโดยเฉพาะ

## Intended uses & limitations

การใช้งาน: โมเดลนี้สามารถนำไปใช้ในงานถามตอบ (Question Answering) สำหรับภาษาไทย เช่น ระบบแชทบอทที่ให้ข้อมูลตามคำถามที่ผู้ใช้ถาม
ข้อจำกัด: โมเดลนี้ได้รับการฝึกบนชุดข้อมูลจำกัด ดังนั้นอาจมีข้อผิดพลาดในการทำงานในบางบริบท และประสิทธิภาพอาจไม่ดีเท่าที่ควรในกรณีที่ข้อมูลหรือคำถามมีความซับซ้อนเกินไป หรือเป็นข้อมูลที่ไม่เคยพบเจอมาก่อน

# Use a pipeline as a high-level helper

from transformers import pipeline

pipe = pipeline("question-answering", model="phoner45/finetune_iapp_thaiqa")

context = """
ประเทศไทยมีกรุงเทพมหานครเป็นเมืองหลวง และเป็นเมืองที่ใหญ่ที่สุดในประเทศ
นอกจากนี้ยังมีจังหวัดอื่นๆ ที่สำคัญ เช่น เชียงใหม่ ภูเก็ต และขอนแก่น
ประเทศไทยมีการปกครองในระบอบประชาธิปไตย โดยมีพระมหากษัตริย์เป็นประมุข
"""

question = "เมืองหลวงของประเทศไทยคือเมืองอะไร?"

result = pipe(question=question, context=context)

## Training and evaluation data

ข้อมูลชุดที่ใช้ในการฝึก (Training Dataset) Thai Wikipedia Question Answering Dataset ipp_thaiqa !wget https://archive.org/download/iapp_thaiqa/iapp_thaiqa.zip

## Training procedure

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 32
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.2
- num_epochs: 2
- mixed_precision_training: Native AMP

### Framework versions

- Transformers 4.44.2
- Pytorch 2.4.0+cu121
- Datasets 2.21.0
- Tokenizers 0.19.1