Command line
pip install quantpreflight
quantpreflight check Qwen/Qwen2.5-7B-Instruct-AWQ --gpu H100 --tp 4
quantpreflight suggest Qwen/Qwen2.5-7B-Instruct --gpu L4
Open source · MIT · No GPU needed
A quantized checkpoint can take an hour to download and still crash at load, return garbage, or run out of memory. quantpreflight reads the config and tensor headers, so you find out first. Enter a Hugging Face model or paste a config.json.
pip install quantpreflightA 40 to 400 GB checkpoint lands on your GPU nodes. That part goes fine, because nothing has looked inside it yet.
Now vLLM or SGLang finds a tensor it can't split, a kernel your GPU doesn't have, or a token past the end of the embedding table.
Sometimes it's a crash. Sometimes it's worse: the server runs and quietly returns nonsense.
NVFP4 · 4-bit · fast on modern NVIDIA GPUs
CRITICAL QPF004: NVFP4 requires Blackwell (sm_100+), target is H100 (sm_90)
Everything it needs is in small JSON files and the first bytes of each weight file. A 38.74 GiB checkpoint took 887 KiB of reads.
Each finding names the file or tensor at fault and how to fix it. Pasting a config.json skips the tensor checks. A model ID reads the tensor headers too, and the command line also handles GGUF, tokenizer.json, gated models, and local folders.
| Rule | Severity | Question |
|---|---|---|
QPF001 | Critical | Were sensitive layers quantized too hard?Norms and vision towers lose too much at low precision, and a quantized router can hurt quality silently. |
QPF002 | Critical | Can a token fall off the end of the embedding table?A token ID past the last row ends in a GPU assert. This is the checkpoint-side relative of CVE-2026-115916. |
QPF003 | Medium | Will the model know when to stop?If the stop token differs between files, it can generate until max_tokens. |
QPF004 | Critical | Does your GPU have the kernels for this format?NVFP4 needs Blackwell, ModelOpt needs sm_80, block FP8 is limited on sm_89, and FP8 may fail on GPUs without FP8 cores. |
QPF005 | Critical | Does this mix trigger a known silent bug?Some engine, GPU, and format mixes corrupt output or ignore your flags with no error. |
QPF006 | Critical | Can the heads and experts split across your GPUs?Attention heads, KV heads, and MoE experts must divide evenly by --tp. |
QPF007 | High | Do the shards still fit the kernel after splitting?Per-GPU sizes must stay multiples of group_size, the 128x64 Marlin tile, and the FP8 block. |
QPF008 | Critical | Does this GPTQ model use desc_act?vLLM rejects it outright, and other engines pay for extra gathers across GPUs. |
QPF009 | Critical | Is every shard really there?Missing shards, dangling tensors, duplicates, and wrong MTP draft shapes fail at load. |
QPF010 | High | Does the config match the weights?Packed tensors with no quantization_config, or the reverse, load wrongly or waste memory. |
QPF011 | High | Can this engine read this format?Safetensors on llama.cpp and GGUF on TensorRT-LLM fail to load, and 1-bit or 2-bit GGUF on vLLM or SGLang is often unsupported or slow. |
QPF012 | Critical | Will it fit in GPU memory?Weights, runtime overhead measured on real GPUs, and the KV cache, with DeepSeek MLA, sliding windows, and Mamba state counted properly. |
QPF013 | Critical | Are the byte offsets in the file sane?Overlapping, inverted, or truncated spans mean a corrupt or incomplete file. |
QPF014 | Critical | Will loading it run someone else's code?Pickle weights and trust_remote_code can execute arbitrary code on your host. |
QPF015 | High | Does your engine version have known vulnerabilities?With --engine-version, your vLLM or SGLang version is checked against published advisories. |
QPF016 | Critical | Is the context longer than the model allows?vLLM refuses a --context-len above max_position_embeddings. |
Is your model family or GPU missing? Adding one is usually a single TOML file with no Python. Read the contributing guide.
Every change runs against 132 small checkpoints labelled with what must fire and what must stay quiet.
| Group | Cases | Passed | Findings missed | False alarms |
|---|---|---|---|---|
| Safe setups | 36 | 36 | 0 | 0 |
| Sensitive layers | 6 | 6 | 0 | 0 |
| Tokens and stop IDs | 13 | 13 | 0 | 0 |
| GPU support | 16 | 16 | 0 | 0 |
| Silent kernel bugs | 8 | 8 | 0 | 0 |
| Splitting across GPUs | 15 | 15 | 0 | 0 |
| Broken files | 17 | 17 | 0 | 0 |
| Engine and format | 12 | 12 | 0 | 0 |
| GPU memory | 6 | 6 | 0 | 0 |
| Known gaps | 3 | 0 | 3 | 0 |
That's 96.9% recall and 100% precision on these cases. We wrote them ourselves, so treat this as a regression check and not a promise about your model. The misses are real gaps, listed in the repository.
26 of 27real vLLM loads on Tesla T4 predicted correctly
505public models scanned with no crashes
359of those had nothing to report
Real runs changed the tool: they showed which warnings were wrong and fitted the memory estimate. Only T4 GPUs have been tested so far, so rules for other GPUs rest on vendor docs and engine issues. Read the full report, or help test it on your GPU.
pip install quantpreflight
quantpreflight check Qwen/Qwen2.5-7B-Instruct-AWQ --gpu H100 --tp 4
quantpreflight suggest Qwen/Qwen2.5-7B-Instruct --gpu L4
repos:
- repo: https://github.com/layer8labs8/quantpreflight
rev: v0.4.0
hooks:
- id: quantpreflight
name: Model preflight
on: [push, pull_request]
permissions:
contents: read
jobs:
preflight:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: layer8labs8/quantpreflight@v0.4.0
with:
target: ./exported-checkpoint
gpu: H100
tp: "4"
fail-on: high
Each report ends with the GPU count and context length that start, and the command to run. suggest ranks the quantized versions of a model that run on your GPUs. It works on Hugging Face repo IDs, direct URLs, local folders, and single .safetensors or .gguf files. Set HF_TOKEN for gated models. The usage guide covers every option.
--concurrency. Real traffic needs more.If this project helped you, I'm really glad. If you'd like to support it, you can send a crypto tip below. If not, that's completely okay.
Ethereum (ERC20), BNB Chain (BEP20), Base, Arbitrum, Optimism, Polygon
0x7C524d172F2bf750e3f7b4Df0339B3fFb09F9ADbBitcoin
bc1qcvdafsre6tlfpsdnv2s4ltwvy9tlgkjj6ag4guSolana
Fv9k74qakg1L7ehMaJ3SBXxVbTKg2WuM5AjW2KLM3nVHTron (TRC20)
TJVfPm5wJnKjD5ZzBRhMXtzB1aF17KbyuzYour wallet or exchange will ask you to choose a network. Pick one listed above and use the address next to it. Crypto payments can't be reversed, so check before you send.