File size: 2,050 Bytes
e48863b
 
0b9d12d
8e4d561
 
 
 
 
 
 
 
e48863b
 
0b9d12d
 
273571b
e48863b
 
 
8e4d561
 
 
 
 
 
 
d2df7f0
8e4d561
08be4a5
8e4d561
e48863b
8e4d561
 
 
 
e48863b
8e4d561
 
e48863b
8e4d561
e48863b
8e4d561
e48863b
8e4d561
 
e48863b
8e4d561
e48863b
8e4d561
 
 
 
e48863b
8e4d561
 
e48863b
8e4d561
e48863b
8e4d561
 
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
---
library_name: transformers
pipeline_tag: text-classification
datasets:
- EXt1/Thai-True-Fake-News
language:
- th
metrics:
- accuracy
base_model:
- microsoft/mdeberta-v3-base
---

# mdeberta-v3-base-thai-fakenews

This model is a fine-tuned version of the microsoft/mdeberta-v3-base model. It was fine-tuned using the EXt1/Thai-True-Fake-News dataset, a collection of Thai news articles labeled as either real or fake. The model is designed for fake news detection in the Thai language, achieving an accuracy of 91% on a test set. This model is part of the senior project of CPE35 students at King Mongkut's University of Technology Thonburi (KMUTT).

### Model Description

- **Base Mode: `microsoft/mdeberta-v3-base`**
- **Dataset: `EXt1/Thai-True-Fake-News`**
- **Model Size: 279M parameters**
- **Language: Thai**
- **Labels:**
  - 0: True News
  - 1: Fake News
 
### Evaluation Results
- **Loss: 0.25065**
- **Accuracy: 91% on the test set**

### Usage
```
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("EXt1/mdeberta-v3-base-thai-fakenews")
model = AutoModelForSequenceClassification.from_pretrained("EXt1/mdeberta-v3-base-thai-fakenews")

text = "M-Flow ส่ง SMS แจ้งให้ชำระค่าปรับจราจรด้วยการคลิกลิงก์"

inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class = torch.argmax(logits, dim=1).item()

if predicted_class == 1:
    print("ข่าวปลอม")
else:
    print("ข่าวจริง")

```
### Use Cases

This model is designed for text classification tasks, specifically for distinguishing between true and fake news in the Thai language. It can be applied to various use cases, such as:

- Detecting fake news articles in the Thai language on social media or news websites.
- Supporting news verification systems or automated content moderation tools.