Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 4 min read How-to mediumAdept

How to Use Multimodal AI Models With Docker Model Runner

Docker Model Runner can run multimodal models such as Gemma3, Moondream2 and SmolVLM locally, accepting image and audio input through the CLI or an OpenAI-compatible chat completions API on localhost:12434. Images are sent as base64 data URLs in image_url content parts, and audio as input_audio parts. GGUF models like Ultravox can be pulled directly from Hugging Face. Multimodal support comes from a multimodal projector, a small adapter network that converts pixels or audio into token embeddings the language model can read. In Model Runner's OCI model artifacts it ships as a separate layer with media type application/vnd.docker.ai.mmproj.

Assumes: Docker CLI basicsOpenAI chat completions API

Related posts

  • How to Build, Run, and Package AI Models Locally with Docker Model Runner

    Docker mediumAdept

    Docker 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.

  • Run LLMs Locally with Docker: A Quickstart Guide to Model Runner

    Docker mediumAdept

    Docker 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}.

  • Run Gemma 3 with Docker Model Runner: Fully Local GenAI Developer Experience

    Docker mediumAdept

    Docker Model Runner (in Docker Desktop for macOS 4.40.0+) exposes an OpenAI-compatible API on localhost, so Gemma 3 can be pulled with `docker model pull ai/gemma3` and called through the standard OpenAI SDK by pointing baseURL at http://localhost:12434/engines/v1. A sample Comment Processing System uses it to generate synthetic user feedback, categorize sentiment, cluster comments with mxbai-embed-large embeddings, extract feature ideas as JSON and draft support replies, all with no external API calls. Per-task temperature and token limits can be tuned freely because local inference carries no per-token cost or rate limit.

  • Generate Images Locally with Docker Model Runner and Open WebUI

    Docker mediumAdept

    Docker Model Runner can now serve diffusion image models locally through an OpenAI-compatible /v1/images/generations endpoint. Paired with Open WebUI, that gives you private, offline image generation from a chat interface. Models are distributed as DDUF single-file artifacts via Docker Hub, `docker model launch openwebui` wires up the UI, and an admin setting points image generation at the diffusers endpoint. The walkthrough also covers calling the API directly with curl, including negative prompts, inference steps, guidance scale and seeds. Under the hood, the backend unpacks the DDUF into a Diffusers pipeline served by a version-pinned FastAPI server.

  • Welcome Gemma 4: Frontier multimodal intelligence on device

    Hugging Face mediumAdept

    Google DeepMind's Gemma 4 is an Apache 2-licensed multimodal model family in five sizes: E2B, E4B, a 12B encoder-free Unified model, a 31B dense model and a 26B MoE with 4B active parameters. The models take text, image, video and in some sizes audio, with context windows up to 256K. The architecture combines alternating sliding-window and global attention, dual RoPE configurations, Per-Layer Embeddings that feed a small per-layer residual signal, and a shared KV cache in which the final layers reuse earlier layers' key/value tensors to save memory and compute. Practical guidance covers modality ordering in prompts (images before text, audio after), native JSON bounding-box output on a 1000x1000 grid, and running or fine-tuning the models with transformers, llama.cpp, MLX, transformers.js, Mistral.rs and TRL.

The quest for software engineering knowledge.

Look:
Layout: