ZAQERIS-7B (4-bit NF4 Local Release)
ZAQERIS-7B is derived from Qwen/Qwen2.5-Coder-7B-Instruct (Apache-2.0) by the independent research group ZAQERIS AI, through layer removal (28 → 27 decoder layers), MLP channel pruning (18944 → 18432), weight rotation, and 4-bit NF4 compression. It has 7.23B parameters (the upstream model has 7.62B) and uses the upstream Qwen2 tokenizer (vocabulary size 152064). Publicly documented languages so far: English and Arabic.
Provenance correction (Nov 2026): An earlier version of this card described the model as trained from scratch. That was incorrect. The weights are a modified derivative of Qwen2.5-Coder-7B-Instruct by the Qwen team (Alibaba Cloud), and full credit for the base model goes to them.
ملاحظة: هذا النموذج مشتق من نموذج Qwen2.5-Coder-7B-Instruct (رخصة Apache-2.0) من فريق Qwen، وقامت مجموعة ZAQERIS AI بتعديله عبر حذف طبقة وتقليم قنوات الـ MLP وتدوير الأوزان وضغطه بصيغة 4-bit NF4. عدد معاملاته
7.23B، ويستخدم مُرمِّز Qwen2 الأصلي (حجم المفردات152064). النسخة السابقة من هذه البطاقة وصفته خطأً بأنه مُدرَّب من الصفر، وتم تصحيح ذلك.
Key Highlights
- Base Model: Qwen/Qwen2.5-Coder-7B-Instruct (Apache-2.0), modified and compressed by ZAQERIS AI. Uses the upstream Qwen2 tokenizer (vocabulary size
152064). - Note on config:
config.jsonuses the standardQwen2ForCausalLMclass because the model is a Qwen2.5 derivative. - Modifications by ZAQERIS AI:
- Layers:
27decoder blocks, one fewer than upstream (hidden_size = 3584,intermediate_size = 18432,GQA 28:4). - Pruning and rotation: One decoder layer removed, structured SwiGLU salience pruning of MLP channels (18944 → 18432), neuron reordering, and function-preserving orthogonal weight rotations. These are compression and packaging steps applied to the upstream weights, not new pretraining.
- Layers:
- 4-bit NF4 Double-Quantized: packed with native
bitsandbytes4-bit kernels. - Built-in Automated Web Search (
<search>):- Automatically emits
<search>query</search>when asked for live, real-time, or post-cutoff facts. - Trained with offline anti-hallucination safety: if search results return an error or are unavailable, the model declines to guess instead of fabricating numbers.
- Automatically emits
- Multilingual capabilities:
- Strong Python/software engineering, step-by-step reasoning, and clean instruction following. Languages listed on this card: English and Arabic.
Quickstart (transformers + bitsandbytes)
pip install torch transformers bitsandbytes accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ZAQERIS/ZAQERIS-7B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto").eval()
system_prompt = (
"You are ZAQERIS-7B, a model by ZAQERIS Ai. "
"If you are asked for live or up-to-date information, trigger automatic search by writing <search>query</search> only."
)
prompt = (
f"<|im_start|>system\n{system_prompt}<|im_end|>\n"
f"<|im_start|>user\nWrite a short Python function to compute Fibonacci numbers.<|im_end|>\n"
f"<|im_start|>assistant\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(
**inputs,
max_new_tokens=200,
do_sample=False,
eos_token_id=tokenizer.encode("<|im_end|>", add_special_tokens=False)[-1],
)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Interactive Auto-Search CLI
This repository includes zaqeris_7b_chat_search.py for live <search> tool execution:
python zaqeris_7b_chat_search.py --model ZAQERIS/ZAQERIS-7B
Verification Summary & Limitations
- Verified Capabilities: Identity and independent research group framing,
<search>tool triggering, offline anti-hallucination refusal when search is unreachable, Python DP coding, and multilingual instruction following (English and Arabic). - Limitations: As a compact
7B-class 4-bit model, complex multi-step arithmetic word problems can occasionally exhibit variance; always verify critical numerical calculations. Uses a standard152064-token BPE tokenizer vocabulary (the Qwen2 tokenizer) for broad multilingual and code coverage.
License and Attribution
This model is a derivative of Qwen/Qwen2.5-Coder-7B-Instruct, Copyright Alibaba Cloud (Qwen team), licensed under the Apache License 2.0. The upstream license terms continue to apply. The modifications listed above (layer removal, MLP pruning, weight rotation, NF4 quantization, chat-template and system-prompt changes) were made by ZAQERIS AI, and this derivative is likewise released under the Apache License 2.0 (LICENSE).
If you use this model, please also cite the Qwen2.5-Coder technical report (Hui et al., 2024, arXiv:2409.12186).