Run this model with HF Jobs
Run willwade/byt5-g2p-multilingual on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/willwade/byt5-g2p-multilingual. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/willwade/byt5-g2p-multilingual on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use willwade/byt5-g2p-multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use willwade/byt5-g2p-multilingual with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="willwade/byt5-g2p-multilingual")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("willwade/byt5-g2p-multilingual") model = AutoModelForSeq2SeqLM.from_pretrained("willwade/byt5-g2p-multilingual", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Floravox ByT5 multilingual G2P (small, v8) — 300M params
Byte-level seq2seq: <lang>: word in, space-separated IPA out, for
264 language and variety tags (eng-US, eng-UK, eng-AU, spa-ES,
por-BR, cmn, yue, ...). Trained on 5.44M word–pronunciation rows built
from Wiktionary, gruut and the other open lexicons of
floravox-lexicons.
<eng-US>: floravox -> f l ˈ ɔ ɹ ə v ɑ k s
<spa-ES>: abeja -> a b e x a
<fra>: bonjour -> b ɔ̃ ʒ u ʁ
<eng-UK>: colour -> k ˈ ʌ l ə (eng-US: k ˈ ʌ l ɚ)
This is v8, released on 2026-12-02. The model it replaced is kept on
the v3-published tag of this repository.
Results
Held-out test (127,392 words never trained on, in word families kept out of training, 264 languages): 86.1% exact (85.2% leaving out every word with a near-neighbour in the training rows); per-language average 71.0%.
| language | exact | language | exact | |
|---|---|---|---|---|
| Spanish | 98.4% | German | 87.7% | |
| Swahili | 100% | French | 88.0% | |
| Hindi | 93.8% | Russian | 76.6% | |
| English (US) | 65.3% | Mandarin | 76.0% | |
| English (UK) | 65.6% | Portuguese | 76.4% |
Against the previous published model, on identical words (the 46,763 test words both corpora hold with the same pronunciation):
| previous | v8 | |
|---|---|---|
| exact | 66.3% | 86.7% |
| the 27 languages with 200–1,000 such words | 52.3% | 81.4% |
| American English, 2,767 words | 64.7% | 70.1% |
| British English, 606 words (phones) | 52.1% | 60.2% |
89 languages up, 33 down; 42 ahead beyond two standard errors.
What changed from the previous model
- 264 tags where the previous model's card names 142, English split by accent (US, UK, Australian, New Zealand, Canadian, Scottish, Indian, Irish, Singaporean, South African), each lexicon in one notation.
- The notation follows the current lexicons, and for a number of languages it differs from the previous model's. In English the stress mark is its own token and stands before the stressed vowel, only primary stress is marked, and diphthongs are two tokens; the previous model glued the mark to the vowel and kept secondary stress (
floravoxin US English:f l ˈɔ ɹ ə v ˌɑ k sbefore,f l ˈ ɔ ɹ ə v ɑ k snow). Mandarin's tones are digits now (ʈ͡ʂ ʊ ŋ 1 k u̯ ɔ 2for 中国) where the previous model wrote superscripts. Consumers that split on spaces and treatˈxas one symbol need adjusting. The lexicon's English rows use only symbols that Piper voices of each accent accept. - British English now carries stress marks at all (the previous lexicon had none).
Files
- weights at the root (safetensors, 1.2 GB),
trainer_state.json,training_args.bin onnx/— fp32 encoder + decoder, checked on a thousand test rows: 84.4% exact, where the model scores 86.1% on all of themonnx-int8/— dynamic int8, a quarter of the size: 83.6% on the same rows (0.8 points down)eval/— the test score by language, and both export checks- the tokenizer files at the root and in both
onnx/folders, which load on transformers 4 and 5 alike (tested on 4.51 to 4.57 and 5.23):AutoTokenizer.from_pretrained("willwade/byt5-g2p-multilingual")gives the same ids as the byte convention below. (Repaired on 2026-12-02: the first v8 upload did not load on transformers 4. Thev8tag points at the repaired commit.)
Consumption conventions are in
onnx_reference.py:
token id = byte + 3, EOS appended to the encoder input, the decoder needs
an explicit causal mask and a length-2 bootstrap.
Quickstart (ONNX, CPU)
# pip install onnxruntime numpy huggingface_hub
from huggingface_hub import snapshot_download
import sys; sys.path.insert(0, "voicegarden-lexicons/scripts/train_byt5")
from onnx_reference import load, run
d = snapshot_download("willwade/byt5-g2p-multilingual", allow_patterns=["onnx/*"])
enc, dec = load(d + "/onnx")
print(run(enc, dec, "<eng-US>: floravox"))
Training
The corpus of floravox-lexicons (5.44M rows, seed 7): word families split
at random into train, validation and test, a word kept out of every tag of
its language. From google/byt5-small, 245,000 steps of batch 64 (the
checkpoint of step 215,000 kept, by exact match on a validation sample in
which every language has a share), 15.4 hours on one RTX 3090. Languages
are sampled by the square root of their rows, no language above 4 passes
over its rows an epoch, the two large English lexicons at twice that
share. Code and the full comparisons:
floravox-training.
Limits
Exact match is whole-word equality; a single wrong vowel counts as wrong,
so the figures understate how close the output usually is. Languages with
a few hundred rows score far below those with thousands. Bengali (Dhaka)
and a handful of other small varieties score worse than on unpublished
intermediate data; the per-language table in eval/ gives every one.
Licence
CC BY-SA 4.0 (share-alike inherited from the Wiktionary and WikiPron training data). Attribution: Wiktionary and WikiPron (CUNY-CL), gruut (rhasspy; its US English rows are CMUdict's), Google byt5-small (Apache-2.0). Training code: voicegarden-lexicons/scripts/train_byt5.
- Downloads last month
- 191
Model tree for willwade/byt5-g2p-multilingual
Base model
google/byt5-small