Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Specialise

Running LLMs locally cheat sheet

Opens with credits

A quick-revision book on running open-weight language models on your own machine, with Ollama as the main tool. It covers choosing and sizing models, fitting them in memory, the REST API and client libraries, local RAG, and serving safely, with a short look at llama.cpp, LM Studio and vLLM.

Curated by Tauseef Fayyaz9 chapters69 concepts89 glossary terms

Chapters

9 chapters · 69 concepts

  1. 1Getting started with OllamaWhat Ollama is, how to install it, and the handful of commands that cover everyday use.8 concepts
  2. 2Models, tags and sizesHow model names and tags work, what the size in a tag means, and which kind of model fits which job.8 concepts
  3. Quantisation and memoryHow weights are compressed, what the quantisation names mean, and how to estimate whether a model and its context will fit.7 conceptsOpens with credits
  4. Hardware and performanceWhere the model runs, why memory bandwidth sets the speed, and what happens when a model does not fit.8 conceptsOpens with credits
  5. Modelfiles and context lengthPackaging a model with its parameters, system prompt and template, and setting the context window it actually uses.8 conceptsOpens with credits
  6. The local REST APIEvery Ollama feature is available over HTTP on port 11434: native endpoints for generation, chat and embeddings, plus an OpenAI-compatible layer.8 conceptsOpens with credits
  7. Clients, structured outputs and toolsThe official Python and JavaScript libraries, and the features that turn a local model into an app component: JSON schemas, tool calls and thinking.7 conceptsOpens with credits
  8. Embeddings and local RAGBuilding retrieval-augmented generation entirely on your machine: embedding documents, storing vectors and answering from them.7 conceptsOpens with credits
  9. Serving safely and alternativesExposing Ollama beyond localhost without exposing yourself, running it in Docker, and when llama.cpp, LM Studio or vLLM fit better.8 conceptsOpens with credits
  10. 10Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.89 terms

About this sheet

Ollama commands, Modelfiles, quantisation, memory and hardware, the local API, clients, tools, embeddings and safe serving.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com