hf-mem
यह क्या करती है
यह टूल पता लगाता है कि कोई AI मॉडल चलाने के लिए कितनी मेमोरी (RAM या VRAM) लगेगी, और इसके लिए पूरा मॉडल डाउनलोड करने की ज़रूरत नहीं होती। यह Hugging Face Hub पर मौजूद मॉडल्स की जांच करता है।
कब इस्तेमाल करें
- ✓मैं जानना चाहता हूं कि कोई मॉडल मेरे ग्राफिक्स कार्ड में आएगा या नहीं।
- ✓मैं कोई मॉडल चुन रहा हूं और उसकी मेमोरी ज़रूरतें जानना चाहता हूं।
- ✓मैं किसी खास मॉडल को चलाने में लगने वाली मेमोरी का अनुमान लगाना चाहता हूं।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hf-mem/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“'mistralai/Mistral-7B-v0.1' मॉडल को चलाने के लिए कितनी VRAM चाहिए?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल इंटरनेट पर Hugging Face Hub से मॉडल की जानकारी लेता है। फिर यह मॉडल के weights का आकार निकालता है, और चाहें तो KV cache के लिए अतिरिक्त मेमोरी का अनुमान भी लगाता है। KV cache वह मेमोरी है जो बड़े भाषा मॉडल कभी-कभी इस्तेमाल करते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
hf_mem 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.
When to use?
- 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
What are the requirements?
uvinstalled (foruvx)HF_TOKENfrom the host's private credential handling for gated/private repositories; avoid putting tokens in command arguments, logs or reports.- A reviewed pinned
hf-mempackage version and permission to access the requested model metadata. This skill does not bundle the executable.
How to run?
The angle-bracket and square-bracket forms below are usage notation, not shell commands to paste literally. Quote actual model IDs and file paths. Inspect the selected package's --help, choose a reviewed version (for example with uvx --from "hf-mem==REVIEWED_VERSION" hf-mem ...) and use a private cache where metadata is sensitive. Do not print credentials.
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 model_index.json for Diffusers) or GGUF model weights within.
uvx hf-mem --model-id <model-id> --json-output
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.
uvx hf-mem --model-id <model-id> --gguf-file <file-or-path> --json-output
Additionally, hf-mem comes with an --experimental flag that will also calculate the KV cache memory requirements too, useful for large-language models, meaning it applies to LLMs (...ForCausalLM), VLMs (...ForConditionalGeneration), and GGUF models.
As per the context window, it will be read from the default or overridden with --max-model-len a la vLLM. And, same goes for the KV cache precision, which will default to the model precision unless manually set via --kv-cache-dtype a la vLLM too.
For Safetensors use as:
uvx hf-mem --model-id <model-id> --experimental [--max-model-len N] [--batch-size N] [--kv-cache-dtype auto|bfloat16|fp8|fp8_ds_mla|fp8_e4m3|fp8_e5m2|fp8_inc] --json-output
And, for GGUF use as:
uvx hf-mem --model-id <model-id> --gguf-file <file-or-path> --experimental [--max-model-len N] [--batch-size N] [--kv-cache-dtype auto|F32|F16|Q4_0|Q4_1|Q5_0|Q5_1|Q8_0|Q8_1|Q2_K|Q3_K|Q4_K|Q5_K|Q6_K|Q8_K|IQ2_XXS|IQ2_XS|IQ3_XXS|IQ1_S|IQ4_NL|IQ3_S|IQ2_S|IQ4_XS|I8|I16|I32|I64|F64|IQ1_M|BF16|TQ1_0|TQ2_0|MXFP4] --json-output
Examples
For Transformers with Safetensors weights:
uvx hf-mem --model-id MiniMaxAI/MiniMax-M2 --json-output
For Diffusers with Safetensors weights:
uvx hf-mem --model-id Qwen/Qwen-Image --json-output
For Sentence Transformers with Safetensors weights:
uvx hf-mem --model-id google/embeddinggemma-300m --json-output
With --experimental to include the KV cache estimation for LLMs and VLMs:
uvx hf-mem --model-id mistralai/Mistral-7B-v0.1 --experimental --json-output
And, for LLMs or VLMs with GGUF weights:
uvx hf-mem --model-id unsloth/Qwen3.5-397B-A17B-GGUF --gguf-file Q4_K_M --experimental --json-output
Limitations
- Use this skill only when the task clearly matches its upstream product or API scope.
- Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
- Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Interpretation and verification
…
अक्सर पूछे जाने वाले सवाल
क्या इस टूल को इस्तेमाल करने के लिए मॉडल डाउनलोड करना पड़ता है?
नहीं, टूल सिर्फ मॉडल के बारे में ऑनलाइन जानकारी देखता है, कोई फाइल डाउनलोड नहीं करता।
'KV cache' क्या है?
यह अतिरिक्त मेमोरी है जो कुछ मॉडल जवाब तेज़ी से देने के लिए इस्तेमाल करते हैं, खासकर बड़े भाषा मॉडल। टूल इस मेमोरी का भी अनुमान लगा सकता है।
क्या यह टूल गारंटी देता है कि मॉडल मेरी मशीन पर चलेगा?
नहीं। यह weights और cache के लिए ज़रूरी मेमोरी का अनुमान देता है। ऑपरेटिंग सिस्टम और दूसरे प्रोग्राम भी मेमोरी इस्तेमाल करते हैं, इसलिए वे भी असर डालते हैं।
जानकारी
लेखक का मूल विवरण
Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #4808
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।