zephyr-7b-beta-marlin

This repo contains model files for zephyr-7b-beta optimized for nm-vllm, a high-throughput serving engine for compressed LLMs.

This model was quantized with GPTQ and saved in the Marlin format for efficient 4-bit inference. Marlin is a highly optimized inference kernel for 4 bit models.

Inference

Install nm-vllm for fast inference and low memory-usage:

pip install nm-vllm[sparse]

Run in a Python pipeline for local inference:

from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

model_id = "neuralmagic/zephyr-7b-beta-marlin"
model = LLM(model_id)

tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [
    {"role": "user", "content": "What is quantization in maching learning?"},
]
formatted_prompt =  tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
sampling_params = SamplingParams(max_tokens=200)
outputs = model.generate(formatted_prompt, sampling_params=sampling_params)
print(outputs[0].outputs[0].text)

"""
Sure! Here's a simple recipe for banana bread:

Ingredients:
- 3-4 ripe bananas,mashed
- 1 large egg
- 2 Tbsp. Flour
- 2 tsp. Baking powder
- 1 tsp. Baking soda
- 1/2 tsp. Ground cinnamon
- 1/4 tsp. Salt
- 1/2 cup butter, melted
- 3 Cups All-purpose flour
- 1/2 tsp. Ground cinnamon

Instructions:

1. Preheat your oven to 350 F (175 C).
"""

Quantization

For details on how this model was quantized and converted to marlin format, run the quantization/apply_gptq_save_marlin.py script:

pip install -r quantization/requirements.txt
python3 quantization/apply_gptq_save_marlin.py --model-id HuggingFaceH4/zephyr-7b-beta --save-dir ./zephyr-marlin

Slack

For further support, and discussions on these models and AI in general, join Neural Magic's Slack Community

Evaluation

Accuracy evaluated with Inspect (inspect_evals task suite), served with vLLM (OpenAI-compatible API, 1x NVIDIA B200), single epoch (pass@1), all samples scored (errors and unparsed answers count as failures). Sampling per the checkpoint's generation config (temperature=1.0, top_p=1.0). The base column was measured under the identical harness, serving stack, sampling and limits (only the checkpoint differs), so the recovery column is a controlled like-for-like comparison.

Benchmark HuggingFaceH4/zephyr-7b-beta RedHatAI/zephyr-7b-beta-marlin Recovery
MMLU-Pro (pass@1) 19.4% 15.2% 78.4%
GPQA Diamond (pass@1) 20.2% 17.7% 87.5%
IFEval (prompt-level strict) 37.5% 35.5% 94.6%

Standard errors (binomial, all samples): MMLU-Pro ±0.3 pp, GPQA Diamond ±2.7 pp, IFEval ±2.1 pp. Notes: mmlu-pro: 61 truncated at the generation cap; gpqa-diamond: 3 truncated at the generation cap; ifeval: 9 truncated at the generation cap.

SWE-bench Verified was skipped: the model produced no tool calls in the agent smoke (0/2 samples with an agent loop), so the benchmark is not completable under the inspect_evals native-tool-calling scaffold; Terminal-Bench 2.1 requires the same capability. IFEval is the third benchmark. The checkpoint was served from a bit-exact GPTQ-layout conversion of the legacy Marlin .B/.s tensor format (which current vLLM cannot load); the validated conversion script ships in the task directory's assets.

Evaluated 2026-11-29 with vLLM (editable install at commit ce41d432ff, engine version line 0.34.0rc1.dev1208+gce41d432f) on 1x NVIDIA B200 (183 GB), thinking not applicable (non-reasoning model).

Reproduction

Serve per this model's vLLM recipe (minimal flags; no recipe exists), then:

inspect eval inspect_evals/<task> --model vllm/RedHatAI/zephyr-7b-beta-marlin --epochs 1 <sampling flags> --max-tokens <cap>

See the evals-refresh repository's task directories for the exact protocol.

Downloads last month
79
Safetensors
Model size
1B params
Tensor type
I32
·
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RedHatAI/zephyr-7b-beta-marlin

Quantized
(37)
this model

Paper for RedHatAI/zephyr-7b-beta-marlin