Skip to content

Commit dedf527

Browse files
cjluo-nvclaude
andcommitted
docs(eval-skill): add NVFP4 model-card sampling reference
Add references/nvfp4-modelcard-sampling.md: the published temperature, top_p and max generation length for the 2026 NVFP4 checkpoints under huggingface.co/nvidia that disclose them, grouped by model family, and make Step 3 of the evaluation skill cross-check it before writing eval params. Config generation currently rederives sampling params per run from a single model card, which is slow and silently wrong in two ways. First, most NVIDIA NVFP4 cards paste a TensorRT-LLM quickstart containing SamplingParams(temperature=0.8, top_p=0.95) -- byte-identical across Llama-3.1-8B, Llama-3.3-70B, Llama-4-Scout, Phi-4, Qwen2.5-VL and six Qwen3 repos -- which is boilerplate, not an eval setting, yet it is the most prominent temperature= in the card. Second, when a card is silent the skill falls back to a generic 65536/16384 default even though a sibling in the same family publishes an exact value. All 69 NVFP4 checkpoints in the org were read; the table lists the 28 published in 2026 whose cards disclose usable settings, so absence means "read the card" rather than "not yet checked". Rows carry provenance -- 23 "eval" where the card ties the values to its accuracy table, 5 "rec" where it recommends them without that tie -- and the lookup procedure resolves per field so a "rec" row or an unpublished field has defined behavior. Per-task exceptions are captured (GLM-5.2 GPQA 100000 vs 64000; Qwen3.5-397B-V2 tau2 128000; Qwen3.6 SciCode temperature 0.6; Kimi-K3 uncapped for Terminal-Bench). Cross-check rule: exact model listed -> use its row; absent -> use the nearest same-family rows; card conflicts with the family pattern -> card wins, but surface the discrepancy. Generations do break the pattern, so the priors are scoped to what the table actually shows -- DeepSeek is explicitly carved out of the 1.0/0.95 house default because both its rows use top_p=1.0. The file ends with a refresh recipe covering the two extraction traps found while building it: cards that publish the cap only as a footnote under the accuracy table ("*Max OSL for evals can be as high as 64K"), and DeepSeek stating sampling in its usage block rather than a "Benchmarked with" sentence. Neither is reachable from the obvious grep. Not changelog-worthy: agent-skill documentation, no user-facing API or behavior change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chenjie Luo <chenjiel@nvidia.com>
1 parent 913f5e2 commit dedf527

3 files changed

Lines changed: 169 additions & 4 deletions

File tree

plugins/modelopt/skills/evaluation/SKILL.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,16 @@ nemo_evaluator_config:
274274
275275
Per-task `max_new_tokens` overrides are forbidden — set one top-level ceiling everywhere.
276276

277+
**Cross-check `temperature` / `top_p` / `max_new_tokens` against `references/nvfp4-modelcard-sampling.md`** — the published settings for the 2026 NVFP4 checkpoints under `huggingface.co/nvidia` that disclose them (older releases and cards that publish nothing are absent — for those, read the card; `-DSpark` / `-DFlash` spec-decode variants share their base checkpoint's row, since spec decoding does not change the target's output distribution). **The card is the source of truth; this file is a reference, not a constraint** — use it to confirm a value you read, to fill a gap when the card is silent or ambiguous, and to catch a misreading. Worth consulting whenever the model is an NVFP4 checkpoint **or shares a family with one** (Qwen3.x, GLM-4.7/5.x, Kimi K2.x/K3, MiniMax M2.x/M3, DeepSeek V3.x/V4/R1, Gemma 4, Nemotron 3/3.5, Llama-Nemotron, Mistral Medium 3.5), and especially when you are unsure. It is a dated snapshot, so for anything newer than it, trust the card. See that file's "Lookup" section.
278+
277279
#### `max_new_tokens` — mandatory model-card lookup
278280

