Downloads · 30 days
14
10% of all-time downloads
ArashEslam/Gemma-2-2B-ar-stage2
Gemma-2-2B-ar-stage2 is a translation model from ArashEslam. Use it when you need text moved from one language to another. It is set up for peft. The card lists the license as gemma.
A biomedical English→Arabic LoRA adapter for unsloth/gemma-2-2b-bnb-4bit, trained on 25k en→ar sentence pairs from PEACH (r=16, alpha=16, all seven projection matrices, one epoch).
Downloads · 30 days
14
10% of all-time downloads
All-time downloads
138
Public
Repo size
164 MB
Likes
0
Public
Click a slice to open those files.
.safetensors83.1 MB · 51%
From the Hugging Face model README
A biomedical English→Arabic LoRA adapter for unsloth/gemma-2-2b-bnb-4bit, trained on 25k en→ar sentence pairs from PEACH (r=16, alpha=16, all seven projection matrices, one epoch).
Together with SarpHarbali/Gemma-2-2B-fa-stage2, this adapter is a required input to every merging recipe in the paper: each merged adapter is a deterministic function of the two. For Arabic translation on its own, ArashEslam/Gemma-2-2B-ar-fa-stage3-r32 is stronger.
This is a LoRA adapter, not a merged model: the base model is required at inference time.
CHrF++ (sacrebleu, --chrf-word-order 2, 0–100) on the 971-sentence TICO-19 development split.
| Direction | dev |
|---|---|
| en→ar | 40.42 |
Apply CAMeL Tools Unicode normalisation to hypotheses and references before scoring.
Reproduce it exactly; quality degrades noticeably with other phrasings. {language} is Arabic.
Translate the below text from English to {language}. Only output the final translation in {language}; do not include any additional text.
### English text:
{source}
### {language} translation:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "unsloth/gemma-2-2b-bnb-4bit"
ADAPTER = "ArashEslam/Gemma-2-2B-ar-stage2"
LANGUAGE = "Arabic"
PROMPT = (
"Translate the below text from English to {language}. Only output the final "
"translation in {language}; do not include any additional text.\n\n"
"### English text:\n{source}\n\n"
"### {language} translation:\n"
)
tokenizer = AutoTokenizer.from_pretrained(BASE)
model = AutoModelForCausalLM.from_pretrained(BASE, device_map="auto", torch_dtype=torch.bfloat16)
model = PeftModel.from_pretrained(model, ADAPTER)
model.eval()
source = "Wash your hands with soap and water for at least 20 seconds."
inputs = tokenizer(
PROMPT.format(language=LANGUAGE, source=source),
return_tensors="pt", truncation=True, max_length=256,
).to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
decoded = tokenizer.decode(output[0], skip_special_tokens=True)
print(decoded.split(f"### {LANGUAGE} translation:")[-1].strip())
Greedy decoding is required to reproduce the reported scores. The model continues past the prompt, so splitting on the ### {language} translation: marker and keeping the final segment is not optional.
This is a research artifact. It must not be used for clinical decision-making, patient communication, or any other safety-critical purpose without qualified human review. Translation errors in healthcare lead to misunderstanding, delayed treatment, and direct patient harm.
Numbers, dosages, units, and dates are not reliably preserved. Do not use this model where a numeric value carries clinical meaning unless every figure is verified against the source.
It is a general-purpose LLM adapted with LoRA, not a system engineered for translation, and is subject to hallucination, prompt sensitivity, and fluent-but-wrong output — the most dangerous failure mode in a medical register, because the output looks correct. Scores are measured on TICO-19 public-health text; performance on specialised clinical, pharmaceutical, or diagnostic terminology is unmeasured and likely worse. Professional medical translator evaluation is required before any deployment.
Use of this adapter is subject to the Gemma Terms of Use and the Gemma Prohibited Use Policy.
@article{alabdullah2026biomedical,
title = {Biomedical Machine Translation for Low-Resource Arabic-Script Languages
via Cross-Lingual Transfer and {LoRA} Adapter Merging},
author = {Alabdullah, Abdullah and Eslamighayour, Arash and
Harbalioglu, Sarp and Han, Lifeng},
journal = {arXiv preprint arXiv:2607.22300},
year = {2026},
url = {https://arxiv.org/abs/2607.22300}
}