Skip to content

feat(nemotron-super): native Nemotron 3.5 Super VL NVFP4 owner with MTP, batching, images and qualification runner - #1510

Merged
Gajesh2007 merged 82 commits into
masterfrom
codex/nemotron-super-vl-intake
Oct 21, 2026
Merged

Gajesh2007 merged 82 commits into
masterfrom
codex/nemotron-super-vl-intake

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Serve native Nemotron 3.5 Super VL NVFP4 from an unregistered, admitted local owner through the provider's real HTTP stack: exact reference prompts, reasoning, tools and structured output, JPEG/PNG images, opt-in MTP speculation and opt-in batched decode, plus a dev-only qualification runner and benchmark/memory scripts. Pins SDK mlx-swift-lm #312 at cda62e9f (the fused SSD prefill windows bit-identical to ssmAttn). No production discovery, registration or routing.

Before

flowchart LR
 A["Super checkpoint"] --> B["Fixture-only owner"] --> C["No full-model run"]
 classDef source fill:#dbeafe,stroke:#2563eb,color:#111827
 classDef blocked fill:#fee2e2,stroke:#dc2626,color:#111827
 class A source
 class C blocked
Loading

After

flowchart LR
 A["Admitted LOAD"] --> B["Owner + local HTTP hook"]
 B --> C["Text, reasoning, tools, images"]
 B --> D["Opt-in MTP / batching"]
 E["Ordinary discovery"] --> F["Super withheld"]
 classDef native fill:#dcfce7,stroke:#15803d,color:#111827
 classDef gated fill:#fef3c7,stroke:#b45309,color:#111827
 class A,B,C,D native
 class F gated
Loading

Green runs on the full checkpoint through the endpoint; yellow is the unchanged fail-closed production gate. No production callsite installs the hook.

