File size: 2,476 Bytes
142c903 0f6e4fe 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f 142c903 422212f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
---
base_model: unsloth/gemma-2-9b-bnb-4bit
library_name: peft
license: apache-2.0
language:
- en
- mr
---
# Model Card for Gemma2 7B - English to Marathi Translation
## Model Details
### Model Description
This model is a fine-tuned variant of **Unsloth's Gemma2 7B**, trained for high-quality English-to-Marathi translations. Built on a robust transformer architecture, the model handles complex translations, idiomatic expressions, and long-context paragraphs effectively. It is optimized for efficient inference using 4-bit quantization.
- **Developed by:** Devavrat Samak
- **Model type:** Causal Language Model, fine-tuned for translation tasks.
- **Language(s) (NLP):** English (en), Marathi (mr)
- **License:** Apache-2.0
- **Finetuned from model:** unsloth/gemma-2-9b-bnb-4bit
### Model Sources
- **Repository:** [https://github.com/Devsam2898/Gemma2-Marathi]
## Uses
### Direct Use
The model can be directly used for English-to-Marathi translations, including handling long-context paragraphs, noisy inputs, and code-mixed sentences.
### Downstream Use
The model can be integrated into applications for:
- Chatbots with multilingual support.
- Translating historical texts for research.
- Localization of content for Marathi-speaking audiences.
### Out-of-Scope Use
- The model is not designed for real-time, high-speed translation in latency-critical systems.
- It may not generalize well for highly domain-specific jargon without additional fine-tuning.
## Bias, Risks, and Limitations
- The model's translations might occasionally lose nuance or context in culturally significant expressions.
- Performance may degrade for noisy data or highly informal text.
### Recommendations
- Users should validate translations in sensitive domains to ensure accuracy.
- Consider additional fine-tuning for domain-specific tasks.
## How to Get Started with the Model
```python
from transformers import AutoTokenizer
from unsloth import Gemma2
# Load model and tokenizer
model = Gemma2.from_pretrained("unsloth/gemma-2-9b-bnb-4bit")
tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-2-9b-bnb-4bit")
# Input and inference
input_text = "The golden age of the Peshwas brought cultural and political prosperity to Maharashtra."
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(inputs["input_ids"], max_length=128)
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translated_text)
|