llama.cpp router mode setup on Mac with model presets
Learn to switch models in llama-server on Mac and preserve custom settings with a models preset file. Router mode is experimental.
Player not loading? Watch on YouTube
This tutorial shows how to configure llama.cpp's llama-server on Mac so users can switch models while keeping their individual settings. The speaker starts with a terminal alias that launches one model with a configuration he has already tuned, then opens the server interface and points out its API endpoints.
Adding a models directory flag starts the server in experimental router mode. In the demonstration, the server does not load a model at startup. Its web interface gains a model selector, and the speaker explains that API requests can specify a named model. This provides a way to run models locally through one server interface, but the initial directory-based setup leaves out his custom configuration.
The rest of the walkthrough restores those settings through a model preset file. The speaker creates a named section, converts command-line options into equals-separated entries, removes shell concatenations and assigns a model alias. He then adds a models preset argument that points to the file. After restarting the server, the named model appears in the selector. The demonstration focuses on model selection and configuration; it does not measure performance or show several models processing requests simultaneously.