{"id":50720539,"url":"https://github.com/elinx/llm-mem-calculator","last_synced_at":"2026-06-09T23:30:53.212Z","repository":{"id":362913100,"uuid":"1261253896","full_name":"elinx/llm-mem-calculator","owner":"elinx","description":"Interactive KV cache memory calculator for LLMs — supports MLA, GQA, hybrid attention, sliding window, and linear attention architectures. Estimate GPU memory for serving any model at any context length.","archived":false,"fork":false,"pushed_at":"2026-06-06T15:01:13.000Z","size":505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T15:08:15.138Z","etag":null,"topics":["calculator","gpu-memory","kv-cache","llm","llm-serving","vllm"],"latest_commit_sha":null,"homepage":"https://elinx.github.io/llm-mem-calculator/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elinx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T12:49:48.000Z","updated_at":"2026-06-06T15:01:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/elinx/llm-mem-calculator","commit_stats":null,"previous_names":["elinx/llm-mem-calculator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/elinx/llm-mem-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elinx%2Fllm-mem-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elinx%2Fllm-mem-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elinx%2Fllm-mem-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elinx%2Fllm-mem-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elinx","download_url":"https://codeload.github.com/elinx/llm-mem-calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elinx%2Fllm-mem-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34130641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","gpu-memory","kv-cache","llm","llm-serving","vllm"],"created_at":"2026-06-09T23:30:52.447Z","updated_at":"2026-06-09T23:30:53.191Z","avatar_url":"https://github.com/elinx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KV Cache Calculator\n\nA web-based tool for estimating LLM KV cache memory requirements. Supports modern architectures including MLA, GQA, hybrid attention, sliding window, and linear attention models.\n\n**Live Demo**: [elinx.github.io/llm-mem-calculator](https://elinx.github.io/llm-mem-calculator/)\n\n## Calculator\n\nCalculate KV cache size for a single model with customizable parameters — context length, batch size, KV precision, and more.\n\n![Calculator](./assets/calculator.png)\n\n## Compare\n\nCompare KV cache memory across multiple models side-by-side with an interactive chart.\n\n![Compare](./assets/compare.png)\n\n## Supported Architectures\n\n| Architecture | Example Models |\n|---|---|\n| Standard GQA | Qwen3, Llama 3.x, Qwen2.5, MiniMax M2.x |\n| MLA (Multi-head Latent Attention) | DeepSeek V3, DeepSeek R1, Kimi K2.5/K2.6 |\n| DSA+MLA (DeepSeek V4 Hybrid) | DeepSeek V4 Pro, DeepSeek V4 Flash, DeepSeek V3.2, GLM-5/5.1 |\n| Mixed Full + Sliding Window | Gemma 4, Cohere Command, MiMo-V2.5 |\n| Linear + Full Hybrid | Qwen3.5, Qwen3.6 |\n\n## Features\n\n- **Precision options**: BF16/FP16, FP8/INT8, FP4/INT4\n- **Draft KV cache**: Account for MTP/draft model KV layers\n- **Linear attention KV**: Include linear attention layer contributions\n- **Context presets**: Quick-select from 1K to 1M tokens\n- **Breakdown view**: Detailed per-layer KV cache breakdown\n- **Formula display**: Shows the exact formula used for each model\n- **Dark mode**: Toggle between light and dark themes\n- **Chart export**: Download comparison charts as PNG or copy to clipboard\n\n## Development\n\nNo build step required — just open `index.html` in a browser or serve the directory with any static file server.\n\n```bash\n# Quick local server\npython3 -m http.server 8765\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felinx%2Fllm-mem-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felinx%2Fllm-mem-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felinx%2Fllm-mem-calculator/lists"}