Every time you type a question into a cloud AI service, it leaves your device. Your prompt travels to a data center owned by one of a handful of companies, gets processed on their hardware, and, depending on the company and your settings, may be stored for years, read by human reviewers, or used to train future models. People now tell AI chatbots things they would never post publicly: health worries, relationship problems, financial details, confidential work documents, and private code. All of it sits on someone else's servers, under someone else's rules.

There is another way. Open-weight AI models, models whose underlying files are published for anyone to download, have improved so quickly that many of them now run comfortably on an ordinary laptop or a small desktop computer. When you run a model locally, your prompts never leave your machine. There is no account, no monthly bill, no usage cap, and no company deciding to change or retire the model you depend on. You can even use it with the internet switched off entirely.

Local AI is not automatically safe, however. Downloading AI models and running AI software introduces security risks of its own, several of which are easy to overlook. This article covers both halves of the picture: why local AI is worth it, what hardware and models to choose, and the five layers of risk you need to understand to run it in the most private and secure way possible.

What Local AI Actually Means

A large language model, the technology behind chatbots like ChatGPT, is at its core a very large file of numbers called weights. These weights are what the model learned during training, and running the model means doing math on them. Companies like OpenAI and Anthropic keep their best models' weights secret and only let you use them through their apps and servers. A growing number of organizations, including Google, OpenAI, Alibaba's Qwen team, Mistral, and DeepSeek, also publish the weights of some of their models for anyone to download. These are called open-weight models, and they are what make local AI possible.

Running a model locally takes two things: the model file itself, and a program called a runtime, or inference engine, that loads the file and lets you chat with it. Tools like Ollama and LM Studio, covered later in this article, combine both into a simple app. You pick a model, it downloads once, and from then on everything happens on your own hardware.

Two terms come up constantly when choosing a model. The first is parameters, the count of numbers in the model, usually written in billions, as in a 27B model with 27 billion parameters. More parameters generally means a more capable model, but also one that needs more memory. The second is quantization, a compression technique that stores each number with fewer bits so the model takes up less space. A model quantized to around 4 bits per parameter is roughly a quarter of its original size and loses surprisingly little quality, which is why 4-bit versions are the standard choice for running models at home.

Why Run AI Locally

Privacy is the biggest reason. With a local model, your conversations are files on your own computer, and nothing is sent anywhere. Compare that with the policies of the major cloud services. In September 2025, Anthropic began using conversations from its consumer Claude plans to train its models unless users opt out, and extended data retention to up to five years for users who allow it. OpenAI uses consumer ChatGPT conversations to improve its models by default unless you turn that setting off. Google says conversations in its Gemini apps that are selected for review by human reviewers are kept for up to three years, even after you delete your activity. And as the companion article The Privacy Stack describes, a court order in 2025 forced OpenAI to preserve ChatGPT conversations users had deleted. None of these policies apply to a model running on your own machine.

Cost is the second. The standard paid tiers of ChatGPT, Claude, and Google's Gemini each cost about 20 dollars a month, or roughly 240 dollars a year, and their top tiers run from 100 to 200 dollars a month. A local model has no subscription at all. If you already own a reasonably modern computer, you can start running capable models today for free. If you buy dedicated hardware, it is a one-time cost that keeps working for years, plus the electricity it uses.

Control is the third. Cloud providers change, restrict, and retire models whenever they decide to. In February 2026, OpenAI removed GPT-4o from ChatGPT despite a public petition and a social media campaign from users who relied on it. A model file on your own drive works the same way tomorrow as it does today, for as long as you want to keep it. There are no rate limits, no outages caused by someone else's servers, no account that can be suspended, and no internet connection required.

The Honest Tradeoffs

Local AI is not a perfect replacement for the largest cloud models, and it is worth being clear about why. The most capable models in the world are still closed, and the very largest open-weight models are too big for normal home hardware. The research group Epoch AI found in 2026 that the best open-weight models trailed the best closed models by about four months on average. The models small enough to run on a single consumer graphics card are further behind, but Epoch found that they have consistently caught up to where the frontier was within six to twelve months. In practice, that means a model you run at home today is roughly as capable as the best cloud AI was six months to a year earlier, which is more than enough for writing, summarizing, brainstorming, studying, answering questions, and a great deal of coding.

The other tradeoffs are practical. Larger models need more memory and therefore more expensive hardware. Local models usually respond more slowly than a cloud service running on a data center full of specialized chips. And you take on the responsibility of keeping your setup updated and secure, which is what the second half of this article is about. For many people, the right approach is a mix: a local model for anything private or sensitive, and a cloud service only for the occasional task that genuinely needs the most powerful model available.

