Skip to content

Hugging Face Model Memory Estimator

Estimate how much memory a Hugging Face model needs to run, without downloading its weights

Stars
11,253
Licence
Apache-2.0
Files
1 file

What it does

Once installed, the agent can look up a model on the Hugging Face Hub and report how much memory (VRAM or RAM) it needs for inference, covering the model weights and optionally the KV cache for language models. It reads only file sizes and headers over HTTP range requests, so it never downloads or loads the full weights. It works with Safetensors and GGUF model formats.

Great for

  • Developers deciding whether a model will fit on their GPU or cloud instance
  • Engineers comparing quantizations of a GGUF model before downloading one
  • People planning context length and KV cache settings for a large language model

Skip it if

  • Exact performance or speed predictions, since the skill only estimates memory from file metadata and formulas
  • Models stored in formats other than Safetensors or GGUF, which it does not cover
  • Private or gated models without an HF_TOKEN, because the Hub will refuse access

Try asking

  • “How much VRAM does MiniMaxAI/MiniMax-M2 need to run?”
  • “Will Mistral-7B-v0.1 fit on a 24GB GPU with a 8k context using --experimental?”
  • “Compare memory needs for the Q4_K_M and Q8_0 GGUF files of this model”
  • “Estimate memory for google/embeddinggemma-300m before I rent an instance”
Step-by-step guide: how to use Hugging Face Model Memory EstimatorInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    hf-mem.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip hf-mem.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip hf-mem.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Add --experimental when you need KV cache estimates for LLMs or VLMs, and set --max-model-len and --kv-cache-dtype to match your planned deployment
  • For GGUF repositories with many quantizations, name the exact file with --gguf-file because the default estimate covers every file separately
  • Treat results as estimates and leave headroom for activations, framework overhead and batch size effects

What's inside

  • SKILL.md

Redistributed unmodified from huggingface/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.