/ Модель

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

Контекст
8 192 токена
Параметры
51,8 млн
Лицензия
Apache 2.0
Архитектура
gemma3_text · dense
Базовая модель
Nawah-50M-RAG-Chat-8K
Библиотека
transformers
Опубликована
14 авг 2026

Nawah-50M-RAG-Chat-8K-GRPO

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

Небольшая арабоязычная модель для многоходовых ответов службы поддержки по предоставленным документам в контексте до 8 192 токенов.

162скачиваний за 30 дней0лайковвеса обновлены20 авг 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Nawah-50M-RAG-Chat-8K-GRPO — небольшая модель поддержки клиентов на современном стандартном арабском языке, разработанная oddadmix. Это дообученная методом GRPO версия Nawah-50M-RAG-Chat-8K: 51,8 млн параметров, архитектура Gemma3ForCausalLM с 12 слоями и контекстом до 8 192 токенов. Десять слоёв используют скользящее окно внимания на 1 024 токена, два — глобальное внимание.

Модель предназначена для многоходовых ответов на вопросы по предоставленным базам знаний: она поддерживает диалог до пяти раундов, учитывает уточнения пользователя и должна отказываться отвечать, если нужных сведений в отрывках нет. Она не выполняет поиск сама: документы и результаты извлечения необходимо передать в запросе. Для диалога используется формат ChatML; в системное сообщение можно включить отдельные данные учётной записи клиента.

В описанной оценке GRPO-версия снизила долю галлюцинаций по сравнению с базовой SFT-моделью, но в 29,1% отвеченных ходов всё ещё появлялись неподтверждённые числа. На длинном контексте качество ниже, чем на среднем; модель может выбрать неверный отрывок, не рассчитана на диалектный арабский и не умеет надёжно вычислять значения. Авторы рекомендуют исследовательское и прототипное применение и не советуют использовать модель с клиентами без участия человека. Лицензия — Apache-2.0.

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

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

Ограничения

Ограничена современным стандартным арабским языком, контекстом 8 192 токена и качеством переданных отрывков; модель сама не выполняет поиск и может выбрать нерелевантный отрывок. В оценке 29,1% отвеченных ходов содержали неподтверждённые числа; вычисления и применение к клиентским обращениям без участия человека не рекомендуются.

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

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

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

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

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

Открыть на Hugging Face

Nawah-50M-RAG-Chat-8K-GRPO

A 51.8M-parameter Arabic (MSA) retrieval-augmented customer-support model that holds a conversation over an 8,192-token knowledge base — roughly 50 passages — and answers from those passages only.

It is the multi-turn, long-context sibling of Nawah-50M-RAG-Support-2K. Where that model answers one question against ~8 passages, this one tracks a 5-round dialogue across ~50, resolves pronouns and ellipsis between turns, handles a customer correcting themselves mid-conversation, and refuses when a follow-up asks for something the passages do not contain.

Parameters51,801,088
ArchitectureGemma3ForCausalLM — 12 layers, hidden 512
Attention10 sliding-window layers (1,024) + 2 global at positions 5 and 11
Context8,192 tokens (~50 passages)
Vocabulary32,002 — Arabic-first byte-level BPE + 2 ChatML tokens
ConversationMulti-turn, 1–5 rounds, with optional per-customer account block
Post-trainingSFT → GRPO

Quick numbers

Gold-forced multi-turn replay over the held-out split — 1,651 turns across 632 conversations, company-disjoint from training. Judged by Gemma-4-31B; score is 0–2 over answerable turns.

SFT basethis model (GRPO)
score — all0.720.86
score — short / mid / long0.73 / 0.72 / 0.710.84 / 0.93 / 0.81
hallucination38.1%29.1%
part-coverage50.1%58.5%
aggregation-recall53.0%53.7%
distractor-number rate22.4%20.7%
chrF++43.7546.93
mid-conversation refusal95.3%93.9%

Quality holds across the conversation, which is the thing a 51.8M model was least likely to manage:

round01234
score0.900.850.770.850.84
hallucination31.6%27.3%27.3%26.6%33.9%

The hallucination result is paired, not a difference of headline means: against the previous reward set this model is better on 266 turns and worse on 134 (exact two-sided sign test, p = 3.9e-11), holding independently in the short bucket (86/44, p = 2.9e-04) and the long bucket (96/53, p = 5.4e-04). Score moves too, but far more weakly (262/214, p = 0.031) — the gold-coverage reward moved specifically what it was written to move.

Cost: replies grew from 37.2 to 41.2 words on average, and mid-conversation refusal gave up 1.4pp.

Usage

ChatML. The system turn carries the support preamble, an optional customer account block, then the numbered passages. Then the conversation alternates.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

REPO = "oddadmix/Nawah-50M-RAG-Chat-8K-GRPO"
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.float32).eval()

chunks = [
    "الباقة الذهبية بسعر 150 ريالاً شهرياً وتشمل توصيلاً مجانياً.",
    "رسوم التأخر في السداد 25 ريالاً بعد مرور 7 أيام من تاريخ الاستحقاق.",
]
system = (
    "أنت مساعد خدمة عملاء. أجب عن سؤال العميل بالفصحى اعتماداً فقط على المعلومات "
    "التالية. إذا لم تكن الإجابة موجودة في المعلومات، فقل ذلك بأدب واعرض تحويل "
    "العميل إلى أحد موظفي خدمة العملاء."
    "\n\n" + "\n".join(f"[{i}] {c}" for i, c in enumerate(chunks, 1))
)