Understanding Hardware: Memory Is Everything

The single most important number for local AI is how much memory your computer can devote to the model. The entire model has to fit in memory to run at a usable speed. On a Windows or Linux computer with a dedicated graphics card, that means the card's video memory, called VRAM. On an Apple silicon Mac, the processor and graphics share one pool of unified memory, so most of the Mac's total memory can be used for AI.

A useful rule of thumb: at the common 4-bit quantization, a model needs about 0.6 gigabytes of memory for every billion parameters, plus extra room for the conversation itself, which grows the longer your chat or document gets. A 9B model needs roughly 6 gigabytes, a 27B model roughly 16 to 17 gigabytes, and a 120B model roughly 65 to 70 gigabytes. The exact file size is always listed next to each model download, and it is the most reliable guide.

Many of the best new models use a design called mixture of experts. Instead of using every parameter for every word, these models contain many specialized sub-networks and only activate a small portion of them at a time. A model described as 35B-A3B has 35 billion parameters in total but uses only about 3 billion for each word it generates. The whole model still has to fit in memory, but it runs far faster than a model that uses all 35 billion at once, which makes these models especially well suited to home hardware.

Once a model fits, speed depends mostly on memory bandwidth, how quickly the hardware can read the model's numbers. As a rough guide, the number of words a model can generate per second is limited by the memory bandwidth divided by the amount of the model it has to read for each word. This is why two machines with the same amount of memory can feel very different: one with high bandwidth will respond several times faster than one with low bandwidth.

Running AI on the Computer You Already Have

Before buying anything, try the computer you already own. A laptop or desktop with 16 gigabytes of memory can run small but genuinely useful models, and Apple silicon Macs are particularly good at this because of their unified memory. A Mac with 16 gigabytes can comfortably run models in the 4B to 12B range, and one with 32 gigabytes or more can run the strong 27B to 35B class of models covered below.

On a Windows or Linux desktop, a dedicated NVIDIA graphics card is the most common and best-supported option. A card with 16 gigabytes of VRAM, such as the RTX 5060 Ti 16GB, which launched at 429 dollars, handles models up to around 14B well and can run some larger mixture-of-experts models. A card with 24 to 32 gigabytes, such as the RTX 5090 with 32 gigabytes, runs the 27B to 35B class at excellent speed. The RTX 5090 launched at 1,999 dollars, but memory shortages pushed graphics card prices far higher during 2026, so check current prices before you buy. If a model is slightly too large for your graphics card, most runtimes can split it between the card and your regular system memory, though the part running on system memory will be noticeably slower.

Dedicated AI Machines: Mac Mini, Mac Studio, and Mini PCs

If you want a machine that runs AI all the time, for yourself or for your household, a small dedicated computer is often a better choice than a gaming PC. These machines are quiet, use relatively little power, and can provide AI to your other devices over your home network, a setup the security sections below explain how to do safely.

The Mac mini is a popular entry point. Apple's current model with the M5 Pro chip can be configured with up to 64 gigabytes of unified memory at 307 gigabytes per second of bandwidth, starting at 1,699 dollars in the United States, which is enough to run the strong mid-size models with plenty of room for long conversations. The Mac Studio goes much further: up to 128 gigabytes with the M5 Max chip, starting at 2,499 dollars, and up to 512 gigabytes with the M5 Ultra, starting at 5,499 dollars, with roughly 1.2 terabytes per second of bandwidth. The largest configurations can run models that would otherwise require several server-class graphics cards.

Outside of Apple, two kinds of compact machines have become popular for local AI. Mini PCs built on AMD's Ryzen AI Max+ 395 chip, such as the Framework Desktop, offer up to 128 gigabytes of memory, of which around 96 gigabytes can be used by the graphics processor; the 128-gigabyte Framework Desktop launched at 1,999 dollars but was listed at 3,449 dollars in 2026. NVIDIA's DGX Spark packs 128 gigabytes of memory into a small box designed specifically for AI; it launched at 3,999 dollars, but NVIDIA raised the price of the 128-gigabyte model twice during 2026, first citing memory supply constraints and then, in October, to 6,950 dollars, when it also added a 64-gigabyte version at 4,999 dollars. Both of these platforms prioritize memory capacity over speed: their memory bandwidth is roughly 256 to 273 gigabytes per second, compared with about 1.8 terabytes per second on an RTX 5090, so they can hold large models but generate text from them more slowly.

