Ollama is a free and open-source software platform for downloading, running, and managing large language models (LLMs) locally on personal computers and servers. It provides a command-line interface (CLI), a native graphical user interface (GUI), a local REST API, and model-management tools, along with integrations for using open-weight models with coding assistants and other applications.
Overview
Ollama is often described as "Docker for LLMs." It allows users to pull open-source language models from a central library with a single command and run them on their own hardware without sending data to external cloud services. It supports Linux, macOS, and Windows operating systems.
Key Features
- Local Execution: Models run entirely on the user's machine, providing data privacy and offline capability once a model is downloaded.
- Unified API: Ollama exposes an API compatible with both the OpenAI and Anthropic API formats, enabling existing tools and agents to be redirected to a local endpoint by changing the base URL.
- Model Library: A catalog of hundreds of open-weight models, including Llama, Gemma, Mistral, Qwen, DeepSeek, Codestral, and many others. New models typically become available shortly after public release.
- CLI and GUI: Primarily operated via command line, but also offers an official desktop GUI and supports numerous third-party web and desktop front-ends.
- Docker Support: An official Docker image (
ollama/ollama) is available for containerized deployment. - Client Libraries: Official Python and JavaScript (npm) libraries are provided, along with community SDKs for Java, .NET, Rust, Swift, Go, Ruby, and others.
Basic Usage
To download and run a model:
ollama run gemma4
If the model is not already downloaded, Ollama fetches it automatically before launching an interactive chat session. Models can also be pulled explicitly:
ollama pull codestral
REST API
Ollama runs a local server on http://localhost:11434 by default. It provides endpoints including:
/api/generate— text generation/api/chat— conversational interactions/api/embeddings— vector embedding generation
Example API call:
curl http://localhost:11434/api/chat -d '{
"model": "gemma4",
"messages": [{"role": "user", "content": "Why is the sky blue?"}],
"stream": false
}'
System Requirements
Ollama is designed to utilize dedicated GPUs from NVIDIA or AMD. Running on CPU only is possible but results in significantly slower performance. Apple Silicon (M-series) chips are supported via an MLX backend that takes advantage of unified memory and Neural Engine accelerators. The minimum recommended GPU compute capability is 5.0 for NVIDIA/AMD hardware.
History and Development
Ollama was first released in 2023. It is developed as an open-source project hosted on GitHub, where it has garnered significant community adoption. The underlying inference engine is based on llama.cpp, originally founded by Georgi Gerganov.
Comparison with Alternatives
- Ollama vs. vLLM: Ollama is optimized for local development and ease of use, while vLLM is designed for high-throughput production serving with advanced optimizations such as PagedAttention.
- Ollama vs. LM Studio: Ollama is CLI-first and scriptable, whereas LM Studio provides a GUI-first desktop application for browsing and chatting with models.
Limitations
- Ollama does not officially support TPUs (Tensor Processing Units) or NPUs (Neural Processing Units).
- Performance is constrained by available GPU VRAM; smaller VRAM limits model size and context window length.
- It is primarily a runtime and management tool rather than a fine-tuning or training platform.