lubzo/marathi-alpaca-cleaned-translated
Viewer • Updated • 51.8k • 49
How to use lubzo/gemma-2-2b-marathi-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b")
model = PeftModel.from_pretrained(base_model, "lubzo/gemma-2-2b-marathi-lora")This repository contains LoRA PEFT adapter weights for google/gemma-2-2b fine-tuned on a Cleaned Alpaca Marathi-translated dataset.
This model attempts to reproduce the experimental setup described in: Khade et al., CHiPSAL 2025.
google/gemma-2-2bq_proj, k_proj, v_proj, o_projmr)unsloth/alpaca-cleaned).Research and educational use, not a production-ready assistant.
Evaluated using the AI4Bharat Airavata benchmark harness:
| Model | Metric | IndicSentiment | ARC-Easy | ARC-Challenge | IndicCOPA | IndicXNLI |
|---|---|---|---|---|---|---|
| gemma-2-2b (Base) | Accuracy | 0.9180 | 0.8085 | 0.6570 | 0.5698 | 0.3782 |
| Binary F1 (Cls 1) | 0.9093 | N/A | N/A | 0.6013 | N/A | |
| Macro F1 | 0.9172 | 0.6463 | 0.5247 | 0.5671 | 0.3075 | |
| Paper Reported F1 | 0.9206 | 0.6384 | 0.6463 | 0.6577 | 0.2191 | |
| gemma-2-2b (Mr) | Accuracy | 0.9520 | 0.7424 | 0.4300 | 0.5158 | 0.4439 |
| Binary F1 (Cls 1) | 0.9502 | N/A | N/A | 0.6687 | N/A | |
| Macro F1 | 0.9519 | 0.7924 | 0.3043 | 0.3846 | 0.3551 | |
| Paper Reported F1 | ** | ** | ** | ** | - |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "google/gemma-2-2b"
adapter_id = "lubzo/gemma-2-2b-marathi-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter_id)
prompt = "खालील प्रश्नाचे उत्तर द्या:\nभारताची राजधानी कोणती आहे?\nउत्तर:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
## Limitations
- Trained on machine-translated data, not natively-authored Marathi — inherits translation artifacts and biases.
## Citation
```bibtex
@inproceedings{khade2025challenges,
title={Challenges in Adapting Multilingual LLMs to Low-Resource Languages using LoRA PEFT Tuning},
author={Khade, Omkar and Jagdale, Shruti and Phaltankar, Abhishek and Takalikar, Gauri and Joshi, Raviraj},
booktitle={Proceedings of the First Workshop on Challenges in Processing South Asian Languages (CHiPSAL 2025)},
year={2025}
}
Base model
google/gemma-2-2b