The Ollama Commands You Will Use Every Day
Ollama has a long command list, but day to day you will use a handful of them. They cover the whole loop: download a model, run it, check where it landed in memory, unload it, and clean up the disk. Every command below comes from Ollama's own CLI reference and FAQ.
Get a model and run it
ollama pull qwen3:8b downloads a model without starting it, which is handy when you want a large download done before you sit down to work. ollama run qwen3:8b starts a chat with it in the terminal. You can also put a prompt in quotes after the model name, which turns run into a one-shot command you can call from a script.
See what is loaded
ollama ps lists running models, and the column to read is PROCESSOR. Ollama's FAQ says 100% GPU means the model loaded entirely into the GPU, 100% CPU means it loaded entirely into system memory, and a split such as 48%/52% CPU/GPU means it sits partly in each. A split is the most common reason a local model suddenly feels slow, and it usually means the model, the context window, or both are too big for your card.
ollama stop qwen3:8b unloads a model right away. By default, the FAQ says, Ollama keeps a model in memory for 5 minutes after you finish so the next request starts faster. Stopping it frees that VRAM immediately, which helps before you load something bigger.
Keep the disk tidy
ollama ls lists every model on disk, and ollama rm qwen3:8b deletes one. Model files add up quickly. Ollama's library lists the qwen3:32b download at 20 GB, so a weekend of trying different sizes and quants can fill a small SSD.
Make a model your own
ollama create mymodel -f Modelfile builds a custom model from a short text file. A Modelfile can set a system message and parameters such as num_ctx, the context window size. That is a clean way to give one model a bigger window without changing the default for everything else.
Two settings worth knowing
The FAQ says Ollama uses a 4096-token context window by default. To raise it for every model, set OLLAMA_CONTEXT_LENGTH before the server starts, for example to 8192. A bigger window costs memory, so check ollama ps again after you change it.
The second is OLLAMA_KV_CACHE_TYPE, which controls the precision of the KV cache, the memory that holds the conversation so far. The default is f16. Per the FAQ, q8_0 uses about half the memory of f16 with a very small loss in precision, and q4_0 uses about a quarter with a larger loss that can show up at long context sizes. Cache quantization needs flash attention; Ollama turns it on automatically where the backend supports it, and OLLAMA_FLASH_ATTENTION=1 forces it on. Both cache settings are global, so they apply to every model the server loads.
If you start the server by hand with ollama serve, that is where these environment variables go.
The Ollama cheat sheet on llmhardware.io has the full list, including the REST API and more environment variables.
Sources: Ollama CLI reference (docs.ollama.com/cli), Ollama FAQ (docs.ollama.com/faq), Modelfile reference (docs.ollama.com/modelfile), Ollama model library.

Comments
Post a Comment