Which to choose comes down to what you value. A graphics card in a desktop gives the most speed per dollar for models that fit in its memory. A Mac mini or Mac Studio gives the simplest setup, low power use, and large memory pools. A Ryzen AI Max mini PC or DGX Spark gives large memory at a lower price than a high-memory Mac Studio, at the cost of speed. For most people starting out, the computer they already own, followed by a Mac mini or a 16 to 32 gigabyte graphics card, covers almost every need.

The Best Open Models to Run Right Now

Open models improve every few months, so treat this as a snapshot of late 2026 and expect newer versions to appear. Unless noted otherwise, the models below are released by their original developers under the Apache 2.0 license, which allows personal and commercial use with very few restrictions.

For 8 to 16 gigabytes of memory, the small models from Alibaba's Qwen3.5 family, released in February 2026 in sizes from 0.8B to 9B, and Google's Gemma 4 family are the strongest choices. Gemma 4 launched in April 2026 with small E2B and E4B models designed for phones and laptops, which can also understand images and audio, and Google added a 12B model in May. Google publishes official 4-bit versions of Gemma 4 that are specially trained to lose as little quality as possible when compressed. OpenAI's gpt-oss-20b, released in August 2025, is another excellent option; OpenAI says it runs within 16 gigabytes of memory.

For 24 to 64 gigabytes, this is the sweet spot of local AI in 2026. Qwen3.8-27B, released in August 2026, is one of the most widely used local models available and handles both text and images. Qwen3.6-35B-A3B is a mixture-of-experts model that uses only about 3 billion parameters at a time, which makes it remarkably fast for its capability. Google's Gemma 4 31B and its mixture-of-experts sibling, Gemma 4 26B-A4B, are similarly strong all-round choices with long context windows of up to 256,000 tokens, enough to work through long documents. Meta's Muse Glimmer 30B, released in August 2026, was built specifically to run on consumer hardware and to work well with AI agents; Meta says its official 4-bit version fits within a 24 to 32 gigabyte graphics card.

For 96 to 128 gigabytes, OpenAI's gpt-oss-120b, which OpenAI designed to run on a single 80-gigabyte server graphics card, needs around 65 gigabytes in its local versions, and Mistral's Mistral Small 4, a 119-billion-parameter mixture-of-experts model that uses about 6 billion at a time, adds strong reasoning and coding abilities. The very largest open models, such as DeepSeek's 763-billion-parameter V4.1-Flash, released in September 2026 under the similarly permissive MIT license, need hundreds of gigabytes even when compressed, which puts them within reach of only the largest Mac Studio configurations or multi-graphics-card servers.

Licenses are worth checking before you rely on a model, especially for work. Meta's Llama models, which helped start the open model movement, use Meta's own community license rather than a standard open-source license; the Llama 4 license, for example, requires a "Built with Llama" label, imposes conditions on very large companies, and grants no rights to individuals or companies based in the European Union for its multimodal models. Meta has since changed course: its newer Muse Glimmer model, mentioned above, is released under the standard Apache 2.0 license instead.

The Software: Ollama, LM Studio, and Friends

Ollama is one of the most popular ways to run local models. It is open source, runs on Windows, macOS, and Linux, and downloads and runs a model with a single command, such as ollama run followed by the model's name. It also includes a simple desktop app and a local server that other programs can connect to. Ollama now offers optional cloud-hosted models as well, which, unlike local models, send your prompts to Ollama's servers; Ollama says it does not store or log that content or train on it, but for a strictly local setup you can switch the cloud features off entirely by setting the environment variable OLLAMA_NO_CLOUD to 1.

LM Studio is the most beginner-friendly option, with a polished graphical interface for browsing, downloading, and chatting with models. It is free, including for use at work since July 2025, though unlike Ollama the app itself is not open source. On Apple silicon Macs it supports Apple's MLX framework, which is often the fastest way to run models on a Mac.

Jan is a fully open-source desktop chat app designed to work completely offline, and llama.cpp is the open-source engine that powers much of the local AI world, including parts of Ollama and LM Studio, for users who want maximum control. Open WebUI is a self-hosted web interface that looks and feels like ChatGPT, with document search and support for multiple user accounts, and connects to Ollama or any compatible server. It is a popular way to share one local AI machine with the rest of a household.

The Five Layers of Local AI Risk

