Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 4 min read

Running AI models locally: a beginner's setup with Ollama and LM Studio

Cloud chatbots are convenient, but they charge you twice: your prompts leave your machine, and the meter never really stops. What surprised me when I first tried this is how little you actually need to avoid both. A 7B m

Cloud chatbots are convenient, but they charge you twice: your prompts leave your machine, and the meter never really stops. What surprised me when I first tried this is how little you actually need to avoid both. A 7B model, a terminal, and around 5GB of free disk space is enough to get a genuinely useful assistant running offline. No account, no API key, no GPU required.

Here's the path I'd hand to someone who has never touched a local LLM: which model to grab, which tool to install, and what your hardware really needs to do the job.

Why keep the model on your own machine

The obvious win is privacy. When inference happens on your own CPU and RAM, your drafts, work files, and half-formed questions never leave the laptop. For anything sensitive, that's a different category of comfort than a checkbox in a settings page.

The second win is cost and availability. Once the weights are on disk, there's no monthly fee and no connection needed β€” you can chat on a train with the Wi-Fi off, forever. And because nothing is locked down, you can swap models whenever you like, tweak parameters, or fine-tune something later.

Pick a model size that fits your laptop

The model is the brain, and bigger isn't automatically better for a beginner machine. Three sensible starting points:

  • Llama 3 (Meta, April 2024) ships in 8B and 70B variants. The 8B is the safest first download.
  • Mistral 7B (September 2023) is compact and punches above its weight for its size.
  • Phi-3 (Microsoft, April 2024) is deliberately small and runs on modest hardware.

My rule of thumb: start at 7B or 8B. If you have 16GB of RAM or more, you can comfortably move up to larger models later. Below that, stay small and lean on quantized builds.

Ollama vs LM Studio vs llama.cpp

You don't have to write a single line of code for any of these.

  • Ollama (first released October 2023) is a command-line tool with a tiny API. Install it, run one command, and the model downloads and starts chatting.
  • LM Studio is a desktop GUI. You search a built-in catalog, click download, and talk to the model in a window.
  • llama.cpp (March 2023) is the engine a lot of the ecosystem is built on. It handles CPU inference well, which is exactly why a GPU isn't mandatory.

If you want the shortest path from zero to an answer, pick Ollama. If you'd rather click than type, pick LM Studio.

What hardware you actually need

No supercomputer. The numbers that matter:

Component Minimum Comfortable
RAM 8GB for a 7B model 16GB
GPU not required 6GB VRAM speeds things up a lot
Disk ~4–5GB per quantized 7B model more if you hoard models

Without a dedicated GPU, CPU-only inference still works β€” it's just slower per token. llama.cpp is tuned for that case, so don't let a laptop without a discrete card put you off. Model size affects your experience far more than which tool you wrap around it.

Step by step: your first local model

Assuming you go the Ollama route:

  1. Grab the installer for your OS from ollama.com and run it.
  2. Open a terminal.
  3. Pull and start a model in one command:
ollama run llama3
  1. Wait for the download β€” the 8B model lands at roughly 4.7GB.
  2. Type a question and press Enter. The answer streams straight into your terminal.

Swapping brains is just another command, and /bye ends the session:

ollama run mistral
# ...chat...
/bye

Prefer a mouse to a keyboard? Install LM Studio, search "Llama 3" in the catalog, hit download, then press Chat. Same result, different ergonomics.

Small habits that make it feel faster

Local inference is a resource negotiation, so give it room:

  • Close heavy apps first. Freed RAM translates directly into faster generation.
  • Prefer quantized files. A build labelled Q4_K_M is the usual sweet spot between answer quality and memory footprint.
  • Update the tool regularly β€” both Ollama and LM Studio ship frequent releases with new model support.
  • Start with short prompts and simple tasks, then branch into system prompts and temperature once the basics feel boring.

This article was originally published on AI Release β€” https://ai-release.org. If you want more write-ups like this one, there's also a channel at https://t.me/ai_release1.

Takeaway

Local AI stopped being a hobbyist-only exercise the moment one-line installers arrived. You don't need a beefy GPU, a cloud subscription, or a research background β€” you need 8GB of RAM, a few gigabytes of disk, and about ten minutes. Install Ollama, run ollama run llama3, and see how far a 7B model gets you. If it feels slow, quantize; if it feels cramped, add RAM. That's the whole tuning loop.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.