Cheat sheets

1 min readMarkdown

Four things you will look up again and again. Each one fits on a screen.

Memory rule of thumb

Multiply the parameterParameterOne learned number inside a model. An 8B model has about eight billion of them.Read more count by the footprint for your quantizationQuantizationStoring each weight with fewer bits so the model takes less memory.Read more, then add room for the context.

QuantizationBudget per billion parametersExample: an 8B model
4-bit (Q4_K_M, 4bit)about 0.6 GB per billion parametersAbout 5 GB
8-bit (Q8_0, 8bit)about 1.1 GB per billion parametersAbout 9 GB
16-bit (F16, BF16)about 2 GB per billion parametersAbout 16 GB
Rule of thumb

Leave a few GB free after the model loads, more for long contexts. On a Mac, count on macOS keeping a share of memory for itself.

For a mixture of expertsMixture of expertsA model split into experts, where only a few run for each token.Read more model, count all the parameters for memory, not only the active ones. Will it fit? does the sum with context included, and Will the model fit in my memory? explains where the rest goes.

Speed thresholds

The minimum writing speed at which each job feels usable.

Speed thresholds
Use caseSpeedScaleWhy
Batch or overnightunder 10 tok/s is fineThroughput per dollar matters more than latency.
Reading-speed chat10 to 30 tok/sHuman reading is about 7 to 15 tok/s. 15 and up feels comfortable.
Coding assistant30+ tok/sPlus fast prefill. Large prompts need a quick time to first token.
Agent loops50+ tok/sMulti-step tool calls multiply token counts. Reasoning models emit thousands of thinking tokens.

As of 27 Nov 2026

Human reading speed is about 7 to 15 tok/s. How fast is fast? lets you feel each speed before you buy anything.

Default ports

Every runtimeRuntimeThe software that loads a model file and runs it.Read more that serves an API listens on a local port. Point your apps at http://localhost:<port>, and add /v1 for the OpenAI-compatible endpoints.

Default ports
RuntimePortOpenAI-compatibleOpen source
Ollama11434YesYes
LM Studio1234YesNo
llama.cpp (llama-server)8080YesYes
vLLM8000YesYes
SGLang30000YesYes
BaseRT–YesPartly
Superfluid8453YesYes
The catch

These are defaults. Two runtimes on the same port will clash, and some apps let you change the port. If an app cannot connect, check which port the server says it started on. How do I call a local model from code? covers the endpoints.

Ten commands

Most of these are Ollama, because it is the most common runtime. How do I use Ollama? and What is llama.cpp? have the full reference.

shell
# 1. Download and chat with a model
ollama run qwen3:8b
 
# 2. Download without starting a chat
ollama pull qwen3:8b
 
# 3. List downloaded models and their size
ollama list
 
# 4. Show loaded models and whether they are on the GPU
ollama ps
 
# 5. Delete a model to free disk space
ollama rm qwen3:8b
 
# 6. Chat and print the speed after each answer
ollama run qwen3:8b --verbose
 
# 7. Check the local API answers
curl http://localhost:11434/v1/models
 
# 8. Serve a GGUF file with llama.cpp, all layers on GPU, 16K context
llama-server -m model.gguf -ngl 99 -c 16384 --jinja
 
# 9. Download one quantization from Hugging Face
hf download <user>/<repo> --include "*Q4_K_M*" --local-dir ./models
 
# 10. Watch NVIDIA GPU memory and load
nvidia-smi
Try it
shell
curl http://localhost:11434/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "qwen3:8b", "messages": [{"role": "user", "content": "Say hello in five words."}]}'

This is the same call most apps make. If it answers, any OpenAI-compatible app can use your local model.