hf-mem
Hugging Face CLI,用于估算从 Hugging Face Hub 加载 Safetensors 或 GGUF 模型权重进行推理所需的内存
译文已校对查看英文原文
Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub
适用对象:对象待分类。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- When to use?
- What are the requirements?
- How to run?
- Examples
hfmem estimates the required memory for inference, including model weights and an optional KV cache, for Safetensors and GGUF for models on the Hugging Face Hub using HTTP Range requests i.e., without downloading or loading any weights locally. User asks how much VRAM or memory a model needs to run User wants to know if a model fits on their GPU or a given instance User references a Hugging Face model ID or URL and asks about inference requirements uv installed (for uvx) HFTOKEN env var or --hf-token flag (for gated or private models only) Run with --model-id pointing to the Hugging Face Hub repository which will check that it either contains Safetensors (via model.safetensors, model.safetensors.index.json if sharded, or modelindex.json for Diffusers) or GGUF model weights within. If the repository contains GGUF model weights in multiple precisions / quantizations, the estimations will be on a per-file basis, whereas for inference you won't load all of those but rather only a single precision. This being said, for GGUF you might as well need to provide --gguf-file to target the specific file (or path if sharded) you want to run. Additionally, hf-mem comes with an --experimental fla
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- huggingface/skills
- 源文件
- skills/hf-mem/SKILL.md
- 固定版本
- 25910b3d0ba31a2ba102f901cdc9e008c278a69c
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:huggingface/skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T16:01:02.702Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
Apache-2.0。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。