New in llama.cpp: Model Management
llama.cpp's llama-server now has a router mode that dynamically loads, unloads and switches between multiple GGUF models without restarting, with each model running in its own process so a crash in one doesn't affect others. Started without a model, it auto-discovers models from the llama.cpp cache or a --models-dir folder, loads them on demand based on the request's model field, and evicts the least-recently-used model once --models-max (default 4) is reached. Endpoints exist to list, load and unload models, and per-model settings such as context size and temperature can be set via an INI preset file.
Related posts
- Beyond Containers: llama.cpp Now Pulls GGUF Models Directly from Docker Hub
Docker mediumAdeptllama.cpp can now pull and run GGUF models directly from Docker Hub via a new --docker-repo (-dr) flag, treating the registry as a versioned model repository using repository:tag syntax. Under the hood it follows the OCI distribution flow: fetch an auth token, retrieve the manifest, locate the layer with the GGUF media type (application/vnd.docker.ai.gguf.v3), download the blob by sha256 digest, and cache it locally. Names default to the ai/ organization and :latest tag, so `llama-server -dr gemma3` resolves to ai/gemma3:latest, while pinning tags or digests gives reproducible model artifacts across environments.
- Run LLMs Locally with Docker: A Quickstart Guide to Model Runner
Docker mediumAdeptDocker Model Runner, in beta with Docker Desktop 4.40 on Apple silicon, pulls LLMs packaged as OCI artifacts and serves them through an OpenAI-compatible API backed by llama.cpp. Unlike `docker container run`, `docker model run` starts no container. The inference engine runs as a native host process for GPU acceleration, loads models on demand, and unloads them after 5 minutes of inactivity. Containers reach it at model-runner.docker.internal, and host processes can use an optional TCP port (12434), so any OpenAI client such as LangChain4j can point at it by setting a base URL and a model tag of the form {model}:{parameters}-{quantization}.
- Llama 2 is here - get it on Hugging Face
Hugging Face mediumAdeptMeta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem. Inference runs through transformers 4.31 or Text Generation Inference and Inference Endpoints, with recommended GPU sizes per model (A10G for 7B, A100 for 13B, 2-4x A100 for 70B). The 7B model can be fine-tuned on a single 16GB T4 using QLoRA and trl's SFTTrainer. The chat prompt format uses [INST] and <<SYS>> delimiters, and prompts must match the training template exactly for system prompts and multi-turn conversations to work.
- Local LLM Messenger: Chat with GenAI on Your iPhone
Docker mediumAdeptLocal LLM Messenger (LoLLMM), an honorable-mention project from Docker's AI/ML Hackathon by Justin Garrison, lets you send iMessages to LLMs running on your own machine. A FastAPI Python app receives Sendblue webhooks, routes prompts to local Ollama models (defaulting to llama2) or optionally OpenAI's GPT-3.5 Turbo and DALL-E 2, keeps conversation context in a file, and supports slash commands for switching models. Docker Compose runs the app, an ngrok tunnel exposing port 8000, and an Ollama container with optional NVIDIA GPU access. A setup walkthrough covers cloning the repo, configuring API keys in .env, and adding the ngrok authtoken.
- Llama can now see and run on your device - welcome Llama 3.2
Hugging Face mediumAdeptMeta's Llama 3.2 adds ten open-weight models: 11B and 90B vision models built by attaching a vision tower and image adapter to frozen Llama 3.1 8B/70B text models, 1B and 3B multilingual text models aimed at on-device use, and Llama Guard 3 variants for vision and small deployments. Vision models handle 128k context but attend only to the last image, and the multimodal license excludes EU-domiciled individuals and companies. The 3B instruct model matches Llama 3.1 8B on IFEval and the small models fit in under 2 GB at INT4. Transformers 4.45+ code samples cover text and vision inference, alongside llama.cpp, Transformers.js, fine-tuning and cloud deployment options.