The R3AL.AI SDK is model-agnostic. Classification, detection, segmentation, pose, custom architectures: if you can export it to ONNX, you can quantize it with the same API. Quantization runs on the platform; export and validation run locally.
0. Authenticate
1. Export to ONNX (if needed)
If you already have.onnx, skip to step 2. Otherwise, pass the checkpoint straight to quantize() and the SDK exports it locally before upload (local export needs the matching extra, for example r3alai[export-torch]):
onnx (passthrough), pytorch, ultralytics, tensorflow, tflite, paddle. Discover them with r3alai.quant.list_export_sources().
2. Choose PTQ or QAT
3. Quantize via the platform (PTQ)
Each call uploads your model, runs the job on R3AL GPUs, streams progress, and downloads the bundle.4. Or train with QAT
When PTQ loses too much accuracy (especially at low bit widths):5. Monitor the job
quantize() and train_qat() block and print live progress. You can also open the platform’s Jobs page to watch status and progress, and to review past runs. See Using the platform.
6. Validate locally before shipping
Latency matters on your deployment hardware, so validation runs locally:7. Check the deliverable
Next steps
Using the platform
Accounts, API keys, the Jobs page, and your plan.
Quantization methods
Dynamic vs static INT8 or INT4, and when to use QAT.
Calibration
Building a good image set for ptq_static and QAT.
Python SDK
The Quantizer facade, PlatformClient, and Job.

