CoolFace
Modelpublic

aleada/Phi-4-mini-instruct-W4A16

sourceHugging Faceotherupdated 6d agoView on Hugging Face
0likes810downloads
Model Card

<img src="assert-logo-light.png" alt="ASSERT" height="26">

Phi-4-mini-instruct — W4A16 (compressed-tensors)

Standard W4A16 quantization of `microsoft/Phi-4-mini-instruct`, produced with llm-compressor (the official vLLM-team quantization toolkit) inside a reproducible Docker container. The artifact saves in `compressed-tensors` format; vLLM auto-detects the quantization config from the embedded config.json at load time. It is drop-in loadable by vLLM — no upstream patches, no client-side shims.

This release is part of an ongoing series of vLLM-friendly quantized packs maintained by atlas, a self-evolving agent project run by **Alex Adamopoulos** at **assert.gr**.

Reproducibility

ParameterValue
Source model`microsoft/Phi-4-mini-instruct`
Quantization toolllm-compressor 0.12.0 (Neural Magic / vLLM team)
Quantization recipeGPTQModifier
schemeW4A16
targetsLinear
ignorere:.*lm_head
graft (kept in source dtype)
sequential_targets
group_size128 (scheme preset)
dampening_frac0.01
Calibration datasetultrachat-200k
Calibration samples256
max_seq_length2048
Quantized size2.71 GiB
Quantization time

What the quantization cost

[image]

A quantized pack is a trade, and this is the side of it you can check before spending the download. Quantization does not damage a model evenly: what survives is the kind of work where a small numeric shift changes nothing, and what suffers is the kind where it changes the answer. Which of those your own work is decides whether this pack is right for you, and the rows below are how you tell — read the generative row if you run arithmetic, tools or long chains of reasoning, and the multiple-choice rows if you classify, rank or chat.

Both arms were run identically — same tasks, same harness, same machine — against `microsoft/Phi-4-mini-instruct`. Recovery is this pack's score over the source model's.

A ratio needs both halves. An absolute score for a quantized pack cannot say what the quantization cost, because the number it should be compared against is missing — and the source's own published figures are not that number either, since they were produced on other hardware with other settings. So the source model was scored here, in the same session as the pack, and both columns below come from that one run.

TaskHow it scoresSourceThis packRecovery
arc_challenge · acclikelihood, multiple choice — forgiving0.56740.548696.7 %
arc_challenge · acc_normlikelihood, multiple choice — forgiving0.58960.575197.5 %
gsm8k · exact_match (flexible-extract)generative, multi-step arithmetic — the sensitive one0.81800.752191.9 %
gsm8k · exact_match (strict-match)generative, multi-step arithmetic — the sensitive one0.81800.751391.8 %
hellaswag · acclikelihood, multiple choice — forgiving0.54520.537698.6 %
hellaswag · acc_normlikelihood, multiple choice — forgiving0.72760.713998.1 %
mmlu · acclikelihood, broad knowledge0.66650.645796.9 %
winogrande · acclikelihood, multiple choice — forgiving0.70800.7238102.2 %
  • Generative tasks: 91.8–91.9 % — the ones that write an answer and are graded on it.
  • Multiple-choice tasks: 96.7–102.2 % — ranking fixed options, where rounding error rarely changes the winner.

There is no single figure here on purpose. The two kinds of task answer different questions, and averaging them hides the answer that matters: on one of our packs the mean came to 100.1% while the generative task had lost nearly nine points. Multiple-choice scoring asks the model to rank options it is given — error that ruins a calculation rarely reverses such a ranking, and a row above 100% is noise, not improvement. A generated answer graded on its final number is where 4-bit rounding compounds.

Measured with lm_eval 0.4.13, torch 2.12.0, transformers 5.10.1, full standard task configurations, on 2026-09-05T13:25:42Z.

License

Inherits the license of the base model. By using this artifact you agree to the original license at the source link above. Atlas / assert.gr adds no additional restrictions on the quantized weights.

Usage with vLLM

bash
docker run --runtime=nvidia --gpus all \
    -p 8000:8000 \
    -e HF_TOKEN=hf_XXX \
    vllm/vllm-openai:latest \
    aleada/Phi-4-mini-instruct-W4A16 \
    --gpu-memory-utilization 0.92 \
    --enable-prefix-caching

The model is the first positional argument — vLLM's --model flag is deprecated and slated for removal.

vLLM auto-detects compressed-tensors from the model's config — no --quantization flag required (it is accepted as a redundant hint). vLLM also picks the model's full native context window from config.json. If you hit KV-cache OOM on a smaller GPU, pin a shorter window with --max-model-len 16384 (or smaller) — leave it off to get the maximum the model was trained for. Once vLLM is running, hit it with any OpenAI client:

python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
    model="aleada/Phi-4-mini-instruct-W4A16",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Hardware target

Requires CUDA compute-capability ≥ 8.0 (Ampere or newer). Verified on NVIDIA RTX 3090 (compute 8.6) where the W4A16 path runs the language tower at INT4 weights / BF16 activations through vLLM's compressed-tensors kernels.

Weight-only INT4 is the point on this class of card: FP8 and NVFP4 checkpoints are native on Hopper and Blackwell but emulated or unusable on Ampere, where the INT4 Marlin kernels are what actually run fast.

Check this pack yourself

Quantization can drop or disable part of a model without failing: the pack loads, serves, and answers correctly while something its card says it kept is absent, or present and ignored by the runtime. Nothing errors, and the card still promises it.

Three tools read any published repo's metadata — safetensors headers and config.json, no weights — entirely in your browser, so each reads exactly what you could read yourself. Point them at this pack. Point them at someone else's.

[Pack integrity check](https://huggingface.co/spaces/aleada/pack-integrity-check) — whether the exclusion entries name real modules, whether anything from the source model failed to reach the pack, and whether anything is left at source precision without being declared.

[Precision map](https://huggingface.co/spaces/aleada/pack-precision-map) — how much of a "4-bit" pack is actually 4-bit, and what stayed whole. Never all of it: embeddings, the output head and the norms are usually kept, so the honest figure is a fifth to two fifths of the bytes. It reads the dtypes rather than the tensor names, because five of the nine quantization toolchains store the packed payload under the plain name weight — a name-driven reader calls those packs full precision.

[Reasoning-parser advisor](https://huggingface.co/spaces/aleada/reasoning-parser-advisor) — whether a model needs vLLM's --reasoning-parser and which one, read from its chat template. Getting this wrong is invisible: the wrong parser claims the entire output and content comes back empty, with no error anywhere.

About the maintainer

Alex Adamopoulos is the founder of assert.gr and the engineer behind the atlas self-evolving AI agent platform. Atlas runs a planner→executor→supervisor loop over a skill registry, backed by Postgres, Redis, Qdrant, and a multi-LLM vLLM deployment. Quantization releases like this one keep the open-source model ecosystem usable on consumer-grade hardware for self-hosted agent research.

Connect: