MMOOZZGG.com

Calculator

LLM memory calculator: will the model fit in your computer?

4 min read8 sources

A model that does not fit in memory does not run at all. The LLM memory calculator counts three parts for large language models: weights, context cache and a reserve, and compares the total with the memory of a laptop, a Mac Studio, graphics cards and server cards. The formula and examples are below the calculator, so you can check the numbers by hand.

On this page · 5 sections

Calculator

Will the model fit in memory

Memory needed

  • Weights17.6 GB
  • KV cache (0.25 MB per token)2 GB
  • Other models0 GB
  • Total with a 15% reserve22.5 GB

For models with few active parameters, count the full number of parameters. The exact memory per token is on the model card.

What it will run on

  • MacBook Pro, 48 GByes, 40 GB
  • MacBook Pro, 64 GByes, 56 GB
  • MacBook Pro 14 M5 Max, 128 GB, 2 TB, $7,957yes, 120 GB
  • Mac Studio M3 Ultra, 96 GB, $7,710yes, 88 GB
  • Mac Studio M4 Max, 128 GB, $10,506yes, 120 GB
  • Mac Studio M3 Ultra, 512 GB, 4 TB, $37,383yes, 504 GB
  • RTX 4090, 24 GB, $5,783tight, 24 GB
  • RTX 5090, 32 GB, $8,885yes, 32 GB
  • 2 x RTX 5090, 64 GB, $17,771yes, 64 GB
  • RTX PRO 6000, 96 GB, $12,795yes, 96 GB
  • 2 x RTX PRO 6000, 192 GB, $25,590yes, 192 GB
  • A100, 40 GB, $6,440yes, 40 GB
  • A100, 80 GB, $12,816yes, 80 GB
  • H100 SXM5, 80 GB, $27,099yes, 80 GB
  • 4 x H100, 320 GB, $108,395yes, 320 GB

For a Mac, unified memory minus 8 GB for the system is counted. “Tight” means a reserve below 10%.

Defaults come from the sources as of 29 September 2026. Dollar figures use the official US dollar rate set by the Bank of Russia, the country's central bank: 84.41. The estimate is approximate; every field can be edited.

How the calculator counts

Weights: the number of parameters in billions, multiplied by bytes per parameter: 2 in FP16, 1 in 8-bit quantization and 0.55 in 4-bit, which includes the format overhead. KV cache: the context length in tokens, multiplied by the memory per token, which depends on the architecture: about 0.13 MB for 8-billion models, 0.25 MB for 30 billion and 0.33 MB for 70 billion and above. Reserve: 15% for working buffers and the system; you can change the field. For several users at once, the cache is multiplied by their number.

Worked examples

An 8-billion model, 4 bits, a context of 8,192 tokens: weights 4.4 GB, cache 1.0 GB, 6.3 GB with the reserve: a laptop with 16 GB. The same model with a context of 32,768: 9.8 GB. A 32-billion model, 4 bits, 8,192 tokens: 22.5 GB: a 24 GB graphics card is a tight fit, a 32 GB card has room, or a Mac with 36 GB. A 70-billion model, 4 bits: 47.3 GB, and 56.4 GB with a context of 32,768: a Mac with 64 GB fits a context of 8,192 but not 32,768, while a Mac with 128 GB has room, as do two 32 GB cards or one 96 GB card. A 70-billion model in FP16: 164 GB, two 80 GB server cards with some layers offloaded, two 96 GB cards or a Mac Studio with 512 GB. A 671-billion model, 4 bits: 427 GB: only a Mac Studio with 512 GB, where it really runs at 6.21 tokens per second, or a server with six 80 GB cards.

What it compares with

The hardware list in the calculator: MacBook Pro with 36, 64 and 128 GB; Mac Studio with 96, 128 and 512 GB; RTX 4090 with 24 GB; RTX 5090 with 32 GB and a pair of these cards; RTX PRO 6000 with 96 GB and a pair of these cards; A100 with 40 and 80 GB; H100 with 80 GB and a server with four H100 cards. For a Mac, the calculator counts unified memory minus 8 GB for the system; for graphics cards, the full video memory. Hardware prices as of 29 September 2026 come from our database; there is no price for the MacBook Pro with 36 and 64 GB. Price sources are listed on the hardware pages.

A check on a real case

