/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
1,5 млрд
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-1.5B-Instruct
Опубликована
19 авг 2026

qwen-egyptian-translator

Генерация текстаТекст → текст3 профессии

Модель переводит разговорный египетский арабский на английский и английский на египетский арабский, стараясь сохранять живую диалектную речь.

121скачиваний за 30 дней2лайкавеса обновлены21 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Qwen Egyptian Translator — диалоговая языковая модель на базе Qwen2.5-1.5B-Instruct, разработанная Mohamed Wasef для перевода разговорного египетского арабского и английского в обоих направлениях. Модель дообучена методом LoRA, а адаптер объединён с базовыми весами; используется архитектура Qwen2 с плотной сетью, 1,5 млрд параметров и точностью fp16. Контекст составляет до 32 768 токенов.

Модель предназначена для перевода коротких и средних разговорных текстов: сообщений, публикаций в соцсетях и повседневных диалогов. Её особенность — сохранение египетского диалекта вместо перехода к литературному арабскому. В описанной оценке качество на тестовом наборе составило 67,5% по критерию семантической точности от 4 баллов из 5; автоматические метрики отдельно приведены для обоих направлений перевода.

Редкие слова и идиомы могут переводиться ошибочно, особенно в коротких фразах без контекста. Модель не предназначена для формальных, юридических, медицинских и технических документов. Лицензия — Apache-2.0.

Сценарии применения

  • перевод египетских арабских сообщений на английский
  • перевод английских сообщений на разговорный египетский арабский
  • перевод повседневных диалогов и переписок
  • перевод публикаций в соцсетях с египетского арабского
  • перевод коротких разговорных фраз между английским и египетским арабским

Ограничения

Редкая лексика и идиомы могут переводиться неверно, особенно в коротких фразах с малым контекстом. Модель не предназначена для формальных, юридических, медицинских или технических документов.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen Egyptian Translator

A fine-tuned version of Qwen2.5-1.5B-Instruct, specialized in bidirectional translation between Egyptian Colloquial Arabic and English — explicitly trained to avoid Modern Standard Arabic (MSA/Fus'ha), which is the default behavior of most general-purpose Arabic translation models.

Why this model exists

Most Arabic translation systems default to Modern Standard Arabic, which sounds formal and unnatural in everyday conversation. This model was fine-tuned specifically to produce and understand Egyptian dialect — the way people actually speak — in both translation directions (Arabic → English and English → Arabic).

Model Details

  • Base model: Qwen/Qwen2.5-1.5B-Instruct
  • Fine-tuning method: LoRA (Low-Rank Adaptation), merged into the base weights
  • Precision: fp16 (full merged weights, no quantization)
  • Training data: 25,000-row stratified sample from a cleaned dataset of 94,706 Egyptian Arabic ↔ English sentence pairs (sourced from real conversational transcripts — video, podcast, and social content)
  • Training epochs: 2
  • Hardware: Kaggle T4 GPU (single GPU, fp16 training)

Example Translations

Egyptian Arabic → English
إزيك يا صاحبي، عامل إيه؟Hey buddy, how are you?
الدنيا وحشة النهاردة، حاسس إني تعبان شوية.Life is tough today, I feel a bit tired.
يا نهار أبيض، ده كلام مش معقول خالص!Oh my goodness, this is pure nonsense!
English → Egyptian Arabic
I need to buy some vegetables from the market.لازم أشتري شوية خضار من السوق.
Ahmed told me he's going to Cairo next Friday at 5 PM.أحمد قال لي إنه رايح القاهرة يوم الجمعة الجاية الساعة ٥ بالليل.
Honestly, I don't think this plan is going to work out well.بصراحة، أنا مش شايف إن الخطة دي هتطلع كويسة.

How to Use

Install the required library:

pip install transformers accelerate torch

Run the example below directly — it downloads the model automatically the first time it runs:

from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL_NAME = "mohamedwasef/qwen-egyptian-translator"

tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, dtype="float16")

