hf-mem

Estimate VRAM and memory requirements for Safetensors and GGUF models from the Hugging Face Hub.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill hf-mem-tyler-r-kendrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-mem
Source: https://github.com/Tyler-R-Kendrick/slm-training/tree/main/.agents/skills/hf-mem
Command: npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill hf-mem-tyler-r-kendrick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires uv.

What problem does it solve?

This skill eliminates the guesswork involved in determining if a specific AI model will fit within your available hardware memory, preventing out-of-memory errors during deployment.

Core Features & Use Cases

  • Memory Estimation: Calculates required VRAM for Safetensors and GGUF models using HTTP Range requests without needing a full download.
  • KV Cache Analysis: Provides experimental memory projections for KV cache requirements in LLMs and VLMs.
  • Use Case: Before downloading a massive 400B parameter model, use this tool to verify if your GPU cluster has sufficient capacity for the specific quantization or precision you intend to run.

Quick Start

Use the hf-mem skill to estimate the memory requirements for the model mistralai/Mistral-7B-v0.1 including the KV cache.

Frequently Asked Questions about hf-mem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I estimate VRAM requirements for Hugging Face models without downloading them?

You can estimate VRAM requirements for Hugging Face models without a full download by using HTTP Range requests to read Safetensors and GGUF weight metadata remotely, providing instant memory projections for deployment.

Can I calculate KV cache memory for LLMs and VLMs before inference?

Yes, KV cache memory calculations for LLMs and VLMs are supported during inference-time memory profiling, providing experimental projections to help verify if your hardware can handle the specific model and context length.

Do I need uv to check if a model will fit in my GPU memory?

Yes, you need the uv package manager installed to run the memory estimation skill, as it handles the environment setup required to access the Hugging Face Hub API and process the model weight calculations.

Does this tool work with both Safetensors and GGUF quantization formats?

Yes, VRAM estimation works with both Safetensors and GGUF formats, allowing you to verify if your GPU cluster has sufficient capacity for the specific quantization or precision you intend to run before downloading massive models.

What is the best way to prevent out-of-memory errors when deploying large AI models?

The best way to prevent out-of-memory errors is to profile model memory requirements beforehand, calculating the exact VRAM needed for weights and KV cache to ensure your hardware capacity matches the deployment target.

Are there limitations to the KV cache memory projections for Hugging Face models?

The KV cache memory projections are experimental, meaning they provide estimates rather than exact measurements for inference-time memory, so you should treat the results as planning guidelines for your GPU capacity rather than absolute limits.