messages = [
    {"role": "system",    "content": system},
    {"role": "user",      "content": "كم سعر الباقة الذهبية؟"},
    {"role": "assistant", "content": "الباقة الذهبية بسعر 150 ريالاً شهرياً."},
    {"role": "user",      "content": "وكم لو تأخرت أسبوع؟"},   # ellipsis: needs turn 1
]
enc = tok.apply_chat_template(
    messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**enc, max_new_tokens=160, do_sample=False, pad_token_id=1)
print(tok.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))

The system string above is verbatim the training format — preamble, blank line, then passages numbered [1], [2], … one per line. Paraphrasing the preamble or dropping the numbering degrades grounding.

The account block

An optional per-customer record goes between the preamble and the passages, separated by a blank line, and stays outside the [n] numbering:

بيانات حساب العميل:
رقم الحساب: 8821-4403
الباقة الحالية: الباقة الذهبية
الرصيد المستحق: 0 ليرة لبنانية
تاريخ الاستحقاق: 2024-12-15

It sits outside the numbering on purpose: in production that record arrives from a billing system, not from retrieval, and the model is trained to let a per-customer figure override the generic policy passage. 55% of training conversations carry one.

How it was built

  1. Pretraining. oddadmix/50M-8192-Nawah-gemma — a Gemma-3-architecture Arabic base trained from scratch at 8,192 context on 20B tokens. The interleaved 10-sliding/2-global layout is what makes an 8K window affordable at this size: attention FLOPs per token drop from 453M (all-global) to ~13M.
  2. Multi-turn SFT → Nawah-50M-RAG-Chat-8K on arabic-rag-chat-30K: 30,662 conversations of 1–5 rounds over knowledge bases stratified short (~1K) / mid (3–5K) / long (6–7K). Loss lands on every assistant turn.
  3. GRPO — this checkpoint — on arabic-rag-chat-grpo-5K, a company-disjoint pool. Prompts are gold-forced replays of round k with rounds 0..k−1 filled in from reference answers, capped at 4,096 tokens: 3,046 prompts, 725 multi-part and 1,270 multi-gold.

The SFT model's measured failure was never fluency or format — it answers in the right shape. It was passage discrimination: it cited a distractor figure in 22.4% of answerable turns and covered only 50.1% of the key facts a question asked for. GRPO targeted that directly, with seven programmatic rewards and no judge in the loop:

rewardwhat it scores
number groundingevery number in the reply must occur in the gold chunks, the account block, or the question; numbers found only in distractor chunks — or nowhere — are penalised
gold coveragen-gram overlap with the gold passages specifically, so quoting the right passage beats quoting a plausible neighbour
part coveragefraction of a multi-part question's key facts actually present in the reply
aggregation recallfor turns needing ≥2 gold chunks, the fraction contributing at least one key fact
refusal correctnessrefuse iff the answer is not in the context
chrF to the gold answeranchors content and MSA fluency
sanityArabic-script prose of reasonable length

Training ran on a single consumer GPU.

Limitations

  • Ten of twelve layers use a 1,024-token sliding window. A passage 6,000 tokens back reaches the answer through two global layers only. This is why the long bucket (0.81) still trails the mid bucket (0.93). Better data and better rewards improve passage selection; they do not change the architecture.
  • 29.1% of answered turns still contain an ungrounded number. Much better than the 38.1% it started from, and far from solved. This is a 51.8M model — do not put it in front of customers without a human path.
  • Passage discrimination is the core weakness. In practice it usually finds the right topic and sometimes the wrong specific passage.
  • Modern Standard Arabic only. Dialectal input is out of distribution.
  • It quotes, it does not compute. Trained to repeat figures, never to derive them. Do not ask it to total a bill.
  • 8,192 tokens is a hard ceiling, and retrieval quality is the real one — this model does not retrieve. Everything above assumes you supply the gold passage among the candidates.
  • The judge is one model's opinion. Treat the 0–2 score as a comparison between rows of these tables, not an absolute. The judge-free columns (part-coverage, aggregation-recall, distractor-number) are string tests and are the more literal measurements.

Reproducing the numbers

Every figure here is recomputable from arabic-rag-chat-8k-eval: the test split, 15 models' raw replies, 13 sets of judge verdicts, and the rendered per-model reports. This model is chat-grpo-v3; its SFT base is chat-s1.

model.safetensors has SHA-256 5b5fea657c15b661a680b2976700f643f8f12bf32b4551ceffcbc6fd0f20b291 — the GRPO v3 policy.

Intended use

Research and prototyping of grounded, multi-turn Arabic question answering, and a baseline for how small a long-context conversational RAG model can get. No general instruction tuning, no safety alignment, and no knowledge of its own — outside the passages you give it, it has nothing to say.

Citation

@misc{nawah50mrag8k,
  title  = {Nawah-50M-RAG-Chat-8K-GRPO: a 51.8M-parameter multi-turn long-context Arabic RAG model},
  author = {Wasfy, Ahmed},
  year   = {2026},
  url    = {https://huggingface.co/oddadmix/Nawah-50M-RAG-Chat-8K-GRPO}
}

© KAND CA 2026 — PROJECT NAWAH

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Gemma3ForCausalLM
Ревизия весов
233b386

0 моделей