Gemma-2-2B-ar-stage2

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.

Scores

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.

Prompt template

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:

Usage

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.

⚠ Intended use and safety

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.

Links

Use of this adapter is subject to the Gemma Terms of Use and the Gemma Prohibited Use Policy.

Citation

@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}
}
Downloads last month
18
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ArashEslam/Gemma-2-2B-ar-stage2

Adapter
(41)
this model

Paper for ArashEslam/Gemma-2-2B-ar-stage2