Downloads · 30 days
30
15% of all-time downloads
B-K/umt5-thai-g2p
umt5-thai-g2p is a text generation model from B-K. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/umt5-small on the B-K/thai-g2p dataset for Thai Grapheme-to-Phoneme (G2P) conversion.
Downloads · 30 days
30
15% of all-time downloads
All-time downloads
199
Public
Parameters
46.1M
184 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors184 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/umt5-small on the B-K/thai-g2p dataset for Thai Grapheme-to-Phoneme (G2P) conversion.
It achieves the following results on the sentence evaluation set:
umt5-thai-g2p is designed to convert Thai text (words or sentences) into their corresponding phonemic International Phonetic Alphabet (IPA) representations.
B-K/thai-g2p training dataset. This includes very rare words, neologisms, or complex named entities.google/umt5-small, it inherits the general architectural limitations and scale of the base model.from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("B-K/umt5-thai-g2p")
model = AutoModelForSeq2SeqLM.from_pretrained("B-K/umt5-thai-g2p")
thai_text = "สวัสดีครับ" # Example Thai text
inputs = tokenizer(thai_text, return_tensors="pt", padding=True, truncation=True)
outputs = model.generate(**inputs, num_beams=3, max_new_tokens=48)
phonemes = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(f"Thai Text: {thai_text}")
print(f"Phonemes: {phonemes}")
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Cer | Gen Len |
|---|---|---|---|---|---|
| No log | 1.0 | 134 | 1.5636 | 0.0917 | 27.1747 |
| No log | 2.0 | 268 | 1.5603 | 0.093 | 27.1781 |
| No log | 3.0 | 402 | 1.5566 | 0.0938 | 27.1729 |
| 1.1631 | 4.0 | 536 | 1.5524 | 0.0941 | 27.1678 |
| 1.1631 | 5.0 | 670 | 1.5508 | 0.0939 | 27.113 |
| 1.1631 | 6.0 | 804 | 1.5472 | 0.0932 | 27.1575 |
| 1.1631 | 7.0 | 938 | 1.5450 | 0.0933 | 27.1421 |
| 1.1603 | 8.0 | 1072 | 1.5449 | 0.094 | 27.0616 |