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
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: NVFP4checkpoint with anignorelist —BF16 attention, shared experts, router gates, embeddings,
lm_headand visiontower; NVFP4 routed experts and the three dense MLPs — not the
MIXED_PRECISIONlayout of the qualifiednvfp4-sparktarget. Its native MTPlayer (
layers.45) ships BF16 but is not covered by the checkpoint'signorelist.
The launcher and the managed mesh renderer currently cannot select it: the
launcher passes
--quantization modelopt_mixedunconditionally and only knowstwo
TARGET_MODEL_VARIANTidentities, andprofile.pyrendersnvfp4-sparkfor every site.
Change
launch-rank.sh: a third variant,nvidia-nvfp4, pinning that revision'sconfig.json/model.safetensors.index.jsonSHA-256s and a SparkCachefingerprint (sha256 of
nvidia/GLM-5.3-Flash-NVFP4@<revision>). Eachvariant now states its vLLM loader (
TARGET_QUANTIZATION,modelopt_mixedfor the two existing variants,
modeloptfor the new one) and whether thenative MTP predictor must be excluded from quantization. When it must, the
launcher extends the verified
config.json'squantization_config.ignorewith 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 alive launch never parses an unverified file; the offline spec omits it when
the checkpoint is absent. Malformed config, no
quantization_config, or nopredictor layers fail closed.
profile.py: optional site fieldtarget_model_variant(
nvfp4-sparkdefault,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_NAMESPACEwith-<variant>so the two checkpoints nevershare persisted pages or an eviction pool. For
nvidia-nvfp4the renderselects
LOAD_FORMAT=safetensorsandDFLASH_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, onereached 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.pydoes not cover.default equals omitted, namespace suffixing and re-render stability; launcher
contract for the new variant (
--quantization modelopt, override contentpreserves 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-sparkpath changes: default renders arebyte-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-gb10on Linux (bash 5.2, python:3.12): base 764 passed / patched 781 passed, 0 failed,
bash -non the launcher,ruff checkclean.
Hardware (private four-Spark TP4/DCP4 ring, published cache+checkpoints image
6921a6c1…, 2026-09-10; details in #257): loads and serves withB12xNvFp4LinearKernel+ 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-sparkon the same 24 sealed-panel windows (top-1 0.930 vs0.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.