Run models locally with Ollama flashcards
Run open AI models on your own computer.
What is Ollama, in one plain sentence?
Ollama is a free app that runs an AI chat , like the ones behind chat assistants, on your own computer instead of on a company's servers.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What Ollama is4 cards
- Model words4 cards
- Computer words2 cards
- First run and goals2 cards
Core basics
- Why run models locally2 cards
- Install, first chat and the server3 cards
- Managing models and tags4 cards
- Sizing models to your hardware4 cards
- Everyday CLI use4 cards
- Choosing a model: licence and task2 cards
Next steps
- The REST API2 cards
- Client libraries and tool integrations5 cards
- Modelfiles and custom models5 cards
- Generation settings2 cards
- Memory, loading and logs3 cards
- Structured output, embeddings and thinking3 cards
Go deeper
- Quantisation and GGUF3 cards
- Importing and adapting models4 cards
- Tools and vision2 cards
- Serving a team4 cards
- Performance tuning3 cards
- Building and evaluating apps2 cards
- Safety, cloud models and scaling beyond3 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversOllama 0.40ollama Python library 0.6Model tags as published in the Ollama library, October 2026
Checked against
Run models locally with Ollama at a glance
Ollama is a free app that runs AI chat models on your own computer.
Online AI is eating out; Ollama is cooking at home: your data stays in your kitchen, but your stove limits the dish.
Words you will meet
- Model
- A big file of learned numbers that turns your text into a reply
- Parameters
- The learned numbers inside a model; 8b means 8 billion
- Prompt
- The text you give the model
- Token
- A small piece of text, about three quarters of a word
- Context
- How much text the model can keep in mind at once
- Quantised
- Stored with fewer digits so the model needs less memory
- GPU
- The graphics chip that runs models much faster
- Tag
- The part after the colon in a model name that picks its size or version
The steps
- 1. Start from zero (12 cards): What Ollama is, what a model is, and the plain words for memory, size and setup before your first chat.
- 2. Core basics (19 cards): Install, pull, chat, tags, memory and the local API.
- 3. Next steps (20 cards): REST and Python APIs, Modelfiles, context, structured output and embeddings.
- 4. Go deeper (21 cards): Quantisation, GGUF, tools, vision, serving, memory tuning and scaling out.
All 12 cards in Start from zero
- What is Ollama, in one plain sentence?
- Ollama is a free app that runs an AI chat model, like the ones behind chat assistants, on your own computer instead of on a company's servers.
- What problem does Ollama solve? What was it like before?
- Running an AI model yourself used to mean hunting for files, setting up Python and fixing errors for hours. Ollama makes it one command, and your words stay on your computer.
- Where do you already meet something like this every day?
- Chat assistants on your phone, writing help in email apps and Summarise buttons all use AI models. Ollama lets you run a similar helper at home, even with no internet.
- What everyday thing is Ollama like?
- Online AI is eating at a restaurant; Ollama is cooking at home. Your ingredients (your data) never leave the kitchen, but the size of your stove (your computer) limits the dish.
- What are a model, its parameters and an open model?
- A model is a big file of learned numbers, called parameters, that turns your text into a reply.
8bin a name means 8 billion parameters. An open model is one the maker lets anyone download. - What are a prompt, a token and the context?
- A prompt is the text you give the model. Models read text in small pieces called tokens, about three quarters of a word each. The context is how much text the model can keep in mind at once.
- What do RAM, CPU and GPU mean, and why do they matter here?
- RAM is your computer's short-term memory, and a model must fit in it to run. The CPU is the main chip; the GPU is the graphics chip, which runs models many times faster.
- What does quantised mean?
- Quantised means the model's numbers are stored with fewer digits, like 4-bit instead of 16-bit. The model then needs about a quarter of the memory, with only a small drop in quality.
- What are the terminal, a command and a CLI?
- The terminal is a window where you type commands, short text instructions like
ollama list. A CLI, a command-line interface, is a program you drive by typing commands instead of clicking. - What are a local server,
localhostand an API? - Ollama runs a local server, a helper program that waits quietly in the background.
localhostmeans your own computer, and the API is the set of web addresses other apps use to send it prompts. - What do you need, and what is your first tiny win?
- A computer with 8 GB of memory and the free Ollama app. In the terminal type
ollama runand a model name: it downloads the model once, then you type after>>>and get an answer. - What will you be able to do after this topic?
- Pick a model that fits your computer, chat with it, use it from scripts and your own apps, shape its behaviour with a Modelfile, and keep it fast and safe.
Run models locally with Ollama cheatsheet
CLI
ollama run qwen3:8bChat, pulling the model if neededollama run gemma3:4b "prompt"One-off answer, then exitollama pull / rm / cpDownload, delete, copy a modelollama listInstalled models and sizesollama psLoaded models, GPU/CPU splitollama stop qwen3:8bUnload from memory nowollama show qwen3:8b --modelfilePrint the recipeollama create name -f ModelfileBuild a custom model
In the chat prompt
/set parameter num_ctx 8192Change a setting for this session/set system "..."Replace the system prompt/show infoModel details/clearForget the conversation/save my-modelSave session as a model""" ... """Multi-line input/byeExit
Modelfile
FROM qwen3:8bBase model, tag or.ggufpathSYSTEM """..."""Fixed instructionsPARAMETER temperature 0.2Default samplingPARAMETER num_ctx 8192Context sizePARAMETER stop "<|im_end|>"Stop sequenceTEMPLATE """..."""Chat format (Go template)ADAPTER ./lora.ggufApply a LoRA adapter
REST API (port 11434)
POST /api/chatChat with a messages listPOST /api/generateSingle prompt completionPOST /api/embedEmbeddings for one or many inputsGET /api/tagsInstalled modelsGET /api/psLoaded models/v1/chat/completionsOpenAI-compatible endpointformat, think, keep_aliveSchema output, reasoning, memory time
Server environment
OLLAMA_HOST=0.0.0.0:11434Listen on all interfacesOLLAMA_ORIGINSAllowed browser origins (CORS)OLLAMA_CONTEXT_LENGTHDefault context sizeOLLAMA_KEEP_ALIVE=30mHow long models stay loadedOLLAMA_NUM_PARALLELParallel requests per modelOLLAMA_FLASH_ATTENTION=1Less attention memoryOLLAMA_KV_CACHE_TYPE=q8_0Half-size KV cacheOLLAMA_MODELSModel storage folder