Downloads · 30 days
14
7% of all-time downloads
UX4567/Speak-English-AI-3B-v1.0
Speak-English-AI-3B-v1.0 is a translation model from UX4567. Use it when you need text moved from one language to another. It is set up for peft. The card lists the license as mit.
A lightweight Hindi <- English translator for spoken English practice, made by Kartik Sharma from Jaipur.
Downloads · 30 days
14
7% of all-time downloads
All-time downloads
201
Public
Parameters
615M
2.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
A lightweight Hindi <-> English translator for spoken English practice, made by Kartik Sharma from Jaipur.
This is a LoRA fine-tuned version of NLLB 600M. It fixes the common error where other models translate Jaipur as Plu or Cartozy. This model correctly translates daily conversation sentences.
Anyone who wants to practice Hindi to English speaking. Example: मैं बाजार जा रहा हूँ -> I am going to market
Can be plugged into a Gradio App, WhatsApp bot, or English learning app.
Use the code below to get started with the model.
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
!pip install -U torchao
adapter_id = "UX4567/Speak-English-AI-3B-v1.0"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForSeq2SeqLM.from_pretrained(adapter_id)
def translate(text, src_lang, tgt_lang):
tokenizer.src_lang = src_lang
inputs = tokenizer(text, return_tensors="pt")
out = model.generate(
**inputs,
max_new_tokens=100
)
return tokenizer.batch_decode(out, skip_special_tokens=True)[0]
# Hindi -> English
print(translate("मैं बाजार जा रहा हूँ", "hin_Deva", "eng_Latn"))
# English -> Hindi
print(translate("I am from Jaipur", "eng_Latn", "hin_Deva"))