Deployment Guide
This guide covers the full deployment story for AITune-tuned models: saving a tuned model to a checkpoint, loading it in production, and optionally serving it as an OpenAI-compatible HTTP endpoint via NVIDIA Dynamo.
Save a Tuned Model
Basic Save
This creates:
checkpoints/model.ait: Compressed checkpoint with tuned modulescheckpoints/model_sha256_sums.txt: SHA256 checksumscheckpoints/model/: Decompressed artifacts (after first load)
With Custom Storage
Load in Production
Basic Load
With Custom Storage
Loading Process
- First load — decompresses
.aitfile, extracts artifacts, verifies checksums, loads backend and weights. Slower due to decompression. - Subsequent loads — uses decompressed files from
checkpoints/, skips decompression. Faster startup.
Serve with Dynamo Worker
After loading a tuned model, you can expose it as an OpenAI-compatible HTTP endpoint using AITune’s Dynamo integration. The worker registers the model with the Dynamo HTTP frontend, deserializes incoming requests, packs inference results into the Dynamo wire format, and blocks until SIGTERM/SIGINT.
Prerequisites
Install the Dynamo extra:
For local development without etcd/NATS, set DYN_DISCOVERY_BACKEND=file before starting any Dynamo process.
Quick Start — Embedding Model
API Reference
Import from aitune.dynamo:
DynamoWorkerConfig
dynamo_worker(model_or_fn, config)
Functional API. Validates config, starts the Dynamo runtime, and blocks until shutdown.
model_or_fn: any callable, or atorch.nn.Module(requiresconfig.mapping)config:DynamoWorkerConfig
DynamoWorker (class-based API)
For more control, subclass DynamoWorker and override setup() and serve():
Override on_ready(runtime, endpoint) for post-startup work such as custom register_model calls.
Modality Types
If your function returns a plain dict, it is forwarded to the runtime as-is (no auto-packing).
Serving with run_dynamo.sh
The recommended way to start all processes locally is a run_dynamo.sh script that:
- Starts the Dynamo HTTP frontend in the background
- Starts the backend worker in the background
- Polls
/healthuntil the endpoint is registered - Runs a smoke-test client request
See the E5Large example for a complete working version.
Next Steps
- AOT Tuning Guide — tuning a model before saving
- Tune Strategies — selecting the right optimization strategy
- Backend Guides — backend-specific deployment notes
- E5Large example — end-to-end embedding worker
- FLUX example — end-to-end image generation worker