Downloads · 30 days
364
1% of all-time downloads
Pavarissy/wangchanberta-ud-thai-pud-upos
wangchanberta-ud-thai-pud-upos is a token classification model from Pavarissy. Use it when you need labels on individual words, such as names. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
364
1% of all-time downloads
All-time downloads
50.5K
Public
Repo size
6.3 GB
Likes
1
Public
Click a slice to open those files.
.bin419 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of airesearch/wangchanberta-base-att-spm-uncased on the universal_dependencies dataset. It achieves the following results on the evaluation set:
This model is train on thai UD Thai PUD corpus with Universal Part-of-speech (UPOS) tag to help with pos tagging in Thai language.
from transformers import AutoModelForTokenClassification, AutoTokenizer, TokenClassificationPipeline
model = AutoModelForTokenClassification.from_pretrained("Pavarissy/wangchanberta-ud-thai-pud-upos")
tokenizer = AutoTokenizer.from_pretrained("Pavarissy/wangchanberta-ud-thai-pud-upos")
pipeline = TokenClassificationPipeline(model=model, tokenizer=tokenizer, grouped_entities=True)
outputs = pipeline("ประเทศไทย อยู่ใน ทวีป เอเชีย")
print(outputs)
# [{'entity_group': 'NOUN', 'score': 0.419697, 'word': '', 'start': 0, 'end': 1}, {'entity_group': 'PROPN', 'score': 0.8809489, 'word': 'ประเทศไทย', 'start': 0, 'end': 9}, {'entity_group': 'VERB', 'score': 0.7754166, 'word': 'อยู่ใน', 'start': 9, 'end': 16}, {'entity_group': 'NOUN', 'score': 0.9976932, 'word': 'ทวีป', 'start': 16, 'end': 21}, {'entity_group': 'PROPN', 'score': 0.97770107, 'word': 'เอเชีย', 'start': 21, 'end': 28}]
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Macro avg precision | Macro avg recall | Macro avg f1 | Weighted avg precision | Weighted avg recall | Weighted avg f1 | Accuracy |
|---|---|---|---|---|---|---|---|---|---|---|
| No log | 1.0 | 125 | 0.5563 | 0.8103 | 0.7235 | 0.7552 | 0.8574 | 0.8522 | 0.8495 | 0.8522 |
| No log | 2.0 | 250 | 0.2316 | 0.8701 | 0.8460 | 0.8564 | 0.9320 | 0.9315 | 0.9310 | 0.9315 |
| No log | 3.0 | 375 | 0.1635 | 0.8903 | 0.8729 | 0.8809 | 0.9511 | 0.9511 | 0.9508 | 0.9511 |
| 0.5782 | 4.0 | 500 | 0.1112 | 0.9037 | 0.8964 | 0.8998 | 0.9687 | 0.9685 | 0.9685 | 0.9685 |
| 0.5782 | 5.0 | 625 | 0.0860 | 0.9110 | 0.9050 | 0.9079 | 0.9752 | 0.9752 | 0.9751 | 0.9752 |
| 0.5782 | 6.0 | 750 | 0.0675 | 0.9160 | 0.9103 | 0.9131 | 0.9815 | 0.9814 | 0.9814 | 0.9814 |
| 0.5782 | 7.0 | 875 | 0.0588 | 0.9189 | 0.9138 | 0.9163 | 0.9839 | 0.9839 | 0.9839 | 0.9839 |
| 0.1073 | 8.0 | 1000 | 0.0514 | 0.9214 | 0.9155 | 0.9184 | 0.9858 | 0.9858 | 0.9858 | 0.9858 |
| 0.1073 | 9.0 | 1125 | 0.0463 | 0.9225 | 0.9171 | 0.9197 | 0.9877 | 0.9876 | 0.9876 | 0.9876 |
| 0.1073 | 10.0 | 1250 | 0.0442 | 0.9221 | 0.9178 | 0.9199 | 0.9883 | 0.9883 | 0.9883 | 0.9883 |