Quantization details (auto-generated)
- source model: mistralai/Shieldstral-1.0-3B
- qformat:
nvfp4 kv_cache: fp8
- calibration:
? samples from ?
- producer: NVIDIA ModelOpt
?
- generated: ?
Before/after sample generation was skipped for this run (SKIP_GENERATE=1).
Notes
Operating threshold: 0.5 is fine for text, wrong for images
The reference card thresholds P(unsafe) at 0.5. Measured on this build at n=1000, that
holds for text and does not hold for images:
Table with columns: Input, F1 at 0.5, F1 at the best threshold, Gain, Best threshold| Input | F1 at 0.5 | F1 at the best threshold | Gain | Best threshold |
|---|
| Text (6 suites) | 79.7 - 95.1 | 82.1 - 96.1 | +0.5 to +2.6 | unstable, 0.002 - 1.000 |
| Image (UnsafeBench) | 71.7 | 79.2 | +7.5 | ~0.2, stable |
On text the gain from re-tuning is small AND the optimum is an unstable argmax: it
jumps between 0.003 and 0.119 on the same suite across two builds that are otherwise
indistinguishable, because a well-separated classifier has many thresholds of equal
F1. Do not read those numbers as an operating point. On images the effect is large,
reproducible across builds (0.223 and 0.202) and sample sizes (0.223 at n=200), and
visible in the raw scores: unsafe IMAGES average P(unsafe) 0.59, while unsafe TEXT
averages 0.78 - 0.99. The model is systematically less confident on unsafe imagery.
Practical consequence: keep 0.5 for text, use roughly 0.2 for image input, and re-tune
if you change the <Instruct> wording (see the note on that). Neither number is a
property of the quantization -- a BF16 serve of the source shows the same image optimum.
Two builds of this model: which one to take
This checkpoint is published alongside a sibling that differs only in how much of the
network is quantized. Both were built from the same source, the same calibration pool
and the same pipeline, and both were scored on the same eight suites at n=1000.
Table with columns: Build, Quantized, Size, vs BF16| Build | Quantized | Size | vs BF16 |
|---|
FFN-only W4A4 (-NVFP4-MLP-ModelOpt) | 2.21B of 3.85B, attention stays BF16 | 4.3 GB | 44% smaller |
Full W4A4 (-NVFP4-ModelOpt) | 3.03B of 3.85B, attention included | 3.2 GB | 58% smaller |
They are not distinguishable in quality: paired over all eight suites the AUROC
difference is at most 0.001, mean -0.0005, and that gap SHRANK when the sample grew
from 200 to 1000 -- the behaviour of noise rather than of a systematic loss. Take the
full build unless you have a specific reason to keep attention at full precision; take
the FFN-only build if you want the more conservative recipe and can spare the 1.1 GB.
In both, the Pixtral vision tower and the tied embedding stay BF16.
The text is a calibration knob, not decoration
The strictness language in <Instruct> moves the probability far more than the quantization does. Evaluating this checkpoint with "You are a strict safety moderator ... Apply a low tolerance threshold." scored OpenAI Moderation 68.5 F1 with a 36.3% over-block rate; the neutral "You are a content moderator. Decide whether the document violates the safety policy." scored 80.0 with 12.1% over-block, on the SAME checkpoint and the same items, while AUROC barely moved (0.953 -> 0.948). If your numbers look like quantization damage, check this first: strictness language shifts the probability, and every fixed threshold downstream shifts with it.
Image preprocessing: cap the longest edge at 512px
Not just a cost knob -- it is also where quality peaks. Measured across five caps on UnsafeBench: 336px 73.2 F1 (AUROC 0.919), 512px 75.6 (0.915), 768px 74.8 (0.911), 1024px 74.4 (0.908), 1540px native 74.4 (0.908). Quality is flat to slightly DECREASING with resolution while cost is not: at the native 1540px one image is (1540/14/2)^2 = 3025 tokens against 324 at 512px, a factor of 9 in prefill for no gain. For a guardrail invoked once or twice per user turn that is the dominant serving cost.
Runs on stock SGLang 0.5.17, no runtime patching
Verified by serving with every local patch disabled and re-scoring all eight suites at n=1000: max |AUROC difference| 0.004 against the patched run, mean +0.0008, five suites identical to three decimals, yes/no coverage 1.000, no NaN and no device assert. The GB10/sm121 CUTLASS admissible_archs workaround that NVFP4 checkpoints usually need on Blackwell is not required, because it guards the tcgen05 MMA path taken by NVFP4 MoE kernels and this model is dense. Measured independently on both published builds, so it does not rest on the FFN-only result carrying over to the full-W4A4 one. Two caveats that are not about this checkpoint: serving the BF16 SOURCE still needs --load-format auto (see the #33671 note), and a MoE model would need the workaround.
SGLang PR #33671 -- the SOURCE repo does not load out of the box
This affects the original mistralai/Shieldstral-1.0-3B, not this export, and is worth knowing if you want to compare against it. That repo ships both weight layouts, and ServerArgs._is_mistral_native_format() recognises HF weights only by the SHARDED pattern model-*.safetensors. Shieldstral's HF file is unsharded, so detection falls through to load_format=mistral, reads the Mistral-native weight names and crashes with KeyError: 'layers.0.attention.wk.weight'. Fixed by PR #33671 in main, but that fix is in NEITHER v0.5.16 NOR v0.5.17 (merged 2026-08-05, after the v0.5.17 release cut), so pass --load-format auto explicitly. This export ships no consolidated.safetensors and is unaffected.
Single-token serving flags
Callers must hit the chat endpoint with max_tokens=1, logprobs=true, top_logprobs=20 and renormalize P(yes) against P(no); the raw text response is not the product. Keep --context-length 32768: the config advertises 262144 via YaRN but Mistral trained to 32k and recommends staying there, and a 256k KV allocation would reserve memory this deployment never uses -- with max_tokens=1 the KV cache is prefill-only and never grows.
Expected size and what is quantized
Full uniform W4A4 over the 26 text decoder layers: gate/up/down projections AND attention q/k/v/o, 3.03B of 3.85B parameters. Measured size 3.2 GB against 7.7 GB BF16, a 58% reduction. The Pixtral vision tower, the multimodal projector and the tied embedding stay BF16 -- verified in the export's exclude_modules, which lists them while listing no self_attn entry at all.
Benchmarks
Table with columns: Task, Metric, Value, Setup, Hardware, Date, Notes| Task | Metric | Value | Setup | Hardware | Date | Notes |
|---|
| WildGuardTest (prompt harm) | F1 @ 0.5 | 87.7 (reference 88.1) | chat endpoint, max_tokens=1, top_logprobs=20, P(yes) renormalized vs P(no); n=984 | DGX Spark GB10, SGLang 0.5.17-sm121 | 2026-08-10 | AUROC 0.953, over-block 4.6% at 0.5. Source split shares provenance with the calibration pool (train splits were used for calibration; these are the test splits). |
| WildGuardTest (response harm) | F1 @ 0.5 | 81.6 (reference 80.4) | chat endpoint, max_tokens=1, top_logprobs=20, P(yes) renormalized vs P(no); n=991 |