What changed

  • Prompts and output: the renderer reproduces the reference template and tokenizer token for token on a 30-case golden corpus (text, system, multi-turn, reasoning on/off, tools, images, edge characters). Reasoning follows the reference parser, with reasoning_content over SSE and JSON and thinking on by default. Tool calls and response_format are held until they validate.
  • Images: JPEG (baseline/progressive) and every PNG colour type and bit depth, matching Pillow/PyTorch preprocessing (PNG byte-exact with Pillow on 50 fixtures). Limits are checked before decoding (Pillow's compressed-chunk limits; at most 500 JPEG scans). Images carry <img>…</img> framing, and the media reservation now includes the RADIO tower and projector bound.
  • Serving:
    • A busy owner returns 429 before any headers.
    • DARKBLOOM_NEMOTRON_SUPER_MTP=1 (depth and rectangular|serial verification) turns on speculation. It is text-only, and images get 400.
    • DARKBLOOM_NEMOTRON_SUPER_MAX_CONCURRENT=N turns on exact batched decode.
    • Each request's reservation includes the graph prefill workspace and a decode row. A grant that is too small fails with UnserviceableGrant, naming the minimum.
  • Qualification tooling: NemotronSuperRunner (harness-template target only) serves the owner on loopback with isolated state. bench_super.py and memory_calibration.py drive it.

Evidence

Full checkpoint (88 shards verified against weight-manifest.json), M3 Ultra 60-core GPU, 256 GB, macOS 27.2, release runner, greedy, through the local endpoint:

Workload Plain, up to 8 concurrent MTP depth 3, up to 8 concurrent
TTFT, 128 / 2,048-token prompt 0.55 / 4.26 s 0.51 / 3.79 s
Decode, single request 27.9 tok/s 64.7 (128) / 52.4 (2,048) tok/s
Aggregate, 1 / 4 / 8 clients (short prompts) 24.2 / 52.2 / 62.5 tok/s 50.9 / 72.2 / 76.4 tok/s
TTFT p50 at 8 clients 1.75 s 1.17 s
Image 1024² TTFT 3.22 s refused
  • Speculation was byte-identical to plain on 6 natural prompts.
  • Tiled prefill (default, ~480-540 tok/s) changes wording on some prompts against exact prefill; answers checked correct.
  • Cold start to ready takes 34 s.
  • Prefix caching (opt-in, DARKBLOOM_PREFIX_CACHE_MEMORY=1): text-only, on the contiguous backend.
    • Checkpoints are taken only at multiples of the 2,048-token prefill chunk, so a restore replays the cold chunk split exactly.
    • Cache bytes come out of the KV grant before the grant check and stay reserved until native retirement.
    • The MTP owner and image requests never use it.
    • Full checkpoint: an 8,128-token prompt took 16.7 s to first token cold and 4.3 s warm, with identical output; a new question on the same document took 4.4 s.
  • Paged KV is not used.
  • Fixture suites at this head: 59 Swift Testing + 23 XCTest passed (1 skipped), 0 failed. docs-impact (against ab423c1c0), changelog and diff checks pass.
  • Receipt: scripts/nemotron-qualification/validation-2026-10-15.json.

Status

Ready for review (head f8a2f791). This is the intake layer; the production slot is #1517, stacked on it. Engine features here are opt-in through the local owner.

Addressed in #1517 (not here): production discovery and managed load, the coordinator request path and capacity quotes, paged KV together with image prefix reuse and MTP with prefix reuse (all on by default there), and the R2 single-download package. Platform registration, prompt sidecar and admission are Layr-Labs/darkbloom-platform#117–#120. The 700–800 tok/s prefill target is not met (measured ~540–560 tok/s on the M3 Ultra; see #1517's qualification report).

Merge Danger

Door: two-way

Draft only. Shared bridge/factory code gains Super-specific paths and a DEBUG-only test gate; needs the canonical provider build and test run before merge.

Blast Radius: provider

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 21, 2026 11:51pm UTC
d-inference-console-ui-dev Ready Ready Preview Oct 21, 2026 11:51pm UTC
d-inference-landing Ready Ready Preview Oct 21, 2026 11:51pm UTC
darkbloom-status Ready Ready Preview Oct 21, 2026 11:51pm UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 21, 2026 11:51pm UTC

Request Review

…fixture runs

The SDK draft gained two commits that fix its Lint and fork.yaml gates
(swift-format output and a fork.yaml section for the Nemotron Super
components). Neither changes behavior.

At SDK 1ce44e9a and these provider sources, the shipped fixture
harnesses build and pass on the GPU: SDK 111 Swift Testing tests in 32
suites plus 2 XCTest tests; provider 25 Swift Testing tests in 6 suites
plus 12 XCTest tests, including the corrected
imageHTTPResetRetainsChargeUntilTerminalRetires test that was pending a
rerun. These are synthetic fixtures, not a full-checkpoint run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 19 commits October 15, 2026 16:16
…e and tokenizer

prompt_golden.py renders the pinned chat_template.jinja as Transformers'
apply_chat_template does, expands image placeholders per
processing_nemotron_h_omni.py and tokenizes with the pinned tokenizer.json
through the tokenizers library (pinned jinja2/markupsafe/tokenizers, isolated
interpreter). The committed corpus holds 30 request bodies, rendered prompts
and token IDs; the tokenizer itself is not committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Super prompt contract now reproduces the reference apply_chat_template
bytes: request-order tool schemas and tool-call arguments (strict ordered JSON
parser into Jinja values), Python str/strip/json.dumps filters bound only for
the pinned template, swift-jinja comment normalization, and the processor's
<img>/<image>*n/</img> placeholder expansion. NemotronSuperRequestPlan resolves
controls (template defaults; force_nonempty_content added), the shared
tool-choice policy and the response-format instruction once, and refuses output
controls the owner cannot honor.

Golden tests check rendered text and image grids against the corpus always, and
token IDs through swift-transformers when NEMOTRON_SUPER_REFERENCE_DIR names
the pinned tokenizer (all 30 cases match).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and JSON output

NemotronSuperReasoningChannel follows vLLM ultra_v3 over deepseek_r1: streamed
output drops <think> deltas inside reasoning and ends it at the first
</think>; a complete response discards text before <think>, strips the
template-owned newline, and honors force_nonempty_content; thinking off makes
all output content. NemotronSuperLocalOutput streams reasoning and plain
content, routes only content through the native Nemotron frame parser, and
withholds tool calls, forced-tool output and JSON content until the shared
ToolConstraintValidation and OpenAIResponseFormatSupport checks pass. Content
is split at each '<' so the shared parser cannot drop text that precedes an
open frame; mid-stream parse failures are refused before exposure. Output
stays bounded. runValidatedText uses the same plan and complete-mode split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NemotronSuperRunner is an executable target of the qualification harness
template only; the shipping provider manifest has no such product. It
loads the pinned checkpoint through NemotronSuperLocalLoad (or mirrors
that transaction on the tiny synthetic fixture), serves the real local
HTTP stack with the opt-in Super image hook on 127.0.0.1 with isolated
home/state and a per-run token, and drains and retires the owner on
SIGINT/SIGTERM. A loopback diagnostics listener reports process
footprint (kernel interval maxima), MLX active/cache/peak and the
LOAD/media/KV charges held, and holds a test ballast for near-limit
probes. --preflight checks checkpoint identity without reading shards.

Per-reservation bytes and the loaded owner are read by reflection in one
file until internal accessors exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he local hook

The opt-in owner hook now handles every chat request for the Super model ID.
Text renders with the owner's own tokenizer and pinned template before headers
and runs on the owner's bridge through a hook-owned NemotronSuperLocalBinding
(drain() joins it; the owner refuses after close or a retained fault). Images
keep the owner's runEncoded path. Both relay native chunks through the request
plan's output parser, so reasoning_content and content stream as SSE deltas or
JSON fields, tool_calls leave only after validation, and response_format
content is withheld and normalized. enable_thinking true or absent now uses
the template default; contradictory controls stay 400, schema/forced-tool
violations 422.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… runner

bench_super.py (stdlib, python3 -I) measures cold load from runner
events, first/cold/warm TTFT, prefill, steady decode and end-to-end
output rates for text contexts and inline PNG images, and latency
percentiles under concurrency, with greedy fixed-seed requests and a
receipt holding hardware/OS, git heads plus diff hashes, model
identity, settings and raw samples. An arm label, --extra-body and
runner --engine-env entries support plain/speculative A/B; compare
refuses receipts with different workloads.

memory_calibration.py compares measured footprint and MLX peaks with
the LOAD and per-request reservations, probes near-limit admission
with a ledger ballast, cancels at each observed phase, runs concurrent
requests, and checks SIGTERM drain plus restart. Procedures live in
super-runner.md and memory_calibration.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t controls

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DARKBLOOM_NEMOTRON_SUPER_MTP=1 (default off) makes the unpublished Super
load transaction add the embedded head's payload and loader construction
allowance to its single LOAD claim, load the head in its own fenced epoch and
serve NemotronSuperMTPTextTarget with the SDK assistant: greedy, one request,
fixed depth (DARKBLOOM_NEMOTRON_SUPER_MTP_DEPTH 1 to 3) and serial target
verification. The engine admits the assistant's bounded per-request charge
before allocation. A speculating owner refuses every media entry.

The shared production model dispatch does not yet recognize the MTP target,
so NemotronSuperLocalMTP assembles the contiguous build itself, resolving the
calibrated scheduler policy on the ordinary adapter over the same composite.

Synthetic provider tests serve identical text through the real bridge with
and without speculation at depths one and three, refuse media, and retire
every LOAD/KV charge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behavior-preserving refactor pass: no shadowed marker binding, no keyword-named
local, one computed reasoning value, a one-line route flag, and comments on why
the relay maps parser errors route-independently and why the filter rebinding
is exact only for the hash-pinned template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner.localTextBinding mints one NemotronSuperLocalBinding on the owner's own
bridge and tokenizer; its acquisition refuses once the owner closes or retains
a fault, without consulting the image binding (which a speculating owner
refuses). closeAfterDrain now drains it before the image binding and bridge,
so hosts no longer drain text separately. A synthetic test closes the owner
while a request may still stream and checks drain, refusal and full refund.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The isolated SDK harness template compiles the new graph/eager parity,
trunk integration and opt-in real-dimension benchmark tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the independent refactor review:
- Synthetic load retains construction scope and owners for the process
  lifetime on a retained fault or failed retirement, creates residency
  inside the failure path, and keeps the scope alive while serving.
- Checkpoint load retires the owner if the image hook cannot be built.
- --kv-bytes-per-token may only raise the configured rate, --cap-fraction
  may only lower the default cap, and an inherited
  DARKBLOOM_MEM_CAP_FRACTION is removed and the cap recorded.
- Exit 4 reports a clean retirement after a listener failure or a timed
  out drain; only a second signal force-exits (via _exit); a shutdown
  during load serves nothing; every listener exit settles its bind waiter.
- The sampler reads charge rows before the other counters, drops stale
  or pre-reset samples, records request charges held at the same time,
  and reports ledger charge outside the rows as unattributed.
- Preflight writes runner-preflight.json instead of a ready file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the independent refactor review:
- Reservation-versus-peak and near-limit use the request charges held
  at the same time, not a sum of per-kind maxima.
- Decode-phase aborts are recorded; near-limit reports not_exercised
  when the ballast is refused or the reference is within the margin.
- Settling waits for request charges and HTTP/bridge work, and reports
  engine-owner-only ledger movement as review instead of a leak.
- Receipts are written before stopping a launched runner; a restarted
  runner is always stopped; compare also requires the same model
  identity and runner build configuration.
- Workload parsing and provenance move into the shared client; docs
  list every runner option, exit code and diagnostics field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A local SSE server checks TTFT, prefill, decode and end-to-end rate
math against usage and delta times, that an abort from the first-delta
callback is recorded, loopback-only endpoints, workload parsing,
percentile interpolation and the RGB8 PNG generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or Nemotron Super

Replace the narrow RGB8 PNG subset with content-sniffed PNG and JPEG
ingress that reproduces transformers load_image (Pillow exif_transpose,
then convert("RGB")):

- PNG is decoded in-process: every colour type and bit depth, Adam7,
  all filters and split IDAT, with Pillow's rawmode conversions (16-bit
  high byte, I;16 gray clipping, palette expansion, alpha dropped, tRNS
  and colour-management chunks ignored). zlib verifies the stream and
  its Adler-32; the stream must end exactly at the last IDAT byte.
