Downloads · 30 days
8
1% of all-time downloads
rayvex/nllb-200-distilled-600M-hin-kang-v1
nllb-200-distilled-600M-hin-kang-v1 is a translation model from rayvex. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains a fine-tuned Neural Machine Translation (NMT) model that translates text from Hindi to Kangri. The model is built using the Hugging Face Transformers library and is designed to facilitate easy…
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
572
Public
Parameters
615M
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This repository contains a fine-tuned Neural Machine Translation (NMT) model that translates text from Hindi to Kangri. The model is built using the Hugging Face Transformers library and is designed to facilitate easy integration and usage in various applications.I have added the kangri language to the tokenizer and train it on the kangri corpus. This is version. Soon, gonna improve it.
To use this model, you need to install the Hugging Face Transformers library along with other required packages. Follow the instructions below:
You can use this model with the Hugging Face Transformers library in a Python script or a Jupyter notebook. Below is a sample code snippet to demonstrate how to load and use the model for translation.
import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
model_name = "cloghost/nllb-200-distilled-600M-hin-kang-v1"
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
device = 0 if torch.cuda.is_available() else -1
translator = pipeline(
"translation",
model=model,
tokenizer=tokenizer,
src_lang="hin_Deva",
tgt_lang="kang_Deva",
device=device
)
text = """मगर हिमाचली भाषा तो पहले से बोली जा रही है।
लोग सदियों से ही इसके संग जी रहे हैं।
पहाड़ी भाषा का इतिहास हिन्दी साहित्य के आदिकाल ,जिसे सिद्ध चारण काल के नाम से भी जानते हैं
"""
translation = translator(text)