279281
1. **Fetch the HF model card before writing the value.** Not optional.
280282
2. Scan for any `max_tokens` / `max_new_tokens` / "output length" recommendation. Pick the **highest** value the card mentions (Qwen3.6: 32768 general + 81920 math-coding → use **81920**). Annotate with a citing comment.
281-
3. If the card is genuinely silent after a thorough read, fall back to: **65536** (reasoning), **16384** (non-reasoning); surface the silence to the user.
282-
4. **Forbidden:** writing `max_new_tokens: <generic_default>` with a "card not yet checked" comment. Either fetch and apply, or fetch and confirm silence.
283-
5. **A higher cap doesn't fix runaway reasoning.** On hard tasks (e.g. HLE) a non-terminating model just rambles to the larger cap (~80% length-capped at 131072), and the cap only helps if deployment `--max-model-len > prompt + max_new_tokens` (else generation is silently clipped — AA-LCR's ~120K input leaves little room). Treat such tasks as low-confidence.
283+
3. **Consult `references/nvfp4-modelcard-sampling.md` as a reference.** Listed and in agreement → proceed with confidence. Listed and different → **the card wins**; re-read it, then note the discrepancy for the user rather than auto-correcting either way. Not listed, or the card is silent or ambiguous → take the nearest same-family rows as the value, a far better prior than the generic fallback below. Its `max_num_tokens` column records the card's *headline* cap, so rule 2 above still governs: when a card names more than one cap, the highest wins even if that exceeds the row.
284+
4. If the card is genuinely silent after a thorough read **and** the family table offers no usable pattern, fall back to: **65536** (reasoning), **16384** (non-reasoning); surface the silence to the user.
285+
5. **Forbidden:** writing `max_new_tokens: <generic_default>` with a "card not yet checked" comment. Either fetch and apply, or fetch and confirm silence.
286+
6. **A higher cap doesn't fix runaway reasoning.** On hard tasks (e.g. HLE) a non-terminating model just rambles to the larger cap (~80% length-capped at 131072), and the cap only helps if deployment `--max-model-len > prompt + max_new_tokens` (else generation is silently clipped — AA-LCR's ~120K input leaves little room). Treat such tasks as low-confidence.
284287

285288
#### Quantization-aware benchmark defaults
286289

plugins/modelopt/skills/evaluation/references/model-card-research.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Use WebSearch to find the model card (HuggingFace, build.nvidia.com). Read it carefully, the FULL text, the devil is in the details. Extract ALL relevant configurations:
44

