Start the MLX LM HTTP Model Server
mainYou can use mlx-lm to create an HTTP API for text generation that is compatible with the OpenAI chat API. Note that this server is not recommended for production due to basic security implementations.
To start the server, use the mlx_lm.server command and provide a path to a local model or a Hugging Face repository ID using the --model flag. The server defaults to running on localhost:8080.
mlx_lm.server --model mlx-community/Mistral-7B-Instruct-v0.3-4bit