Downloads · 30 days
12
1% of all-time downloads
Satwik11/gemma-2b-mt-Hindi-Fintuned
gemma-2b-mt-Hindi-Fintuned is a translation model from Satwik11. 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 model is a fine-tuned version of the GEMMA 2B multilingual transformer, specifically optimized for translating text from English to Hindi. It leverages the capabilities of the original GEMMA architecture to provi…
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
1.3K
Public
Parameters
2.5B
15.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors5 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of the GEMMA 2B multilingual transformer, specifically optimized for translating text from English to Hindi. It leverages the capabilities of the original GEMMA architecture to provide accurate and efficient translations.
-Model Name: Gemma-2b-mt-Hindi-Fintuned -Model Type: Language Translation Model -Base Model: Gemma-2b -Task: English to Hindi Translation -Framework: Transformers
This model can be directly used for translating English text to Hindi. It is suitable for various applications such as: -Localization of content -Cross-lingual communication -Educational tools for language learning -Multilingual content creation
The model can be integrated into larger systems or applications that require English to Hindi translation capabilities, such as: -Machine translation services -Multilingual chatbots -Content management systems for multilingual websites
[More Information Needed]
-The model may struggle with idiomatic expressions or culturally specific content. -There might be potential biases in the training data that could affect translation quality. -The model's performance on specialized or technical content may vary. -It may have limitations in handling complex grammatical structures or maintaining context in longer texts.
-It's recommended to use the model in conjunction with human translators for high-stakes or nuanced translations. -Regular evaluation and fine-tuning with diverse and representative data can help mitigate biases and improve performance.
Use the code below to get started with the model:
from transformers import AutoTokenizer, AutoModelForCausalLM
#Load the model and tokenizer tokenizer = AutoTokenizer.from_pretrained("Satwik11/gemma-2b-mt-Hindi-Fintuned") model = AutoModelForCausalLM.from_pretrained("Satwik11/gemma-2b-mt-Hindi-Fintuned")
def generate_translation(prompt, max_length=90): # Prepare the input inputs = tokenizer(prompt, return_tensors='pt')
# Generate the translation
outputs = model.generate(**inputs, max_length=max_length)
# Decode the generated output
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
return translated_text
#Test the model with some example sentences test_sentences = [ "Today is August 19.The maximum temperature is 70 degrees Fahrenheit" ]
for sentence in test_sentences: prompt = f"Translate the following English text to Hindi: {sentence}" translation = generate_translation(prompt) print(translation)
The model was fine-tuned on the cfilt/iitb-english-hindi dataset, which contains English-Hindi sentence pairs. For more details about the dataset, refer to the dataset card on Hugging Face.
For more information, please contact the model creators through the Hugging Face model repository: https://www.linkedin.com/in/satwik-sinha/