Skip to content
AgenticAIWiki

Shrinking a model to run on a laptop

Full screen
quantize8B model, 16-bit8B x 2 bytes = 16 GB16 GB8 GB4 GBGauges (illustrative)Weights (GB)16Laptop memory (GB)16Tokens/s0Memory for weights = parameters x bytes per parameter.

Swipe to change step

Step 1 of 8. An 8B model stores 8 billion weights. At 16-bit, each weight takes 2 bytes, so the weights alone need about 16 GB. That fills a 16 GB laptop with nothing left over. 8B model, 16-bit (8B x 2 bytes = 16 GB), highlighted. 16 GB. 8 GB. 4 GB. arrow from 8B model, 16-bit to 8-bit, labelled quantize.

In this chapter

  1. 30.1Why run models locally4 min read
  2. 30.2Quantization5 min read
  3. 30.3Inference servers and runtimes5 min read
  4. 30.4Hardware: memory, GPUs and throughput5 min read
  5. 30.5Hybrid setups: local models with a cloud fallback4 min read
  6. 30.6Quantization formats: GGUF, AWQ and FP86 min read
  7. 30.7Desktop runners: Ollama, LM Studio and llama.cpp6 min read
  8. 30.8Speculative decoding and other serving speed-ups7 min read

Chapter check

Already know this? Score 80% or more and you can skip ahead. Each attempt draws 4 questions from 12.

Loading check…