/ Модель

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

Лицензия
Своя лицензия
Базовая модель
Qwen2.5-3B
Опубликована
24 мая 2025

NileChat-3B

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

NileChat-3B — дообученная диалоговая модель для генерации текста на египетском и марокканском арабских диалектах с учётом местного культурного контекста.

439скачиваний за 30 дней24лайкавеса обновлены11 мая 2026

Бенчмарки

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

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

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

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

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

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

NileChat-3B — диалоговая языковая модель, разработанная UBC-NLP для египетских и марокканских сообществ. Это версия с инструктивной настройкой на базе Qwen/Qwen2.5-3B; модель содержит около 3 млрд параметров и предназначена для генерации ответов с учётом особенностей местных диалектов и культурного контекста.

Модель понимает и генерирует египетский и марокканский арабский на арабском письме и в Arabizi, а также работает с современным литературным арабским, французским и английским. Её сценарии применения включают диалог, создание локально релевантного контента и перевод между диалектами, литературным арабским, английским и французским. В README указано обучение на специально собранных языковых и культурных данных, включая материалы о наследии и ценностях Египта и Марокко.

NileChat-3B представлена как исследовательский proof of concept. Возможны фактические ошибки, чувствительность к формулировке запроса и нестабильность на очень длинных входах; важные ответы следует проверять. Лицензия обозначена в метаданных как other, поэтому конкретные условия использования следует уточнить в карточке модели.

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

  • диалог на египетском арабском письмом и Arabizi
  • диалог на марокканском арабском письмом и Arabizi
  • перевод между арабскими диалектами и современным литературным арабским
  • перевод между диалектным арабским, английским и французским
  • создание контента о культуре и повседневной жизни Египта и Марокко

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

NileChat-3B (Moroccan & Egyptian Arabic Dialectal LLM)

NileChat: Towards Linguistically Diverse and Culturally Aware LLMs for Local Communities

This is the instructed-tuned version of NileChat-3B (SFT). For the continued pre-trained version, please check this version.

NileChat is a 3-billion parameter Large Language Model (LLM) adapted for Egyptian and Moroccan communities. It is designed to incorporate their specific language dialects, cultural heritage, and values. The model demonstrates proficiency in both Egyptian and Moroccan dialectal Arabic (using Arabic script and Arabizi), while also maintaining strong performance in Modern Standard Arabic (MSA), French, and English.

This model is the proof-of-concept resulting from the research paper "NileChat: Towards Linguistically Diverse and Culturally Aware LLMs for Local Communities".

Model Description

NileChat was developed to address the underrepresentation of low-resource languages and local cultures in existing LLMs. Current models often rely on translating English corpora, leading to an alignment with the source language's culture rather than the target local communities.

The NileChat methodology focuses on creating synthetic and retrieval-based pre-training data tailored to a specific community by considering its:

  • (i) Language: Dialectal nuances, idiomatic expressions, and unique linguistic structures.
  • (ii) Cultural Heritage: Customs, traditions, social norms, historical context, and common knowledge.
  • (iii) Cultural Values: Ethical standpoints, belief systems, and societal priorities. These are referred to as the Language-Heritage-Values (LHV) dimensions.

The project provides:

  • A novel framework for augmenting pre-training corpora for local communities.
  • New datasets for Egyptian and Moroccan Arabic dialects.
  • The NileChat model itself.

Intended Uses

NileChat is intended to improve LLM accessibility and relevance for Egyptian and Moroccan Arabic-speaking communities. It can be used for tasks requiring:

  • Understanding and generation in Egyptian and Moroccan dialects (Arabic script and Arabizi).
  • Translation between these dialects, MSA, English, and French.
  • Culturally aware interactions and content generation relevant to Egyptian and Moroccan contexts.
  • Applications requiring alignment with local societal values.

How to Use

Example interactions

  • Prompt (Egyptian Arabic): "اديني خمس نصايح ازاي احافظ على وزني" (Give me five tips on how to maintain my weight)
  • Prompt (Moroccan Arabic): "شنو هوما أحسن بلايص ممكن تمشي ليهوم فمراكش؟" (What are the best places to visit in Marrakech?)
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "UBC-NLP/NileChat-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.bfloat16,
)
messages = [
    {"role": "user", "content": "شنو هوما أحسن بلايص ممكن تمشي ليهوم فمراكش؟"},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True, add_generation_prompt=True)
