Lao to English Translation Model
Welcome to the forefront of linguistic innovation with our groundbreaking T5 language model designed specifically for Lao to English translation. In a rapidly globalizing world where effective communication is paramount, our T5 model stands as a beacon of excellence, offering unparalleled accuracy, fluency, and efficiency in bridging the language gap between Lao and English.
Built on state-of-the-art deep learning architecture and trained on vast datasets of Lao and English texts, our language model (LLM) harnesses the power of transformer-based technology to deliver seamless and precise translations. Whether you're a business expanding into Laotian markets, a researcher seeking to access Lao-language resources, or an individual connecting with Lao-speaking communities, our T5 model is your ultimate solution for unlocking linguistic barriers and fostering meaningful cross-cultural exchanges.
With a commitment to quality and innovation, our translation model not only translates words but also preserves context, tone, and cultural nuances, ensuring that the essence of the original message remains intact in every translated sentence. Whether it's documents, websites, or multimedia content, our LLM model offers unmatched versatility and reliability, empowering users to communicate effortlessly across languages and borders.
How to use
On GPU
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("minhtoan/t5-translate-lao-english")
model = AutoModelForSeq2SeqLM.from_pretrained("minhtoan/t5-translate-lao-english")
model.cuda()
src = "ຂ້ອຍຮັກເຈົ້າ"
tokenized_text = tokenizer.encode(src, return_tensors="pt").cuda()
model.eval()
translate_ids = model.generate(tokenized_text, max_length=140)
output = tokenizer.decode(translate_ids[0], skip_special_tokens=True)
output
'I love you'
On CPU
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("minhtoan/t5-translate-lao-english")
model = AutoModelForSeq2SeqLM.from_pretrained("minhtoan/t5-translate-lao-english")
src = "ຂ້ອຍຮັກເຈົ້າ"
input_ids = tokenizer(src, max_length=200, return_tensors="pt", padding="max_length", truncation=True).input_ids
outputs = model.generate(input_ids=input_ids, max_new_tokens=140)
output = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
output
'I love you'
Author
Phan Minh Toan
- Downloads last month
- 30