dev.nodebudget/gguf-fit
Run local GGUF/LLM fit checks and runtime audits through three MCP tools.
Inspect a Hugging Face repo, GGUF URL, or local
.gguffile to compute VRAM/KV-cache fit, GPU layers (-ngl), tok/s, and launch flags; configure context length, KV quantization, GPU preset, quant override, custom VRAM/bandwidth, and all-quants output.Detect local hardware (GPU or unified RAM, usable VRAM budget, memory bandwidth) or list built-in GPU presets.
Audit localhost Ollama,
llama-server, and vLLM instances fornum_ctxtruncation, CPU spill, and FP16 KV-cache bloat, with configurable service ports.
Probes local AMD ROCm/Strix Halo hardware and unified memory, using detected VRAM for GGUF/KV-cache fit calculations and launch flags.
Probes Apple Silicon unified memory and uses it to calculate GGUF/KV-cache fit, offload layers, and launch flags.
Provides a GitHub Action that validates local LLM fit in CI, upserts a PR comment and job summary, and can fail on OOM.
Inspects GGUF headers from Hugging Face repositories via HTTP Range requests, aggregates shards, lists quantizations, and computes VRAM/KV-cache fit and launch commands without downloading full weights.
Probes local NVIDIA GPU VRAM and uses it to calculate GGUF/KV-cache fit and launch flags.
Audits local Ollama instances over localhost, detecting num_ctx truncation, CPU spill, and unquantized KV cache, and generates Modelfile/environment fixes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dev.nodebudget/gguf-fit Will Qwen2.5-Coder-7B fit on my RTX 4090 at 32k context?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gguf-fit
Zero-download GGUF v2/v3 header inspector, exact KV-cache & VRAM fit calculator, local LLM runtime doctor (Ollama, llama-server, vLLM), stdio MCP server, and GitHub Action.
Pure Python 3.10+ standard library — zero runtime dependencies, zero telemetry.
Why gguf-fit?
Running local coding and agent models fails in three predictable ways:
32k–128k context OOM surprises — a 7B/32B model fits at 4k context, then blows past VRAM once real coding-agent context kicks in.
Silent Ollama truncation & CPU spill — Ollama defaults to
num_ctx 2048/4096(silently dropping prompts) or silently spills layers to host RAM (size_vram < size) with a 4–8× decode collapse.Guessing launch flags — manually calculating
-ngl,-c,-ctk/-ctv,--max-model-len, and KV cache quantization across GQA, MHA, DeepSeek MLA, Gemma 2/3 SWA, and MoE models.
gguf-fit reads only the binary GGUF header via HTTP Range requests (typically 256 KiB, fast-skipping 150k+ token vocab arrays without decoding strings), aggregates multi-shard files automatically, probes your real GPU or Apple Silicon / Strix Halo unified memory, and emits exact copy-paste launch commands.
Related MCP server: InferBench
Quick Start
Run directly without installing via uvx, or install with pip:
uvx gguf-fit unsloth/Qwen2.5-Coder-7B-Instruct-GGUF --ctx 32k --kv q8_0pip install gguf-fitCommon CLI Workflows
# Inspect all quantizations in a Hugging Face repo against an M4 Pro 48 GB
gguf-fit unsloth/Qwen3-30B-A3B-GGUF --gpu m4-pro-48g --ctx 64k --all-quants
# Inspect a local .gguf file (auto-aggregates multi-shard siblings)
gguf-fit ./DeepSeek-R1-Distill-Qwen-32B-Q4_K_M.gguf --ctx 32k --kv q8_0
# Generate paste-ready Markdown for GitHub PRs, HF Discussions, or r/LocalLLaMA
gguf-fit unsloth/Qwen2.5-Coder-7B-Instruct-GGUF --gpu rtx-4090 --ctx 64k --markdown
# Machine-readable JSON output
gguf-fit unsloth/Qwen2.5-Coder-7B-Instruct-GGUF --json
# Probe local hardware & list built-in --gpu presets
gguf-fit hardware --list-presetsgguf-fit doctor — Audit Local Runtimes (Localhost Only)
Connects strictly to 127.0.0.1 / localhost (1.5s timeout, zero external calls) to audit running Ollama, llama-server, and vLLM instances:
gguf-fit doctorDetects:
Silent
num_ctxtruncation in Ollama (/api/ps+/api/show) and emits a copyableModelfile+ollama createfix.Silent partial CPU spill (
size_vram < size) with exact GiB spilled to RAM.Unquantized
f16KV cache with ready-to-runOLLAMA_FLASH_ATTENTION=1andOLLAMA_KV_CACHE_TYPE=q8_0commands.llama-serverslot-split context traps (/props+/slots) and vLLMmax_model_lenKV pre-allocation warnings.
MCP Server (dev.nodebudget/gguf-fit)
gguf-fit ships a pure-stdlib stdio JSON-RPC 2.0 MCP server exposing 3 lean tools (< 600 total schema tokens):
inspect_model_fit— zero-download GGUF/HF inspection, VRAM/KV breakdown,-ngl,tok/s, and launch flagsdetect_local_hardware— Apple Silicon / NVIDIA / AMD ROCm Strix Halo / CPU probeaudit_local_llm_runtime— localhost Ollama /llama-server/ vLLM runtime audit
Claude Code
claude mcp add gguf-fit -- uvx gguf-fit --mcpCursor / VS Code / Claude Desktop
{
"mcpServers": {
"gguf-fit": {
"command": "uvx",
"args": ["gguf-fit", "--mcp"]
}
}
}GitHub Action
Validate local LLM model targets in CI and upsert a single <!-- gguf-fit-report --> PR comment:
name: Local LLM Fit Check
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
gguf-fit:
runs-on: ubuntu-latest
steps:
- uses: nodebudget/gguf-fit@v1
with:
model: unsloth/Qwen2.5-Coder-7B-Instruct-GGUF
gpu: rtx-4090
ctx: "32768"
kv: q8_0
all-quants: "true"
comment-pr: "true"
fail-on-oom: "false"Set comment-pr: "false" to write only to the GitHub Job Summary without commenting on PRs (only contents: read required).
Companion Browser Extension
Want inline FITS / TIGHT / OOM badges and 1-click launch commands directly inside Hugging Face /tree/main file tables and Ollama library pages?
Local LLM VRAM & GGUF Fit Checker (Chrome Web Store & Firefox Add-ons) — shares the exact same GGUF binary header parser and KV-cache math engine.
Source: nodebudget-chrome-extension
Architecture & Methodology
Binary GGUF v2/v3 parser: Incremental HTTP
Rangereads (256 KiB->1 MiB->2 MiB->4 MiB), fast-skippingtokenizer.*arrays by byte offset without decoding vocab strings, plusconfig.json/ safetensors fallback.Exact KV-cache equations: Supports MHA, GQA, DeepSeek MLA (
kv_lora_rank + qk_rope_head_dim), Gemma 2/3 & Mistral Sliding Window Attention (sliding_window), and MoE active-parameter memory-bandwidth decode estimation (CUDA/Metal/ROCm/CPU).Interactive web calculator & methodology: Local LLM VRAM & Mini PC Fit Checker and Local LLM vs Cloud GPU Break-Even Guide.
License
MIT
Available Tools
3 toolsaudit_local_llm_runtimeC
Audit localhost Ollama, llama-server, and vLLM for num_ctx truncation, CPU spill, and FP16 KV bloat.
Inputs: vllm_port, llama_port, ollama_port.
detect_local_hardwareC
Detect local GPU or unified RAM, usable VRAM budget, and memory bandwidth.
Inputs: list_presets.
inspect_model_fitB
Inspect HF repo or local GGUF header and compute VRAM fit, KV cache, GPU layers, tok/s, and launch flags.
Inputs: target (required), kv, ctx, gpu, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools map to distinct concerns: model/capacity math, host hardware discovery, and live runtime inspection. inspect_model_fit and audit_local_llm_runtime both touch VRAM/KV-cache topics, which could cause occasional selection confusion, but the descriptions clearly separate 'what-if fit computation' from 'audit of running servers'.
All three names follow a consistent snake_case verb_object pattern (inspect_, detect_, audit_) with descriptive object nouns. The convention is predictable and readable.
Three tools is on the lean side but each covers a clearly separate stage of the GGUF-fitting workflow (hardware, fit estimate, runtime check), so none feel redundant. A small surface is appropriate for this narrow diagnostic purpose.
The surface covers hardware detection, fit estimation, and runtime auditing, but there is no way to enumerate local GGUF models, search HF candidates, or apply/launch the recommended flags. Agents can work around these by supplying explicit model paths, but the lifecycle has visible dead ends.
Maintenance
Related MCP Connectors
Search open model file records, inspect recorded SHA-256 hashes and license labels, and check estimated memory fit. Public reads need no account. Connect over Streamable HTTP. Public board and request tools require user consent. A matching hash checks bytes; fit and license labels do not establish successful execution or permission for every use. Hosted MCP: https://huggingbay.xyz/api/mcp Install: npx -y hugging-bay-mcp@0.1.13 Docs: https://huggingbay.xyz/docs Repository: https://github.com/barneywohl/hugging-bay
Health, token bloat, SHA-256 Rug Pull & prompt injection audit API for remote MCPs.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
12 read-only MCP tools for AI communication rules, instruction linting & 25-model benchmarks.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for LLM quantization. Compress any HuggingFace model to GGUF, GPTQ, or AWQ format. 6 tools: info, check, recommend, quantize, evaluate, push. Self-contained Python server — no external CLI needed.65MIT
- AlicenseNot gradedqualityBmaintenanceVendor-neutral local LLM inference benchmark and hardware-config advisor for mlx and llama.cpp. Exposes an MCP tool that measures real tokens/second on your own hardware.20 npmApache 2.0
- AlicenseAqualityCmaintenanceProvides tools to inspect local GGUF and safetensors model files, returning metadata, tensor info, and VRAM estimates without reading tensor data. Enables asking natural-language questions about model architecture, quantization, size, and compatibility.4MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to scan local GGUF models, estimate VRAM and suggest GPU offload layers, manage llama-server lifecycle, and proxy OpenAI-format chats with idle auto-unload.9MIT