Running AI on your own hardware removes the biggest privacy risk, which is handing your data to someone else. But it adds new risks that cloud users never have to think about, because you are now downloading files from the internet and running server software on your own machine. Security researchers have documented real attacks at five distinct layers of the local AI stack. None of them are reasons to avoid local AI. They are reasons to set it up carefully.

Layer 1: Untrustworthy Downloads

Some AI model file formats can contain executable code. The older PyTorch format, based on a Python feature called pickle, can run code the moment a model is loaded. In 2024, the security company JFrog flagged around 100 models on Hugging Face, the largest public hub for AI models, with code-execution payloads, including one that opened a hidden connection to a real outside server; JFrog said about 10 of them were truly malicious and the rest appeared to be researchers' tests. In 2025, ReversingLabs found malicious models that used a deliberately broken file format to slip past Hugging Face's security scanner. Hugging Face does scan uploads with tools from the security company Protect AI, which by April 2025 had flagged 352,000 unsafe or suspicious issues across 51,700 models, but files marked unsafe are labeled rather than removed, and can still be downloaded.

The AI software itself is a target too. Throughout 2026, security firms including Kaspersky and Darktrace documented fake download pages and fake installers for popular AI tools, often promoted through search ads, that delivered infostealers, the password- and session-stealing malware covered in Everyday Cybersecurity Habits That Actually Matter. A developer's computer, full of saved logins and access keys, is an especially valuable prize.

The defense is to be deliberate about where everything comes from. Download Ollama, LM Studio, and other tools only from their official websites, typed directly rather than found through a search ad. Download models from the original developer's official account, such as Qwen, google, or openai on Hugging Face, or from the curated libraries built into Ollama and LM Studio. Prefer the GGUF and safetensors formats, which are designed to hold data rather than executable code, and avoid older pickle-based files with extensions like .bin, .pt, or .pkl from unknown uploaders.

Layer 2: Malicious Templates

Every chat model needs a template that formats your conversation into the exact structure the model expects. In the GGUF format, this template is stored inside the model file and is written in a small programming language called Jinja. That makes it a hiding place. In July 2025, the security firm Pillar Security demonstrated poisoned GGUF templates that stayed completely dormant during normal use but secretly injected attacker-chosen instructions whenever a prompt touched a specific topic. In their demonstration, a model behaved normally for ordinary questions but slipped malicious script code into its answers whenever it was asked to write web pages. The model's weights were untouched, so the model itself looked clean, and Pillar reported that the poisoned files passed the automated security scans on Hugging Face. Pillar also noted that Hugging Face's website shows the template of only the first file in a repository, so an attacker could hide a payload in one of the other compressed versions.

Templates have caused more direct damage too. In 2024, a flaw nicknamed Llama Drama, tracked as CVE-2024-34359, was found in llama-cpp-python, a popular tool for running models from Python. It processed templates without any safety restrictions, so a malicious model file could run code on your computer when it was used. It was fixed in version 0.2.72.

The defense is the same discipline as the first layer, plus one extra step: stick to model files from official developers or well-known, established publishers, keep your AI software updated, and be especially wary of re-uploaded or modified versions of popular models from unfamiliar accounts. If you want to check a model's template yourself, Ollama shows it with the command ollama show followed by the model name and the --template option, and LM Studio displays it in the model's settings.

Layer 3: Vulnerabilities in the AI Software Itself

Local AI tools are software, and software has bugs. Ollama, as one of the most popular tools, has had several serious ones. In 2024, the cloud security company Wiz disclosed a flaw it named Probllama, CVE-2024-37032, that let an attacker who could reach an Ollama server overwrite files on it and potentially take control of the machine; it was fixed in version 0.1.34. In May 2026, the security firm Cyera published details of a flaw it named Bleeding Llama, CVE-2026-7482, rated 9.1 out of 10 for severity. By uploading a deliberately malformed model file, an attacker with no password could trick Ollama into reading beyond the edge of its memory and send back whatever was there: environment variables containing API keys and passwords, system prompts, and the conversations of anyone else using the same server. Cyera estimated that around 300,000 Ollama servers were reachable from the internet. Ollama had already fixed the flaw in version 0.17.1, released in February 2026, but the release notes did not describe it as a security fix, so many users never realized they needed to update.

The defense is simple and important: keep your AI software updated, and do not rely on release notes to tell you when an update matters. Check your Ollama version with the command ollama -v and compare it with the latest release on Ollama's official site, turn on automatic updates in LM Studio and the Ollama app, and update any Docker containers you run. Just as importantly, keep your AI server off the internet, which is the next layer.

Layer 4: Exposing Your AI Server to the Network