55
- Sampling params (`temperature`, `top_p`)
6+
- **Only trust a sentence that ties the values to the benchmarks** ("Benchmarked
7+
with…", "…were evaluated with…", "We evaluate the model using…") or a
8+
"Recommended Sampling" row. The `SamplingParams(temperature=0.8, top_p=0.95)`
9+
in a card's TensorRT-LLM/vLLM quickstart snippet is boilerplate copied
10+
verbatim across unrelated models — **never** read eval settings out of it.
11+
- **Then cross-check `nvfp4-modelcard-sampling.md`** — published
12+
`temperature` / `top_p` / `max_num_tokens` for the 2026 NVFP4 checkpoints
13+
under `huggingface.co/nvidia` that disclose them, grouped by family.
14+
Required for any NVFP4 checkpoint or same-family sibling; it is also the
15+
best source of a default when the card is silent. Pre-2026 releases are out
16+
of scope there — read their cards.
617
- Context length (`deployment.extra_args: "--max-model-len <value>"`)
718
- **Output length (`max_new_tokens`) — mandatory extraction.** Scan the
819
card for any `max_tokens` / `max_new_tokens` / "output length"
@@ -11,7 +22,9 @@ Use WebSearch to find the model card (HuggingFace, build.nvidia.com). Read it ca
1122
apply at the top level (no per-task overrides). If the card is genuinely
1223
silent on output length, note that explicitly and fall back to the
1324
generic default (64K reasoning / 16K non-reasoning) — never write a
14-
config with "card not yet checked" + generic default. See SKILL.md
25+
config with "card not yet checked" + generic default. Check
26+
`nvfp4-modelcard-sampling.md` for the model or its family before falling
27+
back; a same-family published cap beats the generic default. See SKILL.md
1528
Step 3 "`max_new_tokens` — pick a single top-level value" for the full
1629
rule.
1730
- TP/DP settings (to set them appropriately, AskUserQuestion on how many GPUs the model will be deployed)
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# NVFP4 Model-Card Sampling Reference
2+
3+
Published `temperature` / `top_p` / max generation length for the **2026 NVFP4
4+
checkpoints under [huggingface.co/nvidia](https://huggingface.co/nvidia/models)
5+
whose cards disclose them** — 25 rows, collected 2026-08-20. All 69 NVFP4
6+
checkpoints in the org were read; absent are those published before 2026-01-01,
7+
those whose cards disclose nothing usable, and **speculative-decoding variants
8+
(`-DSpark`, `-DFlash`)** — spec decoding is verified against the target and does
9+
not change its output distribution, so those checkpoints share their base
10+
checkpoint's row. A miss here means "read the card", not "not yet checked".
11+
12+
Use it to reproduce a published NVFP4 number, and as the cross-check when a card
13+
is silent or ambiguous. It does not replace reading the card — see
14+
`model-card-research.md`.
15+
16+
## Lookup
17+
18+
**The card is the source of truth; this table is a reference, not a constraint.**
19+
Use it to confirm what you read, to fill a gap when the card is silent, and as a
20+
sanity check when you are unsure — never to override a value the card states.
21+
22+
1. **Exact row, resolved per field.** `eval` → use it, cite the row. `rec` → use
23+
it, but note in the config comment that it is recommended sampling, not a
24+
stated eval setting; if a same-family `eval` row disagrees, surface both.
25+
`` → that field is unpublished; resolve **it alone** via step 2.
26+
`max_num_tokens` is the card's *headline* cap — where a note names a higher
27+
per-task cap (GLM-5.2 GPQA `100000`, Qwen3.5-397B-V2 τ²-Telecom `128000`,
28+
Kimi-K3 uncapped for Terminal-Bench) and that task is in your suite, SKILL.md
29+
Step 3's take-the-highest rule governs the single top-level value, not the
30+
column.
31+
2. **No row** (new or unreleased variant, non-NVIDIA baseline, pre-2026) → take
32+
the nearest same-family rows as the expected value.
33+
3. **Card vs. table.** Agree → proceed. Card silent + family consistent → adopt
34+
the family value and cite this file in a line comment; that beats SKILL.md
35+
Step 3's generic 65536 / 16384. **Card disagrees → the card wins**, but
36+
surface it — defaults shift between generations, so a mismatch means re-read,
37+
not auto-correct.
38+
4. **Baseline and candidate share one setting.** Cards report both precisions
39+
measured under the single setting listed; use the NVFP4 row for both.
40+
41+
**Per-task sampling is precedent, not mandate.** Some notes record a
42+
benchmark-specific `temperature` / `top_p` (Qwen3.6 SciCode `0.6`; Qwen3.6-27B
43+
τ²-Bench Telecom `0.0` / `top_p=1.0`; Kimi-K3 `top_p=1.0` agentic). Engineers do
44+
tune sampling per benchmark, so **follow the card you are working from** and use
45+
these as the cross-check. Where the two disagree, **escalate to the user on a
46+
regime change, not a nudge** — greedy (`temperature ≤ 0.1` or `top_p ≤ 1e-4`)
47+
versus sampled flips the regime and materially moves both score and variance;
48+
`0.95` vs `1.0` does not. NEL accepts per-task `temperature` / `top_p` under
49+
`evaluation.tasks.*.nemo_evaluator_config`; only `max_new_tokens` is barred
50+
(SKILL.md Step 3).
51+
52+
> **Never take sampling from a card's quickstart snippet.**
53+
> `SamplingParams(temperature=0.8, top_p=0.95)` and `max_tokens=32` are
54+
> boilerplate, repeated verbatim across unrelated models. Only *Benchmarked
55+
> with…* / *evaluated with…* / *We evaluate the model using…* sentences,
56+
> "Recommended Sampling" rows, and footnotes under the accuracy table count.
57+
58+
`provenance`**`eval`** (20 rows): card ties the values to its accuracy table,
59+
authoritative. **`rec`** (5 rows): card recommends them for inference without
60+
that tie. `max_num_tokens` is the max generation length, i.e.
61+
`nemo_evaluator_config.config.params.max_new_tokens`.
62+
63+
| Model card ID | temp | top_p | max_num_tokens | prov | notes |
64+
| --- | --- | --- | --- | --- | --- |
65+
| `nvidia/DeepSeek-V4-Flash-NVFP4` | 1.0 | **1.0** | 384000 | eval | `top_p=1.0`, unlike every other row here |
66+
| `nvidia/Qwen3.6-35B-A3B-NVFP4` | 1.0 | 0.95 | 131072 | eval | SciCode used `temperature=0.6` |
67+
| `nvidia/Qwen3.6-27B-NVFP4` | 1.0 | 0.95 | 81920 | eval | SciCode `0.6`; τ²-Bench Telecom `0.0` / `top_p=1.0` |
68+
| `nvidia/Qwen3.5-397B-A17B-NVFP4-V2` | 0.6 | 0.95 | 64000 | eval | τ²-Bench Telecom used `128000` |
69+
| `nvidia/Qwen3.5-397B-A17B-NVFP4` | 0.6 | 0.95 | 64000 | eval | |
70+
| `nvidia/Qwen3.5-122B-A10B-NVFP4` | 0.6 | 0.95 | 64000 | eval | |
71+
| `nvidia/Qwen3-Coder-480B-A35B-Instruct-NVFP4` | **0.0** | **1.0e-05** | 16384 | eval | greedy — instruct variant |
72+
| `nvidia/GLM-5.2-NVFP4` | 1.0 | 0.95 | 64000 | eval | GPQA Diamond used `100000` |
73+
| `nvidia/GLM-5.1-NVFP4` | 1.0 | 0.95 | 64000 | eval | benchmarked on `vllm/vllm-openai:v0.19.1` |
74+
| `nvidia/GLM-5-NVFP4` | 1.0 | 0.95 | 131072 | eval | |
75+
| `nvidia/GLM-4.7-NVFP4` | 1.0 | 0.95 | 131072 | eval | |
76+
| `nvidia/Kimi-K3-NVFP4` | 1.0 | 0.95 | 65536 | eval | **uncapped for Terminal-Bench**; card also recommends `top_p=1.0` agentic, `n=1`, `presence_penalty=0`, `frequency_penalty=0` |
77+
| `nvidia/Kimi-K2.7-Code-NVFP4` | 1.0 | 0.95 | 64000 | eval | |
78+
| `nvidia/Kimi-K2.6-NVFP4` | 1.0 | 0.95 | 128000 | eval | |
79+
| `nvidia/MiniMax-M3-NVFP4` | 1.0 | 0.95 | 65536 | eval | baseline is native MXFP8 |
80+
| `nvidia/MiniMax-M2.5-NVFP4` | 1.0 | 0.95 | 64000 | eval | |
81+
| `nvidia/Gemma-4-31B-IT-NVFP4` | 1.0 | 0.95 | 131072 | eval | |
82+
| `nvidia/Gemma-4-26B-A4B-NVFP4` | 1.0 | 0.95 | 131072 | eval | |
83+
| `nvidia/diffusiongemma-26B-A4B-it-NVFP4` | upstream | upstream | `null` (uncapped) | eval | defers to `google/diffusiongemma-26B-A4B-it`; diffusion decoding, serve with `--override-generation-config '{"max_new_tokens": null}'`. Uncapped is deliberate — do **not** substitute a numeric fallback |
84+
| `nvidia/Ising-Calibration-1.5-31B-NVFP4` | 0.2 || 8192 zero-shot / 32767 ICL | rec | domain model (Gemma-4-31B derivative) |
85+
| `nvidia/Mistral-Medium-3.5-128B-NVFP4` | 0.7 | 0.95 || eval | benchmarked with `reasoning_effort="high"` |
86+
| `nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4` | 1.0 | 0.95 || rec | its spec-decode siblings' cards say *Benchmarked with* these same values; eval recipes live in NeMo Gym, client examples use `max_tokens=16000` |
87+
| `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4` | 1.0 | 0.95 || rec | card: use across **all** tasks and serving backends |
88+
| `nvidia/NVIDIA-Nemotron-Labs-3-Elastic-30B-A3B-NVFP4` | 1.0 | 1.0 || rec | reasoning tasks |
89+
| `nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4` | 0.6 think / 0.2 instruct | 0.95 think / — | 20480 think / 1024 instruct | rec | think adds `reasoning_budget=16384`, `grace_period=1024`; instruct sets `top_k=1` |
90+
91+
## Priors (verify against the card)
92+
93+
- **`1.0 / 0.95` is the house default** — GLM 4.7–5.2, Kimi K2.6–K3, MiniMax
94+
M2.5–M3, Gemma 4, Nemotron 3/3.5, Qwen3.6. Best guess when a recent card is
95+
silent.
96+
- **DeepSeek is carved out of it** — its row uses `top_p=1.0`, not `0.95`.
97+
Never carry the house default onto an unlisted DeepSeek variant.
98+
- **Qwen splits by variant** — thinking `0.6 / 0.95` at Qwen3.5, raised to `1.0`
99+
at Qwen3.6; instruct/coder near-greedy `0 / 1e-5` with `16384`.
100+
- **GLM**`1.0 / 0.95` throughout; cap fell from 131072 (4.7, 5) to 64000
101+
(5.1, 5.2).
102+
- **Caps cluster at 64000 / 65536 / 81920 / 128000 / 131072**, 64000 most
103+
common. `16384` appears only with greedy instruct Qwen; DeepSeek-V4-Flash's
104+
`384000` is a long-context outlier.
105+
- **Per-task overrides are narrow** — SciCode (lower temperature), τ²-Bench
106+
Telecom (greedy or larger cap), GPQA Diamond (larger cap), Terminal-Bench
107+
(uncapped). SKILL.md Step 3 forbids per-task `max_new_tokens`, so when a card
108+
lists two caps **take the maximum** as the single top-level value and note the
109+
split in a comment.
110+
111+
## Refreshing
112+
113+
Built from the HF API, verified to match the website pagination page for page
114+
(918 repos across `p=0..31`, identical NVFP4 sets).
115+
116+
```bash
117+
curl -s "https://huggingface.co/api/models?author=nvidia&limit=1000" -o all.json
118+
python3 -c "
119+
import json, re
120+
KEEP = re.compile(r'-NVFP4(-V\d+|-QAD)?\$', re.I) # target checkpoints only
121+
for m in json.load(open('all.json')):
122+
if KEEP.search(m['id']) and m.get('createdAt', '') >= '2026-01-01':
123+
print(m['id'])
124+
" > ids.txt
125+
126+
mkdir -p cards
127+
# 404 = repo ships no card; 401 = gated, fetch with 'hf download <id> README.md'
128+
# (never interpolate the HF token into a curl argument)
129+
while read id; do curl -sfL "https://huggingface.co/$id/raw/main/README.md" \
130+
-o "cards/${id//\//_}.md"; done < ids.txt
131+
132+
grep -ihnE "benchmark(ed|ing) (parameters|with)|were evaluated with|we evaluate the model using|evaluation settings" cards/*.md
133+
grep -ihnE "max OSL|for evals?|including benchmarking" cards/*.md
134+
```
135+
136+
The second grep is **not optional**: some cards give the cap only as a footnote
137+
under the accuracy table (*"\*Max OSL for evals can be as high as 64K"*), and
138+
DeepSeek states sampling in its `## Input:` usage block — neither is reachable
139+
from the first.
140+
141+
`KEEP` matches a **target checkpoint's** name shape — `…-NVFP4`, plus the
142+
`-V2`-style revision and `-QAD` (a quantization recipe, so still a target). It
143+
therefore drops, by construction, every repo class that would only pollute the
144+
table: `-DSpark` / `-DFlash` speculative-decoding variants (verified against the
145+
target, so identical accuracy — they duplicate the base row), `-Eagle3` draft
146+
heads, and `-MLPerf-Inference-Closed-*` submission snapshots (which ship no
147+
card). `re.I` matters: DeepSeek spells its revisions `-v2`, not `-V2`. The one
148+
blind spot is a repo named `-FP4-*` whose `hf_quant_config.json` says NVFP4 —
149+
rare, and none currently in scope; check the `fp4` tag if you need certainty.

0 commit comments

Comments
 (0)