Will this LLM fit on your GPU, multi-GPU rig or Mac? Exact VRAM & KV-cache math. Read-only.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
FitLLM is an open-source, zero-dependency engine that checks whether a local LLM fits on a GPU or Apple Silicon Mac using architecture-aware memory math.

Live: https://fitllm.run Β· Bilingual Β· Free Β· No ads Β· No login
Open engine: fitllm-engine (MIT Β· npm
fitllm-engineΒ·npx fitllm)Zero dependencies. One readable file:
engine.js. Conformance-vector tested. MIT.
Connect any Streamable HTTP MCP client to https://fitllm.run/api/mcp:
check_llm_fit β check one model against a GPU, multi-GPU rig, or Mac and return the verdict, memory breakdown, and a fix when it does not fit.what_fits_on_hardware β rank the supported local models that fit the given GPU, multi-GPU rig, or Mac.list_supported β list the built-in model and hardware names accepted by the fit checker.The server is read-only, stateless, and requires no authentication.
--detect reads all nvidia-smi adapters, uses Apple Silicon unified memory on arm64 macOS, and can resolve an exact catalog GPU name through Windows/WSL PowerShell. It never uses Win32_VideoController.AdapterRAM, serials, PNP IDs, or full environment dumps. Intel-only, ambiguous, and unsupported adapters stop with exit 2 instead of borrowing a nearby GPU's memory.
Why a CLI? The "will it run?" question is born in the terminal β one line before ollama pull. No install, no tab-switching, and it reads your actual hardware with --detect instead of asking you to know your VRAM. Exit code 0/1 makes it a pre-download guard:
The CLI exit contract composes directly with model runtimes. The download or launch runs only after a FITS or TIGHT verdict; invalid inputs stop with exit 2.
For CI, use the repository's composite Action. It needs no secret and returns the full --json --why result as steps.preflight.outputs.result:
Set exactly one of gpu or mac. The Action preserves the CLI contract: exit 0 means fits/tight, 1 means it will not fit, and 2 means the request is invalid. Inputs cross the GitHub expression boundary through environment variables and are passed to Node as a Bash argument array.
Agents can collect a typed measurement without uploading anything:
The command validates the conditions and prints a candidate JSON object plus a prefilled GitHub issue URL. Submission remains a human action. Public Hugging Face IDs (org/model) are fetched with a bounded config/index reader and accepted only when parseHfConfig() supports the architecture.
This is the open calculation core of FitLLM. The math is open so you can audit it.
Ask an LLM "does Qwen 3.6 fit my GPU?" and it pattern-matches to an architecture from its training cutoff β and usually says no. Catalog-based calculators lag new releases. The CLI, API, and MCP use a curated catalog pinned to official configs. The web calculator can additionally inspect a pasted Hugging Face ID's official config.json live, so supported architectures work on day-one releases β including the hybrid / sliding-window / MoE structures that naive formulas get wrong.
Covers Apple Silicon unified memory (M1βM6, Pro/Max/Ultra β up to the 512GB Mac Studio), NVIDIA GPUs (RTX 20/30/40/50, workstation RTX 6000 Ada / RTX PRO 6000, datacenter A100/H100/H200/B200), AMD Radeon (RX 7000/9000, PRO W7900) and multi-GPU presets (2Γ3090, 2Γ4090, 4Γ3090) β with GGUF Q-tier weight quantization kept separate from KV-cache quantization. Hardware entries carry their source URLs per-value in engine.js; new entries require β₯2 independent sources (CONTRIBUTING).
Almost every "can I run this LLM?" calculator estimates the KV cache with the textbook formula:
That assumes every layer keeps a full-context KV cache with one uniform head shape. True for Llama-1/2 β wrong for most 2025β2026 models:
| Model | What naive formulas miss | Naive KV | FitLLM KV | Off by |
|---|---|---|---|---|
| Gemma 4 31B @131K, 8-bit | 50 of 60 layers are sliding-window (keep only the last 1024 tokens); the 10 global layers use a different head shape (4 KV-heads Γ 512, not 16 Γ 256) | ~60 GB | ~5.4 GB | 11Γ |
| Qwen 3.6 27B @131K, 8-bit | 48 of 64 layers are linear attention (Gated DeltaNet) β no growing KV cache | ~16 GB | ~4 GB | 4Γ |
| Qwen 3.8 27B @256K, F16 KV | same shape, newest generation: KV lives on 16 of 64 layers only | 64.0 GiB | 16.0 GiB | 4Γ |
| GLM-4.7-Flash @128K, bf16 | MLA: K/V compressed into one shared latent (512+64 dims, cached once β not per-head K and V) | ~117 GB | ~6.6 GB | 17.8Γ |
| Plain dense (Llama, Mistralβ¦) | nothing β standard transformer | same | same | 1Γ β |
An 11Γ error flips the verdict: a naive calculator says Gemma 4 31B won't fit in 64 GB at long context, when it fits comfortably.
linearState) β it is a constant per sequence, so it never inflates the context curve.kv_lora_rank + RoPE dims) shared across all heads β per-head "2 Γ heads Γ head_dim" formulas over-count by an order of magnitude. Verified against the DeepSeek-V2 paper (arXiv:2405.04434) and the official DeepSeek-V3 inference code.head_dim (Gemma 4: 512 vs 256). MoE keeps every expert in memory while activating only a few per token.per_layer_token_embd input-layer tensor to CPU/host buffers instead of accelerator memory, so only the non-PLE weights are counted against VRAM for the verified Gemma 4 e2b/e4b entries. Counting all 5.1B params against a GPU over-predicts e2b's resident weights by ~1.9Γ and flips small-card verdicts. This deduction is conditional and rests on that placement alone: the host memory the tensor needs is not budgeted by the GPU verdict, a runtime that loads PLE tensors onto the accelerator (vLLM, for example) invalidates the estimate, and unverified families keep their full weights resident. On Apple Silicon unified memory the full weights stay counted. The exact premise and its pinned sources are listed under Structural premises; a direct measurement on a Gemma 4 GGUF is welcome in issue #7.This engine models each layer type separately, verified against official HuggingFace config.json files.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/fitllm)<a href="https://allmcps.com/mcp/fitllm"><img src="https://allmcps.com/api/badge/fitllm?style=directory" alt="FitLLM on AllMCPs" /></a>