
A local AI model is a language model you download and run on your own computer or server, so your text is processed on your side. You can run it in Ollama or LM Studio without programming, but the model alone does not make the whole application private.
Below you will find the step-by-step setup, tables of memory needs and open models with their licences, and a way to decide when running locally pays off for a company. Figures are as of 20 October 2026.
A small model in Ollama downloads at about 7.2 GB and needs 8 GB of free GPU memory or unified memory (figures as of 20 October 2026). Count memory as the model file plus context: at 4-bit quantisation roughly 0.6 GB per billion parameters, so about 5 GB for an 8-billion-parameter model and 14 GB for gpt-oss:20b. Ollama's default context is only 4k tokens when VRAM is under 24 GiB, so raise it for longer documents. Judge privacy for the whole application, including cloud features, logs and backups, not for the model alone. I set up a local model for data that must not leave the company as part of AI automation, from €60 per hour.
How do you run local AI on your own computer?
There are two common routes. Ollama is a command line with an app, LM Studio is a graphical app with a model catalogue. Both run on macOS, Windows and Linux. For a single user they are equivalent: if you would rather not type commands, start with LM Studio.
Setup in Ollama
- Download the installer from ollama.com/download. On Windows you need Windows 10 22H2 or newer and the installer does not require administrator rights; on macOS you need version 14 (Sonoma) or newer (Windows, macOS). With NVIDIA cards, Ollama on Windows requires driver 551.61 or newer.
- In a terminal run
ollama run gemma4:e2b. The command downloads the model if you do not have it yet and opens a chat; leave it by typing/bye. - In a second terminal window enter
ollama ps. The PROCESSOR column shows100% GPU(fully in GPU memory),100% CPU(fully in system memory) or a split such as48%/52% CPU/GPU. The CONTEXT column shows the allocated context.
Other useful commands:
ollama pull gemma4:e2b # only downloads the model
ollama ls # downloaded models
ollama stop gemma4:e2b # frees the model from memory
ollama rm gemma4:e2b # deletes the model from disk
By default Ollama listens only on 127.0.0.1:11434, so your application connects to localhost:11434, but nobody on another computer can reach it until you change the address with the OLLAMA_HOST variable. Commands and behaviour are described in the Ollama documentation and the quickstart.
Setup in LM Studio
- Download the app from lmstudio.ai. According to the requirements, a Mac needs an Apple Silicon chip (M1 to M4) and macOS 14 or newer; Intel Macs are not supported. Windows runs on x64 (AVX2 support required) and on ARM. 16 GB of RAM is recommended, and on Windows also at least 4 GB of VRAM.
- Open the Discover tab (Ctrl+2, Cmd+2 on a Mac) and search for a model. The documentation says to choose a 4-bit variant or higher if your machine can handle it.
- Load the model and type into the chat. Context size and GPU offload can be set per model (model settings: My Models tab, gear icon).
- You can attach
.docx,.pdfand.txtfiles to a chat. If they fit in the context, LM Studio inserts them in full; longer documents are handled by retrieval (RAG), which according to the documentation sometimes needs tuning. - For your own application, switch on Start server in the Developer tab or run
lms server start(server). The OpenAI-compatible interface is then athttp://localhost:1234/v1in the documentation's examples.
LM Studio also works without internet once a model is downloaded. It needs the network only for model search and downloads, runtimes and app updates (offline operation).
What context should you set so the whole document fits?
Context is the maximum number of tokens the model keeps in memory: your instruction, the pasted document and the answer together. Ollama's default depends on GPU memory: under 24 GiB of VRAM it is 4k tokens, from 24 to 48 GiB 32k, from 48 GiB 256k (context documentation). On an ordinary graphics card an 8,000-token document therefore does not fit in the default context and the model does not see all of it.
You raise the context with the slider in the Ollama app settings or with an environment variable, for example OLLAMA_CONTEXT_LENGTH=16384 ollama serve (macOS and Linux syntax); in an interactive ollama run session use /set parameter num_ctx 16384 (FAQ). For agents, coding tools and web search the documentation recommends at least 64,000 tokens.
A larger context costs memory. According to the FAQ, the RAM required scales with OLLAMA_NUM_PARALLEL × OLLAMA_CONTEXT_LENGTH. You can reduce the memory used for context by quantising the cache (OLLAMA_KV_CACHE_TYPE, which works with Flash Attention enabled and applies to all models): q8_0 takes roughly half the memory of the default f16, q4_0 roughly a quarter, but its loss of precision is more noticeable at large context sizes.
The context length listed for a model is a ceiling, not a recommendation. Gemma 4 31B states 256K tokens and Qwen3.8-27B 262,144, but you still need the memory for such a context.
Worked example: What to check before buying a GPU
pilot worksheet
| Item | Pilot record |
|---|---|
| Hardware | GPU: 12 GB VRAM; RAM: 32 GB |
| Model | Exact file + quantization: to record |
| Workload | 1 user; 8,000-token document |
| Context | Above 8,000 tokens with headroom for the prompt and the answer, e.g. 12,000 (Ollama default with VRAM under 24 GiB: 4k) |
| Verification | Loading, memory and CPU/GPU split (ollama ps), latency, correctness |
A sample plan, not a measurement result. VRAM use and response time can only be established by testing the specific model file.
How much memory does a local model need?
Memory consists of the model file, the context and the program's overhead. The tables below show only the model file, to which the context is added. The llama.cpp README states that the memory and disk requirements of the file are the same.
Llama 3.1 8B file size by quantisation (llama.cpp README, figures in GiB):
| Quantisation | Bits per weight | File size |
|---|---|---|
| F16 (unquantised) | 16.00 | 14.96 GiB |
| Q8_0 | 8.50 | 7.95 GiB |
| Q6_K | 6.56 | 6.14 GiB |
| Q5_K_M | 5.70 | 5.33 GiB |
| Q4_K_M | 4.89 | 4.58 GiB |
| Q3_K_M | 4.00 | 3.74 GiB |
| Q2_K | 3.16 | 2.95 GiB |
Size grows with the number of parameters. In Q4_K_M, Llama 3.1 with 8 billion parameters is 4.9 GB, with 70 billion 43.1 GB and with 405 billion 249.1 GB. From these numbers comes the rule of roughly 0.6 GB per billion parameters. In pure theory 4 bits would give 0.5 GB, but Q4_K_M uses 4.89 bits per weight on average.
Add the context and some headroom to the file. What was actually loaded, you will see in ollama ps. The table above is in GiB; the Ollama library and vendor figures are in GB.
Mac or a PC with a graphics card?
A Mac with Apple Silicon has one memory for both processor and graphics. Apple's MLX framework describes this as a unified memory model: arrays live in shared memory and operations on the CPU and GPU need no data transfer (MLX). Model size is therefore limited by the Mac's memory as a whole, not by a separate graphics memory. Ollama supports both CPU and GPU on M-series Macs and only the CPU on Intel Macs; LM Studio does not support Intel Macs. The Ollama library also has -mlx variants for Mac, for example gemma4:26b-mlx (18 GB).
On a PC it is best to have the model entirely in graphics memory (VRAM). When VRAM is short, Ollama can use system RAM, but responses may be slower (quickstart). Llama.cpp splits a larger model between GPU and CPU, so only part of it is accelerated (llama.cpp). You see the split in ollama ps. The amount of memory you have matters more than the brand of computer.
Which open models can you use today, and under what licence?
The table is based on the model cards on Hugging Face and the Ollama library (read 20 October 2026). File size is the figure from the Ollama library; a range means the library lists several variants.
| Model | Parameters (total / active) | Licence | File and note |
|---|---|---|---|
E4B: 4.5 billion effective (8 billion with embeddings) |
Apache 2.0 |
gemma4:e2b 4.6 to 7.5 GB, gemma4:e4b 6.6 to 9.5 GB; 128K context |
|
Ministral 3 (3B, 8B, 14B) |
8B: 8.4 billion + 0.4 billion vision |
Apache 2.0 |
8B card: fits in 12 GB of VRAM in FP8, less if quantised further |
21 billion / 3.6 billion |
Apache 2.0 |
gpt-oss:20b 14 GB; the vendor says it runs within 16 GB of memory |
|
25.2 billion / 3.8 billion |
Apache 2.0 |
gemma4:26b 16 to 19 GB; 256K context |
|
27 billion (dense model) |
Apache 2.0 |
qwen3.8:27b 18 GB; 262,144 context |
|
30.7 billion |
Apache 2.0 |
gemma4:31b 19 to 20 GB; 256K context |
|
35 billion / 3 billion |
Apache 2.0 |
qwen3.6:35b 23 to 24 GB; 262,144 context |
|
117 billion / 5.1 billion |
Apache 2.0 |
gpt-oss:120b 65 GB; per the vendor, a single 80 GB GPU |
|
119 billion / 6.5 billion |
Apache 2.0 |
the card gives no memory requirements; even at 4-bit quantisation it is tens of GB by estimate (0.6 GB × 119); 256k context |
The file must be smaller than your memory, with headroom for the context. For 8 GB of memory that is gemma4:e2b, which Ollama's quickstart also recommends. For 16 GB of memory gpt-oss:20b. Qwen3.6 35B at 23 to 24 GB needs a computer with more than 24 GB of memory.
Every model in the table is under Apache 2.0. That is a permissive licence, but open weights are not the same as open training data, and modified versions or third-party quantisations may carry different terms. Read the licence of the specific file you download.
I do not judge Czech quality from the cards. Gemma 4 states support for 35+ languages and pre-training on 140+ languages, while the Ministral 3 card does not name Czech among the listed languages. Test Czech on your own texts.
Is local AI automatically private?
No. A model on your computer sends text only where the program around it sends it. Ollama states that when you run locally it does not see your prompts or data (FAQ), and LM Studio that nothing from a chat leaves the device (offline operation). That holds for a chat with a local model.
Privacy is undone by what you add: cloud models and web search in Ollama (you switch them off with OLLAMA_NO_CLOUD=1), tools that call external APIs, synchronisation, logs and backups. Before putting in real data, go through the data flow of the whole application. Local computation is a necessary condition, not a guarantee.
What are local models good for?
Try them on these tasks in a pilot. For each, write down the expected answers in advance, and the cases where the model should decline or admit it does not know.
Tasks for a local model pilot
- Summarisation and extraction summarise a document, pull data out of a contract, compile minutes from a transcript
- An internal assistant over documents answers from internal guidelines, manuals and order history without the documents leaving the company
- Classification and sorting enquiries, tickets and reviews, sentiment, pre-processing data for another system
- Personal-data redaction proposing removal of identifiers; check completeness and re-identification risk, a model rewrite alone does not guarantee anonymisation
- High-volume simple tasks thousands of short operations a day, where a cloud bill would grow and a small model's quality is enough
Worked example: Extraction should point to its source
ORIGINAL EXAMPLE · FICTIONAL DATA
| Field | Draft output | Source check |
|---|---|---|
| Document | DEMO-017 | Fictional purchase order |
| Product | Alba lamp | "Item" line |
| Quantity | 2 units | "Quantity" line |
| Missing field | Date: not stated | Do not invent a date |
The example does not prove where a model ran or where data went.
How does RAG over company documents work?
RAG (retrieval-augmented generation) is an approach where, before answering, the system finds relevant passages in your documents and hands them to the model together with the question. The model answers from your material and you do not have to retrain it.
How RAG answers from company documents
- Splitting documents are split into passages (chunks)
- Embeddings each passage becomes a numeric vector; Ollama documents the
embeddinggemmamodel and the/api/embedendpoint for this (embeddings), with the same model for indexing and queries - Retrieval the question is converted with the same model and the nearest passages are found, usually by cosine similarity
- Answer the language model receives the passages as context and the answer should cite its source
Three practical points follow. The embedding model must run locally too, otherwise documents leave already at indexing. If you change the chunking or the embedding model, the index has to be rebuilt. And permissions must be applied at retrieval, not only in the finished answer. The quickest start is attaching a file in LM Studio (see above). How to build search over internal procedures with source citations and access control is covered in AI over company documents.
Local AI or cloud?
| Aspect | Local AI | Cloud AI |
|---|---|---|
| Data flow | Computation happens on your side. A chat with a local model does not send data to the program's operator, but the connected tools still matter. | Text goes to the provider's servers; the contract and account settings set the terms. |
| Costs | Hardware, electricity and an administrator's time. You do not pay per token. | You pay for use (tokens or a subscription) and buy no hardware. |
| Quality | Limited by the model that fits in your memory. The largest open models (gpt-oss:120b is 65 GB) need a server. |
Access to large closed models (ChatGPT, Claude, Gemini). Running locally does not improve a model, it only changes control over data. |
| Maintenance | Updates of models, programs and drivers, backups and security are yours. | The provider handles operation and model updates; you manage accounts and access. |
| Offline | Works without internet once the model is downloaded. | Does not work without internet. |
Decide with a pilot on your own tasks, not with a general rule. A combination makes sense when you decide in advance which data and tasks may go to which environment, for example sensitive documents locally and general texts in the cloud.
What infrastructure does a company need?
For one person, a workstation with Ollama or LM Studio is enough. For a team, deal with:
- Concurrency. By default Ollama processes 1 request per model at a time (
OLLAMA_NUM_PARALLEL) and keeps a model in memory for 5 minutes after use (OLLAMA_KEEP_ALIVE). More users mean more memory, see the context multiplier above. - Access. Ollama listens on
127.0.0.1; for the network you change the address withOLLAMA_HOST. LM Studio can also serve on the local network. Put a login and a firewall in front of the interface and do not expose it to the internet. - Logs and backups. Decide what is stored (prompts, answers), for how long and who reads it. A server backup also backs up the content of documents.
- Updates. Models, programs and graphics drivers change continually. After every change, run the same tasks again to see whether the model still answers as well.
- An owner. Someone has to own operation, internally or externally. Without an owner, a local service is a risk even when the other reasons favour it.
For dozens of concurrent users it is already a job for someone who manages servers.
When does local AI pay off for a company?
Answer four questions:
- Do you work with data that must not leave the company (health, legal, financial, trade secrets), and are a cloud provider's contractual guarantees not enough for you?
- Do you need AI where there is no reliable internet (production, field work, closed networks)?
- Do you have a high volume of simple tasks where a cloud bill would grow and a smaller model's quality is enough?
- Do you have someone to look after it?
Do not turn the answers into a score. A single requirement for offline operation or for data inside the company can decide it. Without an owner, a local service does not make sense even with three yes answers.
Calculate the payback with a formula, not with prices that go stale quickly. Cloud per month = number of requests × tokens per request × price per token from the provider's current price list. Local per month = hardware price ÷ number of months of service life + electricity + administrator's time. Running locally pays off when the first figure is consistently larger than the second, or when a requirement decides it that the cloud cannot meet.
Payback: cloud or local
- Cloud per month
- number of requests × tokens per request
- × price per token from the provider's current price list
- Local per month
- hardware price ÷ months of service life
- + electricity
- + administrator's time
I help in two ways. AI automation starts with an operations audit and is billed by the hour (€60/h, with an hour estimate up front); a local-model variant is available for data that must not leave the building. When the assistant has to serve the whole team with logins and permissions, I build it as a custom internal application. I cover the rules for a team working with AI (what may go into AI, internal data, personal data, GDPR) in corporate AI training, where a workshop starts at €1,000. To try AI yourself first, take one of the open courses.
Whether a local model pays off depends on the tasks, the data and your privacy requirements. I will go through which tasks in your company suit AI and propose a small pilot, so you can verify it before investing in hardware.
What do GDPR and the AI Act say about running locally?
GDPR applies locally too. Legal basis, minimisation, access and security are handled just as in the cloud. Running locally can reduce disclosure to other parties, but only if actual operation matches that: external hosting, support, backups or cloud tools create further relationships. The EDPB explains the controller and processor roles.
The AI Act regulates the purpose of use, not where the computation runs. The open-source exemption in Article 2(12) concerns AI systems released under a free and open-source licence, and even it does not apply to high-risk systems, prohibited practices (Article 5) and transparency obligations (Article 50). A downloaded model under Apache 2.0 therefore does not mean the AI Act does not concern you. If you build a chatbot on it that interacts with people, Article 50 requires that they are informed they are interacting with AI, unless that is obvious.
The deadlines shifted in 2026. Regulation (EU) 2026/1744 of 8 July 2026 (Official Journal 24 July 2026, in force on the third day after publication) moves high-risk systems under Annex III to 2 December 2027 and under Annex I to 2 August 2028. It changes the AI literacy duty in Article 4 to "take measures to support" the development of AI literacy. Providers of generative systems placed on the market before 2 August 2026 must meet the marking of synthetic content under Article 50(2) by 2 December 2026. An overview of the deadlines is in the AI Act in practice. I am not a lawyer; have your specific deployment assessed legally.
What to take away
- You can run a local model without programming in Ollama or LM Studio, and your text is processed on your side.
- Count memory as the model file plus context and overhead; at 4-bit quantisation that is roughly 0.6 GB per billion parameters.
- Privacy is guaranteed not by the model but by the whole application: cloud features, search, tools, logs and backups.
- It pays off for data that must not leave the company, for offline operation or for a large volume of simple tasks, and only when someone looks after it.
- GDPR and the AI Act apply to local operation too; the AI Act regulates the purpose of use, not where the computation runs.
Frequently asked questions
How do I run AI on my own computer?
Install Ollama or LM Studio, download a small model and try it on your own text. In Ollama ollama run gemma4:e2b is enough, in LM Studio the Discover tab. Use ollama ps to check whether the model runs on the GPU, and for longer documents raise the default context, which is only 4k tokens when VRAM is under 24 GiB.
In what way is local AI better than the cloud?
Running locally does not improve the quality of a model. It changes control over data (the computation runs on your side), dependence on a provider and the cost structure (hardware instead of per-token payments), and it allows operation without internet. Compare quality and price on the same tasks.
How much memory do I need?
The size of the model file plus the context and the program's overhead. Examples from the Ollama library: gpt-oss:20b 14 GB, gemma4:26b 16 to 19 GB, qwen3.6:27b 18 to 19 GB. As a rule of thumb, 4-bit quantisation gives 0.6 GB per billion parameters. ollama ps shows the actual consumption after loading.
What infrastructure does a company need?
For one user a workstation is enough. For a team, deal with concurrency (by default Ollama processes 1 request per model, OLLAMA_NUM_PARALLEL), memory for the context, access, logs, backups and updates. Do not expose the interface to the internet; put a login and a firewall in front of network traffic.
Which model should I choose and what licence does it have?
Start with models under Apache 2.0, such as Qwen3.6 and 3.8, Gemma 4, gpt-oss or Mistral Small 4, and pick one whose file fits in memory with headroom for the context. Read the licence of the specific file and test Czech on your own texts.
Do GDPR and the AI Act apply to local AI?
Yes. Running locally does not guarantee compliance. The open-source exemption in the AI Act does not extend to high-risk systems, prohibited practices and the transparency obligations under Article 50. Under GDPR you handle legal basis, minimisation and security just as in the cloud. I am not a lawyer; have your specific use assessed legally.
Sources and links
All read on 20 October 2026.
- Ollama: quickstart, commands, context, FAQ, Windows, macOS, embeddings, download
- Ollama, file sizes in the library: gpt-oss, gemma4, qwen3.6, qwen3.8
- LM Studio: offline operation, system requirements, downloading models, documents and RAG, model settings, server
- llama.cpp: file sizes by quantisation and project description, MLX from Apple
- Model cards: Qwen3.8-27B, Qwen3.6-35B-A3B, Gemma 4 26B A4B, Gemma 4 31B, Gemma 4 E4B, gpt-oss-20b, gpt-oss-120b, Mistral Small 4, Ministral 3 8B
- Regulation (EU) 2024/1689 (AI Act) and Regulation (EU) 2026/1744 (Digital Omnibus on AI)
- GDPR Regulation (EU) 2016/679 and EDPB: controller and processor
