Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

hf-mem

Latest version: v1.1.2

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: alvarobartt
956 Stars
85 Forks
5 Versions
3.2K Downloads
Python Repo language

Scan summary

hf-mem was last scanned on 26 Nov 2026 at version 1.1.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest 3 were published within 7 days (20–26 Nov 2026).
  • Findings: No rules fired in version 1.1.2.
  • Downloads: 3,216 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.1.2 LATEST 26 Nov 2026 No rules fired
1.1.1 20 Nov 2026 No rules fired
1.1.0 20 Nov 2026 No rules fired
1.0.0 9 Nov 2026 Not shown
0.6.0 3 Nov 2026 Not shown

No rules fired in 1.1.2

Findings

Findings for v1.1.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.1.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

hf-mem estimates the memory required to run any model from the Hugging Face Hub, or from a local path, without downloading the weights. It reads the Safetensors, GGUF and ONNX metadata via HTTP Range requests, and only depends on httpx2.

The estimate covers the model weights, the KV cache for generative models, and the runtime overhead of the inference engine (activations, encoder, graphs and runtime), for Transformers, Diffusers, Sentence Transformers, GGUF and ONNX models (without the ONNX Runtime overhead).

Usage

Run it with uv as uvx hf-mem <model>, where <model> is a Hugging Face Hub model ID (optionally with @revision, and with :<quantization> for GGUF), a URL, or a local path. Use --gpu-memory to check whether the model fits and --help for all options.

Transformers
$ uvx hf-mem zai-org/GLM-5.3-Flash
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬ hf-mem v1.1.2 ┐
├┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┤
│             INFERENCE MEMORY ESTIMATE FOR             │
│      https://hf.co/zai-org/GLM-5.3-Flash @ main       │
│        w/ max-model-len=1048576, batch-size=1         │
├─────────────────┬─────────────────────────────────────┤
│ GPU CAPACITY    │ 365.20 GiB (392.13 GB) ON ONE GPU   │
│ RECOMMENDED     │ ███████████████████████████████████ │
├─────────────────┴─────────────────────────────────────┤
│            MODEL (9.67B PARAMS, 15.46 GiB)            │
├─────────────────┬─────────────────────────────────────┤
│ BF16            │ 12.90 / 365.20 GiB                  │
│ 6.93B PARAMS    │ █▎░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ F8_E4M3         │ 2.55 / 365.20 GiB                   │
│ 2.74B PARAMS    │ ▎░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ F32             │ 0.00 / 365.20 GiB                   │
│ 295.52K PARAMS  │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┴─────────────────────────────────────┤
│       EXPERTS (288 x 1.08B PARAMS, 290.32 GiB)        │
├─────────────────┬─────────────────────────────────────┤
│ F8_E4M3         │ 290.25 / 365.20 GiB                 │
│ 311.65B PARAMS  │ ███████████████████████████▉░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ F32             │ 0.07 / 365.20 GiB                   │
│ 0 PARAMS        │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┴─────────────────────────────────────┤
│         KV CACHE (1048576 TOKENS, 17.35 GiB)          │
├─────────────────┬─────────────────────────────────────┤
│ BF16            │ 17.35 / 365.20 GiB                  │
│ 1048576 TOKENS  │ █▋░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┴─────────────────────────────────────┤
│                  OVERHEAD (5.55 GiB)                  │
├─────────────────┬─────────────────────────────────────┤
│ ACTIVATIONS     │ 3.48 / 365.20 GiB                   │
│                 │ ▍░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ ENCODER         │ 0.05 / 365.20 GiB                   │
│                 │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ GRAPHS          │ 0.89 / 365.20 GiB                   │
│                 │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼─────────────────────────────────────┤
│ RUNTIME         │ 1.13 / 365.20 GiB                   │
│                 │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
└─────────────────┴─────────────────────────────────────┘

Generative models default to the context length in config.json and one sequence. Set --max-model-len, --batch-size and --kv-cache-dtype (e.g. fp8) to estimate your workload; automatic cache precision follows the model config.

