{"id":3200,"date":"2026-03-11T16:13:40","date_gmt":"2026-03-11T08:13:40","guid":{"rendered":"https:\/\/www.starverse-ai.com\/guide\/archives\/3200"},"modified":"2026-03-11T16:13:40","modified_gmt":"2026-03-11T08:13:40","slug":"%e7%99%be%e4%b8%87token%e9%95%bf%e4%b8%8a%e4%b8%8b%e6%96%87%e9%9a%be%e5%80%92%e6%9c%ac%e5%9c%b0%e6%9c%ba%ef%bc%9f%e6%98%9f%e5%ae%87%e6%99%ba%e7%ae%97kv-cache%e5%bc%b9%e6%80%a7%e5%ad%98%e5%82%a8","status":"publish","type":"post","link":"https:\/\/www.starverse-ai.com\/guide\/archives\/3200","title":{"rendered":"\u767e\u4e07token\u957f\u4e0a\u4e0b\u6587\u96be\u5012\u672c\u5730\u673a\uff1f\u661f\u5b87\u667a\u7b97KV-Cache\u5f39\u6027\u5b58\u50a8\u65b9\u6848\u5b9e\u6d4b\u4e0d\u6389\u901f"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/03\/1773216820_7d3674.png\" alt=\"\u767e\u4e07token\u957f\u4e0a\u4e0b\u6587\u96be\u5012\u672c\u5730\u673a\uff1f\u661f\u5b87\u667a\u7b97KV-Cache\u5f39\u6027\u5b58\u50a8\u65b9\u6848\u5b9e\u6d4b\u4e0d\u6389\u901f\" style=\"display:block; margin:10px auto; max-width:100%; height:auto;\" \/><\/figure>\n<h1>\u767e\u4e07 token \u957f\u4e0a\u4e0b\u6587\u96be\u5012\u672c\u5730\u673a\uff1f\u661f\u5b87\u667a\u7b97 KV-Cache \u5f39\u6027\u5b58\u50a8\u65b9\u6848\u5b9e\u6d4b\u4e0d\u6389\u901f<\/h1>\n<blockquote>\n<p>\u201c\u5f53\u4e00\u4efd 300 \u9875\u7684\u533b\u7597\u75c5\u5386\u300110 \u4e07\u884c\u4ee3\u7801\u4ed3\u5e93\u6216 200 \u4e07 token \u7684\u91d1\u878d\u7814\u62a5\u540c\u65f6\u585e\u8fdb\u5927\u6a21\u578b\uff0c\u5355\u5361 80 GB \u663e\u5b58\u77ac\u95f4\u89c1\u5e95\uff0cGPU \u5229\u7528\u7387\u5374\u8dcc\u5230 40% \u4ee5\u4e0b\u3002\u201d\u2014\u2014\u8fd9\u662f\u8fc7\u53bb\u534a\u5e74\u91cc\uff0c\u51e0\u4e4e\u6240\u6709\u505a\u957f\u6587\u6863 AI\u3001\u4ee3\u7801\u5ba1\u67e5\u3001\u533b\u7597\u6458\u8981\u7684\u56e2\u961f\u90fd\u9047\u5230\u7684\u5171\u540c\u5c34\u5c2c\u3002<\/p>\n<\/blockquote>\n<h2>\u70ed\u70b9\u7206\u53d1\uff1a\u957f\u4e0a\u4e0b\u6587\u6210\u4e3a\u201c\u521a\u9700\u201d<\/h2>\n<p>GitHub \u6700\u65b0\u62a5\u544a\u663e\u793a\uff0c2024 Q1 \u5e73\u5747 PR \u4f53\u79ef\u540c\u6bd4\u589e\u957f 37%\uff0c\u800c\u533b\u7597 AI \u8d5b\u9053\u7684\u201c\u6574\u672c\u75c5\u5386\u201d\u6458\u8981\u9700\u6c42\u66f4\u662f\u540c\u6bd4\u66b4\u6da8 4 \u500d\u3002 longer-context \u6a21\u578b\uff08128k~2M token\uff09\u5f00\u6e90\u6570\u91cf\u534a\u5e74\u7ffb\u4e86 5 \u500d\uff0c\u4f46\u771f\u6b63\u80fd\u8dd1\u8d77\u6765\u7684\u516c\u53f8\u5374\u5be5\u5be5\u65e0\u51e0\u2014\u2014\u539f\u56e0\u65e0\u4ed6\uff0c<strong>KV-Cache \u628a GPU \u663e\u5b58\u76f4\u63a5\u5403\u6210\u4e86\u201c\u5185\u5b58\u5899\u201d<\/strong>\u3002\u672c\u5730 8\u00d7A100 80 GB \u673a\u5b50\uff0c\u4e00\u4e0d\u7559\u795e\u5c31\u88ab 1 M token \u7684\u5bf9\u8bdd\u5386\u53f2\u6491\u7206\uff0cOOM \u91cd\u542f\u6210\u4e86\u65e5\u5e38\u3002<\/p>\n<h2>GPU \u5185\u5b58\u5899\uff1a\u5355\u5361 80 GB \u4e5f\u88c5\u4e0d\u4e0b\u201c\u56de\u5fc6\u201d<\/h2>\n<p>\u5927\u6a21\u578b\u63a8\u7406\u65f6\uff0c\u6bcf\u4e00\u5c42 Attention \u90fd\u8981\u628a Key-Value \u7f13\u5b58\u7559\u5728\u663e\u5b58\u91cc\uff0c\u957f\u5ea6\u7ebf\u6027\u589e\u957f\u3001\u5c42\u6570\u7ffb\u500d\uff0c<strong>128 k \u4e0a\u4e0b\u6587\u5c31\u80fd\u8f7b\u6613\u5403\u6389 70 GB<\/strong>\u3002\u4e3a\u4e86\u4e0d\u6389\u901f\uff0c\u5f00\u53d1\u8005\u53ea\u80fd\u51cf\u5c11 batch\u3001\u780d\u5e76\u53d1\uff0c\u7ed3\u679c GPU \u7b97\u529b\u95f2\u7f6e\u4e00\u534a\u4ee5\u4e0a\uff0c<strong>\u6602\u8d35\u7684 GPU \u670d\u52a1\u5668\u79df\u7528\u8d39\u7528\u5374\u4e00\u5206\u4e0d\u5c11<\/strong>\u3002\u66f4\u75db\u82e6\u7684\u662f\uff0c\u672c\u5730\u6269\u5bb9\u610f\u5473\u7740\u518d\u82b1\u6570\u767e\u4e07\u91c7\u8d2d\u65b0\u5361\uff0c\u5468\u671f\u81f3\u5c11 6 \u5468\u2014\u2014\u5546\u673a\u4e0d\u7b49\u4eba\u3002<\/p>\n<h2>\u661f\u5b87\u667a\u7b97 + AIStor\uff1a\u628a KV-Cache \u642c\u5230\u201c\u5fae\u79d2\u7ea7\u201d\u5b58\u50a8\u5c42<\/h2>\n<p>\u661f\u5b87\u667a\u7b97\u4e0e AIStor \u8054\u5408\u63a8\u51fa\u7684 <strong>KV-Cache \u5f39\u6027\u5378\u8f7d\u65b9\u6848<\/strong>\uff0c\u7528\u4e00\u5f20 200 Gbps RDMA \u7f51\u5361\u76f4\u63a5\u628a\u7f13\u5b58\u5c42\u642c\u5230\u6c60\u5316\u7684 NVMe-oF \u96c6\u7fa4\uff0c<strong>\u5ef6\u8fdf &lt; 200 \u03bcs<\/strong>\uff0c\u6bd4\u672c\u5730 PCI-e \u642c\u8fd0\u4ec5\u591a\u4e00\u6b21\u5185\u5b58\u62f7\u8d1d\u3002\u6838\u5fc3\u601d\u8def\uff1a<\/p>\n<ol>\n<li>GPU \u8ba1\u7b97\u8282\u70b9\u4ec5\u4fdd\u7559\u5f53\u524d token \u7684\u6d3b\u8dc3\u7f13\u5b58\uff0c\u5386\u53f2 KV \u81ea\u52a8\u4e0b\u6c89\uff1b  <\/li>\n<li>RDMA \u7ed5\u8fc7 CPU\uff0cGPU Direct Storage \u76f4\u5199\u8fdc\u7aef NVMe\uff0c<strong>\u541e\u5410 30 GB\/s<\/strong>\uff1b  <\/li>\n<li>\u7f13\u5b58\u5207\u7247\u6309 token ID \u54c8\u5e0c\uff0c\u6a2a\u5411\u6269\u5bb9\u65e0\u9501\uff0c<strong>\u767e\u4e07 token \u53ea\u9700 3 \u53f0\u5b58\u50a8\u8282\u70b9<\/strong>\u3002<\/li>\n<\/ol>\n<h2>\u5b9e\u6d4b\u6570\u636e\uff1aGPU \u5229\u7528\u7387\u4ece 42% \u98d9\u5230 92%<\/h2>\n<p>\u6211\u4eec\u5728\u661f\u5b87\u667a\u7b97 GPU\u4e91\u4e3b\u673a 8\u00d7RTX 4090 \u5b9e\u4f8b\u4e0a\uff0c\u7528 70 B \u6a21\u578b\u30011 M token \u957f\u5ea6\u3001batch=4 \u91cd\u590d 10 \u6b21\u63a8\u7406\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u6307\u6807<\/th>\n<th>\u7eaf\u663e\u5b58\u65b9\u6848<\/th>\n<th>KV-Cache \u5378\u8f7d\u65b9\u6848<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u663e\u5b58\u5360\u7528<\/td>\n<td>78 GB<\/td>\n<td>29 GB<\/td>\n<\/tr>\n<tr>\n<td>\u5e73\u5747\u5ef6\u8fdf\/token<\/td>\n<td>178 ms<\/td>\n<td>182 ms<\/td>\n<\/tr>\n<tr>\n<td>GPU \u5229\u7528\u7387<\/td>\n<td>42 %<\/td>\n<td>92 %<\/td>\n<\/tr>\n<tr>\n<td>\u6bcf 1 M token \u6210\u672c<\/td>\n<td>68 \u5143<\/td>\n<td>51 \u5143<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u6210\u672c\u7acb\u964d 25%\uff0c\u5ef6\u8fdf\u51e0\u4e4e\u96f6\u611f\u77e5<\/strong>\uff0c\u518d\u4e5f\u4e0d\u7528\u62c5\u5fc3\u663e\u5b58\u70b8\u6389\u3002<\/p>\n<h2>\u5e73\u53f0\u5373\u5f00\u5373\u7528\uff1a\u955c\u50cf\u91cc\u5df2\u96c6\u6210 MinIO + GPUDirect<\/h2>\n<p>\u4e3a\u4e86\u8ba9\u5f00\u53d1\u8005\u201c<strong>\u5f00\u7bb1\u5373\u8dd1<\/strong>\u201d\uff0c\u661f\u5b87\u667a\u7b97\u5df2\u7ecf\u628a <strong>MinIO\u3001NVIDIA GPUDirect Storage\u3001vLLM 0.4.3<\/strong> \u9884\u88c5\u8fdb\u5b98\u65b9\u955c\u50cf\u3002\u521b\u5efa GPU\u670d\u52a1\u5668\u79df\u7528\u5b9e\u4f8b\u65f6\u52fe\u9009\u201cKV-Cache \u5f39\u6027\u5b58\u50a8\u201d\uff0c30 \u79d2\u5185\u81ea\u52a8\u6302\u8f7d RDMA \u7f51\u7edc\uff0c<strong>\u65e0\u9700\u6539\u4e00\u884c\u4ee3\u7801<\/strong>\uff0cvLLM \u4f1a\u81ea\u52a8\u8bc6\u522b\u5e76\u542f\u7528 offload\u3002<br \/>\n\u540c\u65f6\uff0c\u5e73\u53f0\u63d0\u4f9b <strong>\u4e91\u786c\u76d8\u3001\u4e91\u5b58\u50a8\u3001\u6a21\u578b\u4e0e\u6570\u636e\u96c6<\/strong> \u4e09\u91cd\u6301\u4e45\u5316\u65b9\u6848\uff1a<br \/>\n&#8211; \u4e91\u786c\u76d8\u53ef\u5728\u591a\u5b9e\u4f8b\u95f4\u6f02\u79fb\uff0c\u8bad\u7ec3\u7ed3\u679c\u79d2\u7ea7\u8fc1\u79fb\uff1b<br \/>\n&#8211; \u4e91\u5b58\u50a8\u652f\u6301 Web \u7aef\u4e0a\u4f20\/\u4e0b\u8f7d\uff0c\u5b9e\u4f8b\u5185\u76f4\u63a5 <code>ls \/public-dataset<\/code> \u5373\u53ef\u8c03\u7528\uff1b<br \/>\n&#8211; \u516c\u5171\u8d44\u6e90\u5e93\u5185\u7f6e Llama3-70B\u3001Mistral-8\u00d722B\u3001Med42-70B \u7b49\u957f\u4e0a\u4e0b\u6587\u6a21\u578b\uff0c<strong>\u4e00\u952e\u590d\u5236\u5230\u5b9e\u4f8b<\/strong>\uff0c\u7701\u53bb 200 GB \u4e0b\u8f7d\u65f6\u95f4\u3002<\/p>\n<h2>\u6309 token \u8ba1\u8d39\u66f4\u900f\u660e\uff0c\u6210\u672c\u518d\u964d\u4e00\u5c42<\/h2>\n<p>\u4f20\u7edf\u4e91\u5382\u5546\u6309\u201c\u5361\u65f6\u201d\u8ba1\u8d39\uff0c\u957f\u4e0a\u4e0b\u6587\u573a\u666f\u4e0b GPU \u7a7a\u8f6c\u5374\u8981\u4ed8 100% \u8d39\u7528\u3002\u661f\u5b87\u667a\u7b97\u63a8\u51fa <strong>\u201c\u7b97\u529b + \u5b58\u50a8\u201d \u5206\u79bb\u8ba1\u8d39<\/strong>\uff1a<br \/>\n&#8211; GPU \u4ec5\u6536\u6d3b\u8dc3\u8ba1\u7b97\u65f6\u957f\uff1b<br \/>\n&#8211; KV-Cache \u5b58\u50a8\u6309 token \u8ba1\u8d39\uff0c<strong>\u6bcf 1 M token \u6700\u4f4e 0.8 \u5206\/\u5c0f\u65f6<\/strong>\uff1b<br \/>\n&#8211; \u652f\u6301\u5b9e\u65f6\u8d26\u5355\uff0ctoken \u957f\u5ea6\u3001\u5b58\u50a8\u65f6\u957f\u4e00\u76ee\u4e86\u7136\uff0c<strong>\u6210\u672c\u53ef\u63a7\u4e0d\u80cc\u523a<\/strong>\u3002<\/p>\n<h2>\u65b0\u7528\u6237\u798f\u5229\uff1a\u6ce8\u518c\u5373\u9001 10 \u5143\u4f53\u9a8c\u91d1<\/h2>\n<p>\u73b0\u5728\u6ce8\u518c <a href=\"https:\/\/www.starverse-ai.com\">\u661f\u5b87\u667a\u7b97<\/a> \u8d26\u53f7\uff0c<strong>\u7acb\u5f97 10 \u5143\u4f53\u9a8c\u91d1<\/strong>\uff0c\u53ef 0 \u6210\u672c\u8bd5\u7528 2\u00d7RTX 4090 GPU\u4e91\u4e3b\u673a 1 \u5c0f\u65f6 + 100 \u4e07 token \u5f39\u6027\u7f13\u5b58\uff0c<strong>\u65e0\u9700\u7ed1\u5361\u3001\u65e0\u9700\u5b9e\u540d<\/strong>\uff0c\u8dd1\u901a\u957f\u6587\u6863\u6458\u8981 demo \u518d\u51b3\u5b9a\u5546\u7528\u3002<\/p>\n<h2>\u7ed3\u8bed<\/h2>\n<p>\u5f53\u5927\u6a21\u578b\u8fdb\u5165\u201c\u957f\u4e0a\u4e0b\u6587\u201d\u65f6\u4ee3\uff0c\u518d\u5806 GPU \u663e\u5b58\u5df2\u4e0d\u662f\u6700\u4f18\u89e3\u3002<strong>\u661f\u5b87\u667a\u7b97 KV-Cache \u5f39\u6027\u5b58\u50a8\u65b9\u6848<\/strong>\u7528 RDMA \u628a\u201c\u5185\u5b58\u5899\u201d\u53d8\u6210\u201c\u900f\u660e\u7f13\u5b58\u201d\uff0c\u8ba9\u5f00\u53d1\u8005\u4ee5 <strong>GPU\u670d\u52a1\u5668\u79df\u7528<\/strong> \u7684\u4ef7\u683c\u4eab\u53d7\u8d85\u914d\u663e\u5b58\u7684\u723d\u611f\uff0c<strong>AI\u5e94\u7528<\/strong>\u843d\u5730\u4e0d\u518d\u88ab\u786c\u4ef6\u675f\u7f1a\u3002<br \/>\n\u4e0b\u4e00\u6b21\uff0c\u5f53\u4ea7\u54c1\u7ecf\u7406\u628a 500 \u9875 PDF \u7529\u8fc7\u6765\uff0c\u4f60\u53ef\u4ee5\u6de1\u5b9a\u5730\u56de\u4e00\u53e5\uff1a\u201c\u4e0a\u661f\u5b87\u667a\u7b97\uff0c\u4e00\u53e3\u6c14\u8bfb\u5b8c\u4e0d\u6389\u901f\u3002\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u767e\u4e07 token \u957f\u4e0a\u4e0b\u6587\u96be\u5012\u672c\u5730\u673a\uff1f\u661f\u5b87\u667a\u7b97 KV-Cac&hellip;<\/p>\n","protected":false},"author":2,"featured_media":3199,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3200","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zixun"],"views":53,"_links":{"self":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/3200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/comments?post=3200"}],"version-history":[{"count":0,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/3200\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media\/3199"}],"wp:attachment":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media?parent=3200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/categories?post=3200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/tags?post=3200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}