EGY-JEV: Egyptian Arabic Decision Model

EGY-JEV is a Qwen3.5-2B model fine-tuned with LoRA on Egyptian Arabic decision questions. Given a short state, a question, and candidate labels, it predicts one of the labels. The distributed checkpoint contains merged BF16 weights. The training dataset is not included.

Example input

The input uses the same state and typed questions shape as the client examples. targets are evaluation labels and should not be sent to the model. This sample includes one question; for a multi-question case, run one generation per question with the same state.

sample = {
    "state": (
        "ุงู„ุนู…ูŠู„ ูƒุงุชุจ ููŠ ุงู„ุดุงุช: ยซุงู„ู…ูˆู‚ุน ุจุทูŠุก ุฌุฏู‹ุง ูˆุตูุญุฉ ุงู„ุฏูุน ู…ุจุชุญู…ู„ุด ุนู†ุฏูŠ. "
        "ุฑู‚ู… ู…ุฑุฌุน ุงู„ุทู„ุจ ุฃูˆ ุงู„ุญุณุงุจ ู…ุฐูƒูˆุฑ ุจูˆุถูˆุญ ููŠ ุงู„ุฑุณุงู„ุฉุŒ ูˆุงู„ุชูุงุตูŠู„ ุงู„ุฃุณุงุณูŠุฉ "
        "ุงู„ู…ุทู„ูˆุจุฉ ู…ูˆุฌูˆุฏุฉ. ู…ููŠุด deadline ุงู„ู†ู‡ุงุฑุฏู‡ุŒ ูˆุงู„ุฎุฏู…ุฉ ุงู„ุจุฏูŠู„ุฉ ุดุบุงู„ุฉ ู…ุคู‚ุชู‹ุง. "
        "ุงู„ู…ูˆุถูˆุน ู…ุณุจุจู„ูŠ ุชูˆุชุฑ ูˆู…ุญุชุงุฌ ุฃูู‡ู… ุงู„ู„ูŠ ุจูŠุญุตู„. ูˆูƒู…ุงู† ุทู„ุจ ุฅู„ุบุงุก ุงู„ุฎุฏู…ุฉ ูƒุทู„ุจ "
        "ุฅุถุงููŠุŒ ู…ุน ุฅู† ุณุจุจ ุชูˆุงุตู„ู‡ ุงู„ุฃุณุงุณูŠ ู‡ูˆ ุงู„ู…ุดูƒู„ุฉ ุงู„ู„ูŠ ุดุฑุญู‡ุง.ยป ู…ุฑุฌุน ุงู„ู…ุญุงุฏุซุฉ "
        "ุงู„ุฏุงุฎู„ูŠ 90028."
    ),
    "questions": {
        "customer_intent": {
            "type": "choice",
            "instructions": (
                "ุฅูŠู‡ ุงู„ุทู„ุจ ุงู„ุฃุณุงุณูŠ ุงู„ู„ูŠ ุงู„ุนู…ูŠู„ ู…ุญุชุงุฌ ู…ุณุงุนุฏุฉ ููŠู‡ุŸ ุงุฎุชุงุฑ ุงู„ู†ูŠุฉ "
                "ุงู„ุฑุฆูŠุณูŠุฉ ู…ู† ูƒู„ุงู…ู‡ุŒ ู…ุด ู…ุฌุฑุฏ ูƒู„ู…ุฉ ุธู‡ุฑุช ููŠ ุงู„ุฑุณุงู„ุฉ."
            ),
            "criteria": {
                "refund": "ุงุณุชุฑุฏุงุฏ ู…ุจู„ุบ ู…ุฏููˆุน",
                "payment_issue": "ู…ุฑุงุฌุนุฉ ุฏูุน ุฃูˆ ุฎุตู… ุฃูˆ ุชุญูˆูŠู„",
                "account_access": "ุงู„ุฏุฎูˆู„ ู„ู„ุญุณุงุจ ุฃูˆ ุงุณุชุนุงุฏุชู‡",
                "technical_support": "ุญู„ ุนุทู„ ุชู‚ู†ูŠ ููŠ ุงู„ุชุทุจูŠู‚ ุฃูˆ ุงู„ู…ูˆู‚ุน",
                "delivery": "ู…ุชุงุจุนุฉ ุงู„ุดุญู†ุฉ ุฃูˆ ุงู„ุชูˆุตูŠู„",
                "return_exchange": "ุฅุฑุฌุงุน ุฃูˆ ุงุณุชุจุฏุงู„ ู…ู†ุชุฌ",
                "cancellation": "ุฅู„ุบุงุก ุฎุฏู…ุฉ ุฃูˆ ุงุดุชุฑุงูƒ ุฃูˆ ุญุฌุฒ",
                "reschedule": "ุชุบูŠูŠุฑ ู…ูˆุนุฏ ู…ุน ุงู„ุงุณุชู…ุฑุงุฑ ููŠ ุงู„ุฎุฏู…ุฉ",
                "information": "ุงุณุชูุณุงุฑ ุนู† ู…ุนู„ูˆู…ุฉ ุฃูˆ ุณูŠุงุณุฉ",
                "complaint": "ุชู‚ุฏูŠู… ุดูƒูˆู‰ ุนู„ู‰ ุชุฌุฑุจุฉ ุฃูˆ ุชุนุงู…ู„",
                "billing_dispute": "ุงู„ุงุนุชุฑุงุถ ุนู„ู‰ ูุงุชูˆุฑุฉ ุฃูˆ ู…ุจู„ุบ ู…ุญุณูˆุจ",
                "order_change": "ุชุนุฏูŠู„ ุทู„ุจ ู‚ุงุฆู… ู‚ุจู„ ุชู†ููŠุฐู‡",
            },
        }
    },
}

