Hugging Face Model Memory Estimator
Estimate inference memory without downloading model weights.
The document discloses that HTTP Range requests are used against the Hugging Face Hub and that HF_TOKEN is needed only for gated or private models, making the main data flow visible. However, it runs an unpinned external CLI through uvx and does not explain token protection, user confirmation, permission isolation, failure recovery, or rollback, so 12 points are deducted. No credential theft, covert exfiltration, or destructive default is evident.
The commands, Safetensors/GGUF branches, and main options are internally consistent, making the happy path plausible. However, there is no version pinning, committed test suite, example failure output, abnormal-input handling, or diagnostic guidance, and execution was not performed here. Static calibration therefore limits this to 7 points.
The intended scenarios, model ID, GGUF file, experimental mode, and JSON output are clearly described, with examples for Transformers, Diffusers, Sentence Transformers, and LLM/VLM use. Non-fit boundaries, estimation-error limits, trigger exclusions, Chinese-language support, and mainland-China reachability are not documented; the core path depends on the Hugging Face Hub and package retrieval through uv, so points are deducted.
The SKILL.md is concise and includes trigger conditions, requirements, commands, parameters, and examples. The repository supplies an Apache-2.0 license and CI validation for generated artifacts. The skill itself lacks versioning, changelog, explicit maintenance ownership or update path, troubleshooting, limitation disclosure, and output-field explanations, warranting a mid-range score.
The commands produce JSON memory estimates directly usable for the stated task and cover both weights and optional KV-cache requirements. However, there are no committed real execution results, accuracy validation, or comparative evidence, and the estimation boundaries are incomplete. Static calibration limits the score to 5.
The source provides auditable commands, parameters, and examples, while repository CI can validate generated-file consistency. There is no evidence of tests covering hf-mem key paths, real outputs, third-party review, or corroboration across independent sources. Evidence is therefore limited to 3 points.
- uvx may retrieve and execute an unpinned tool from an external source; verify package provenance, version, and execution isolation.
- The skill accesses the Hugging Face Hub; HF_TOKEN for private or gated models must not appear in commands, logs, or output.
- Mainland-China reachability, failure handling, estimation error, and output-field semantics are undocumented; add these limitations and perform real validation before deployment.
What does this skill do, and when should you use it?
hf-mem is a focused skill in the Hugging Face Skills repository for estimating the memory needed to run models hosted on the Hugging Face Hub. It supports Safetensors and GGUF weights and uses HTTP Range requests, so weights do not need to be downloaded or loaded locally. The standard estimate covers model weights, while --experimental can add KV-cache requirements for supported LLMs, VLMs, and GGUF models. It is a good fit for pre-deployment hardware planning when the model repository and target inference settings are known.
Runs the hf-mem CLI against a Hugging Face Hub model repository and returns JSON memory estimates for Safetensors or GGUF weights. For repositories containing multiple GGUF precisions or quantizations, it can estimate each file or target a selected file or sharded path with --gguf-file. With --experimental, it calculates KV-cache memory using the context length, batch size, and KV-cache precision supplied by the user or inferred from defaults.
- A developer wants to estimate VRAM before running a Hugging Face model locally.
- An ML engineer needs to check whether a model fits a particular GPU or compute instance.
- A user provides a Hugging Face model ID or URL and asks about inference requirements.
- A practitioner needs per-file memory estimates for different GGUF quantizations in one repository.
What are this skill's strengths and limitations?
- Supports both Safetensors and GGUF weights.
- Uses HTTP Range requests without downloading or locally loading model weights.
- Provides JSON output for automation.
- Experimental mode includes KV-cache estimates and exposes context-length, batch-size, and cache-precision controls.
- Requires uv and network access to the Hugging Face Hub.
- GGUF repositories with multiple quantizations may require manual file selection.
- KV-cache estimation is explicitly experimental.
- The supplied material gives no test-suite, performance, or cross-platform validation evidence.
How do you install this skill?
Copy or symlink the skills/hf-mem/ folder into an Agent Skills directory supported by the client, such as Codex's $REPO_ROOT/.agents/skills or $HOME/.agents/skills. The README also documents hf skills add <skill-name> for adding other Hugging Face skills, but it does not provide a separate hf-mem package or versioned installation command.
How do you use this skill?
Install uv, then run:
uvx hf-mem --model-id <model-id> --json-output
For a specific GGUF file, run:
uvx hf-mem --model-id <model-id> --gguf-file <file-or-path> --json-output
Add --experimental to estimate KV-cache memory, optionally setting --max-model-len, --batch-size, and --kv-cache-dtype. For gated or private models, provide HF_TOKEN or pass --hf-token.