srirag/alexmt-gemma4-e4b-dpo-bwspbleu-lr5e7
The srirag/alexmt-gemma4-e4b-dpo-bwspbleu-lr5e7 model is a 7.9 billion parameter Gemma-4-E4B-based model fine-tuned for context-aware English to dialectal Arabic and dialectal Arabic to English translation. Developed by srirag, this model specializes in conversational turns across nine Arabic varieties, leveraging DPO training on the Alexandria dataset. It is specifically optimized for accurate translation within conversational contexts, considering elements like domain, participants, and gender direction.
Loading preview...
Overview
This model, srirag/alexmt-gemma4-e4b-dpo-bwspbleu-lr5e7, is a 7.9 billion parameter Gemma-4-E4B variant specifically fine-tuned for context-aware English ↔ dialectal Arabic translation in conversational settings. It was trained using DPO (Direct Preference Optimization) on the Alexandria dataset, focusing on improving translation quality for conversational turns.
Key Capabilities
- Bidirectional Translation: Translates between English and nine varieties of dialectal Arabic (EG, JO, LB, MR, OM, PS, SA, SY, YE).
- Context-Aware: Utilizes up to three prior turns, domain, participants, and speaker/addressee gender direction for more accurate and nuanced translations.
- DPO Fine-tuning: Enhanced through DPO with preference pairs generated by ranking SFT model outputs using sentence spBLEU against human references.
- Conversational Focus: Optimized for translating individual turns within a dialogue, making it suitable for chat-based applications.
Performance Highlights
Evaluated on the Alexandria public test split, this model shows improved performance over its SFT base model (alexmt-gemma4-e4b-sft). For English to dialectal Arabic, it achieves 29.27 spBLEU and 44.31 chrF++. For dialectal Arabic to English, it reaches 51.14 spBLEU and 66.22 chrF++. It's important to note that these scores are based on a specific setup and are not directly comparable to the Alexandria paper's results or the AlexandriaX shared task.
Usage
The model expects Alexandria's JSON prompt format for input and outputs a JSON object with the translated text. Users should apply the tokenizer's chat template with add_generation_prompt=True and enable_thinking=False.