outputs = model.generate(**input_ids, max_new_tokens=1024)
print(tokenizer.decode(outputs[0]))

Training Data

NileChat's pre-training and fine-tuning datasets were specifically curated to imbue linguistic and cultural competence for Egyptian (EGY) and Moroccan (MOR) Arabic.

Pre-training Data

A novel data augmentation pipeline was used, combining:

  1. Machine Translation (MT) for Knowledge and Fluency:
    • English educational content (5.5 million texts from Fineweb-edu) was translated into EGY and MOR dialects using the Command R+ teacher model. Focus on educational domain for topical breadth.
  2. Controlled Generation for Cultural Heritage and Values:
    • Diverse texts (stories, personal essays, blog posts, reviews, conversations) were generated in the target language.
    • Components:
      • Local Contextual Information: From local news websites (approx. 1.5M EGY, 800k MOR articles in MSA).
      • Core Cultural Heritage Concepts: Extracted from country-specific Wikipedia portals (25k EGY, 49k MOR articles).
      • Linguistic and Cultural Expressions: Common expressions, proverbs, idioms, TV dialogues (600 utterances), and local terminology (4,000 dialect-to-English word pairs per dialect from Gatitos dictionary).
      • Representative Personas: 1,200 descriptions based on World Values Survey (WVS) data for Egyptian and Moroccan participants.
    • Generated ~300k samples per genre for EGY, and ~150k samples per genre for MOR.
  3. Retrieval for Local Cultural Heritage:
    • Brave Search API queried with 6,500 Moroccan and 4,500 Egyptian cultural concepts across ten categories (food, clothes, landmarks, etc.).
    • Collected 110k articles for EGY and 30k for MOR.

Arabizi Data: 1.5M generated educational/LHV samples for EGY and 0.5M for MOR were converted to Arabizi.

Final Pre-training Mixture: The generated and retrieved data were combined with pre-existing public data for EGY, MOR, MSA, English, French, Math, and Code to mitigate catastrophic forgetting. The resulting dataset comprises 98.57 billion words.

TypeNameHugging Face Link
DataFineweb-edu-MoroccoOpen In HF
DataFineweb-edu-EgyptOpen In HF
DataArabizi-EgyptOpen In HF
DataArabizi-MoroccoOpen In HF
DataLHV-EgyptOpen In HF
DataLHV-MoroccoOpen In HF
ModelNileChat-3BOpen In HF

Supervised Fine-Tuning (SFT) Data

Due to scarcity of SFT datasets for EGY and MOR, a comprehensive set was constructed by:

  • Translating the SmolTalk dataset into MOR, EGY, French, and MSA.
  • Generating synthetic dialectal QA pairs from the retrieved local cultural heritage dataset.
  • Incorporating the Darija-SFT-Mixture MOR dataset.
  • Translating the TULU-V2-mix dataset into EGY.
  • Converting understanding/generation tasks from ORCA and Dolphin benchmark training sets into instruction-response formats. A portion of this data was converted to Arabizi.

Training Procedure

Teacher Model

  • Command R+ (104B) was used as the teacher model for translation and controlled generation due to its reasonable text-generation capabilities in target dialects and open weights.

Continued Pre-training

  • Base Model: Qwen-2.5-3B was selected due to competitive performance and good tokenizer compression on MSA.
  • The full 3.1B parameter model was pre-trained for one epoch on the curated dataset (98.57 billion words).
  • Sequence Length: 4,096.
  • Learning Rate: Linearly decayed from $5 \times 10^{-6}$ to $5 \times 10^{-7}$.
  • Weight Decay: 0.1.
  • Gradient Clipping: Norms clipped at 1.0.
  • Compute: Data augmentation took 1,096 hours on 4x A100 80GB GPUs.Continued pre-training took 750 hours on 4x A100 80GB GPUs.