SYSTEM_PROMPT = (
    "You are an expert bilingual translator specialized in Egyptian Arabic and English. "
    "When translating into Arabic, you must use Egyptian Colloquial Arabic (اللهجة المصرية العامية), "
    "never Modern Standard Arabic (الفصحى). "
    "Preserve the original meaning, tone, register, names, numbers, punctuation, and formatting exactly. "
    "Output only the translation itself, with no additional commentary, explanations, or notes."
)

def translate(text: str, direction: str) -> str:
    instruction = (
        f"Translate the following Egyptian Arabic text to English:\n{text}"
        if direction == "ar2en"
        else f"Translate the following English text to Egyptian Arabic:\n{text}"
    )
    messages = [
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user", "content": instruction},
    ]
    inputs = tokenizer.apply_chat_template(
        messages, tokenize=True, add_generation_prompt=True,
        return_tensors="pt", return_dict=True,
    )
    output_ids = model.generate(
        **inputs, max_new_tokens=200, do_sample=False,
        pad_token_id=tokenizer.pad_token_id,
    )
    generated = output_ids[0][inputs["input_ids"].shape[1]:]
    return tokenizer.decode(generated, skip_special_tokens=True)

print(translate("إزيك يا صاحبي، عامل إيه؟", "ar2en"))
# → "Hey buddy, how are you?"

Note: Greedy decoding (do_sample=False) is recommended for translation tasks to ensure deterministic, reproducible output.

Evaluation

Evaluated using an LLM-as-judge methodology (GPT-4o-mini scoring 1–5 on semantic accuracy) on a held-out test set never seen during training.

ModelSemantic Accuracy (score ≥ 4)
Base Qwen2.5-1.5B-Instruct (zero-shot, no fine-tuning)28.7%
This fine-tuned model67.5%
Improvement+38.8 points

Fine-tuning did not just adjust style — it substantially reduced hallucinations. The base model frequently produced non-Arabic/non-English text (e.g. Chinese characters) and made factual errors (mistranslated numbers, names, and common words) that the fine-tuned model largely avoids.

Supporting automated metrics (computed on the full test set):

DirectionchrF++BLEU
Egyptian Arabic → English57.2535.74
English → Egyptian Arabic44.5218.24

BLEU/chrF scores are reported as supporting metrics only, not the primary quality measure. Egyptian Colloquial Arabic has no standardized spelling (e.g. "عايز" vs "عاوز" are both correct), so lexical-overlap metrics penalize valid dialectal variation. The LLM-judge score above is the primary indicator of translation quality.

Known Limitations

  • Trained on a subset of the available data. The full cleaned dataset contains 94,706 pairs; this model was trained on a 25,000-row stratified sample to keep training time within a single GPU session. This is a deliberate time/scope trade-off, not a data quality issue — the full dataset was cleaned and validated, but not all of it was used for this training run.
  • Rare vocabulary can be mistranslated. Words or phrases that appeared infrequently in the training sample (e.g. specific food names, uncommon idioms) are more likely to be translated incorrectly, especially in short sentences with little surrounding context.
  • GGUF (quantized) inference is not yet fully validated. A quantized version for CPU-efficient serving was built via llama.cpp, but showed a measurable accuracy gap compared to the full-precision model that has not yet been root-caused. The fp16 model (this repository) is the recommended version for accuracy-sensitive use.

Training Configuration

LoRA: r=16, alpha=32, dropout=0.05, target_modules=all-linear
Learning rate: 2e-4 (cosine schedule, warmup_ratio=0.03)
Batch size: 4 (per device), gradient_accumulation_steps=8 → effective batch size 32
Precision: fp16
Max sequence length: 768 tokens
Loss: completion-only (loss computed on the translation output only, not the prompt)

Intended Use

This model is intended for translating short-to-medium conversational text between Egyptian Arabic and English — chat messages, social media content, casual conversation. It is not intended for formal, legal, medical, or technical document translation, where Modern Standard Arabic and precise terminology are required.

Citation

This is a portfolio/personal project built end-to-end (data cleaning, LoRA fine-tuning, evaluation, and deployment). Not affiliated with an academic publication.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
658b455

0 моделей