Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

hf-mem

Skill by sickn33

Estimates the memory needed to load Safetensors or GGUF model weights from the Hugging Face Hub for inference. Useful for checking whether a model fits a GPU or instance before running it.

  • Score 90
  • 50k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install hf-mem

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/hf-mem ~/.claude/skills/hf-mem

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install hf-mem in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

hf-mem is a Hugging Face CLI skill that estimates the memory required for inference from model weights hosted on the Hugging Face Hub. It supports Safetensors and GGUF files. With the --experimental flag, it can also estimate KV cache memory for LLMs, VLMs and GGUF models.

The tool uses HTTP Range requests to read file metadata, so it does not download or load weights locally. The source says the skill is for users who ask how much VRAM or memory a model needs, whether it fits their GPU, or what a Hub model ID requires for inference. Estimates are not a guarantee that a model fits, so the source recommends confirming with the intended inference backend on target hardware.

Written from the project's SKILL.md and checked against it.

What it can do

  • Safetensors memory estimateEstimates memory for model weights in Safetensors repositories using model.safetensors or sharded index files.
  • GGUF memory estimateEstimates memory per GGUF file, with --gguf-file to target one precision or quantization.
  • KV cache estimateWith --experimental, adds KV cache memory for LLMs, VLMs and GGUF models.
  • Context and batch optionsAccepts --max-model-len and --batch-size to change the context length and batch size used in the estimate.
  • KV cache dtype optionAccepts --kv-cache-dtype to set the KV cache precision, defaulting to the model precision.
  • JSON outputPrints results in JSON with --json-output.

What you need

  • uv installed, for running uvx
  • HF_TOKEN for gated or private Hugging Face repositories
  • A reviewed, pinned hf-mem package version

Try asking

  • How much VRAM does this Hugging Face model need to run?
  • Estimate memory for this GGUF file with KV cache at a 8192 context.
  • Will this Safetensors model fit on my GPU? Check the Hub model ID.

Good to know

  • Estimates from weights and headers are not a guarantee that a model fits.
  • Experimental KV cache estimates depend on supported architectures.
  • Metadata access contacts the Hub and can reveal private model identifiers.
  • The skill does not bundle the hf-mem executable.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/hf-mem/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB

Alternatives to hf-mem

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

hf-mem: common questions

Does hf-mem download the model weights?

No. The source says it uses HTTP Range requests, so it does not download or load any weights locally.

What does the --experimental flag add?

It calculates KV cache memory requirements in addition to model weights, for LLMs, VLMs and GGUF models.

Does the estimate guarantee a model will run on my hardware?

No. The source says runtime workspaces, activations, fragmentation and concurrent processes add memory, so confirm on target hardware.

How do I install hf-mem?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is hf-mem free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is hf-mem safe to use?

It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to hf-mem?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

hf-mem Install

Add to stack

Loading.