Supervised Fine-Tuning (SFT)

  • Two separate variants of the pre-trained model were fully fine-tuned: one for MOR and one for EGY, each on its respective dialectal data (Arabic script & Arabizi) plus shared multilingual data (English, MSA, French SmolTalk; ORCA & Dolphin data).
  • Epochs: 2 for each dialect-specific model.
  • Sequence Length: 4,096.
  • Learning Rate: Linearly decayed from $7 \times 10^{-6}$ to $7 \times 10^{-7}$.
  • Model Merging: The two fine-tuned variants were merged using weighted linear averaging to create the final NileChat model.

Evaluation

NileChat was evaluated on understanding, cultural knowledge, translation, and value alignment.

Understanding

  • Tasks: MMLU, HellaSwag, Belebele (adapted to EGY and MOR).
  • Results: NileChat demonstrated SoTA performance compared to similar sized models, significantly outperforming its baseline Qwen2.5-3B-instruct (e.g., by ~10 points on MMLU, HellaSwag, Belebele). It also outperformed larger Arabic-focused models like AceGPT-13B and Jais-13B, and achieved on-par performance with ALLAM-7B.

Cultural Knowledge

  • Task: Palm benchmark (public test set for Morocco and Egypt), evaluated using Gemma-3-27b as LLM-as-Judge.
  • Results: NileChat achieved scores of 5.72 (EGY) and 5.86 (MOR), significantly up from Qwen2.5-3B-instruct's 2.86 (EGY) and 2.31 (MOR). It surpassed AceGPT-7B and -13B on Moroccan cultural knowledge.

Translation

  • Tasks: Flores-200 and an in-house human-curated dataset of authentic EGY/MOR utterances. Directions: dialect-dialect, dialect-MSA, English-dialect, French-dialect. Metric: spBLEU, ChrF++.
  • Results: NileChat achieved the highest average translation quality (spBLEU: 21.32) among evaluated models, including NLLB-200-3.3B (18.29) and ALLaM-7B (20.60). On the in-house dataset reflecting authentic speech, NileChat significantly outperformed all baselines.

Value Alignment

  • Task: Adapted World Values Survey (WVS) questions into multiple-choice format in the local language, across 13 dimensions. Metric: Social Value Alignment (SVA).
  • Results: NileChat showed substantial improvements over the baseline across most societal-value dimensions for both Morocco and Egypt. The approach of using a teacher LLM for role-playing with local personas successfully steered responses towards culturally aligned positions.

Performance Evolution

  • Model performance showed a large boost during the first 10B pre-training tokens, stabilizing around 60B tokens for Belebele and translation tasks.

Results for MMLU, HellaSwag, Belebele and Palm (cultural Knowledge) are presented below:

ModelMMLUHellaSwagBelebelePalm
EGYMOREGYMOREGYMOREGYMOR
Less than 7B
Qwen3-1.7B28.5328.5328.4427.4722.8922.893.612.12
ar-stablelm-2-chat41.5640.3634.7933.4538.8936.114.203.62
Atlas-Chat-2B42.6144.8729.6634.7450.5655.673.163.42
Llama-3.2-3B-Instruct40.6837.5429.1628.2745.4435.893.212.28
gemma-3-4b-it40.7932.7034.2131.3537.3334.227.615.42
Qwen3-4B28.6128.5430.2829.0422.8922.894.512.71
Qwen2.5-3B-Instruct43.3744.4331.6229.5851.3341.442.862.31
NileChat (3B)57.5657.3637.9739.3372.6770.335.725.86
More than 7B
AceGPT-7B-chat40.2937.5733.2730.4732.6732.005.583.93
ALLaM-7B-Instruct60.0458.7239.4037.3069.5657.786.786.14
Qwen2.5-7B-Instruct49.6544.9834.6732.1664.2248.566.704.77
Qwen3-8B28.5328.5331.7630.3222.8922.895.883.96
Atlas-Chat-9B55.1758.8433.7144.3470.3374.115.244.84
gemma-3-12b-it61.1760.0038.5935.6675.7864.898.767.09
AceGPT-13B-chat45.4540.6835.0632.4038.7836.446.104.83
jais-13b-chat49.7948.1039.0236.5664.2253.785.664.80

