Source Model
Export Format
Optimization
Export Summary
1.71 GB
Original
428 MB
Exported
4x
Compression
2.3x
Speedup
Export Progress
0%
Ready to export
Format Comparison
| Format | Size | Latency | Acc Drop | Platforms |
|---|---|---|---|---|
| PyTorch (FP32) | 1.71 GB | 45 ms | 0% | Python |
| ONNX | 1.71 GB | 38 ms | 0% | Cross-platform |
| ONNX + INT8 | 428 MB | 19 ms | 0.5% | Cross-platform |
| TensorRT FP16 | 856 MB | 12 ms | 0.1% | NVIDIA GPU |
| TensorRT INT8 | 428 MB | 8 ms | 0.8% | NVIDIA GPU |
| Core ML | 856 MB | 22 ms | 0.1% | Apple |
| TFLite | 428 MB | 85 ms | 0.6% | Mobile |
Usage Example
import onnxruntime as ort
import numpy as np
# Load exported ONNX model
session = ort.InferenceSession("clip_vit_l14.onnx")
# Prepare inputs
image = preprocess_image(image_path) # [1, 3, 224, 224]
text = tokenize(["a photo of a cat"]) # [1, 77]
# Run inference
outputs = session.run(
None,
{
"image": image.numpy(),
"text": text.numpy()
}
)
image_features, text_features = outputs
similarity = (image_features @ text_features.T).softmax(dim=-1)
Export Log
[INFO] Ready to export