AI on the Internet

Running an AI Model on Your Own Computer

Check your hardware, pick a model size, install a local runtime and keep your setup private and safe.

Key takeaways

  • Memory is usually the limiting factor, so check how much RAM and graphics memory you have before downloading anything.
  • Quantized versions of a model use less memory in exchange for some loss of quality.
  • Use a well-known runtime and download models from the original publisher or a reputable hub.
  • A local server should stay reachable only from your own machine unless you add authentication.

You can run a useful AI language model on a recent laptop or desktop. You need a downloadable (open-weight) model, a program that runs it, and enough memory to hold it. Once both are installed, it can answer without an internet connection, and your prompts don't have to leave your machine.

The catch is size. Models small enough for typical hardware are generally weaker than the largest hosted services, and speed depends heavily on your processor and graphics chip. This guide helps you set realistic expectations and get a working setup.

Check your hardware

Start with total system memory, then your graphics hardware. On Windows, open Task Manager and look at the Performance tab for memory and GPU. On macOS, choose the Apple menu and then About This Mac. On Linux, run:

free -h
lspci | grep -i -E "vga|3d"

If you have an NVIDIA card with its drivers installed, nvidia-smi shows the card's memory. Apple silicon Macs use unified memory shared between processor and graphics, which often works well for local models. Laptops with only integrated graphics can still run small models on the processor, just more slowly.

Disk space matters too. Model files are commonly several gigabytes each, and collections grow quickly.

How big a model can you run?

A model's size is described by its parameter count. At full precision each parameter often takes two bytes, so a model with 7 billion parameters needs about 14 gigabytes just for the weights. Quantization stores the numbers with fewer bits, which shrinks the footprint. At about 4 bits per parameter, that same model takes roughly 3.5 to 4 gigabytes, plus extra memory for processing.

Example: weight memory for a 7-billion-parameter model
32-bit values 28 GB 16-bit values 14 GB 8-bit quantized 7 GB 4-bit quantized 3.5 GB 32-bit values 28 GB 16-bit values 14 GB 8-bit quantized 7 GB 4-bit quantized 3.5 GB

Weights only. Real use needs extra memory for context and software. Basis: Arithmetic: parameter count times bits per parameter, divided by 8.

As a rule of thumb, leave several gigabytes free for the operating system and the conversation's working memory. Longer contexts use more. If the model doesn't fit in graphics memory, many tools can split it between GPU and system RAM, which works but slows things down.

Aggressive quantization can reduce quality noticeably. If you have room, try a middle setting and compare answers on your own tasks.

Choose a runtime

A runtime is the software that loads the weights and generates text. Several popular options exist. Some are desktop apps with a model browser and chat window. Others are command-line tools or libraries. Examples people use include Ollama, LM Studio and the llama.cpp project, among others. Features and menu names change, so follow the current instructions from each project.

What to look for:

  • Works with your operating system and graphics chip.
  • Clear information about which models and file formats it supports.
  • An option to keep everything offline.
  • Active maintenance and a public record of changes.
From empty machine to first local answer
1 Check memory Note RAM, graphics memory and free disk space. 2 Install a runtime Get it from the project's official site. 3 Pick a small model Start well within your memory limit. 4 Test real tasks Try prompts you actually care about. 5 Tune or upgrade Adjust size, quantization or context length. Check memory Note RAM, graphics memory and free disk space. 1 Install a runtime Get it from the project's official site. 2 Pick a small model Start well within your memory limit. 3 Test real tasks Try prompts you actually care about. 4 Tune or upgrade Adjust size, quantization or context length. 5

Pick and download a model

Look for a model with a license that allows your use, a clear publisher and a model card, the document describing what it was built for and its known limits. Instruction-tuned or chat versions are what you want for conversation. Base versions mostly continue text. Open-weight vs. closed AI models explains the licensing points.

Download from the original publisher or a well-known model hub. Prefer formats meant to store only weights and settings. Some older formats can run code when loaded, which makes an untrusted file dangerous. Where checksums are published, verify the file.

Start small. A model that answers quickly will teach you more in an evening than a giant one that produces a few words a second.

First tests

Try tasks you actually do: summarizing meeting notes, rewriting an email, explaining a script, extracting fields from a block of text. Check results against facts you know.

