Skip to content

Add the nvidia-nvfp4 target variant (nvidia/GLM-5.3-Flash-NVFP4) to the GLM-5.3 launcher and mesh renderer - #258

Open
sethforprivacy wants to merge 1 commit into
FujitsuPolycom:mainfrom
sethforprivacy:nvidia-nvfp4-variant
Open

Add the nvidia-nvfp4 target variant (nvidia/GLM-5.3-Flash-NVFP4) to the GLM-5.3 launcher and mesh renderer#258
sethforprivacy wants to merge 1 commit into
FujitsuPolycom:mainfrom
sethforprivacy:nvidia-nvfp4-variant

Conversation

@sethforprivacy

@sethforprivacy sethforprivacy commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

NVIDIA published an official ModelOpt NVFP4 export of GLM-5.3-Flash on
2026-09-09 (nvidia/GLM-5.3-Flash-NVFP4 @ 423acf37583782c51c142d145aef733d72943d93,
MIT). It is a plain quant_algo: NVFP4 checkpoint with an ignore list —
BF16 attention, shared experts, router gates, embeddings, lm_head and vision
tower; NVFP4 routed experts and the three dense MLPs — not the
MIXED_PRECISION layout of the qualified nvfp4-spark target. Its native MTP
layer (layers.45) ships BF16 but is not covered by the checkpoint's ignore
list.

The launcher and the managed mesh renderer currently cannot select it: the
launcher passes --quantization modelopt_mixed unconditionally and only knows
two TARGET_MODEL_VARIANT identities, and profile.py renders nvfp4-spark
for every site.

Change

  • launch-rank.sh: a third variant, nvidia-nvfp4, pinning that revision's
    config.json / model.safetensors.index.json SHA-256s and a SparkCache
    fingerprint (sha256 of nvidia/GLM-5.3-Flash-NVFP4@<revision>). Each
    variant now states its vLLM loader (TARGET_QUANTIZATION, modelopt_mixed
    for the two existing variants, modelopt for the new one) and whether the
    native MTP predictor must be excluded from quantization. When it must, the
    launcher extends the verified config.json's quantization_config.ignore
    with the predictor layers (num_hidden_layers .. +num_nextn_predict_layers,
    both the HF and loader-side spellings) and passes the result as
    --hf-overrides. The override is derived after the identity check, so a
    live launch never parses an unverified file; the offline spec omits it when
    the checkpoint is absent. Malformed config, no quantization_config, or no
    predictor layers fail closed.
  • profile.py: optional site field target_model_variant
    (nvfp4-spark default, nvidia-nvfp4), validated against a fixed set.
    Omitting it, or naming the default, renders byte-identical rank
    environments. A non-default variant also suffixes
    SPARKCACHE_CACHE_NAMESPACE with -<variant> so the two checkpoints never
    share persisted pages or an eviction pool. For nvidia-nvfp4 the render
    selects LOAD_FORMAT=safetensors and DFLASH_WARMUP_TIMEOUT_SECONDS=1500:
    the checkpoint's 33 shards of ~6.2 GB overflow GB10 unified memory under
    fastsafetensors (every rank hit NV_ERR_NO_MEMORY ~30 s into the load, one
    reached 118 GiB and was cgroup-OOM-flagged), and the host-mmap load takes
    ~500 s for 50 GiB per rank, which the 600 s readiness deadline in
    serve-with-warmup.py does not cover.
  • Docs: site-field table row in the mesh quickstart; launcher README note.
  • Tests: variant acceptance/rejection, default-render invariance, explicit
    default equals omitted, namespace suffixing and re-render stability; launcher
    contract for the new variant (--quantization modelopt, override content
    preserves the checkpoint's own entries and appends the predictor patterns,
    fingerprint plumbed into the SparkCache connector, same hashed file set),
    the qualified variant still passes no override, identity mismatch and
    undecodable/incomplete configs fail closed, error text updated.

Nothing in the qualified nvfp4-spark path changes: default renders are
byte-identical and the existing contract tests pass unchanged apart from the
variant error message.

Validation

Offline: python -m pytest runtime/glm53-spark-mtp3-mesh runtime/glm53-flash-jj-r8-gb10
on Linux (bash 5.2, python:3.12): base 764 passed / patched 781 passed, 0 failed, bash -n on the launcher, ruff check
clean.

Hardware (private four-Spark TP4/DCP4 ring, published cache+checkpoints image
6921a6c1…, 2026-09-10; details in #257): loads and serves with
B12xNvFp4LinearKernel + B12X NVFP4 MoE + BF16 MLA/KDA + native MTP3;
50.11 GiB weights per rank; 8-run corruption probe 8/8, #138 signature 6/6,
32-image/video/alias vision checks clean; KLD vs the BF16 teacher 0.0508 vs
0.0522 for nvfp4-spark on the same 24 sealed-panel windows (top-1 0.930 vs
0.929); clean-boot ladders within 3–10 % on decode and 4–8 % ahead on prefill;
1 h concurrent long-context soak 0 failures / 0 preemptions. The variant is
marked research-only in the docs; no receipt claims to cover it.

The launcher gains a third TARGET_MODEL_VARIANT pinning the official
ModelOpt NVFP4 checkpoint (revision 423acf37), selects the vLLM loader per
variant (modelopt for it, modelopt_mixed for the existing two), and derives
an --hf-overrides quantization_config from the verified config.json that
keeps the BF16 native-MTP predictor layer unquantized. The managed mesh
renderer accepts an optional target_model_variant site field; omitting it
renders byte-identical environments, and a non-default variant gets its
own SparkCache namespace suffix. Tracks FujitsuPolycom#257.
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.

1 participant