Skip to main content

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

Project description


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.3.0.tar.gz (7.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.3.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hf_mem-0.3.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hf_mem-0.3.0.tar.gz
Algorithm Hash digest
SHA256 481b71597635ce0b647379638e339c129800e9d75f685907c8388bc0fe222418
MD5 89705d773ee9a1e5c345a65d443a159f
BLAKE2b-256 f5c1e258c2cdcc789a935d0422b3fb24b23eaa6fe28ed37bb38f5c879ad91783

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hf_mem-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hf_mem-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3344a9c3e1efc3c396919b64c6052d60f75a7ebcb1a1b42033fb77c3fc0b445d
MD5 f9a87469f52e54cbd32b0d8e10aaae4b
BLAKE2b-256 3fc4b64da94c918db61b0e5204d3e2b3209afd0cc86cacb8305c0aa7ad5998fa

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