[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DH5QF5PWKHRFD4W6WS6PC0":3,"skill-same:01M7DH5QF5PWKHRFD4W6WS6PC0":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7DH5QF5PWKHRFD4W6WS6PC0","hf-mem",null,"Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub","ak2dev\u002Fagentguard","ak2dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F233005497?v=4","01M7DGWK3E3XCC276C6YRFSN05","01M7DGWK4J2A9WQ44CS5CRP4R6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-hf-mem\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: hf-mem\ndescription: Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub\n---\n\n`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.\n\n## When to use?\n\n- User asks how much VRAM or memory a model needs to run\n- User wants to know if a model fits on their GPU or a given instance\n- User references a Hugging Face model ID or URL and asks about inference requirements\n\n## What are the requirements?\n\n- `uv` installed (for `uvx`)\n- `HF_TOKEN` env var or `--hf-token` flag (for gated or private models only)\n\n## How to run?\n\nRun 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.\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --json-output\n```\n\nIf the repository contains GGUF model weights in multiple precisions \u002F 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.\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --gguf-file \u003Cfile-or-path> --json-output\n```\n\nAdditionally, `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.\n\nAs 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.\n\nFor Safetensors use as:\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-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\n```\n\nAnd, for GGUF use as:\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --gguf-file \u003Cfile-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\n```\n\n## Examples\n\nFor Transformers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id MiniMaxAI\u002FMiniMax-M2 --json-output\n```\n\nFor Diffusers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id Qwen\u002FQwen-Image --json-output\n```\n\nFor Sentence Transformers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id google\u002Fembeddinggemma-300m --json-output\n```\n\nWith `--experimental` to include the KV cache estimation for LLMs and VLMs:\n\n```bash\nuvx hf-mem --model-id mistralai\u002FMistral-7B-v0.1 --experimental --json-output\n```\n\nAnd, for LLMs or VLMs with GGUF weights:\n\n```bash\nuvx hf-mem --model-id unsloth\u002FQwen3.5-397B-A17B-GGUF --gguf-file Q4_K_M --experimental --json-output\n```\n","`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.\n\n## When to use?\n\n- User asks how much VRAM or memory a model needs to run\n- User wants to know if a model fits on their GPU or a given instance\n- User references a Hugging Face model ID or URL and asks about inference requirements\n\n## What are the requirements?\n\n- `uv` installed (for `uvx`)\n- `HF_TOKEN` env var or `--hf-token` flag (for gated or private models only)\n\n## How to run?\n\nRun 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.\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --json-output\n```\n\nIf the repository contains GGUF model weights in multiple precisions \u002F 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.\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --gguf-file \u003Cfile-or-path> --json-output\n```\n\nAdditionally, `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.\n\nAs 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.\n\nFor Safetensors use as:\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-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\n```\n\nAnd, for GGUF use as:\n\n```bash\nuvx hf-mem --model-id \u003Cmodel-id> --gguf-file \u003Cfile-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\n```\n\n## Examples\n\nFor Transformers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id MiniMaxAI\u002FMiniMax-M2 --json-output\n```\n\nFor Diffusers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id Qwen\u002FQwen-Image --json-output\n```\n\nFor Sentence Transformers with Safetensors weights:\n\n```bash\nuvx hf-mem --model-id google\u002Fembeddinggemma-300m --json-output\n```\n\nWith `--experimental` to include the KV cache estimation for LLMs and VLMs:\n\n```bash\nuvx hf-mem --model-id mistralai\u002FMistral-7B-v0.1 --experimental --json-output\n```\n\nAnd, for LLMs or VLMs with GGUF weights:\n\n```bash\nuvx hf-mem --model-id unsloth\u002FQwen3.5-397B-A17B-GGUF --gguf-file Q4_K_M --experimental --json-output\n```\n",{"name":5,"description":7},"main","634c25395a24b98cd6125453ad4abb65517bcabb","bench\u002Fcorpus\u002Fbenign\u002Freal-hf-hf-mem","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard","https:\u002F\u002Fsite-bionic8.vercel.app","https:\u002F\u002Fgithub.com\u002Fak2dev","2026-11-11 02:37:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add ak2dev\u002Fagentguard --skill hf-mem",{"tool":36,"command":37},"bunx","bunx skills add ak2dev\u002Fagentguard --skill hf-mem",{"tool":39,"command":40},"pnpm","pnpm dlx skills add ak2dev\u002Fagentguard --skill hf-mem","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-hf-mem\u002FSKILL.md",true,[],[45,52,57,62,67,73],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7DJ7GBSJBJ32GXNQXVAMNYK","csv-tool","Summarize CSV files and report column statistics.","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-002\u002Fpositive\u002Ffault\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":53,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M7DJ7F00PA7EHFM39RVCC8R5","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-002\u002Fnegative\u002Fnormal\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":58,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7DJ7DP7KDW7MYY5Q0R0JFEN","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-001\u002Fpositive\u002Ftoo-large\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":63,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7DJ7C3VA0KQ8Q9ESNX6AJHE","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-001\u002Fnegative\u002Fsmall\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7DJ7AQZTGY5YADQX73TRB7K","pdf","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SKL-TYP-002\u002Fpositive\u002Fother-publisher\u002Fpdf\u002FSKILL.md",[],[],{"skillNo":74,"name":69,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7DJ7831XDVWS4W9SAAKBJHX","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SKL-TYP-002\u002Fnegative\u002Fsame-publisher\u002Fpdf\u002FSKILL.md",[],[]]