$ uvx hf-mem Qwen/Qwen3.8-27B --max-model-len 32768 --batch-size 4
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬ hf-mem v1.1.2 ┐
├┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┤
│            INFERENCE MEMORY ESTIMATE FOR            │
│        https://hf.co/Qwen/Qwen3.8-27B @ main        │
│        w/ max-model-len=32768, batch-size=4         │
├─────────────────┬───────────────────────────────────┤
│ GPU CAPACITY    │ 73.71 GiB (79.14 GB) ON ONE GPU   │
│ RECOMMENDED     │ █████████████████████████████████ │
├─────────────────┴───────────────────────────────────┤
│          MODEL (27.36B PARAMS, 50.96 GiB)           │
├─────────────────┬───────────────────────────────────┤
│ BF16            │ 50.96 / 73.71 GiB                 │
│ 27.36B PARAMS   │ ██████████████████████▉░░░░░░░░░░ │
├─────────────────┴───────────────────────────────────┤
│         KV CACHE (131072 TOKENS, 9.19 GiB)          │
├─────────────────┬───────────────────────────────────┤
│ BF16            │ 9.19 / 73.71 GiB                  │
│ 131072 TOKENS   │ ████▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┴───────────────────────────────────┤
│                 OVERHEAD (6.19 GiB)                 │
├─────────────────┬───────────────────────────────────┤
│ ACTIVATIONS     │ 2.65 / 73.71 GiB                  │
│                 │ █▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼───────────────────────────────────┤
│ ENCODER         │ 2.42 / 73.71 GiB                  │
│                 │ █▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼───────────────────────────────────┤
│ GRAPHS          │ 0.39 / 73.71 GiB                  │
│                 │ ▏░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
├─────────────────┼───────────────────────────────────┤
│ RUNTIME         │ 0.74 / 73.71 GiB                  │
│                 │ ▍░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
└─────────────────┴───────────────────────────────────┘
Diffusers
$ uvx hf-mem Qwen/Qwen-Image-2.1
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬ hf-mem v1.1.2 ┐
├┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┤
│         INFERENCE MEMORY ESTIMATE FOR          │
│    https://hf.co/Qwen/Qwen-Image-2.1 @ main    │
├─────────────────┬──────────────────────────────┤
│ TOTAL MEMORY    │ 30.84 GiB (16.22B PARAMS)    │
│                 │ ████████████████████████████ │
├─────────────────┴──────────────────────────────┤
│     TEXT_ENCODER (8.77B PARAMS, 16.33 GiB)     │
├─────────────────┬──────────────────────────────┤
│ BF16            │ 16.33 / 30.84 GiB            │
│ 8.77B PARAMS    │ ██████████████▉░░░░░░░░░░░░░ │
├─────────────────┴──────────────────────────────┤
│     TRANSFORMER (7.12B PARAMS, 13.25 GiB)      │
├─────────────────┬──────────────────────────────┤
│ BF16            │ 13.25 / 30.84 GiB            │
│ 7.12B PARAMS    │ ████████████░░░░░░░░░░░░░░░░ │
├─────────────────┴──────────────────────────────┤
│         VAE (337.74M PARAMS, 1.26 GiB)         │
├─────────────────┬──────────────────────────────┤
│ F32             │ 1.26 / 30.84 GiB             │
│ 337.74M PARAMS  │ █▏░░░░░░░░░░░░░░░░░░░░░░░░░░ │
└─────────────────┴──────────────────────────────┘
Sentence Transformers
$ uvx hf-mem google/embeddinggemma-2
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬ hf-mem v1.1.2 ┐
├┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┤
│           INFERENCE MEMORY ESTIMATE FOR            │
│    https://hf.co/google/embeddinggemma-2 @ main    │
├─────────────────┬──────────────────────────────────┤
│ TOTAL MEMORY    │ 1.39 GiB (744.37M PARAMS)        │
│                 │ ████████████████████████████████ │
├─────────────────┴──────────────────────────────────┤
│          MODEL (744.37M PARAMS, 1.39 GiB)          │
├─────────────────┬──────────────────────────────────┤
│ BF16            │ 1.39 / 1.39 GiB                  │
│ 744.37M PARAMS  │ ████████████████████████████████ │
└─────────────────┴──────────────────────────────────┘

Text encoders, rerankers and Sentence Transformers include warmup memory. Use --max-num-batched-tokens for the warmup token budget and --max-model-len for the sequence length.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases hf-mem

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229