Downloads · 30 days
10
10% of all-time downloads
svogunas/g2p-lt-byt5-base
g2p-lt-byt5-base is a text generation model from svogunas. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-4.0.
A byte-level ByT5 model that converts Lithuanian words in standard orthography into their phoneme sequence. It is the pronunciation front-end for Lithuanian TTS (and useful for forced alignment, lexicon expansion, and…
Downloads · 30 days
10
10% of all-time downloads
All-time downloads
105
Public
Parameters
582M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
A byte-level ByT5 model that converts Lithuanian words in standard orthography into their phoneme sequence. It is the pronunciation front-end for Lithuanian TTS (and useful for forced alignment, lexicon expansion, and linguistic tooling).
labasphon alphabet — e.g. l a b a sgoogle/byt5-base (582 M),
fully fine-tuned. Byte-level ⇒ no tokenizer issues with Lithuanian letters or phoneme symbols.This is the flagship (most accurate). A smaller, ~2× faster variant for edge/embedded use is
svogunas/g2p-lt-byt5-small.
Held-out test set of 3,000 words unseen in training (true generalisation), word-level PER (phoneme error rate) and exact-match word accuracy:
| decoding | PER | word accuracy |
|---|---|---|
| greedy | 1.88 % | 89.2 % |
| beam = 5 | 1.86 % | 89.3 % |
For comparison, the small variant scores 1.98 % / 88.3 %. A larger byt5-large was trained and did not improve over base (2.57–2.70 % PER) — capacity past byt5-base is wasted on this data, so base is the recommended model.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tok = AutoTokenizer.from_pretrained("svogunas/g2p-lt-byt5-base")
model = AutoModelForSeq2SeqLM.from_pretrained("svogunas/g2p-lt-byt5-base")
def g2p(word: str) -> str:
ids = tok(word.lower(), return_tensors="pt").input_ids
out = model.generate(ids, max_length=64) # greedy; add num_beams=5 for a tiny gain
return tok.decode(out[0], skip_special_tokens=True)
print(g2p("labas")) # l a b a s
print(g2p("abaravičiene")) # a b a r a v' i tS' ie n' e
Feed one word at a time (the model is trained on isolated words). For a sentence, split on whitespace, look words up, and handle punctuation/numbers in your own front-end.
phon alphabet)Phonemes are space-separated. Conventions:
' after a consonant marks palatalization (Lithuanian minkštumas): v', tS', n'.aa, oo, ii, ee, uu.ie, uo, ea; tS (č), dZ (dž), ts (c), dz.aA, Aa, Oo, Ea).Full inventory (~90 symbols) observed in the training lexicon:
a i e s s' n' t' t u oo k m r' n r k' l' p j j' m' I v' p' ee d d' l ii S' E v w
g' g uu U aA o S b' tS' b A Aa Ee Uo Z' aa Oo Ii Ea ea ie z J ts' eA z' Z uo O iI
W uU f' dZ' f oO N iE eE N' Uu Ie R' R uO x h L' ts M' x' h' L M tS dZ dz' dz
phon/) — the bulk of the lexicon.Fine-tuned from google/byt5-base, 5 epochs, lr 5e-4, load_best_model_at_end on eval loss.
Released under CC BY 4.0. Training data (LIEPA-3, EMO) is CC BY 4.0 from VDU / CLARIN-LT — please attribute them when you use this model:
Pronunciation lexicon derived from LIEPA-3 and the VDU Lithuanian emotional speech corpus, distributed via CLARIN-LT (CC BY 4.0).
@misc{g2p-lt-byt5-base,
title = {g2p-lt-byt5-base: Lithuanian grapheme-to-phoneme (ByT5)},
author = {Smaliukas, Arūnas},
year = {2026},
note = {Fine-tuned from google/byt5-base on a LIEPA-3 + EMO pronunciation lexicon (CC BY 4.0)},
url = {https://huggingface.co/svogunas/g2p-lt-byt5-base}
}