Views
No views yet
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.1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3tokenizer = AutoTokenizer.from_pretrained("B-K/umt5-thai-g2p")
4model = AutoModelForSeq2SeqLM.from_pretrained("B-K/umt5-thai-g2p")
5
6thai_text = "สวัสดีครับ" # Example Thai text
7inputs = tokenizer(thai_text, return_tensors="pt", padding=True, truncation=True)
8
9outputs = model.generate(**inputs, num_beams=3, max_new_tokens=48)
10phonemes = tokenizer.decode(outputs[0], skip_special_tokens=True)
11
12print(f"Thai Text: {thai_text}")
13print(f"Phonemes: {phonemes}")| 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 |