GuideIntermediate

Local Models for Engineers: From GGUF to Production

You already know how to start a model on your machine and call it through an API. This guide starts there and gives you what is missing to use it for real: the technical why and the engineering cases. You will understand what takes up memory when a model runs (the weights, the quantization, the KV cache that grows with every word of the conversation) and what limits its speed, so you can calculate, before downloading anything, whether a model fits your hardware and how fast it will go. You will choose a model with your own speed and quality measurements, not rankings; pick between llama.cpp, Ollama (with its MLX engine on Apple Silicon), headless LM Studio, mlx-lm, and vLLM depending on the case; and write a single client that works the same against a local model, a cloud model, or both with a fallback, with a lock that prevents by design any sensitive data from leaving for the internet. Then come the cases that fail most often locally: structured output and tool calling, with their real, measured limits; a RAG that works with the network off, with evaluated retrieval and verifiable citations; and coding agents with a local model, with the configuration that makes them usable and a way to measure them on your own repository. The guide closes with verified privacy (what leaves the machine and how to check it), the licenses of open models, and the final project: a private document assistant packaged in Docker that answers with citations and has no way out to the internet. Everything happens in one case: Altamira Clinic, a network of three clinics that needs an assistant for its staff, with one non-negotiable condition: no document leaves the building.

64
lessons
8
modules
English · Spanish
available in
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Calculate the memory a model needs (weights by quantization, KV cache by context and parallel requests) and estimate its speed from memory bandwidth
  • Tell GGUF, safetensors, and MLX apart, and choose a quantization (Q8, Q5, Q4) knowing what you gain and what you lose
  • Explain why a mixture-of-experts (MoE) model takes memory for its total parameters and runs at the speed of its active parameters
  • Choose a model for specific hardware with your own speed benchmark and quality eval set
  • Operate llama.cpp (`llama-server`), Ollama, headless LM Studio (`lms`), mlx-lm, and vLLM, and decide which one fits each case
  • Write an OpenAI-compatible client that serves local, cloud, and fallback, with timeouts, health checks, streaming, and a privacy lock tested with unit tests
  • Get structured output and tool calling from a local model with validation, retries, and limits, and measure how often they fail
  • Build a 100% local RAG with local embeddings and a SQLite store, and evaluate its retrieval with hit@k and MRR
  • Set up a coding agent with a local model (context, runtime, permissions) and measure it with tasks from your own repository
  • Verify what leaves your machine, read an open model's license, and ship the application in Docker with no internet egress

Before you start

What you need to bring

It's for you if...

  • Software engineers who have already called a local model through an API and want to understand what happens inside before putting it in a product
  • Teams with data that cannot go to the cloud (health, legal, finance, confidential code) who need a measured alternative, not a promise
  • Anyone who has to decide what hardware to buy or which model to run and wants numbers instead of opinions
  • Developers who use coding agents and want to know when a local model is enough and when it isn't

Requirements and materials

  • Intermediate Python: functions, classes, `dataclass`, virtual environments, `pip`
  • Having installed a local runtime and called it through an API. If you haven't yet, first do modules 3 (LM Studio) and 4 (Ollama) of the [LLM Access Strategies](../../../llm-access-strategies-guide/) guide
  • Basic terminal and Docker installed for the last module
  • A computer with 16 GB of RAM can follow the whole guide with a small model. You don't need an NVIDIA GPU: whatever requires one is explained with its alternative

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!