Instructions to use pushkarsharma/arabic-translation-challenge-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use pushkarsharma/arabic-translation-challenge-adapters with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Arabic-Centric Machine Translation โ Fine-Tuned Checkpoints
LoRA adapters for Arabic-centric machine translation across six directions (arโen, arโhi, arโur), covering the models evaluated in the accompanying Arabic-Centric Machine Translation Framework.
Code: https://github.com/p-sharma-7/Arabic-Translation-Challenge
Contents
Each directory is <family>/<direction>/ and holds a PEFT adapter plus the
tokenizer files saved alongside it.
| Family | Base model | Directions |
|---|---|---|
acegpt/ |
FreedomIntelligence/AceGPT-v2-8B-Chat |
6 |
fanar/ |
QCRI/Fanar-1-9B-Instruct |
6 |
gemmax2/ |
ModelSpace/GemmaX2-28-9B-v0.1 |
6 |
hala9b/ |
hammh0a/Hala-9B |
6 |
translategemma/ |
google/translategemma-4b-it |
6 |
madlad/ |
google/madlad400-10b-mt |
5 (no ar-ur) |
nllb/ |
facebook/nllb-200-3.3B (full fine-tune) |
6 โ weights truncated, see below |
Directions are ar-en, en-ar, ar-hi, hi-ar, ar-ur, ur-ar.
LoRA configuration
Identical across all families: r=16, alpha=32, dropout=0.05, task_type
varying with the base architecture. Target modules follow each architecture:
- Decoder-only (
acegpt,fanar,gemmax2,hala9b):q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj - T5-style (
madlad):q, k, v, o, wi_0, wi_1, wo translategemma: the decoder-only set plusfc1, fc2, out_proj
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
from huggingface_hub import snapshot_download
path = snapshot_download(
"pushkarsharma/arabic-translation-challenge-adapters",
allow_patterns="fanar/ar-en/*",
)
base = AutoModelForCausalLM.from_pretrained("QCRI/Fanar-1-9B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base, f"{path}/fanar/ar-en")
tok = AutoTokenizer.from_pretrained(f"{path}/fanar/ar-en")
To reconstruct the layout the code expects, fetch the whole set into
finetuned_checkpoints/ at the repo root:
from huggingface_hub import snapshot_download
snapshot_download(
"pushkarsharma/arabic-translation-challenge-adapters",
local_dir="finetuned_checkpoints",
)
Several base models are gated โ request access on the Hub and authenticate
(hf auth login, or set HF_TOKEN) before loading.
Known issue: NLLB checkpoints
The nllb/ directories are included here for completeness, but their weights
are truncated and cannot be loaded. Each model-0000*-of-00002.safetensors
shard is exactly 5 MiB, while the safetensors header declares 687 tensors
requiring ~6.23 GiB per direction โ shard 1 alone is missing ~4.99 GB.
transformers will fail on them.
What is usable in nllb/: config.json, generation_config.json,
model.safetensors.index.json, the tokenizer files, and training_args.bin,
which together record the NLLB run's configuration. To obtain working NLLB
weights, re-run that fine-tuning pipeline. The six LoRA families above are
unaffected.
- Downloads last month
- -
Model tree for pushkarsharma/arabic-translation-challenge-adapters
Base model
FreedomIntelligence/AceGPT-v2-8B-Chat