Skip to main content

A CLI to estimate inference memory requirements for Hugging Face models, written in Python

Project description

hf-mem

hf-mem is an experimental CLI to estimate inference memory requirements for Hugging Face models, written in Python. hf-mem is lightweight, only depends on httpx. It's recommended to run with uv for a better experience.

hf-mem lets you estimate the inference requirements to run any model from the Hugging Face Hub, including Transformers, Diffusers and Sentence Transformers models, as well as any model that contains Safetensors compatible weights.

Read more information about hf-mem in this short-form post.

Usage

uvx hf-mem --model-id MiniMaxAI/MiniMax-M2
uvx hf-mem --model-id Qwen/Qwen-Image

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hf_mem-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hf_mem-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file hf_mem-0.1.1.tar.gz.

File metadata

  • Download URL: hf_mem-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for hf_mem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d500633cc08762864aa4aedad3999b31edcfe2fc73ac18e5f5c791f83685a12c
MD5 77f65c8c8bbbfd52a36d2245945c8dc9
BLAKE2b-256 bb9ae5f90a14184cd25fad21505a00729bb5f74cc6acc2eafcc543a86f503ee2

See more details on using hashes here.

File details

Details for the file hf_mem-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hf_mem-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for hf_mem-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9b140b8b67070436ea6d6643eb76587dbca99fe44572a265c56d83cc54ccd0
MD5 340dbf9bd8bde62ed31558ea14cd7acd
BLAKE2b-256 fb76dabbf895be819ceacdd02566dd55b429cd7399db82bfcb9faa8ff328aeb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page