hf-mem

Estimate inference memory for Safetensors and GGUF models from Hugging Face Hub.

10.9k|724|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/huggingface/skills --skill hf-mem-huggingface
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-mem
Source: https://github.com/huggingface/skills/tree/main/skills/hf-mem
Command: npx skills add https://github.com/huggingface/skills --skill hf-mem-huggingface

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires uv, and includes scripts (resource) components.

What problem does it solve?

Determines the amount of VRAM or memory needed for inference on models from the Hugging Face Hub.

Core Features & Use Cases

  • Model Memory Estimation: Calculates the memory required for Safetensors or GGUF model weights for inference.
  • HTTP Range Requests: Estimates memory without downloading or loading weights locally.
  • Use Case: Ideal for users who need to ensure a model fits on their GPU or server instance before running it.

Quick Start

Use the hf-mem skill to estimate the memory requirements for the 'MiniMax-M2' model on the Hugging Face Hub.

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 before downloading?

You can estimate VRAM requirements for Hugging Face models using HTTP Range Requests to read Safetensors or GGUF metadata remotely. This calculates inference memory usage without downloading or loading model weights locally.

How does memory estimation work for Safetensors and GGUF model weights?

Memory estimation for Safetensors and GGUF weights works by fetching model metadata via HTTP Range Requests. It reads tensor information from the Hugging Face Hub to calculate the required VRAM for inference without pulling the entire file.

Do I need an HF_TOKEN to estimate memory for gated models on the Hugging Face Hub?

Yes, you need an HF_TOKEN to estimate memory for gated models on the Hugging Face Hub. Accessing gated repositories requires authentication to authorize the HTTP Range Requests used for reading model metadata.

Can I check if a Hugging Face model fits on my GPU without downloading it?

Yes, you can check if a Hugging Face model fits on your GPU without downloading it. The estimation tool reads Safetensors and GGUF metadata remotely to validate model size against your GPU VRAM allocation.

Does estimating model size require installing uv?

Yes, estimating model size requires installing uv. The uv dependency is necessary to run the scripts that execute HTTP Range Requests against the Hugging Face Hub for memory calculation.