EGY-JEV is a standard generative Qwen model, not the d3-nano model and does not implement its system_one method. For EGY-JEV, serialize each question with its state into the chat message as shown below.

Run with vLLM

Install vLLM using the instructions for your CUDA environment. Qwen3.5 support requires vLLM 0.32.0 or newer. Start the OpenAI-compatible server:

vllm serve AhmedReda25300/EGY-JEV \
  --dtype bfloat16 \
  --max-model-len 8192 \
  --served-model-name EGY-JEV

Install the OpenAI Python client and run this in the same Python session as the sample above:

pip install openai
import json
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
question_name, question = next(iter(sample["questions"].items()))
labels = list(question["criteria"])
model_input = {
    "state": sample["state"],
    "question_name": question_name,
    **question,
}
response = client.chat.completions.create(
    model="EGY-JEV",
    messages=[
        {
            "role": "system",
            "content": "You are a decision model. Read the JSON input and answer with ONLY the label.",
        },
        {"role": "user", "content": json.dumps(model_input, ensure_ascii=False)},
    ],
    temperature=0,
    max_tokens=16,
    extra_body={"structured_outputs": {"choice": labels}},
)
print(response.choices[0].message.content)

Run with Transformers

This path requires an NVIDIA GPU, CUDA-enabled PyTorch, Transformers 5.19.0 or newer, and Accelerate:

pip install "transformers>=5.19.0" accelerate

Load the model from the Hub and generate a response. Run this in the same Python session as the sample above:

import json
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer

model_id = "AhmedReda25300/EGY-JEV"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

question_name, question = next(iter(sample["questions"].items()))
model_input = {
    "state": sample["state"],
    "question_name": question_name,
    **question,
}
messages = [
    {
        "role": "system",
        "content": "You are a decision model. Read the JSON input and answer with ONLY the label.",
    },
    {
        "role": "user",
        "content": json.dumps(model_input, ensure_ascii=False),
    },
]
inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    enable_thinking=False,
    return_tensors="pt",
    return_dict=True,
).to(model.device)

with torch.inference_mode():
    output = model.generate(**inputs, do_sample=False, max_new_tokens=16)

answer = tokenizer.decode(
    output[0, inputs["input_ids"].shape[1]:],
    skip_special_tokens=True,
).strip()
print(answer)

For this example, the expected label is technical_support. The Transformers snippet prompts for a label but does not constrain decoding; validate the answer against question["criteria"]. vLLM's structured output option constrains the choice to the candidate labels.

The 4.2 GB BF16 checkpoint requires additional GPU memory for inference.

Model files and architecture

This is a merged BF16 fine-tune of Qwen/Qwen3.5-2B. The repository includes the Transformers config, tokenizer, chat template, and image/video processor metadata. The Qwen3_5ForConditionalGeneration implementation is provided by Transformers; this checkpoint does not require custom modeling_*.py code.

Evaluation

On 100 questions selected from the deterministic held-out split used during training (seed 42), the model got 94/100 correct:

Question type Correct Accuracy
Choice 57/57 100%
Yes/no (noul) 32/38 84.2%
Score 5/5 100%

This is a small evaluation sample, not a comprehensive or independently verified benchmark. On a local NVIDIA A40 using vLLM, the 100-question run had 66.8 ms median and 79.6 ms p95 warmed API latency; the first request took about 1.5 seconds. Hardware, server settings, prompt length, and request load affect latency.

Limitations

  • The model is optimized for the task and label conventions represented in its training data; it may perform poorly on other tasks or dialects.
  • The reported evaluation is small and should not be treated as a guarantee of accuracy on new data.
  • The training dataset is not included. Users should verify they have the appropriate rights and permissions for any data used with the model.
  • The model can produce incorrect decisions. Review outputs before using them in consequential settings.

License

Apache-2.0, following the base model's license.

Downloads last month
160
Safetensors
Model size
2B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for AhmedReda25300/EGY-JEV

Finetuned
Qwen/Qwen3.5-2B
Finetuned
(662)
this model