Ollama runs a server in the background that apps connect to. By default, a normal installation only listens on 127.0.0.1, port 11434, an address that only programs on your own computer can reach. The trouble starts when people change that. Guides for sharing a model with other devices often say to set the OLLAMA_HOST setting to 0.0.0.0, which tells Ollama to accept connections from any network it is connected to. Ollama has no password or login of its own, so on an untrusted network, or on a machine that is reachable from the internet, anyone who finds it can use it. The official Ollama Docker image also listens on all interfaces inside its container, so publishing its port carelessly has the same effect.

This is not a theoretical problem. In January 2026, researchers from SentinelOne and Censys reported finding about 175,000 Ollama servers publicly exposed to the internet across 130 countries, nearly half of them with tool-calling abilities that let the AI take actions, and described criminals scanning for these servers and reselling access to them. Exposed servers are exactly what flaws like Bleeding Llama prey on.

Even a server that never leaves your own computer can be reached through your web browser. In 2024, the security firm NCC Group disclosed CVE-2024-28224, a DNS rebinding flaw in Ollama. DNS rebinding is a trick in which a malicious website manipulates how your browser looks up its address, so that the site's code ends up talking to services on your own computer. In this case, simply visiting a malicious page could give it full access to a local Ollama server, including the ability to chat with your models, delete them, and potentially read files. It was fixed in version 0.1.29, but it shows why local servers need protection too.

The defense: leave the default setting alone unless you truly need to share your model. If you do, never forward the port on your router to the internet. Instead, use a private network tool like Tailscale, which is based on the WireGuard encryption protocol and connects only your own devices, or put the server behind a reverse proxy, a gatekeeper program that requires a password before passing requests through, and allow only your local network in your firewall. If you run Ollama in Docker, publish the port only to your own machine with -p 127.0.0.1:11434:11434. Do not set OLLAMA_ORIGINS, the setting that controls which websites can talk to Ollama, to an asterisk, which allows every website. And if you share a model with your household through Open WebUI, keep its user accounts and passwords turned on.

Layer 5: Poisoned Models and AI Agents

The most subtle risk lives in the model itself. Because a model's behavior is stored in billions of numbers rather than readable code, it is possible to train a model with a hidden backdoor: behavior that only appears when a specific trigger shows up. In 2024, researchers at Anthropic published a paper called Sleeper Agents showing that deliberately planted backdoors, such as writing secure code normally but inserting vulnerabilities when told the year is 2024, survived the standard safety training techniques meant to remove harmful behavior.

This becomes dangerous when a model is connected to tools. AI agents, such as coding assistants that can read your files and run commands, turn a model's words directly into actions on your computer. In October 2026, the security company ProjectDiscovery demonstrated exactly this. They trained a backdoor into Qwen2.5-7B, an older open model, and connected it to OpenAI's Codex coding agent. The model behaved perfectly on normal requests, but when a hidden trigger phrase appeared, it used the agent's ability to run commands to download a script that read the project's .env files, the configuration files where developers often store passwords and API keys, sent their contents to an outside server, and also tried to grab SSH keys. The secrets in their demonstration were fake, but the attack worked, and it cost about 8 dollars in rented computing time and under 50 dollars in total to build. The researchers specifically warned about abliterated models, community versions with their safety restrictions removed, which are popular downloads and an easy place to hide this kind of modification.

The defense is to limit what any model can touch. Run AI agents inside a sandbox, such as a container or a separate user account, that can only see the folders it actually needs. Keep secrets out of project folders where possible, and never give an agent access to your whole home directory. Require approval before an agent runs commands, and block or monitor its network access so a compromised model cannot send data out. Prefer official models from their original developers over modified or uncensored community versions, especially for anything with tool access. And treat a model like any other untrusted program: benchmarks measure how capable a model is, not whether it has been tampered with.

A Private and Fortified Local AI Setup

Putting it all together, a well-secured local AI setup looks like this:

Closing Thoughts

For most of the short history of modern AI, using a capable model meant sending your words to a company's data center and accepting whatever terms came with it. That is no longer true. The open models available today are capable enough for most everyday tasks, they run on hardware many people already own, and they keep every word you type on your own machine.

Owning your AI also means owning its security. The risks covered here are real and documented, but every one of them has a straightforward defense: trusted sources, regular updates, a server that stays private, and agents that only touch what they need. Start small. Install Ollama or LM Studio, download one model from its official developer, and see what it can do. Then build from there, deliberately and safely. Your conversations, your documents, and your ideas should belong to you, and with local AI, they can.