Skip to content

Explanation of Messages During Model Conversion

Guide to understanding the messages that appear when converting HuggingFace models to ONNX with GPUX.


📊 Message Types

✅ Informational Messages (INFO)

These messages are normal and only indicate progress:

INFO     Selected opset 18 for audio architecture using optimum converter
INFO     Model optimized successfully
INFO     Model validation successful
INFO     Successfully converted model to ONNX

Meaning: Everything is working correctly. The system is: - Selecting the correct opset - Optimizing the model - Validating that the model is correct - Successfully completing the conversion


⚠️ Warnings (Non-Critical)

1. Warning about Slow Image Processor

Using a slow image processor as `use_fast` is unset...

What does it mean? - Some models (like Whisper) use image processors to preprocess audio - The model was saved with a "slow" processor (more compatible) - In future versions of transformers, the fast processor will be used by default

Is it a problem? - ❌ Not a problem - Only affects conversion speed, not model quality - The converted model will work perfectly

Solution: No action required. It's just informational.


2. Warning about Generation Configuration

Moving the following attributes in the config to the generation config...

What does it mean? - Some generation parameters were in the main config.json - Transformers is moving them to generation_config.json (newer structure) - It's part of the migration to the new configuration structure

Is it a problem? - ❌ Not a problem - It's just an internal reorganization of the configuration - Does not affect model functionality

Solution: No action required. It's just informational.


3. PyTorch TracerWarnings

TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect...

What does it mean? - PyTorch is converting the model to ONNX format - During conversion, some Python boolean values are converted to constants - This may cause the model not to generalize to all possible inputs

Is it a problem? - ⚠️ Generally not a problem - These warnings are common in complex models like Whisper - The converted model will work correctly for most use cases - Could only be a problem if you need very different inputs than expected

Solution: - If the model works correctly in your tests, you can ignore these warnings - If you encounter problems, consider using a smaller model or adjusting inputs


4. Warning about Advanced ONNX Operators

UserWarning: Exporting aten::index operator of advanced indexing in opset 18...

What does it mean? - ONNX is exporting advanced indexing operators from PyTorch - In opset 18, these operators are converted to combinations of multiple ONNX operators - If indices include negative values, there could be problems

Is it a problem? - ⚠️ Rarely a problem - Most models work correctly - Would only be a problem if the model uses indexing with unexpected negative values

Solution: - If the model works in your tests, you can ignore this warning - If you encounter problems, report the issue with specific details


5. Warning about Numerical Validation

-[x] values not close enough, max diff: 0.00010395050048828125 (atol: 1e-05)
The maximum absolute difference between the output of the reference model
and the ONNX exported model is not within the set tolerance 1e-05

What does it mean? - Optimum compares outputs from the original model (PyTorch) with the converted model (ONNX) - There are small numerical differences between both - The maximum difference is very small (0.0001, which is 0.01%)

Is it a problem? - ❌ Generally not a problem - The differences are very small (less than 0.01%) - They are caused by normal differences in numerical precision between PyTorch and ONNX - For most applications, these differences are imperceptible

Solution: - If the model works correctly in your tests, you can ignore this warning - If you need exact precision, consider using simpler models or adjusting tolerance


🎯 Summary: What to Do?

✅ You Can Completely Ignore:

  1. ✅ INFO messages (informational)
  2. ✅ Warnings about slow processors
  3. ✅ Warnings about generation configuration
  4. ✅ TracerWarnings (if the model works)
  5. ✅ Warnings about ONNX operators (if the model works)
  6. ✅ Warnings about small numerical differences (< 0.1%)

⚠️ Review if:

  1. ⚠️ Numerical differences are very large (> 1%)
  2. ⚠️ The model doesn't work correctly after conversion
  3. ⚠️ Errors are critical (not warnings)

🔍 Example of Normal Output

A successful conversion should look like this:

✅ INFO: Selected opset 18 for audio architecture
✅ INFO: Model optimized successfully
✅ INFO: Model validation successful
✅ INFO: Successfully converted model to ONNX
⚠️  Warnings: Various informational warnings (normal)
✅ Result: Model converted successfully

🐛 When to Worry?

Signs of Real Problems:

  1. Errors (not warnings):

    ERROR: Conversion failed
    ERROR: Model cannot be loaded
    

  2. Very large numerical differences:

    max diff: 0.5 (50% difference)
    

  3. The model doesn't work after conversion:

  4. Doesn't produce results
  5. Produces completely incorrect results
  6. Hangs or crashes

If You Encounter Problems:

  1. Verify the model works:

    gpux run model-name --input '{"audio": "test.wav"}'
    

  2. Review complete logs:

    gpux pull model-name --verbose
    

  3. Try with a smaller model:

  4. If whisper-large fails, try whisper-tiny
  5. If wav2vec2-large fails, try wav2vec2-base

  6. Report the problem with:

  7. Model name
  8. Complete error messages
  9. Logs with --verbose

💡 Tips

  1. Warnings are normal: Most warnings during conversion are informational and don't indicate real problems.

  2. Test the model: The best way to verify everything is okay is to test the converted model.

  3. Small numerical differences are normal: Differences less than 0.1% are expected and don't affect functionality.

  4. TracerWarnings are common: They appear in many complex models and generally don't cause problems.

  5. If it works, it's fine: If the model produces correct results, you can ignore most warnings.


📚 References


🎯 Conclusion

Most messages you see are normal and don't indicate problems. The fact that you see:

✅ Successfully converted model to ONNX
✅ Model validation successful

Means the conversion was successful. The warnings are informational and you can ignore them if the model works correctly in your tests.