Skip to main content
E0403: non-finite weights cannot be quantized for akida-akd1500

What happened

A .thx artifact was validated against the akida-akd1500 backend and one of its weight tensors contains one or more NaN or Inf values. AKD1500 requires integer-quantizable weights; quantization of non-finite floats is undefined.

Why

The AKD1500 compile path maps f32 weights to 4-bit signed integers in the range [-7, 7] using the scale max|W| / 7. If any weight is NaN or Inf, this scale computation produces NaN, and the resulting quantized tensor is garbage. Rather than produce silently incorrect inference output, the backend rejects the artifact at validation time. Non-finite weights almost always indicate a numerical problem in the training pipeline: exploding gradients, a missing gradient clip, or an unstable loss function.

How to fix

  1. Identify the source. Check where in training the weights diverge. Add gradient clipping:
  2. Check your loss function for instability — a log(0) or division by zero in the loss will propagate Inf through the backward pass.
  3. Re-export the model after fixing the training issue and verify with:
  4. Recompile the corrected model for akida-akd1500.

Example