Technical report LGC-TR-2026-01

Running open-weight AI models on your own hardware

Logicode Engineering

Published Revised Version 2.09 min read

Read the paper

Abstract

Organisations that cannot send documents to a hosted service can run open-weight language models on their own hardware. This paper sets out two estimates that decide whether a given machine is adequate. The first is memory: the weights occupy the parameter count multiplied by the bits stored per weight, to which the context cache and runtime overhead are added. The second is speed: each generated token requires the active weights to be read from memory once, so memory bandwidth divided by the size of the active weights is an upper bound on tokens per second. Both estimates are worked for common model sizes and machines, and the effect of mixture-of-experts architectures is shown using the published figures for gpt-oss [1, 2]. The method is implemented in Logicode's model-fit calculator; the fractions of the bound achieved in practice are stated as assumptions, not measurements.

Keywords: open-weight models; local inference; quantisation; memory bandwidth; KV cache; mixture of experts; retrieval-augmented generation

Key findings

  1. Memory for the weights, in gigabytes, is the parameter count in billions multiplied by the bits per weight and divided by eight. An 8-billion-parameter model at 4.8 bits per weight needs 4.8 GB (Eq. (1)).
  2. Memory bandwidth divided by the bytes read per token is an upper bound on generation speed. For that model on a 936 GB/s graphics card the bound is 195 tokens per second (Eq. (3)).
  3. A mixture-of-experts model reads only its active parameters for each token. gpt-oss-20b has 21 billion parameters, of which 3.6 billion are active, and is published as running within 16 GB of memory [1].
  4. Every concurrent user needs a separate context cache, so a shared server is sized by users multiplied by context length, in addition to the weights (Section 4).

1Scope

A hosted model is the simpler option and is appropriate for many tasks. Local hosting is justified in three situations: the data may not leave the organisation's network (contracts, medical notes, source code); a fixed hardware cost is preferred to a charge per token; or the connection to an outside service cannot be relied upon.

This paper covers inference only: running a trained model, not training one. It addresses a single question that precedes any purchase: will a given model run on a given machine, and at what speed. Model quality is outside its scope and should be evaluated on the organisation's own tasks.

2Memory requirement

A model must be held entirely in fast memory to generate at a useful speed. Three quantities make up the total.

2.1Weights

Mw=N×b8(1)

where Mw is the memory for the weights in GB, N the number of parameters in billions and b the average bits stored per weight.

At full 16-bit precision an 8-billion-parameter model needs 16 GB. Quantisation stores each weight at lower precision. The common GGUF [3] 4-bit variants average about 4.8 bits per weight once their metadata is included, which reduces the same model to 4.8 GB. The loss in output quality depends on the model and the task and should be measured, not assumed.

2.2Context cache and overhead

The KV cache holds intermediate results for the text already processed and grows in proportion to the context length. Its size per token depends on the model's layer count and attention design. The calculator uses an empirical approximation, 46 kB multiplied by the square root of the parameter count in billions, per token of context; it is a planning figure, not a property of any particular model. Runtime buffers are allowed for as 0.6 GB plus 5% of the weights.

M=Mw+Mkv+Mo(2)

where Mkv is the context cache and Mo the runtime overhead, all in GB.

Table 1. Estimated memory for dense models at 4.8 bits per weight with a context of 8,192 tokens, from Eq. (1) and Eq. (2).
ParametersWeights (GB)Context cache (GB)Total (GB)
8 billion4.81.16.7
14 billion8.41.410.8
32 billion19.22.122.9
70 billion423.247.9

A model fits when the total is below the machine's graphics memory or, on a unified-memory machine, below the memory available to the graphics processor. A margin of 15 to 25% above the weights is a reasonable allowance when the context length is not yet known.

3Generation speed

Producing one token requires every active weight to be read from memory once. Generation is therefore limited by how fast memory can be read, not by arithmetic throughput.

rmax=BMa(3)

where rmax is the upper bound in tokens per second, B the memory bandwidth in GB/s and Ma the size of the weights read per token in GB.

Memory bandwidth follows from the memory interface: bus width multiplied by the data rate per pin, divided by eight. A graphics card with a 384-bit interface at 19.5 Gbit/s per pin has 384 × 19.5 ÷ 8 = 936 GB/s. Dual-channel DDR5 on a desktop processor provides roughly 90 GB/s, a factor of ten less, which is why the same model is far slower on a processor alone. Fig. 1 shows the bound for three bandwidths.

1101001,0008143270Parameters (billions)Tokens per second (upper bound)936 GB/s, 8: 195936 GB/s, 14: 111936 GB/s, 32: 48.8936 GB/s, 70: 22.3936 GB/s400 GB/s, 8: 83.3400 GB/s, 14: 47.6400 GB/s, 32: 20.8400 GB/s, 70: 9.52400 GB/s90 GB/s, 8: 18.890 GB/s, 14: 10.790 GB/s, 32: 4.6990 GB/s, 70: 2.1490 GB/s936 GB/s400 GB/s90 GB/s
Fig. 1. Upper bound on generation speed against model size, for three memory bandwidths Calculated from Eq. (3) for dense models at 4.8 bits per weight.
Data as a table
Parameters (billions)936 GB/s400 GB/s90 GB/s
819583.318.8
1411147.610.7
3248.820.84.69
7022.39.522.14