Expect weaker performance on niche facts and long reasoning chains than with large hosted models. Local models hallucinate too, for the same reasons described in why AI models hallucinate. Pasting in the source material and asking for answers based on it helps a great deal.

Most runtimes let you set temperature, which controls randomness, and context length, which controls how much text the model considers. Keep temperature low for factual or formatting work.

Working with your own files

A model doesn't learn your documents just because they're on the same computer. You have to put the relevant text into the prompt, or use a tool that searches your files and inserts matching passages. That second approach is retrieval, compared with retraining in fine-tuning vs. retrieval.

Some desktop apps include a document chat feature. Check whether it processes files locally or sends them to a service, because not every feature in a "local" app stays local.

Using it from your own scripts

Many runtimes can expose a local web server with an API, so your scripts or editor can send it text. The address is usually on localhost, meaning only your computer can reach it. A generic request looks like this, with a placeholder port and path that vary by tool:

curl http://localhost:8080/ -H "Content-Type: application/json" -d '{"prompt":"Say hello"}'

Check your runtime's documentation for the real endpoint. Don't change the listening address to expose it on your network or the internet unless you understand the risks and add authentication and a firewall rule. An open model server lets strangers use your hardware and possibly see what you send it. Environment variables and secrets helps keep any keys out of your code.

Choosing settings that matter

Three settings explain most differences in behavior. Context length sets how much text the model considers at once. A long setting helps with big documents but consumes more memory, so don't raise it without a reason. If the model seems to ignore the start of a long paste, the context may be set shorter than your text.

Temperature controls randomness. Low values suit extraction, formatting and code. Higher values give more varied drafts and brainstorming.

System prompt is standing guidance sent with every conversation. Use it to say who the assistant is helping, how long answers should be and what to do when unsure. Keep it short on small models, which can lose track of long instruction lists.

Change one setting at a time and rerun the same few prompts. Otherwise you won't know which change made the difference. Some tools also offer GPU layer or thread options; the defaults are usually sensible, and the runtime's documentation explains when to adjust them.

Privacy checks after setup

"Local" describes where the model runs, not everything the application does. Look through the settings for usage reporting, crash reports, automatic updates, cloud model options and web search, and turn off what you don't want. Some apps offer both local and hosted models in the same menu, so confirm which one is selected before pasting something sensitive.

Chat history is usually stored as files on your disk. Anyone with access to your account, or to an unencrypted stolen laptop, may be able to read them. Full-disk encryption protects those files when the device is off, and deleting old chats limits what there is to lose. If you want proof that nothing leaves the machine, disconnect from the network and confirm the model still answers.

What can go wrong

  • Out-of-memory errors or crashes. Choose a smaller model, a more compact quantization or a shorter context.
  • Very slow output. Confirm the runtime is using your GPU. Close memory-hungry apps. Update graphics drivers from the vendor.
  • Hot, noisy laptop. Long sessions push hardware. Keep vents clear and use shorter runs on battery.
  • Gibberish or strange formatting. The prompt template may not match the model. Use the runtime's listed version or the publisher's recommendations.
  • Disk filling up. Delete models you no longer use.

Is it worth it?

Local models make sense if you handle material that shouldn't leave your machine, work offline, enjoy tinkering, or want to experiment without per-use fees. They're less attractive if you need top-quality answers with no setup, or your hardware is old.

Many people keep both: a local model for private or routine jobs and a hosted one for harder questions. Either way, check important output, and remember that private processing does not make the answer correct.

Keeping it tidy

Update the runtime periodically, since new releases often fix security flaws and improve speed. Read release notes before updating if you depend on a particular behavior. Keep a short note of which model and settings worked well, so you can recreate your setup after a reinstall.

Common questions

Do I need a graphics card?

No, small models run on a processor. A capable GPU or unified-memory chip makes replies much faster and allows larger models.

Will it work without internet?

After you've downloaded the runtime and model, text generation can work offline. Update checks, web search features and some plugins still need a connection.

Can I train it on my own data?

Further training is possible but takes more memory and skill than running a model. Try giving it relevant documents in the prompt first.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in AI on the Internet →

Latest news on this topic