Text Generation
Transformers
TensorBoard
Safetensors
Thai
umt5
text2text-generation
Eval Results (legacy)
Instructions to use B-K/umt5-thai-g2p with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use B-K/umt5-thai-g2p with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="B-K/umt5-thai-g2p")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("B-K/umt5-thai-g2p") model = AutoModelForSeq2SeqLM.from_pretrained("B-K/umt5-thai-g2p", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use B-K/umt5-thai-g2p with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "B-K/umt5-thai-g2p" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "B-K/umt5-thai-g2p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/B-K/umt5-thai-g2p
- SGLang
How to use B-K/umt5-thai-g2p with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "B-K/umt5-thai-g2p" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "B-K/umt5-thai-g2p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "B-K/umt5-thai-g2p" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "B-K/umt5-thai-g2p", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use B-K/umt5-thai-g2p with Docker Model Runner:
docker model run hf.co/B-K/umt5-thai-g2p
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,8 +27,9 @@ metrics:
|
|
| 27 |
- cer
|
| 28 |
pipeline_tag: text2text-generation
|
| 29 |
widget:
|
| 30 |
-
- text:
|
| 31 |
-
example_title:
|
|
|
|
| 32 |
---
|
| 33 |
|
| 34 |
# umt5-thai-g2p
|
|
@@ -41,15 +42,14 @@ It achieves the following results on the sentence evaluation set:
|
|
| 41 |
|
| 42 |
## Model Description
|
| 43 |
|
| 44 |
-
`umt5-thai-g2p` is designed to convert Thai text (words or sentences) into their corresponding International Phonetic Alphabet (IPA) representations.
|
| 45 |
|
| 46 |
## Intended uses & limitations
|
| 47 |
|
| 48 |
### Intended Uses
|
| 49 |
|
| 50 |
-
* **Thai Grapheme-to-Phoneme (G2P) Conversion**: The primary use of this model is to generate
|
| 51 |
* **Speech Synthesis Preprocessing**: Can be used as a component in a Text-to-Speech (TTS) pipeline to convert input text into phonemes before acoustic model processing.
|
| 52 |
-
* **Linguistic Analysis**: May assist in phonetic research or applications requiring phonetic representations of Thai words.
|
| 53 |
|
| 54 |
### Limitations
|
| 55 |
|
|
|
|
| 27 |
- cer
|
| 28 |
pipeline_tag: text2text-generation
|
| 29 |
widget:
|
| 30 |
+
- text: สวัสดีครับ
|
| 31 |
+
example_title: Thai G2P Example
|
| 32 |
+
new_version: B-K/umt5-thai-g2p-v2-0.5k
|
| 33 |
---
|
| 34 |
|
| 35 |
# umt5-thai-g2p
|
|
|
|
| 42 |
|
| 43 |
## Model Description
|
| 44 |
|
| 45 |
+
`umt5-thai-g2p` is designed to convert Thai text (words or sentences) into their corresponding phonemic International Phonetic Alphabet (IPA) representations.
|
| 46 |
|
| 47 |
## Intended uses & limitations
|
| 48 |
|
| 49 |
### Intended Uses
|
| 50 |
|
| 51 |
+
* **Thai Grapheme-to-Phoneme (G2P) Conversion**: The primary use of this model is to generate phonemic transcriptions (IPA) for Thai text.
|
| 52 |
* **Speech Synthesis Preprocessing**: Can be used as a component in a Text-to-Speech (TTS) pipeline to convert input text into phonemes before acoustic model processing.
|
|
|
|
| 53 |
|
| 54 |
### Limitations
|
| 55 |
|