NVIDIA / NVIDIA/TensorRT-Edge-LLM
Qwen3.5-35B-A3B GPTQ INT4 ONNX export ERROR using tensorrt edge llm 0.9.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 563
- Forks
- 135
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 1
Description
Describe the bug
When exporting the Hugging Face checkpoint of Qwen3.5-35B-A3B GPTQ INT4 with TensorRT Edge-LLM 0.9.0, the generated ONNX graph appears to combine the shared-expert output and routed-expert output twice inside each MoE layer.
The expected MoE output should conceptually be computed once as:
moe_output = routed_expert_output + shared_expert_output
However, inspection of the exported ONNX graph shows two equivalent accumulation paths involving the shared-expert and routed-expert outputs. In other words, the operation that adds the shared-expert branch to the routed-expert branch appears to be inserted twice. The onnx graph is showed below:
No explicit Python exception is raised during export. The issue was identified by inspecting the generated ONNX graph.
Steps/Code to reproduce bug
- Install TensorRT Edge-LLM 0.9.0.
- Download the open-source Hugging Face checkpoint for Qwen3.5-35B-A3B GPTQ INT4.
- Export the checkpoint to ONNX using
tensorrt-edgellm-export-llm. - Open the exported ONNX model with Netron or another ONNX graph viewer.
- Inspect the output aggregation section of an MoE decoder layer.
Installation method:
pip install .
Export command used:
tensorrt-edgellm-export-llm \
--model_dir <DIR_OF_HUGGINGFACE_MODEL> \
--output_dir <ONNX_OUTPUT_DIRECTORY> \
Expected behavior
Fix the onnx export bug~
The exported ONNX model should preserve the numerical behavior of the original Hugging Face model and should be usable for subsequent TensorRT engine building and inference.
System information (x86 Host with GPU)
-
Container used (if applicable): No applicable?
-
OS (e.g., Ubuntu 22.04, CentOS 7): Ubuntu 22.04 LTS
-
CPU architecture: x86_64
-
GPU name (e.g. H100, A100, RTX 4090): A100
-
GPU memory size: 80G
-
Number of GPUs: 8
-
Library versions:
- Python: 3.10.6
- TensorRT Edge-LLM version or commit hash: 0.9.0
- CUDA: 13.0
- PyTorch: 2.12.0+cu130
- Transformers: 5.9.0
- ModelOpt: 0.44.0
- ONNX: 1.19.0
-
Any other details that may help: No~
- Model:
Qwen3.5-35B-A3B GPTQ INT4 - Model source: Hugging Face open-source checkpoint
- Export itself does not necessarily report an explicit exception.
- The incorrect behavior was identified by inspecting the exported ONNX graph.
- The generated ONNX model fails or behaves incorrectly in the subsequent build/inference pipeline.
- ONNX graph viewer used:
<NETRON_OR_OTHER_TOOL_VERSION>
- Model:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the export with tensorrt-edgellm-export-llm for the Qwen3.5-35B-A3B GPTQ INT4 checkpoint, then inspect the MoE output aggregation in the generated ONNX graph with Netron. Compare the exported graph with the expected single routed-plus-shared accumulation and verify that the resulting model preserves behavior and can proceed through TensorRT engine building and inference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100