A cloud provider’s team fit a text model and a vision model on a 24 GB card with a context of 65,536 tokens: weights of 13.0 and 6.1 GB, cache of 0.9 and 2.4 GB, 22.4 GB in total. If you enter the same parts and remove the reserve, the calculator shows 22.4 GB and marks the 24 GB card as a tight fit, meaning a margin under 10%. With the standard 15% reserve the total is 25.8 GB, and the 24 GB card does not pass.

Limits of the calculation

Models with few active parameters, for example 30 billion in total and 3 billion active, take memory by the full number of parameters but behave like small models in speed: count by the full size. Memory per token depends strongly on the architecture, so look for the exact value in the model card. The calculator does not count vision and speech models loaded alongside: add their weights as a separate line.

Questions and answers

What if I am 2–3 GB short?

Reduce the context, take a lower quantization or a model one step smaller. Offloading some layers to system RAM works, but the speed drops several times.

Why does the calculator count Mac memory minus 8 GB?

Unified memory is shared with the system and apps. Check how much memory is really available for the model on your Mac with a trial load of the model in LM Studio; 8 GB is the calculator’s default reserve.

Sources and fact-checking

Checked by the editors on 29 September 2026.

  1. llama.cpp, performance on Apple Silicon, table updated 25 August 2026 (github.com)
  2. Hardware Corner, DeepSeek 671B on Mac Studio M3 Ultra 512 GB, 27 March 2025 (hardware-corner.net)
  3. GPU-Benchmarks-on-LLM-Inference, Llama 3 8B and 70B, May 2024 (github.com)
  4. Digital Platforms, case no. 2929, 2025: IT holding T1 (platforms.su)
  5. Digital Platforms, case no. 3475, 2 September 2026: NSIS, operator of the insurance information system (platforms.su)
  6. Digital Platforms, case no. 3661, 2 September 2026: Digital Sector and a client from IT infrastructure (platforms.su)
  7. Digital Platforms, case no. 4084, 2 September 2026: VK Tech (platforms.su)
  8. Digital Platforms, case no. 2874, 2025: LANIT (platforms.su)

Found a mistake? Tell us

Publications

Cases on this topic: 5

  • Market case · Russia

    A large Russian IT holding contract approval in 3 days instead of two weeks, document comparison costs 40% lower

    The legal department of the holding, more than 70 lawyers, trained its own language model on the company’s legal data for over a year. Contract approval fell from two weeks to three days. AI contract comparison of two versions of a document is five times faster than by hand.

    IT companies

    source: platforms.su

    Read the case
  • Market case · Russia

    NSIS, insurance information system operator requests handled 20 times faster on a local LLM, 1.5 times more requests with no new hires

    The operator of the national insurance information system deployed a local LLM, a large language model on its own servers, and built three uses on it. The first is automatic processing of requests with many fields. The second is a RAG service for technical support that answers from company documents. The third is AI agents in software development, including automatic code review.

    IT companies

    2 September 2026 · source: platforms.su

    Read the case
  • Market case · Russia

    Digital Sector and an IT infrastructure client AI contract analysis agent in the client’s closed environment; in the integrator’s own testing, agents freed 20% of team time

    The integrator built an AI agent for first-pass contract analysis inside the closed network of a client that designs and supplies IT infrastructure. The agent extracts and matches data, finds discrepancies and prepares the result for a specialist. The integrator also put agents into its own testing process, which freed 20% of the team’s working time per sprint.

    IT companies

    2 September 2026 · source: platforms.su

    Read the case
  • Market case · Russia

    VK Tech two models fit into 22.4 GB of 24 GB of video memory with a 65,536-token context

    The team built a local AI agent in a closed environment with Ollama and an agent layer, on a rented GPU server with one NVIDIA A30 card of 24 GB. The models were gpt-oss 20b (13 GB) for text and tools and qwen3-vl 8b (6.1 GB) for images; with the KV cache for a 65,536-token context, they used 22.4 GB.

    IT companies

    2 September 2026 · source: platforms.su

    Read the case
  • Market case · Russia

    LANIT requirements gathering 4 times faster, document search time 66% lower on a local LLM platform

    The group built a platform that runs large language models on the customer’s own infrastructure: a chat and complex pipelines for documents, audio and images. A subsidiary built its own model, trained further on Russian-language data. It pilots the model in CRM, SRM and HRM projects and in corporate chatbots.

    IT companies

    source: platforms.su

    Read the case
Contact us