- EXIF IFD0 and XMP tiff:Orientation follow Pillow's lookup order and
  truncation rules; APNG frame 0 is the IDAT image.
- JPEG frames (8-bit Huffman baseline/extended/progressive) are checked
  from their markers, then decoded by ImageIO and read without drawing.
  Only colour interpretations on which libjpeg-turbo and ImageIO agree
  are admitted; CMYK is read Adobe-inverted as Pillow does.
- Declared geometry, pixel count and encoded size are bounded before any
  raster buffer exists; rows are written at their oriented position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er images

- 80 synthetic fixtures (50 PNG, 30 JPEG; 352 KB) with Pillow 12.2.0
  RGB8 references and CPU PyTorch 2.12.0 processor tensors, generated
  reproducibly by scripts/nemotron-qualification/image-goldens.
- PNG must match Pillow byte for byte (oriented and unoriented) and the
  final normalized tensors bitwise; JPEG must stay within per-chroma
  ImageIO bounds derived from measurement.
- Refusal, limit, signature-sniffing, cancellation and mutation tests,
  plus live loopback HTTP requests through the tiny synthetic owner.
- Register the new test files in the shipped provider harness template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reference-template prompt rendering, the ultra_v3 reasoning channel with
validated tool and JSON output, the golden prompt corpus and the local
hook's text, reasoning, tool and JSON serving. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The qualification-only loopback Nemotron Super runner, the benchmark and
memory calibration tooling and its client tests.