Zero-shot performance of models on under- standing and cultural knowledge evaluations. Metrics are accuracy for MMLU, HellaSwag, and Belebele, and a 0-10 correctness score for Palm. Bold values indicate the highest score among models comparable in size to ours (< 7B) and the highest score in the entire column, including larger models.

Results for translation capabilities using Flores-200 and our in-house dataset are presented below:

ModelFlores-200In-House DataAverage
XX →→ XXXX →→ XX
EGYMOREGYMOREGYMOREGYMOR
Less than 7B
Qwen3-1.7B14.7510.8919.5115.4711.414.3615.636.3212.29
ar-stablelm-2-chat14.357.0711.109.729.232.9211.237.739.17
Atlas-Chat-2B15.2013.4021.3921.115.367.8314.5213.5414.05
Llama-3.2-3B-Instruct14.259.1519.2815.5410.673.1613.614.8711.32
gemma-3-4b-it9.275.2212.4610.133.010.6016.895.257.86
Qwen3-4B17.9311.6420.0318.9013.094.4420.728.5214.41
NLLB-200-3.3B23.9315.3725.8426.5716.777.4918.9011.4318.29
Qwen2.5-3B-Instruct15.1411.2720.5217.379.914.1919.247.8313.18
NileChat (3B)23.6016.4125.7425.5622.0212.3426.5018.3921.32
More than 7B
AceGPT-7B-chat18.0211.3321.1117.4614.734.9520.107.4714.40
ALLaM-7B-Instruct23.9115.8824.7423.1919.989.1629.4018.5120.60
Qwen2.5-7B-Instruct14.4110.2319.8118.9510.434.1020.928.8013.46
Qwen3-8B20.0313.8622.5621.3313.384.7324.149.2716.16
Atlas-Chat-9B18.2016.8924.9226.295.367.6817.3515.2316.49
gemma-3-12b-it13.014.8919.0519.547.862.4524.5112.3812.96
AceGPT-13B-chat19.4814.0222.8119.8415.545.5623.519.5216.29
jais-13b-chat8.804.2915.7717.1210.834.0219.1912.4711.56

Zero-shot translation performance (spBLEU) on the Flores and in-house datasets. XX →EGY and XX →MOR denote average over target languages EGY and MOR, respectively. Conversely, EGY → XX and MOR → XX indicate average over EGY and MOR as source languages. Bold values highlight the top score among models with fewer than 7 billion parameters and the highest score overall in each column.

Ethical Considerations

  • The work aims to develop inclusive, linguistically, and culturally diverse LLMs.
  • Pre-training and instruction-tuning data generation, while using a teacher LLM, was critically informed by ground-truth cultural values survey data (WVS) and local context.
  • Evaluations show reasonable alignment with the cultural heritage and values of the target communities.
  • No explicit safety alignment procedures were conducted. The authors strongly recommend thorough testing and further safety evaluations before any real-world deployment.

Limitations

As a smaller Large Language Model, NileChat-3B shares common limitations with other LLMs. These can include generating plausible yet incorrect information (hallucinations), sensitivity to prompt phrasing, and inconsistent performance with very long inputs. Although NileChat-3B aims to mitigate these issues, particularly for Arabic tasks, users should exercise critical judgment when evaluating its outputs, especially in crucial or fact-dependent situations.

Citation

If you use NileChat or the associated methodology, please cite the original paper:

@inproceedings{el-mekki-etal-2025-nilechat,
    title = "{N}ile{C}hat: Towards Linguistically Diverse and Culturally Aware {LLM}s for Local Communities",
    author = "El Mekki, Abdellah  and
      Atou, Houdaifa  and
      Nacar, Omer  and
      Shehata, Shady  and
      Abdul-Mageed, Muhammad",
    editor = "Christodoulopoulos, Christos  and
      Chakraborty, Tanmoy  and
      Rose, Carolyn  and
      Peng, Violet",
    booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
    month = nov,
    year = "2025",
    address = "Suzhou, China",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.emnlp-main.556/",
    doi = "10.18653/v1/2025.emnlp-main.556",
    pages = "10978--11002",
    ISBN = "979-8-89176-332-6"
}

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

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

GPU в ailist

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

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
af10fe4

0 моделей