Skip to main content
AI & Machine Learning

Ollama Local LLM Management & CLI

Production

Local open-source LLM inference, model downloads, GPU quantization, Modelfile customization, and REST API.

Instant Copy & SearchProduction Flagged SyntaxCurrent Flag Reference

Ollama Local LLM Management & CLI Interactive Command Directory

Browse, search, and copy battle-tested commands & syntax recipes (16 Total Commands).

16+ Verified Recipes
Model Executionrun <model>
ollama run llama3:8b

Download and launch an interactive conversation terminal with Llama 3 8B model.

Model Pullingpull <model>
ollama pull mistral:instruct

Download weights and tokenizer layers to local storage without running prompt loop.

List Modelslist
ollama list

Display all locally installed model tags, disk sizes, and modification dates.

Active Processesps
ollama ps

Inspect currently loaded in-memory models, VRAM usage, and active inference sessions.

Custom Modelfilecreate -f
ollama create tech-writer -f ./Modelfile

Build custom fine-tuned or system-prompted model defined in a Modelfile.

REST API Inference/api/generate
curl http://localhost:11434/api/generate -d '{ "model": "llama3", "prompt": "Explain quantum computing in 2 sentences.", "stream": false }'

Perform programmatic non-streaming completion request via native REST API.

Model Removalrm <model>
ollama rm llama2:13b

Delete model weights from local cache to reclaim disk space.

Modelfile Inspection--modelfile
ollama show llama3:8b --modelfile

Display raw Modelfile definition, system prompt, and context parameters for an installed model.

Direct Prompt Executionollama run <model> '<prompt>'
ollama run mistral:7b 'Translate to French: Hello world'

Send prompt directly to model and stream response without opening interactive shell session.

VRAM Offloadingollama stop
ollama stop llama3:8b

Unload model weights from active GPU VRAM back to disk to free GPU capacity for other processes.

Vector Embeddings API/api/embeddings
curl http://localhost:11434/api/embeddings -d '{"model": "nomic-embed-text", "prompt": "Search query"}'

Generate dense high-dimensional text embeddings for semantic search and RAG indexing.

Generation Telemetry--verbose
ollama run codellama:13b --verbose

Execute model displaying tokens-per-second, prompt evaluation time, and token count stats.

Concurrency TuningOLLAMA_NUM_PARALLEL
OLLAMA_NUM_PARALLEL=4 OLLAMA_MAX_LOADED_MODELS=2 ollama serve

Launch daemon supporting 4 parallel concurrent inferences and caching 2 warm models in VRAM.

Local Model Taggingollama cp
ollama cp llama3:8b my-custom-llama

Create local copy of model under customized alias tag.

Registry Distributionollama push
ollama push my-repo/my-model:latest

Push customized fine-tuned or prompt-engineered model to remote Ollama model registry.

Model Catalog Query/api/tags
curl http://localhost:11434/api/tags

Query daemon HTTP API listing installed model manifests, tags, and byte sizes.

Zero Setup100% In-Browser Execution

Companion Developer Tools & Playgrounds

Accelerate command execution and syntax debugging with HelloAIHub suite of interactive tools.

Explore all developer tools

Ollama Local LLM Management & CLI: Command Groups & Quick Index

16 indexed entries across 16 sections
Model Execution1 items
Model Pulling1 items
List Models1 items
Active Processes1 items
Custom Modelfile1 items
REST API Inference1 items
Model Removal1 items
Modelfile Inspection1 items
Direct Prompt Execution1 items
VRAM Offloading1 items
Vector Embeddings API1 items
Generation Telemetry1 items
Concurrency Tuning1 items
Local Model Tagging1 items
Registry Distribution1 items
Model Catalog Query1 items

Highlighted Flags & Syntax Examples in Ollama Local LLM Management & CLI

ollama run llama3:8b

Download and launch an interactive conversation terminal with Llama 3 8B model.

Flags: run <model>
ollama pull mistral:instruct

Download weights and tokenizer layers to local storage without running prompt loop.

Flags: pull <model>
ollama list

Display all locally installed model tags, disk sizes, and modification dates.

Flags: list
ollama ps

Inspect currently loaded in-memory models, VRAM usage, and active inference sessions.

Flags: ps

Frequently Asked Questions

Expert recommendations, common traps, and production best practices for Ollama Local LLM Management & CLI.

What is GGUF and how does Ollama utilize it?

GGUF is a binary file format for storing quantized LLM weights. Ollama uses GGUF models to run 4-bit, 5-bit, and 8-bit quantized models efficiently on consumer CPUs, Apple Silicon Unified Memory, and NVIDIA GPUs.

How can I configure Ollama to listen across local network interfaces?

Set the environment variable OLLAMA_HOST=0.0.0.0:11434 before starting the Ollama daemon service to accept incoming connections from other machines on your LAN.

How does Ollama manage GPU VRAM and layer offloading between CPU and GPU?

Ollama uses llama.cpp under the hood. On model load, it measures free GPU VRAM and offloads as many transformer layers as fit into VRAM. If a model exceeds available VRAM, remaining layers run on the CPU (using system RAM), sacrificing inference speed while still allowing oversized models to run.

What is the difference between Temperature, Top-P, and Top-K in Ollama inference parameters?

'Temperature' scales the probability distribution: lower values (0.1) produce deterministic output while higher values (0.8+) increase creativity. 'Top-K' limits next-token sampling to the K most probable tokens (e.g. 40). 'Top-P' (nucleus sampling) dynamically selects the smallest set of tokens whose cumulative probability exceeds P (e.g. 0.9).

How can you run multiple models concurrently or serve multiple concurrent requests in Ollama?

By setting environment variables on the Ollama daemon: 'OLLAMA_NUM_PARALLEL=4' allows a single model to process 4 concurrent inference streams simultaneously, and 'OLLAMA_MAX_LOADED_MODELS=2' keeps up to 2 distinct models loaded in memory simultaneously (assuming sufficient VRAM/RAM exists).

How do you create a custom assistant with system instructions using an Ollama Modelfile?

Create a text file named 'Modelfile' with: 'FROM llama3:8b', followed by 'SYSTEM "You are a senior DevOps engineer."', and custom parameters like 'PARAMETER temperature 0.2'. Then build it into a local model using 'ollama create devops-bot -f ./Modelfile' and run via 'ollama run devops-bot'.

Cross-Hub Skill Acceleration

Combine command lookups with active coding interviews and complete career paths.

Need More Cheat Sheets?

Explore developer cheat sheets and syntax guides on HelloAIHub.

Browse All Cheat Sheets