export command converts a trained Neurenix model to different formats for deployment across various platforms and frameworks.
Usage
Options
Supported Formats
Examples
Export to ONNX
Export to TorchScript
Export to TensorFlow
Export to TensorFlow Lite
Export to WebAssembly
Export to C
Custom output path
Export with optimization
Export with quantization
Export with all optimizations
Quantization Options
INT8 Quantization
Reduces model size by ~75% with minimal accuracy loss:- Smaller model size (4x reduction)
- Faster inference on compatible hardware
- Lower memory usage
- Small accuracy degradation (typically less than 1%)
- Requires calibration data for best results
FP16 Quantization
Reduces model size by ~50% with negligible accuracy loss:- Smaller model size (2x reduction)
- Faster inference on GPUs
- Minimal accuracy loss
- Less size reduction than INT8
- Requires FP16-capable hardware for speedup
Format-Specific Details
ONNX (.onnx)
Best for: Cross-platform deployment, inference optimizationTorchScript (.pt)
Best for: PyTorch production environmentsTensorFlow Lite (.tflite)
Best for: Mobile apps (Android/iOS), edge devicesWebAssembly (.wasm)
Best for: Browser-based inference, edge computingC (.c)
Best for: Embedded systems, microcontrollersError Handling
Model not found
Invalid format
Export error
Best Practices
1. Test exported models
Always verify exported models match original performance:2. Choose appropriate format for target platform
3. Optimize for production
Always use optimization for production deployments:4. Version exported models
5. Document export settings
Create a script to reproduce exports:Deployment Workflow
See Also
- Serve command - Serve models as APIs
- Eval command - Evaluate models
- Optimize command - Optimize models
- Run command - Train models