Hardware for local AI

Last updated

The biggest practical question when running AI yourself is hardware. The good news is that you may already own a computer that can run a useful model. The less good news is that running larger models quickly, for several people at once, requires serious hardware. This article explains what matters and how to think about sizing, without tying advice to specific products that change every few months.

Memory matters most

To run a model, its weights must be loaded into memory, and for good speed, into the fast memory attached to the processor doing the work. The amount of memory you have largely determines which models you can run at all.

As a rough guide, a model's memory needs depend on its parameter count and how precisely each parameter is stored:

  • At 16-bit precision, a model needs roughly 2 bytes per parameter. An 8-billion-parameter model needs about 16 GB just for the weights.
  • At 8-bit precision, roughly 1 byte per parameter, so about 8 GB for the same model.
  • At 4-bit precision, roughly half a byte per parameter, so about 4 to 5 GB.

On top of the weights, you need extra memory for the context: the conversation and documents being processed. Longer context and more simultaneous users require more. Leave headroom beyond the bare model size.

These are approximations, but they explain why memory is the first number to check.

Quantization: making models smaller

Quantization stores a model's parameters with fewer bits, shrinking memory needs and often increasing speed. Most people running models locally use quantized versions, commonly at around 4 to 8 bits.

The tradeoff is some loss of quality. Moderate quantization, around 4 to 6 bits for many models, often preserves most of the model's usefulness for everyday tasks. Very aggressive quantization degrades quality more noticeably. Quantized versions of popular open-weight models are widely available, often in formats like GGUF used by llama.cpp and tools built on it.

A useful rule of thumb: a larger model with moderate quantization often performs better than a smaller model at full precision using the same memory.

The main hardware options

Graphics cards (GPUs)

GPUs are the workhorses of AI because they perform the required math in parallel very quickly. What matters most:

  • Video memory (VRAM): determines which models fit. Consumer cards come in a range of memory sizes; professional and data center cards offer much more.
  • Memory bandwidth: largely determines how fast text is generated.
  • Software support: NVIDIA GPUs have the broadest support in AI software. AMD and Intel GPUs are increasingly supported by popular tools, but compatibility should be checked for your specific software.

Multiple GPUs can be combined to run larger models or serve more users, with added complexity.

Computers with unified memory

Some computers, such as Apple silicon Macs and certain newer PC platforms, share one large pool of fast memory between the CPU and GPU. Configurations with large amounts of unified memory can load surprisingly large models. They are often slower than high-end dedicated GPUs at generating text and handling many users, but they are quiet, power-efficient, and simple to set up, which makes them popular for individuals and small teams.

CPU only

Small models can run on a regular processor with ordinary system memory. It works, and tools like llama.cpp are well optimized for it, but generation is noticeably slower than on a GPU. CPU-only setups are fine for experimenting, light personal use, and small models on tasks where speed is not critical.

Specialized AI accelerators and small devices

Neural processing units in newer laptops and phones, and small single-board devices, can run very small models for specific tasks. They are improving but are generally not suited to running large general-purpose models.

Sizing for different needs

One person experimenting

A recent laptop or desktop can run small models, in the range of a few billion parameters, comfortably. A computer with a mid-range GPU or ample unified memory opens up mid-sized models. Start with what you have before buying anything.

A small team sharing a model

A dedicated machine with one or two capable GPUs, or a high-memory unified memory system, can serve a mid-sized model to a small group with acceptable speed. Software like Ollama or vLLM provides an API that team members' tools can connect to. Think about how many people will use it at once, not just how many people have access.

An application or customer-facing feature

Serving many simultaneous requests reliably calls for server-grade hardware, high-throughput serving software such as vLLM, monitoring, and redundancy so one failure does not take the feature offline. At this scale, compare carefully against hosted APIs and private cloud options, because the hardware and operations effort is significant. See Local AI vs hosted APIs vs private cloud.

Other practical considerations

  • Power and heat. High-end GPUs draw a lot of power and generate heat and noise. Plan for electrical capacity, cooling, and where the machine will live.
  • Storage. Model files are large, often several to tens of gigabytes each. Fast SSD storage speeds up loading.
  • Networking and security. A shared AI server should be on a protected network, require authentication, and not be exposed to the internet without proper safeguards.
  • Reliability. Consider backups, a plan for hardware failure, and who maintains the system.
  • Renting instead of buying. Cloud GPU servers can be rented by the hour or month. This lets you test which hardware and models you actually need before buying, and it is still self-hosting in the sense that you control the model and configuration.

How to start without overspending

  1. Define the task and the quality you need.
  2. Test models on hardware you already have, or rent a cloud GPU briefly.
  3. Find the smallest model and quantization that meets your quality bar on real examples.
  4. Estimate concurrent usage and context length.
  5. Then choose hardware with enough memory for that model plus headroom.

Buying hardware first and then searching for a use is the most common way to overspend.

Some businesses prefer to have a partner handle this. Napa AI, for example, designs and maintains local AI servers, from small models on low-cost off-the-shelf PCs to purpose-built GPU servers, and many IT providers and system builders offer similar services.

Key takeaways

  • Memory is the most important factor; it determines which models you can run.
  • Quantization shrinks models with modest quality loss and is standard for local use.
  • GPUs offer the best speed; unified memory systems offer large capacity simply; CPU-only works for small models.
  • Size hardware for concurrent users and context length, not just model size.
  • Test models first, on existing or rented hardware, before buying.