[Bug]: Qwen3.8-27B NVFP4 cannot load with the PyTorch backend
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
- TensorRT-LLM: current
main - Backend: PyTorch
- Model:
unsloth/Qwen3.8-27B-NVFP4 - Reproduced on: DGX Spark / SM121
Who can help?
No response
Information
- The official example scripts
- The
transformerscheckpoint loader - The PyTorch backend
Reproduction
Attempt to load the checkpoint through LLM(...) or trtllm-serve with the PyTorch backend and text-only multimodal execution (disable_mm_encoder=True).
The checkpoint is a dense Qwen3.8/Qwen3.5-family VLM with mixed compressed-tensors quantization: packed NVFP4 dense MLP weights, FP8 attention/GDN/lm_head weights, FP8 KV cache, and one MTP layer.
Expected behavior
The checkpoint should select Qwen3_5VLModel, preserve each config group's quantization, map packed compressed-tensors names to TRT-LLM parameters, construct a rowwise-FP8 lm_head, and generate coherent text with and without MTP.
Actual behavior
Current main has several independent blockers:
- Generic dense Qwen3.6/3.8 VLM configs are classified as Qwen-Image-Bench configs.
- The compressed-tensors parser rejects or loses multiple
config_groups. - Packed NVFP4 names/scales are not normalized for the Qwen mapper.
- Dense MLP quant-config keys do not match the
_DenseMlpAdapterruntime module path. - The explicit FP8
lm_headentry is dropped, which would cast the FP8 weight to bf16 and discard its scale.
Validation
With focused fixes for those concerns, an SM121 full-model smoke loaded 23.91 GiB of model weights, selected native trtllm::nvfp4_gemm, constructed lm_head as FP8_PER_CHANNEL_PER_TOKEN, and generated coherent 64-token responses for two prompts. The same stack also generated coherently with the checkpoint MTP layer enabled.
The changes will be proposed as small dependent PRs so each concern can be reviewed independently.
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 checkpoint load through LLM(...) or trtllm-serve with the PyTorch backend and disable_mm_encoder=True. Read the transformers checkpoint loader and PyTorch backend around Qwen config classification, compressed-tensors config_groups, Qwen name mapping, _DenseMlpAdapter paths, and lm_head handling. Done means the model selects Qwen3_5VLModel, preserves quantization, loads on SM121, and generates coherent text with and without MTP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100