[Bug]: Qwen3-30B-A3B NVFP4 HF export fails to load in TRT-LLM on DGX Spark/GB10 (weight_scale mismatch)
System Info
- CPU architecture: aarch64
- Host memory: 121 GiB RAM
- GPU properties:
- GPU name: NVIDIA GB10 (DGX Spark)
- GPU memory: UMA / not reported by
nvidia-smi --query-gpu=memory.totalon this host
- Libraries / containers tested:
- Export line:
- TensorRT-LLM container:
nvcr.io/nvidia/tensorrt-llm/release:1.2.0 - TensorRT-LLM:
1.2.0 - nvidia-modelopt:
0.37.0 - transformers during export/smoke overlay:
4.51.0 - torch:
2.10.0a0+b4e4ee81d3.nv25.12
- TensorRT-LLM container:
- Runtime candidates tested against the SAME exported checkpoint:
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc10(tensorrt_llm 1.3.0rc10, repo digestsha256:fd68e7500952100df58bb3682c4ea69b6e6723dc4d13dfc911a1bdee80ac389a)nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc9(tensorrt_llm 1.3.0rc9, repo digestsha256:6c3c31a599a0fe744aa626abc49a49f6f7b642676e8162404f25bf1fef1f0e6d)
- Model:
Qwen/Qwen3-30B-A3B-Instruct-2507
- Export line:
- NVIDIA driver version:
580.142 - OS: Linux
Who can help?
@Tracin @Fridah-nv
Information
- [x] The official example scripts
- [x] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [x] My own task or dataset (give details below)
Reproduction
We can reproduce this with a Qwen3 MoE NVFP4 HF export on DGX Spark / GB10.
-
Export the model to HF NVFP4 with ModelOpt 0.37.0. We used the TensorRT-LLM 1.2.0 container with a controlled overlay
transformers==4.51.0becausenvidia-modelopt[hf]declarestransformers<4.57. -
Reuse the exported checkpoint (same export for every runtime candidate):
config.jsonhf_quant_config.jsonmodel.safetensors.index.jsonmodel-00001-of-00004.safetensors...model-00004-of-00004.safetensors
-
Try to load it with TRT-LLM PyTorch runtime. Minimal probe used in
1.3.0rc10/1.3.0rc9:
from tensorrt_llm import LLM
from tensorrt_llm.sampling_params import SamplingParams
llm = LLM(
model="/workspace/model_export",
)
outputs = llm.generate(["Hola"], SamplingParams(max_tokens=8))
print(outputs[0].outputs[0].text)
- We also tested with:
export TRTLLM_MOE_BACKEND=TRITON
Observed errors:
- In
1.2.0builtin runtime:
Error executing load_single_module with args (model.layers.0.self_attn.qkv_proj, ...)
RuntimeError: The size of tensor a (655360) must match the size of tensor b (327680) at non-singleton dimension 0
- In
1.3.0rc9and1.3.0rc10runtime direct TRT-LLM:
model.layers.0.self_attn.o_proj
RuntimeError: The size of tensor a (524288) must match the size of tensor b (262144) at non-singleton dimension 0
Additional context from our exported checkpoint:
config.jsonreportsQwen3MoeForCausalLMmax_position_embeddings = 262144- Export status is complete; the checkpoint is physically materialized and surface HF checks (
AutoConfig+AutoTokenizer) pass. - We are NOT using dense HF
AutoModelForCausalLM.from_pretrained(...)as a success gate anymore, because it gives false negatives on this packaged NVFP4 export format.
Expected behavior
A HF NVFP4 export of Qwen/Qwen3-30B-A3B-Instruct-2507 produced with ModelOpt 0.37.0 should be loadable by a recent TRT-LLM PyTorch runtime on DGX Spark / GB10, at least for a minimal runtime initialization and short generation smoke test.
actual behavior
The export is created successfully, but TRT-LLM runtime fails to load it consistently.
1.2.0fails while loadingself_attn.qkv_proj1.3.0rc9and1.3.0rc10both fail while loadingself_attn.o_projTRTLLM_MOE_BACKEND=TRITONdoes not help, which suggests the failure happens before MoE dispatch becomes relevant.
additional notes
- I searched existing issues and found related NVFP4 scale/export work, especially:
- #11988
- PR #11991
- issue #9503 (different NVFP4 managed-weights failure) but I did not find an issue that matches this exact runtime load pattern for a HF ModelOpt NVFP4 export of Qwen3 MoE on DGX Spark / GB10.
- The mismatch is consistent across multiple TRT-LLM runtime versions, which makes this look more like a runtime/export contract problem than a one-off container regression.
- We now treat the export as
export_completed_runtime_validation_blockedin our lab state because the exported package exists but TRT-LLM runtime cannot load it yet. - If useful, I can provide the exact
phase_summary.json,validation_summary.json, and runtime probe logs from these runs.
Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.