What problem does it solve?
hf-mem provides estimates of the VRAM and parameter footprint required to load Safetensors-based Hugging Face models, helping you plan deployment and capacity.
Core Features & Use Cases
- Estimate inference memory for Transformers, Diffusers and Sentence Transformers models using Safetensors metadata and HTTP Range requests.
- Support gated/private models via HF_TOKEN and optional KV cache estimation with the --experimental flag for causal and multi-modal architectures.
- Return results as a readable table or JSON, including per-component memory and optional KV cache details to aid capacity planning.
Quick Start
Use the hf-mem CLI to query a model, e.g.:
uvx hf-mem --model-id <org/model-name>
uvx hf-mem --model-id <org/model-name> --experimental