Hybrid AI Isn’t the Future — It’s Here (and It Runs in Docker using the Minions protocol)
The MinionS protocol splits LLM work between a capable remote model that writes orchestration code and lightweight local models that process document chunks in parallel, with the remote model aggregating the results. Docker Compose declares the local model, served by Docker Model Runner, in a few lines of YAML, and runs the generated orchestration code in a sandboxed container. The Minions paper reports a 5.7× cost reduction for MinionS while keeping about 97.9% of remote-only quality, versus 30.4× cost reduction and about 87% quality for the simpler Minion protocol. In practice, using Qwen3 locally roughly halved remote token use, to about 15,000 tokens, but responses can be up to about 10× slower.
Related posts
- Why and How to Run Local Models in Zed
Zed mediumAdeptLocal open-weight models run through LM Studio, Ollama or llama.cpp offer privacy, predictable cost, control and guaranteed availability, at the price of lower capability, fewer tokens per second and smaller context windows than frontier models. A Mixture-of-Experts model such as Qwen 3.6 35B A3B activates only about 3B parameters per token, so it runs roughly 10x faster than a dense 35B model and suits unified-memory chips like Apple M series. At Q4 quantization it needs about 17.5GB of VRAM. Zed connects to LM Studio at localhost:1234 or to any OpenAI-compatible server via its Ollama provider. To keep context clean with weaker models, edit earlier messages instead of sending corrections, and lean on subagents.
- How to Build, Run, and Package AI Models Locally with Docker Model Runner
Docker mediumAdeptDocker Model Runner, enabled as a beta feature in Docker Desktop 4.40+, pulls GGUF-format LLMs from Docker Hub or Hugging Face and runs them locally via the `docker model` CLI or an OpenAI-compatible HTTP endpoint on localhost. The guide walks through enabling the feature, pulling, tagging and pushing models to a local registry, one-shot and interactive prompts, curl calls to the chat completions API, and packaging your own .gguf file with a license as an OCI artifact. Constraints noted: only GGUF is supported, one model is loaded at a time, and models unload after 5 minutes idle. Compose v2.35+ can declare models as services and inject connection URLs into dependent containers.
- Behind the scenes: How we designed Docker Model Runner and what’s next
Docker mediumAdeptDocker Model Runner runs AI models locally and exposes them to both containers and host processes through Docker-style /models endpoints and OpenAI-compatible /engines/{engine}/v1 endpoints. llama.cpp is the first backend, but the API path leaves room for others like vLLM and MLX. On Docker Desktop, inference runs on the host outside the VM to get reliable GPU acceleration, with API calls proxied from the VM; on Docker CE it runs in containers with direct hardware access. A scheduler/loader swaps engine-model process pairs in and out of memory and holds requests until RAM/VRAM frees up rather than returning 503s. Model tensors are kept in a separate store so the engine can mmap them.
- 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}.
- OpenCode with Docker Model Runner for Private AI Coding
Docker mediumAdeptOpenCode can use locally hosted models by pointing an @ai-sdk/openai-compatible provider in opencode.json at Docker Model Runner's OpenAI-compatible endpoint (localhost:12434/v1, with TCP enabled on Docker Desktop). Prompts and code then stay on infrastructure you control, and there are no per-token costs. Coding models such as qwen3-coder and devstral-small-2 ship with 128K context, while gpt-oss defaults to 4,096 tokens. `docker model package --context-size` can repackage gpt-oss as a 128K OCI artifact that teams push to a registry to standardize and version model variants.