VALLR-LFM3-1.7B-phonemes-to-text-v1
Phoneme-to-text stage of VALLR (visual speech recognition). This is
LiquidAI/LFM3-1.7B finetuned with LoRA, then merged, to turn an ARPAbet phoneme sequence
(output of the VALLR video-to-phoneme network) into the English sentence. First full run, before continued training.
The LoRA adapter alone is in the GitHub repo, under models/.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "MyEcoria/VALLR-LFM3-1.7B-phonemes-to-text-v1"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, torch_dtype="auto")
phonemes = "HH AH0 L OW1 W ER1 L D"
prompt = f"<S2S>\n<PHONEMES>\n{phonemes}\n</PHONEMES>\n<TEXT>\n"
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
out = model.generate(ids, max_new_tokens=64)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Training code: Models/Llama.py in the GitHub repo. License: same terms as the base model, LiquidAI/LFM3-1.7B.