Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub
.claude/skills/sickn33-hf-mem/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -52% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -51% | 0% |
hf_mem estimates the required memory for inference, including model weights and an optional KV cache, for Safetensors and GGUF for models on the Hugging Face Hub using HTTP Range requests i.e., without downloading or loading any weights locally.
uv installed (for uvx)HF_TOKEN env var or --hf-token flag (for gated or private models only)Run with --model-id pointing to the Hugging Face Hub repository which will check that it either contains Safetensors (via model.safetensors, model.safetensors.index.json if sharded, or model_index.json for Diffusers) or GGUF model weights within.
bashuvx hf-mem --model-id <model-id> --json-output
If the repository contains GGUF model weights in multiple precisions / quantizations, the estimations will be on a per-file basis, whereas for inference you won't load all of those but rather only a single precision. This being said, for GGUF you might as well need to provide --gguf-file to target the specific file (or path if sharded) you want to run.
bashuvx hf-mem --model-id <model-id> --gguf-file <file-or-path> --json-output
Additionally, hf-mem comes with an --experimental flag that will also calculate the KV cache memory requirements too, useful for large-language models, meaning it applies to LLMs (...ForCausalLM), VLMs (...ForConditionalGeneration), and GGUF models.
As per the context window, it will be read from the default or overridden with --max-model-len a la vLLM. And, same goes for the KV cache precision, which will default to the model precision unless manually set via --kv-cache-dtype a la vLLM too.
For Safetensors use as:
bashuvx hf-mem --model-id <model-id> --experimental [--max-model-len N] [--batch-size N] [--kv-cache-dtype auto|bfloat16|fp8|fp8_ds_mla|fp8_e4m3|fp8_e5m2|fp8_inc] --json-output
And, for GGUF use as:
bashuvx hf-mem --model-id <model-id> --gguf-file <file-or-path> --experimental [--max-model-len N] [--batch-size N] [--kv-cache-dtype auto|F32|F16|Q4_0|Q4_1|Q5_0|Q5_1|Q8_0|Q8_1|Q2_K|Q3_K|Q4_K|Q5_K|Q6_K|Q8_K|IQ2_XXS|IQ2_XS|IQ3_XXS|IQ1_S|IQ4_NL|IQ3_S|IQ2_S|IQ4_XS|I8|I16|I32|I64|F64|IQ1_M|BF16|TQ1_0|TQ2_0|MXFP4] --json-output
For Transformers with Safetensors weights:
bashuvx hf-mem --model-id MiniMaxAI/MiniMax-M2 --json-output
For Diffusers with Safetensors weights:
bashuvx hf-mem --model-id Qwen/Qwen-Image --json-output
For Sentence Transformers with Safetensors weights:
bashuvx hf-mem --model-id google/embeddinggemma-300m --json-output
With --experimental to include the KV cache estimation for LLMs and VLMs:
bashuvx hf-mem --model-id mistralai/Mistral-7B-v0.1 --experimental --json-output
And, for LLMs or VLMs with GGUF weights:
bashuvx hf-mem --model-id unsloth/Qwen3.5-397B-A17B-GGUF --gguf-file Q4_K_M --experimental --json-output
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,740 | 1,838 | -87% | 1 | 1 | 0% | 2,747 | 1,315 | -52% | 0 | 0 | — |
case-02 | fail→pass | 12,937 | 7,902 | -39% | 1 | 1 | 0% | 2,397 | 2,430 | +1% | 0 | 0 | — |
case-03 | fail→pass | 13,874 | 4,445 | -68% | 1 | 1 | 0% | 2,726 | 1,861 | -32% | 0 | 0 | — |
case-04 | fail→pass | 13,456 | 2,463 | -82% | 1 | 1 | 0% | 2,275 | 1,552 | -32% | 0 | 0 | — |
case-05 | fail→pass | 15,165 | 1,595 | -89% | 1 | 1 | 0% | 2,782 | 1,362 | -51% | 0 | 0 | — |
case-06 | fail→pass | 8,514 | 1,350 | -84% | 1 | 1 | 0% | 1,664 | 1,266 | -24% | 0 | 0 | — |
case-07 | fail→pass | 7,396 | 3,344 | -55% | 1 | 1 | 0% | 1,338 | 1,671 | +25% | 0 | 0 | — |
case-08 | fail→pass | 16,247 | 3,334 | -79% | 1 | 1 | 0% | 2,556 | 1,662 | -35% | 0 | 0 | — |
case-09 | fail→pass | 11,490 | 2,941 | -74% | 1 | 1 | 0% | 2,242 | 1,706 | -24% | 0 | 0 | — |
case-10 | fail→pass | 14,205 | 6,589 | -54% | 1 | 1 | 0% | 2,827 | 2,214 | -22% | 0 | 0 | — |
case-11 | fail→pass | 13,583 | 3,046 | -78% | 1 | 1 | 0% | 2,280 | 1,671 | -27% | 0 | 0 | — |
case-12 | fail→pass | 9,428 | 3,403 | -64% | 1 | 1 | 0% | 1,555 | 1,739 | +12% | 0 | 0 | — |
case-18 | pass→pass | 4,860 | 4,679 | -4% | 1 | 1 | 0% | 814 | 1,783 | +119% | 0 | 0 | — |
case-13 | fail→pass | 16,524 | 8,402 | -49% | 1 | 1 | 0% | 2,951 | 2,037 | -31% | 0 | 0 | — |
case-14 | fail→pass | 12,573 | 2,720 | -78% | 1 | 1 | 0% | 2,391 | 1,552 | -35% | 0 | 0 | — |
case-15 | fail→pass | 18,797 | 3,423 | -82% | 1 | 1 | 0% | 3,620 | 1,784 | -51% | 0 | 0 | — |
case-16 | fail→fail | 10,316 | 5,590 | -46% | 1 | 1 | 0% | 2,129 | 1,491 | -30% | 0 | 0 | — |
case-17 | pass→pass | 20,301 | 20,342 | +0% | 1 | 1 | 0% | 3,824 | 5,181 | +35% | 0 | 0 | — |
case-19 | pass→pass | 13,890 | 8,562 | -38% | 1 | 1 | 0% | 2,492 | 2,653 | +6% | 0 | 0 | — |
case-20 | fail→pass | 11,733 | 1,503 | -87% | 1 | 1 | 0% | 2,379 | 1,327 | -44% | 0 | 0 | — |
case-21 | fail→pass | 13,064 | 3,362 | -74% | 1 | 1 | 0% | 2,384 | 1,785 | -25% | 0 | 0 | — |
case-22 | fail→pass | 9,171 | 1,416 | -85% | 1 | 1 | 0% | 1,782 | 1,318 | -26% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +82 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.