Knowledge: Local Models
Local language models: what open-weight models can do and what they need
Running a language model on your own hardware means taking three things into your own hands: the weights, the memory and the operations. That means understanding what open weights actually mean, how quantisation works, how to work out memory needs, and when a hosted model remains the better choice.

Short answer
A local language model runs on your own hardware using published weights, so requests and documents never leave the network. Hardware needs come down mainly to GPU memory: it must hold the weights, whose size quantisation cuts sharply, plus a cache that grows with context length and parallelism. Serving, updates, monitoring and security all become your own responsibility.
Definition
Open-weight model: An open-weight model is a language model whose trained weights are published for download, so it can run on your own hardware with no connection to the provider. Open weights say nothing about training data, training code or licence terms. Whether such a model also counts as open source depends on whether those components and freedoms of use are granted as well.
In the glossary: Open-weight model, Open-source software, Quantisation, GPU, Inference, Context window, Token, On-premises, Offline LLM, Large language model
01
What is a local language model, and what actually runs in-house?
A local language model consists of a file of trained weights and a runtime that computes answers from them. Both run on hardware you control, your own data centre or a hosting provider of your choice. Requests, documents and answers never leave that environment. Only model and software updates come in from outside, and only when you fetch them.
A large language model is, at its core, a very large set of learned numbers, the weights. A runtime loads them into the memory of a GPU, breaks requests into tokens and computes the answer token by token. "Local" therefore describes no property of the model itself, but an architectural decision: where do the weights, runtime, requests and logs live, and who decides on changes?
| Component | What it is | Under local operation |
|---|---|---|
| Weights | Trained parameters as a file | In your own storage, version tracked |
| Runtime | Software that accepts requests and computes | On your own server |
| Requests and context | Questions, injected documents, intermediate results | Within your own network only |
| Logs | Usage, errors, response times | In your own storage, under your own retention policy |
| Updates | New model versions, security patches | Fetched and vetted deliberately |
Whether local or cloud fits better comes down to your data situation, load and desired control, as On-premises vs. cloud LLM sets out. Knowledge management with AI shows how the model fits into a knowledge system alongside search, access rights and upkeep.
02
Are open-weight models the same thing as open source?
No. Open weights only mean that the parameters can be downloaded. The Open Source Initiative's Open Source AI Definition additionally requires the freedoms to use, study, modify and share the system, plus the full code and detailed information about the training data. A model with open weights can meet that bar, but does not have to.
The Open Source Initiative published version 1.0 of its Open Source AI Definition on 28 October 2024 (OSI, 2024). It carries the familiar freedoms of free software over to AI systems: use for any purpose without permission, study, modify, including the output, and share. In return it requires three components: information about the training data detailed enough that a skilled person could build a substantially equivalent system, the full code for training and inference, and the model parameters. The training data itself does not have to be published.
Open weights, Open Source AI and hosted models
| Criterion | Open weights | Open Source AI per OSI | Hosted model |
|---|---|---|---|
| Weights downloadable | Yes | Yes | No |
| Training and inference code | Not required | Fully required | No |
| Information about training data | Not required | Required in detail | Usually sparse |
| Use for any purpose | Depends on the licence | Required | Per the provider's terms of use |
| Runs on your own hardware | Possible | Possible | Not possible |
For operation, what counts first is simply that the weights are available. For procurement and compliance, what counts is the licence text of the specific model version, because some licences attach conditions to use case, user numbers or modifications. LLM comparison and model selection covers which clauses should be clarified before a test. Open-weight models for German B2B offers an assessment of widely used open models for German text.
03
What is quantisation, and what does it cost in quality?
Quantisation stores a model's weights with fewer bits, say 8 or 4 instead of 16 bits per value. That cuts the weights' memory footprint to a half or a quarter, and answers often come back faster. The quality loss is small at a moderate level, grows with heavier compression, and hits languages and difficult tasks to different degrees.
Every weight is a decimal number, usually stored with 16 bits during training. Quantisation maps these values onto a coarser grid, 256 levels at 8 bits or 16 levels at 4 bits, and stores a scaling factor per group of weights that lets the original magnitude be reconstructed. The real work of these methods lies in placing the grid so that the values that matter most for the result lose as little as possible.
| Representation | Bytes per parameter | Share versus 16 bits | Assessment |
|---|---|---|---|
| 16 bits | 2 | 100% | Reference point for comparisons and fine-tuning |
| 8 bits | 1 | 50% | Low loss, documented in research |
| 4 bits | 0.5 plus scaling factors | around 25 to 30% | Common for local operation, test on your own set |
| 3 bits or fewer | under 0.4 | under 20% | Only after careful measurement of your own |
Research shows how far this carries. LLM.int8() (Dettmers et al., NeurIPS 2022) halves the memory needed for inference by keeping a handful of outlier dimensions at 16 bits, with no loss of accuracy according to the paper for models up to 175 billion parameters. GPTQ and AWQ go further, compressing weights down to a few bits after training, with AWQ specifically protecting the small number of especially important weights.
A fourth piece of work matters for anything beyond English. Marchisio et al. (EMNLP 2024) found that automatic measurements underestimate the damage from quantisation, that languages with non-Latin scripts suffer the most, and that difficult tasks such as mathematical reasoning degrade faster than easy ones. English benchmark figures for a quantised model are therefore no substitute for testing on German technical text with a human sample.
04
How much GPU memory does a local model need?
GPU memory has to accommodate three items: the weights, whose size comes from the parameter count times bytes per parameter, the key-value cache (KV cache), which grows with context length and the number of simultaneous requests, and a margin for the runtime. With long contexts and many users, the KV cache quickly exceeds the weights themselves.
This calculation uses a hypothetical model, so the numbers do not go stale with any particular model version. The assumptions are stated explicitly, so you can swap in the values from your own candidate's configuration file. A gigabyte here means one billion bytes.
- Parameters: 30 billion
- Layers: 64
- Key-value heads: 8, with 128 dimensions each (grouped-query attention, covered shortly)
- KV cache: 16 bits, so 2 bytes per value
- Weights: quantised to an effective 4.5 bits per parameter, the extra half-bit covering scaling factors
- Runtime margin: a flat 2 GB for activations and overhead
Weights = parameters x bits per parameter / 8
= 30,000,000,000 x 4.5 / 8 = approx. 16.9 GB
KV per token = 2 (key and value) x layers x KV heads x head dimension x bytes
= 2 x 64 x 8 x 128 x 2 = 262,144 bytes, approx. 0.26 MB
KV total = KV per token x context length x concurrent requests
= 262,144 x 8,000 x 4 = approx. 8.4 GB
Total = weights + KV total + runtime overhead
= 16.9 + 8.4 + 2 = approx. 27 GB| Scenario | Weights | KV cache | Margin | Total |
|---|---|---|---|---|
| 4.5 bits, 4 requests of 8,000 tokens each | 16.9 GB | 8.4 GB | 2 GB | around 27 GB |
| 4.5 bits, 4 requests of 32,000 tokens each | 16.9 GB | 33.6 GB | 2 GB | around 52 GB |
| 16 bits, 4 requests of 8,000 tokens each | 60.0 GB | 8.4 GB | 2 GB | around 70 GB |
| 4.5 bits, without grouped-query attention (64 KV heads), 4 requests of 8,000 tokens each | 16.9 GB | 67.1 GB | 2 GB | around 86 GB |
Two lessons follow from this. First, doubling context length or parallelism doubles the KV cache, while the weights stay the same. Second, architecture matters too: grouped-query attention (Ainslie et al., EMNLP 2023) shares keys and values across fewer heads, shrinking the cache accordingly, and reaches quality close to full multi-head attention according to the paper. The number of layers and KV heads is listed in every model's configuration file.
Local LLM in the enterprise: hardware, cost, reality maps out which hardware classes fit which model sizes.
05
How is a local model made available to applications?
A local model is served through an inference server that accepts requests, batches several together, and streams the answer back token by token. Applications talk to it over an HTTP interface, commonly in a format compatible with the chat interfaces of popular hosted services. That way the model can be swapped out without rewriting the application.
- 01AcceptAuthentication, queue
- 02TokeniseText into tokens
- 03PrefillThe whole context at once
- 04DecodeOne token per step, cache grows
- 05StreamAnswer sent to the application
The two compute phases load the hardware differently. During prefill, the model processes the entire context in parallel, which sets the wait until the first token. During decode, every further token is generated one at a time, and each step reaches into the weights and the growing cache again. A server that batches many requests into shared passes uses the GPU far more efficiently than one that works through them one after another.
How much memory gets wasted depends on how the KV cache is managed. PagedAttention (Kwon et al., SOSP 2023) manages it in blocks modelled on virtual memory management in operating systems, achieves almost no waste according to the paper, and raises the throughput of popular models two to four times over at the same latency. The resulting server, vLLM, offers endpoints compatible with OpenAI's chat completions interface, according to its documentation.
Two classes of runtime
| Criterion | Single-machine runtime | Server runtime |
|---|---|---|
| Typical use | Development, testing, individual users | Multiple users, applications in production |
| Model format | Often a single file with weights and metadata, such as GGUF | Weights across several files plus configuration |
| Hardware | CPU-only or mixed CPU and GPU too | GPU with sufficient memory |
| Concurrent requests | A few | Many, batched |
| Strength | Easy to start with, low requirements | Throughput, cache management, metrics |
GGUF, according to the GGML project's specification, is a binary format that stores tensors and metadata in a single file and is built for fast loading, including via memory mapping. For operation with many users, though, what counts is batching, cache management and monitoring.
06
What does running a local model long-term actually require?
Long-term operation requires four things: tracked model and software versions, so results stay traceable, measurements of latency, throughput, memory and answer quality, a vetted path for updating the model and the runtime, and security, because an unprotected inference server is an open compute service on the network. That work starts once installation ends.
Track versions
The model file with its checksum, runtime version, quantisation level and configuration all belong in version control. Only that way can a changed answer be traced back to a cause.
Maintain a test set
Real tasks with verified expected results run before every change of model, quantisation or runtime. Checking AI answers describes how to build one.
Measure operations
Time to first token, tokens per second, memory utilisation, queue length and error rate show when the hardware is reaching its limit.
Roll out updates deliberately
New model versions are checked against the test set in a test environment and only adopted afterwards. Security patches for the runtime get their own, shorter path.
Secure access
The server is reachable internally only, requires authentication, and logs access without personal content. Access control in AI knowledge systems covers who is allowed to see which answers.
The German Federal Office for Information Security (BSI) gives a structured overview of risks and countermeasures across the whole lifecycle of generative models, from planning to operation, in a 2025 publication on the opportunities and risks of generative AI models for industry and public bodies.
Checklist
Operational readiness of a local model
For the team taking on operations. Nothing here is saved.
07
When is a hosted model the better choice?
A hosted model is the better choice when the task needs a level of performance unreachable on available hardware, when load swings sharply or occurs rarely, when nobody can take on operations, or when the data is not sensitive. A split often works well: confidential tasks stay local, non-sensitive ones go through a service.
Decision path
Local, at a hosting provider, or as a service?
Three questions that point to the next sensible step.
All questions and results as a list
- Is the affected data allowed to leave your own infrastructure?
- No, continue with: Is there someone who takes lasting responsibility for the server, updates and monitoring?
- Yes, continue with: Is the load predictable and high throughout the day?
- Is there someone who takes lasting responsibility for the server, updates and monitoring?
- Yes, Result: Run it locally
- No, Result: Settle operations first
- Is the load predictable and high throughout the day?
- Yes, Result: Run the numbers both ways
- No, Result: A hosted service is the natural fit
- Result: Run it locallyWhat to work out: which model size solves the tasks on your test set, what the memory calculation looks like at the expected parallelism, and how updates get vetted.
- Result: Settle operations firstWhat to work out: who takes on operations and security, internally or externally, before any hardware is procured. An open model at a hosting provider with a contractually fixed location can serve as an interim solution.
- Result: Run the numbers both waysWhat to work out: total cost over several years at the actual load, quality differences on the test set, and dependence on a provider's terms.
- Result: A hosted service is the natural fitWhat to work out: which service solves the task on your test set, what contract terms apply, and how the application would cope with switching later, for example through its own model interface.
On-premises and offline LLM and AI with EU data residency go deeper on hybrid setups and their criteria. A Signal on the lesson of operational control describes how even a leading hosted model can disappear from the market at short notice.
08
Which common assumptions about local models do not hold up?
Several common assumptions do not survive scrutiny: that open weights mean a free licence, that the largest model that fits is the safe choice, that quantisation costs nothing, that local automatically means secure, and that an installed model needs no ongoing work. Each one leads either to the wrong procurement decision or to a poorly maintained system.
Assumptions about local language models
Not automatically.
The Open Source Initiative's definition requires code and detailed information about training data alongside the parameters, plus freedoms for any purpose. What governs deployment is the licence text of the specific version.
Often not.
A larger model leaves less memory for the KV cache, and so for context and concurrent users. For narrowly scoped tasks with good retrieval of the relevant passages, a smaller model is often enough.
Little at a moderate level, measurable beyond that.
Automatic tests markedly underestimate the loss, according to Marchisio et al. (EMNLP 2024). The comparison belongs on your own tasks, in your own language.
False.
Local operation prevents data flowing out to a provider, but not unauthorised access within your own network, faulty answers or manipulated inputs. Access control and logging remain the job of operations.
No.
The runtime and drivers need security updates, new models need vetting, and changing usage shifts the memory calculation.
Models that call tools carry additional requirements, described in AI agents in knowledge work.
09
How do you get started with a local language model?
Start with a narrowly scoped task and a test set of real examples, not with the hardware. Two or three open candidates of different sizes run against that test set, initially in a simple runtime. Only once quality and the memory calculation hold up do server runtime, security and choosing the right hardware follow.
- Define the task and data class: Which requests, which documents, which level of confidentiality.
- Build a test set: Real tasks with verified expected results, difficult cases included, in German.
- Compare candidates: Two or three open models of different sizes and quantisation, under the same conditions.
- Calculate memory: Using the values from the model configuration, the context length and the expected parallelism.
- Set up operations: Server runtime, authentication, metrics, version control and a tested rollback path.
iiterate Technologies GmbH builds AI applications and custom software from architecture through implementation to operation, on client infrastructure or in EU hosting, with a focus on local language models, RAG and integration with existing systems (Services).
Read more on iiterate.de
Deeper dives in Signals
- Signal Local LLM in the enterprise: hardware and reality Which hardware class supports which model size, and why smaller is often enough.
- Signal On-premises vs. cloud LLM The choice between local and cloud, based on data situation, load and control.
- Signal Open-weight models for German B2B Open models ranked by licence, German-language quality and hardware fit.
- Signal Subquadratic LLMs for long context Why new architectures cap the KV cache, and what is actually proven so far.
- Signal When a leading model disappears Why operational control over a model matters more than a service's leaderboard position.
Implementation and tools
- Consulting On-premises and offline LLM Building and running open models on your own hardware or in a private cloud.
- Consulting LLM comparison and model selection Comparing models on your own test sets and checking licences before testing.
- Consulting AI with EU data residency Architectures where data and models stay within the EU.
- Tool AI readiness check A self-test of where a company stands on data, organisation and infrastructure.
More in Knowledge
- Knowledge Knowledge management with AI The overview of how model, search, access rights and upkeep work together.
- Knowledge Retrieval-augmented generation explained The pipeline that supplies a model with the right passages, complete with source.
- Knowledge Access control in AI knowledge systems How access rights carry from the document all the way into the answer.
- Glossary Quantisation in the glossary The short definition, with links to related terms.
Frequently asked questions
Is a normal office PC enough for a local language model?
Often yes for small models and testing, especially with runtimes that also compute on the CPU. Answers then come back slowly, and multiple concurrent users are barely possible. For operation with a team, GPU memory is what counts. The memory calculation set out earlier shows how model size, context length and parallelism interact.
Can a local model be fine-tuned on your own data?
Open weights allow fine-tuning, as far as the licence permits. For knowledge drawn from documents, that is rarely the best route, because content changes and sources go missing. Connecting to document search usually holds up better. RAG or fine-tuning describes which approach fits when.
When is it worth switching to a newer model?
When it measurably outperforms the current one on your own test set, needs less memory, or fixes a problem with the existing setup. Being newer is not a reason on its own. Wrapping model calls behind your own interface and tracking versions turns every switch into a vetted configuration change with a tested rollback path.
Are local models slower than hosted ones?
Not inherently. Speed depends on model size, quantisation, hardware, runtime and the number of concurrent requests. A small model on the right GPU often answers faster than a large service under load. With very large models and many users, though, a single server runs into limits that a provider with large compute clusters does not have.
Does a local model need an internet connection?
Not for operation. Weights, runtime and application all work entirely within your own network, which is the precondition for offline operation. A connection is only needed to fetch new model versions or software updates, and even that can go through a vetted transfer path.
What is the difference between parameters and tokens?
Parameters are the model's learned numbers; their count determines the weights' memory footprint. Tokens are the word fragments that text gets broken into for processing. Their count in a request determines the cache requirement and the compute time. German text often produces more tokens than an English text of the same length.
Read on
Related topics
Sources
- 01 The Open Source AI Definition 1.0 Open Source Initiative, 2024 · opensource.org
- 02 LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale arXiv (NeurIPS 2022), 2022 · arxiv.org
- 03 GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers arXiv (ICLR 2023), 2022 · arxiv.org
- 04 AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration arXiv (MLSys 2024), 2023 · arxiv.org
- 05 How Does Quantization Affect Multilingual LLMs? arXiv (EMNLP 2024), 2024 · arxiv.org
- 06 Efficient Memory Management for Large Language Model Serving with PagedAttention arXiv (SOSP 2023), 2023 · arxiv.org
- 07 GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints arXiv (EMNLP 2023), 2023 · arxiv.org
- 08 Lost in the Middle: How Language Models Use Long Contexts arXiv (TACL), 2023 · arxiv.org
- 09 GGUF GGML-Projekt, o. J. · github.com
- 10 Online Serving: OpenAI-Compatible Server vLLM-Projekt, o. J. · docs.vllm.ai
- 11 Generative KI-Modelle: Chancen und Risiken für Industrie und Behörden Bundesamt für Sicherheit in der Informationstechnik (BSI), 2025 · bsi.bund.de
Let us talk about your project
Whether it is a prototype, an internal tool or an AI application: describe briefly what you are building or want to take into production.