Quantize and serve the tuned model
OptiQ trains on a model that is already quantized. So there is no separate quantize step after training: the base is quantized once, the adapter rides on top, and the two are served together.
The quantized base
Most of the time the base already exists. OptiQ quants of Qwen, Gemma 4 and other families are on Hugging Face under mlx-community; the models page lists them with their size and memory, and the Lab's Hub loads one with a click.
For a model that has no OptiQ quant yet, including someone else's fine-tune you want to train further, build one. OptiQ measures how sensitive each layer is on a calibration set and gives the sensitive layers more precision.
# any Hugging Face model id or local folder $ optiq convert your-org/your-model -o ./my-base
The Lab's Quantize wizard runs the same pipeline with a progress view and a push-to-Hugging-Face button. Then train against ./my-base exactly as on the SFT page.
Serve the base with the adapter
The quickest way to use the result is to mount the adapter at startup:
$ optiq serve --model mlx-community/Qwen3.5-4B-OptiQ-4bit \
--adapter ./my_adapter --port 8080
The same process answers OpenAI /v1/chat/completions and Anthropic /v1/messages, so the OpenAI SDK, the Anthropic SDK, curl and coding agents all point at http://localhost:8080/v1. See serving and integrations.
Pass --adapter more than once to keep several adapters on one base. Each request then picks one by folder name, and switching costs nothing because the base is loaded once:
$ curl http://localhost:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "..."}],
"adapters": "my_adapter"
}'
Bundle it as one model
To hand the model to someone else, or push it to Hugging Face, optiq lora export writes the base and the adapter into one folder. Several --adapter flags (an SFT and its DPO, say) are merged into one adapter on the way, and the originals are kept beside it for reference.
$ optiq lora export mlx-community/Qwen3.5-4B-OptiQ-4bit \ --adapter ./my_adapter \ -o ./my-model $ optiq serve --model ./my-model
The Lab does the same from the last step of a fine-tune (Bundle as a self-contained model), then Push to Hugging Face. The adapter files are PEFT-compatible, and from Python mlx_lm.load(base, adapter_path=...) loads the adapter on its base.