Skip to content

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.

Quick answer

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.

Data Integrity#tensorrt-llm#modelopt#awq#w4a16#weight-mapper#checkpoint-loading

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

SymptomWhy it happens
A weight mapper rejecting ModelOpt W4A16_AWQ checkpoints during loadLoading 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 checksumQuantized 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 beginsThe 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 errorLoading 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)

training.log (synthetic fingerprint)
[TRT-LLM] [E] qwen3_5_weight_mapper rejects ModelOpt W4A16_AWQ checkpoints
[TRT-LLM] [I] Loading weights via the architecture weight mapper

Timestamps 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 analysis

No 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 reference pattern
// 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 / StackRecommendationNotes
ModelOpt export refusedMatch the ModelOpt version to the TensorRT-LLM releaseNaming a mapper expects is set by the producer it was written against.
Scheme close to a supported oneRe-export to the documented scheme for the architectureNeighbouring schemes differ in layout while sounding interchangeable.
Suspected file damageLoad with the producing tool firstA clean load rules out corruption in one step.
Custom or community quantizationCompare tensor names against the mapper's expectationsA shared architecture name does not imply a shared layout.

With the fix vs without the fix

DimensionWith the fixWithout the fix
What the rejection meansThe reader has no rule for this layoutRead as the checkpoint being corrupt
Where compatibility livesBetween the quantizer version and the runtime versionAssumed to be a property of the file alone
Why other tools load itThey have their own mappersTaken 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

Two correct programs, one file, no agreement
  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 -> rejected
The export names its packed weights, scales and zero points in one convention while the mapper looks for another. Neither side is wrong about the file; the mapper simply has no translation for the layout it was handed.

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?
Almost certainly not. Load it with the tool that wrote it; a clean load shows the bytes are sound and the reader simply has no rule for the layout.
Why does another framework load it fine?
Each framework has its own mapper written against its own expectations. Agreement on the file format does not imply agreement on tensor naming.
Which version should I change?
Align them as a pair. The mapper was written against a particular producer, so matching the quantizer to the runtime release is more reliable than upgrading either alone.
Can I rename the tensors by hand?
It sometimes works and it is fragile, because grouping and not just naming can differ. Re-exporting to a documented scheme is the durable fix.

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.