Instructions to use ZAQERIS/ZAQERIS-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZAQERIS/ZAQERIS-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZAQERIS/ZAQERIS-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZAQERIS/ZAQERIS-7B") model = AutoModelForCausalLM.from_pretrained("ZAQERIS/ZAQERIS-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZAQERIS/ZAQERIS-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZAQERIS/ZAQERIS-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZAQERIS/ZAQERIS-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZAQERIS/ZAQERIS-7B
- SGLang
How to use ZAQERIS/ZAQERIS-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ZAQERIS/ZAQERIS-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZAQERIS/ZAQERIS-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ZAQERIS/ZAQERIS-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZAQERIS/ZAQERIS-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZAQERIS/ZAQERIS-7B with Docker Model Runner:
docker model run hf.co/ZAQERIS/ZAQERIS-7B
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 so it runs inside consumer 8 GB VRAM GPUs. 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:
- 8 GB VRAM Ready (
4-bit NF4Double-Quantized):- Loads in
~4.99 GiB VRAMon anNVIDIA GeForce RTX 5060 Laptop GPU (8 GB)with zero CPU offloading required. - Decode throughput:
14 – 19 tok/svia nativebitsandbytes4-bit kernels.
- Loads in
- 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
- Hardware Tested: NVIDIA GeForce RTX 5060 Laptop GPU (
8 GB VRAM), Loaded VRAM4.992 GiB. - Verified Capabilities: Identity and independent research group framing,
<search>tool triggering, offline anti-hallucination refusal when search is unreachable, Python DP coding (18.79 tok/s), 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).
- Downloads last month
- 99