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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hf_mem-0.2.2.tar.gz
  • Upload date:
  • Size: 7.1 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.2.tar.gz
Algorithm Hash digest
SHA256 fc4c0fa69dd14a8f29d2635ba6074dde48b982023d93725c75441cb177d3ce80
MD5 912397e48107e788e2d18aa7ac0a6e34
BLAKE2b-256 d93a2dec6393bb9426fc119c6eb61bc6766376f742eeeef819b0f76e375fd1cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hf_mem-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af245cbb5f06b69a2ac59e5328bdb71288f91fb13046c4e5ca013fd97cfe5536
MD5 d444250d85a7f602087a4e264b7ebbb6
BLAKE2b-256 035c6b6005950fdf4657661cb7b929d58b290f5e0df123b583818df314daa9e9

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