Real systems reach a fraction of this bound. The calculator assumes 60% for dense models and 40% for mixture-of-experts models; these are working assumptions for planning and should be replaced by a measurement on the intended hardware before a commitment is made. Fig. 2 applies them to an 8-billion-parameter model.

05010015020025090 GB/s936 GB/s1792 GB/s256 GB/s400 GB/sMachine (memory bandwidth)Tokens per second (estimate)90 GB/s: 11.3 tokens/s11.3936 GB/s: 117 tokens/s1171792 GB/s: 224 tokens/s224256 GB/s: 32 tokens/s32400 GB/s: 50 tokens/s50
Fig. 2. Estimated generation speed of an 8-billion-parameter model at 4.8 bits per weight, by machine Calculator estimate: 60% of the bound in Eq. (3). An assumption, not a benchmark.
Data as a table
Machine (memory bandwidth)Estimate
90 GB/s11.3
936 GB/s117
1792 GB/s224
256 GB/s32
400 GB/s50

The machines in Fig. 2 are, in order: Desktop CPU, 64 GB dual-channel DDR5; RTX 3090, 24 GB; RTX 5090, 32 GB; Ryzen AI Max+ 395, 128 GB unified; Mac with M-series Max, 64 GB.

3.1Mixture-of-experts models

In a mixture-of-experts model only part of the network is used for each token. All of the weights must still fit in memory, so Eq. (1) is unchanged, but Ma in Eq. (3) is the active portion only. gpt-oss-20b has 21 billion parameters with 3.6 billion active, and its publisher states that it runs within 16 GB of memory [1]. gpt-oss-120b has 117 billion parameters with 5.1 billion active and is stated to fit on a single 80 GB graphics processor [2].

Applying Eq. (3) to gpt-oss-20b at 4.8 bits per weight gives an active size of 2.2 GB and a bound of 433 tokens per second on 936 GB/s memory, compared with 74 for a dense model of the same total size. Unified-memory machines, which pair large capacity with moderate bandwidth, benefit most from this architecture.

4Serving more than one user

The weights are shared between users; the context cache is not. A server for a team is sized as the weights plus one context cache per concurrent conversation. Serving software designed for this case batches requests and allocates cache memory in pages so that it is not reserved for context a conversation never uses [4].

  • Establish the number of simultaneous conversations, not the number of staff.
  • Set a context limit per conversation and size the cache from it.
  • Measure throughput with realistic concurrent load before settling the hardware.

5Making the model useful

A model knows nothing about an organisation's own documents. The established approach is retrieval-augmented generation: relevant passages are retrieved from an index of the documents and supplied to the model with the question, so that the answer is drawn from them and can cite them [5]. Most of the engineering effort lies here: how documents are divided, the quality of search, permissions so that staff see only what they are entitled to, and evaluation sets that show whether a change improved the answers.

6Limitations

  • The context-cache approximation and the achieved fractions of the speed bound are planning assumptions, not measurements.
  • Prompt processing, which is limited by compute more than by bandwidth, is not modelled; long prompts add a delay before the first token.
  • Model quality after quantisation is task-dependent and is not addressed.
  • Model releases and their licences change frequently. Figures for named models are as published on their model cards in November 2026; the licence on the model card should be read before any deployment.

References

  1. OpenAI, gpt-oss-20b model card, Hugging Face, 2025. huggingface.co/openai/gpt-oss-20b
  2. OpenAI, gpt-oss-120b model card, Hugging Face, 2025. huggingface.co/openai/gpt-oss-120b
  3. ggml-org, GGUF file format specification, ggml project documentation, 2023. github.com/ggml-org/ggml/blob/master/docs/gguf.md
  4. W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. E. Gonzalez, H. Zhang and I. Stoica, Efficient Memory Management for Large Language Model Serving with PagedAttention, Proceedings of the 29th ACM Symposium on Operating Systems Principles (SOSP), 2023. arxiv.org/abs/2309.06180
  5. P. Lewis, E. Perez, A. Piktus et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, Advances in Neural Information Processing Systems 33 (NeurIPS), 2020. arxiv.org/abs/2005.11401

Cite this paper

Plain text
Logicode Engineering, "Running open-weight AI models on your own hardware", Logicode Technical Report LGC-TR-2026-01, version 2.0, 2026. https://logicode.solutions/insights/running-open-weight-models-on-your-own-hardware
BibTeX
@techreport{lgctr202601,
  author      = {{Logicode Engineering}},
  title       = {Running open-weight AI models on your own hardware},
  institution = {Logicode Solutions},
  number      = {LGC-TR-2026-01},
  year        = {2026},
  note        = {Version 2.0},
  url         = {https://logicode.solutions/insights/running-open-weight-models-on-your-own-hardware}
}

Version history

  • 2.0 · Rewritten as a technical paper: equations, calculated tables and figures, references.
  • 1.0 · First published.

Next

Wi-Fi, Bluetooth, LoRaWAN or cellular: choosing a radio for an IoT device

Continue scrolling to proceed, or select the title.