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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hf_mem-0.2.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.2.1.tar.gz
Algorithm Hash digest
SHA256 59c8a488f6d9dc22ef15a5cfbfe9461a0b921431e8c972640619bfa187298e55
MD5 6bf1f9b2560b78f01b88268206fd6368
BLAKE2b-256 cd0471c2686536966536c481a653a9c6898188e48024c718a147c4d6132b0245

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hf_mem-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bf69a34968ddac4b292c839d6f429256ba24d75dcd4e70d4f719f06d04987e6
MD5 06f70295adef8175ce248f5c63464974
BLAKE2b-256 15669eda3e5e75d9fba44e0c192862f152dd4cecfafc7698547d4588c4265a76

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