TensorRT-LLM refuses a quantized checkpoint because its weight mapper does not recognise the export layout
TensorRT-LLM loads a checkpoint through a per-model weight mapper that expects tensor names and groupings in a particular layout. A quantized export written by a different tool, or by a different version of the same tool, can be entirely valid and still be rejected, because the mapper has no rule for the names it contains.
The file is fine and the reader has no rule for it. Load it with the tool that produced it to prove that, then align the quantizer version with the TensorRT-LLM version rather than editing the checkpoint.
What this failure is
A checkpoint load failure caused by a mismatch between the tensor layout a quantized export was written in and the layout the target architecture's weight mapper was written to read, with no corruption of the file involved.
Why it happens (the mechanism)
A quantized checkpoint is not one tensor per parameter. It carries packed weights alongside scales and zero points whose names and grouping are chosen by the exporting tool, and the mapper on the reading side hard-codes the arrangement it was written against. Two correct programs can therefore disagree about a correct file, and they do so most often when their versions have drifted apart.
What you'll observe
- A checkpoint that other tools load without complaint is refused here
- The rejection names a mapper or a key rather than saying what layout was expected
- Re-exporting with different settings sometimes works, without making clear which setting mattered
- The same model in an unquantized form loads normally
Common symptoms and what they mean
| Symptom | Why it happens |
|---|---|
| A weight mapper rejecting ModelOpt W4A16_AWQ checkpoints during load | Loading is a translation step, not a copy. Each supported architecture has a mapper that knows which exported tensor becomes which internal parameter, including how quantized weights, scales and zero points are grouped. That knowledge is written per scheme, so a scheme it was not written for has no route through. |
| Errors naming a model-specific weight mapper rather than a file or a checksum | Quantized exports carry additional tensors that unquantized ones do not, and their names differ between producers and between versions of one producer. The mapper is therefore coupled to the exporting tool in a way the checkpoint format alone does not express, which is why a file can be internally consistent and still unloadable. |
| Failure occurring at load time, before any engine build or serving begins | The rejection is not evidence of corruption. Nothing about the bytes is wrong; the reader simply has no rule for the layout it found, which is why other tools accept the identical file. |
| The unquantized variant of the same model loading without error | Loading is a translation step, not a copy. Each supported architecture has a mapper that knows which exported tensor becomes which internal parameter, including how quantized weights, scales and zero points are grouped. That knowledge is written per scheme, so a scheme it was not written for has no route through. |
Which systems are affected
- ModelOpt exports in W4A16 AWQ and neighbouring quantization schemes
- Model families whose mapper was written against one export tool's naming
- Version skew between the quantizer that wrote the checkpoint and the TensorRT-LLM that reads it
- Custom or community quantizations reusing an architecture name without matching its expected layout
How to confirm this is the problem
Apply the following checklist to a small reproduction: each box below is a positive signal that you are looking at this exact failure rather than a sibling in the same taxonomy.
- ✓Load the checkpoint with the tool that wrote it. Success confirms the bytes are sound and the problem is the reader's expectations.
- ✓List the tensor names in the export and compare a sample against those the mapper looks for. A consistent difference in prefix or grouping identifies the mismatch.
- ✓Load the unquantized variant of the same model. Success there shows the architecture is supported and narrows the fault to the quantized layout.
Example training logs (fingerprint)
[TRT-LLM] [E] qwen3_5_weight_mapper rejects ModelOpt W4A16_AWQ checkpoints
[TRT-LLM] [I] Loading weights via the architecture weight mapperTimestamps and exact values vary across runs, but the pattern. An info-level start, an early WARN, an ERROR carrying the symptom. Is the actual fingerprint you should alert on. The Denpex platform flags this combination automatically.
Root cause, fix & prevention, signed in
Sign up free to see why this failure really happens, the exact remediation steps, and the production-grade prevention pattern. You also get 3 free full diagnoses for your own training logs.
Sign up free. Unlock the full analysisNo credit card · 3 free diagnoses · Instant access
Why the recommended fix works
Aligning the producer and the runtime removes the drift that the mapper is sensitive to, so the names it looks for are the names present. Re-exporting to a documented scheme works for the same reason from the other side. Comparing tensor names turns the disagreement into a specific, visible difference rather than a trial of settings.
Code examples
// Typical pattern:
import torch.optim as optim
optimizer = optim.AdamW(model.parameters(), lr=3e-4)
scheduler = optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=num_training_steps)
for step in range(num_training_steps):
optimizer.zero_grad()
loss = model(batch)
loss.backward()
optimizer.step()
scheduler.step()Adapt the snippet to your framework. The same pattern holds for PyTorch Lightning, Hugging Face Trainer, DeepSpeed, Megatron-LM, and vLLM training wrappers. Where the wrapper exposes a config flag (for examplelr_scheduler_type in Trainer), prefer the flag over the imperative API to keep the schedule declarative and reproducible.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| ModelOpt export refused | Match the ModelOpt version to the TensorRT-LLM release | Naming a mapper expects is set by the producer it was written against. |
| Scheme close to a supported one | Re-export to the documented scheme for the architecture | Neighbouring schemes differ in layout while sounding interchangeable. |
| Suspected file damage | Load with the producing tool first | A clean load rules out corruption in one step. |
| Custom or community quantization | Compare tensor names against the mapper's expectations | A shared architecture name does not imply a shared layout. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| What the rejection means | The reader has no rule for this layout | Read as the checkpoint being corrupt |
| Where compatibility lives | Between the quantizer version and the runtime version | Assumed to be a property of the file alone |
| Why other tools load it | They have their own mappers | Taken as proof the runtime is at fault |
Real engineering notes
“The word rejects invites a hunt for a damaged file, and that hunt is always fruitless here. The strongest early move is to load the checkpoint with its own producer: it takes a minute, and a clean load converts the question from is this file broken into which of these two tools is out of date. Skipping that step is how teams end up re-downloading weights repeatedly and re-quantizing at random.”
Visual fingerprint
quantizer export architecture weight mapper
layer.qweight expects layer.weight_packed
layer.scales --> expects layer.weight_scale
layer.zeros expects layer.weight_zero_point
|
no rule for these names -> rejectedRelated failures to investigate next
Root cause, fix & prevention
Frequently asked questions
Twelve targeted questions that engineers and on-call staff most commonly ask about this failure.
Is my checkpoint corrupt?
Why does another framework load it fine?
Which version should I change?
Can I rename the tensors by hand?
Don't just read the fix, diagnose your run
The encyclopedia tells you what went wrong. Denpex tells you what went wrong in YOUR training run. With your logs, your config, and your stack.