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