Downloads · 30 days
24
24% of all-time downloads
svogunas/g2p-lt-byt5-small
g2p-lt-byt5-small 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. This is the lite variant — 300 M params, ~2× faster than the flagship, for edge/embedded use — at a small acc…
Downloads · 30 days
24
24% of all-time downloads
All-time downloads
101
Public
Parameters
300M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
A byte-level ByT5 model that converts Lithuanian words in standard orthography into their phoneme sequence. This is the lite variant — 300 M params, ~2× faster than the flagship, for edge/embedded use — at a small accuracy cost.
labasphon alphabet — e.g. l a b a sgoogle/byt5-small (300 M),
fully fine-tuned. Byte-level ⇒ no tokenizer issues with Lithuanian letters or phoneme symbols.For maximum accuracy use the flagship
svogunas/g2p-lt-byt5-base.
Held-out test set of 3,000 words unseen in training (true generalisation):
| decoding | PER | word accuracy |
|---|---|---|
| greedy | 1.98 % | 88.3 % |
| beam = 5 | 1.96 % | 88.5 % |
The flagship base scores 1.88 % / 89.2 % — a 0.1 % PER edge for ~2× the parameters. This small model was trained for 12 epochs (vs 5 for base): the extra epochs help the small model (2.34 % → 1.98 %) where they did not help base or large.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tok = AutoTokenizer.from_pretrained("svogunas/g2p-lt-byt5-small")
model = AutoModelForSeq2SeqLM.from_pretrained("svogunas/g2p-lt-byt5-small")
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/) + EMO (Lithuanian emotional speech) phoneme
annotations, merged into a 233 k-word pronunciation lexicon (one consistent notation,
99.5 % mean cross-source agreement); 3 k words held out for the test above.Fine-tuned from google/byt5-small, 12 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-small,
title = {g2p-lt-byt5-small: Lithuanian grapheme-to-phoneme (ByT5, lite)},
author = {Smaliukas, Arūnas},
year = {2026},
note = {Fine-tuned from google/byt5-small on a LIEPA-3 + EMO pronunciation lexicon (CC BY 4.0)},
url = {https://huggingface.co/svogunas/g2p-lt-byt5-small}
}