Conflict: scripts/nemotron-qualification/README.md, where the prompt track
and the runner track each added a section after the bundle verification
text. Resolved by keeping both, "Prompt and tokenizer parity" first and
"Loopback runner, benchmark and memory calibration" second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gajesh2007

Copy link
Copy Markdown
Member

Update: I merged master again, through eaaf5e615 (head 7c548f8d3). The merge was clean. Locally, 72 Super, signal and CLI tests plus the 591 CLI tests pass, and all CI checks are green. The earlier CI failure on b1a590e0f was a runner GPU-driver hang (ioGPUResourceFinalize inside Memory.clearCache); it passed on rerun.

…r-vl-intake

Resolves the Last updated stamps of hardware-support.md and prefix-cache.md and takes master's mlx-swift-lm pin 19634dd8 (Layr-Labs/mlx-swift-lm main; contains this branch's 025d65a4).
…ix-cache text

The master merge (c221da6) resolved these two files' Last updated conflict by taking master's whole file, dropping this branch's Super paragraphs. Three-way merge of both sides; only the stamp takes master's 2026-10-21.
…t-lm

The master merge moved this branch's mlx-swift-lm pin to 19634dd8, whose
NemotronHModel.prefillActivationBoundBytes is (1 << 30) + tokens * (15 << 18)
(re-measured whole-chunk bound); the child branches already assert it.
@Gajesh2007
Gajesh2007 merged commit 811f7ed into master Oct 21, 2026
21 of 22 checks passed
jonathan308 added a commit that referenced this pull request Oct 21, 2026
#1510 was squash-merged into master (811f7ed) and #1517 then merged into its
stale stacked base instead of master. This branch already holds #1510's head
(3cfd983), so overlapping hunks keep this branch's version; master's only other
change, #1533 (threat-review CI), merges in unchanged. Re-opened onto master.
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
Refresh before review: master gained #1510 and #1538 (Nemotron Super). The
one conflict is the measuredActivationFloorsBytes row in
docs/architecture/hardware-support.md; keep master's Nemotron Super floor
and this branch's note that the gpt-oss-20b floor was measured on the
float32 path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 22, 2026
Brings the Nemotron 3.5 Super managed provider (#1510, #1538) and #1533.
Conflicts in the shared provider files keep both models side by side:
supported-model list and managed-load refusals, scanner load estimates
(GLM, then Super, then the existing paths; the combined optional chain is
split for the type checker), MTP preparation, the failed-build unwind
(master's restoreNewcomerReslice, then GLM's validated failure), the
standalone partition (Super excluded before GLM's local qualification) and
the local chat responder. There, Super's raw-chat hook is tried first and
the inferred reasoning parser applies only to the generic service: Super's
owner refuses a request parser, as on the coordinator path. Doc stamps
take master's date.

This branch was successfully deployed

5 active deployments
Preview – d-inference-console-ui-dev — 3cfd983b Deployed Oct 21, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 3cfd983b Deployed Oct 21, 2026 by vercel[bot]
Preview – d-inference-landing — 3cfd983b Deployed Oct 21, 2026 by vercel[bot]
Preview – d-inference — 3cfd983b Deployed Oct 21, 2026 by vercel[bot]
Preview – darkbloom-status — 3cfd983b Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants