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¶
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¶
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¶
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¶
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:¶
- ✅ INFO messages (informational)
- ✅ Warnings about slow processors
- ✅ Warnings about generation configuration
- ✅ TracerWarnings (if the model works)
- ✅ Warnings about ONNX operators (if the model works)
- ✅ Warnings about small numerical differences (< 0.1%)
⚠️ Review if:¶
- ⚠️ Numerical differences are very large (> 1%)
- ⚠️ The model doesn't work correctly after conversion
- ⚠️ 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:¶
-
Errors (not warnings):
-
Very large numerical differences:
-
The model doesn't work after conversion:
- Doesn't produce results
- Produces completely incorrect results
- Hangs or crashes
If You Encounter Problems:¶
-
Verify the model works:
-
Review complete logs:
-
Try with a smaller model:
- If
whisper-largefails, trywhisper-tiny -
If
wav2vec2-largefails, trywav2vec2-base -
Report the problem with:
- Model name
- Complete error messages
- Logs with
--verbose
💡 Tips¶
-
Warnings are normal: Most warnings during conversion are informational and don't indicate real problems.
-
Test the model: The best way to verify everything is okay is to test the converted model.
-
Small numerical differences are normal: Differences less than 0.1% are expected and don't affect functionality.
-
TracerWarnings are common: They appear in many complex models and generally don't cause problems.
-
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:
Means the conversion was successful. The warnings are informational and you can ignore them if the model works correctly in your tests.