{"id":97230,"date":"2026-08-29T07:34:06","date_gmt":"2026-08-28T23:34:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/97230.html"},"modified":"2026-08-29T07:34:06","modified_gmt":"2026-08-28T23:34:06","slug":"%e4%bb%8e%e4%b8%80%e6%9d%a1%e7%9b%b4%e7%ba%bf%e5%88%b0%e5%a4%a7%e6%a8%a1%e5%9e%8b%e8%be%93%e5%87%ba%e4%b8%80%e4%b8%aatoken%ef%bc%88%e5%8d%81%ef%bc%89%ef%bc%9a%e9%a6%96-token-%e8%af%9e%e7%94%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/97230.html","title":{"rendered":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache"},"content":{"rendered":"<h2>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache<\/h2>\n<p>\u5efa\u8bae\u5148\u770b&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u4e5d&#xff09;&#xff1a;\u8f93\u51fa\u77e9\u9635\u4e0e\u591a\u5c42\u5806\u53e0<\/p>\n<p>\u4e0a\u4e00\u7bc7\u62ff\u5230\u4e86\u8f93\u51fa\u77e9\u9635&#xff0c;6 \u6761\u7ea6\u675f\u94fe\u5168\u90e8\u6c89\u6dc0\u5728\u6700\u540e\u4e00\u884c\u3002\u8fd9\u4e00\u7bc7\u8ba9\u9996 token \u771f\u6b63\u8bde\u751f\u2014\u2014\u7136\u540e\u662f\u81ea\u56de\u5f52\u3001KV-Cache&#xff0c;\u4ee5\u53ca\u6574\u4e2a\u7cfb\u5217\u7684\u6536\u5b98\u3002<\/p>\n<\/p>\n<h4>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache <\/h4>\n<ul>\n<li>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache<\/li>\n<li>\n<ul>\n<li>1. \u53d6\u6700\u540e\u4e00\u884c&#xff1a;\u4e3a\u4ec0\u4e48\u662f\u300c&#xff1f;\u300d<\/li>\n<li>2. lm_head&#xff1a;\u6700\u540e\u4e00\u6b21\u300c\u4e00\u884c\u4e58\u4e00\u5217\u300d<\/li>\n<li>3. Softmax&#xff1a;\u5206\u6570\u53d8\u6982\u7387<\/li>\n<li>4. \u9009 token&#xff1a;\u4e09\u79cd\u7b56\u7565<\/li>\n<li>5. \u9996 token \u8bde\u751f<\/li>\n<li>6. \u81ea\u56de\u5f52&#xff1a;\u7b2c\u4e8c\u4e2a\u5b57\u600e\u4e48\u6765<\/li>\n<li>7. KV-Cache&#xff1a;\u65e7 token \u7684 K\/V \u4e0d\u7528\u91cd\u7b97<\/li>\n<li>\n<ul>\n<li>7.1 \u6d6a\u8d39\u5728\u54ea<\/li>\n<li>7.2 \u7f13\u5b58\u65b9\u6848<\/li>\n<li>7.3 \u6536\u76ca\u4e0e\u4ee3\u4ef7<\/li>\n<li>7.4 GQA \u4e0e MLA&#xff1a;\u7ed9 KV-Cache \u7626\u8eab\u7684\u4e24\u628a\u5200<\/li>\n<\/ul>\n<\/li>\n<li>8. \u6536\u5b98&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u4e00\u4e2a token<\/li>\n<li>\n<ul>\n<li>8.1 \u5341\u7bc7\u65c5\u7a0b<\/li>\n<li>8.2 230B \u7684\u6700\u540e\u4e00\u73af<\/li>\n<li>8.3 \u5199\u5728\u7cfb\u5217\u5b8c\u7ed3<\/li>\n<\/ul>\n<\/li>\n<li>9. \u4e0b\u4e00\u7cfb\u5217\u9884\u544a&#xff1a;17 \u4e2a\u95ee\u9898<\/li>\n<li>\u5c0f\u7ed3<\/li>\n<li>\u7cfb\u5217\u5b8c\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p> )<\/p>\n<h3>1. \u53d6\u6700\u540e\u4e00\u884c&#xff1a;\u4e3a\u4ec0\u4e48\u662f\u300c&#xff1f;\u300d<\/h3>\n<p>\u7bc79 \u7ed3\u5c3e\u8bf4\u8fc7&#xff1a;\u8f93\u51fa\u77e9\u9635\u7684\u6700\u540e\u4e00\u884c\u2014\u2014\u300c&#xff1f;\u300d\u884c\u2014\u2014\u662f\u9884\u6d4b\u9996 token \u7684\u5168\u90e8\u539f\u6599\u3002\u4e3a\u4ec0\u4e48\u504f\u504f\u662f\u6700\u540e\u4e00\u884c&#xff1f;<\/p>\n<p>\u56e0\u4e3a\u56e0\u679c\u8bed\u8a00\u6a21\u578b\u4ece\u5de6\u5230\u53f3\u9884\u6d4b\u4e0b\u4e00\u4e2a token&#xff1a;\u8bad\u7ec3\u65f6\u6bcf\u4e2a token \u7684\u4efb\u52a1\u90fd\u662f&#034;\u6839\u636e\u5de6\u8fb9\u6240\u6709 token&#xff0c;\u9884\u6d4b\u6211\u53f3\u8fb9\u662f\u8c01&#034;\u3002\u300c\u4eca\u5929\u300d\u9884\u6d4b\u300c\u897f\u5b89\u300d&#xff0c;\u300c\u897f\u5b89\u300d\u9884\u6d4b\u300c\u7684\u300d\u2026\u2026\u800c\u300c&#xff1f;\u300d\u662f\u53e5\u5b50\u7684\u6700\u540e\u4e00\u4e2a token&#xff0c;\u53ea\u6709\u5b83\u89c1\u8fc7\u5168\u90e8\u524d\u6587\u2014\u2014\u4eca\u5929\u3001\u897f\u5b89\u3001\u7684\u3001\u5929\u6c14\u3001\u600e\u4e48\u6837&#xff0c;\u4e00\u4e2a\u4e0d\u843d\u3002<\/p>\n<p>\u6240\u4ee5\u9884\u6d4b&#034;&#xff1f;\u201c\u540e\u9762\u662f\u4ec0\u4e48&#xff0c;\u5c31\u7528\u201d&#xff1f;&#034;\u7684\u884c\u5411\u91cf\u3002\u628a 6\u00d74096 \u7684\u8f93\u51fa\u77e9\u9635\u53ea\u53d6\u6700\u540e\u4e00\u884c&#xff0c;\u5f97\u5230 v\u2014\u20141\u00d74096 \u7684\u884c\u5411\u91cf&#xff08;\u6f14\u793a 1\u00d74&#xff09;&#xff0c;\u5982\u56fe 10-1 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233341-6a921ad54728a.png\" alt=\"\u53d6\u6700\u540e\u4e00\u884c\" \/><\/p>\n<p>\u56fe10-1 \u53ea\u53d6\u6700\u540e\u4e00\u884c&#xff1a;\u300c&#xff1f;\u300d\u884c\u662f\u5168\u53e5\u4fe1\u606f\u7684\u6c47\u96c6\u70b9<\/p>\n<p>\u6ce8\u610f\u56fe 10-1 \u91cc\u7684\u7ec6\u8282&#xff1a;v &#061; [2.85, -0.35, 1.90, -1.32]&#xff0c;d1 &#061; 2.85 \u662f\u884c\u5185\u6700\u5927\u503c\u2014\u2014\u8fd9\u6b63\u662f\u7bc79 \u53cd\u590d\u94fa\u57ab\u7684\u90a3\u6761\u7ebf&#xff1a;\u300c&#xff1f;\u300d\u884c d1 \u5728\u6df1\u5c42\u5168\u9762\u63a5\u7ba1&#xff0c;&#034;\u95ee\u5b8c\u4e86&#xff0c;\u8be5\u4f5c\u7b54&#034;\u7684\u5f00\u5173\u4fe1\u53f7\u5df2\u7ecf\u5c31\u4f4d\u3002<\/p>\n<h3>2. lm_head&#xff1a;\u6700\u540e\u4e00\u6b21\u300c\u4e00\u884c\u4e58\u4e00\u5217\u300d<\/h3>\n<p>\u73b0\u5728\u628a v \u7ffb\u8bd1\u6210\u8bcd\u8868\u4e0a\u6bcf\u4e2a\u5019\u9009 token \u7684\u5206\u6570\u3002\u7bc79 \u5df2\u7ecf\u9884\u544a\u8fc7\u5de5\u5177&#xff1a;lm_head\u2014\u2014\u4e00\u4e2a 4096\u00d7129,280 \u7684\u6743\u91cd\u77e9\u9635&#xff08;5.3 \u4ebf\u53c2\u6570&#xff09;\u3002\u8ba1\u7b97\u8fd8\u662f\u90a3\u4e2a\u8d2f\u7a7f\u5168\u7cfb\u5217\u7684\u52a8\u4f5c&#xff1a;\u4e00\u884c\u4e58\u4e00\u5217\u3002<\/p>\n<p>\u6f14\u793a\u7528 8 \u4e2a\u5019\u9009 token \u7684\u5c0f\u8bcd\u8868&#xff08;\u4eca\u3001\u6674\u3001\u96e8\u3001\u591a\u3001\u9634\u3001\u96ea\u3001\u98ce\u3001\u5f88&#xff09;&#xff0c;lm_head \u5c31\u662f 4\u00d78 \u7684\u5c0f\u77e9\u9635\u3002v \u4e58\u5b83&#xff0c;\u5f97\u5230 8 \u4e2a\u5206\u6570&#xff08;logits&#xff09;&#xff0c;\u5982\u56fe 10-2 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233343-6a921ad7a09c5.png\" alt=\"lm_head \u8ba1\u7b97\" \/><\/p>\n<p>\u56fe10-2 lm_head&#xff1a;\u6700\u540e\u4e00\u6b21\u300c\u4e00\u884c\u4e58\u4e00\u5217\u300d\u2014\u20144096 \u7ef4\u7ffb\u8bd1\u6210\u8bcd\u8868\u5206\u6570<\/p>\n<p>\u624b\u7b97\u300c\u6674\u300d\u90a3\u4e00\u5217&#xff08;\u56fe 10-2 \u9ec4\u8272\u9ad8\u4eae\u5217&#xff09;&#xff1a;<\/p>\n<p><span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         2.85<\/p>\n<p>         \u00d7<\/p>\n<p>         0.70<\/p>\n<p>         &#043;<\/p>\n<p>         (<\/p>\n<p>         \u2212<\/p>\n<p>         0.35<\/p>\n<p>         )<\/p>\n<p>         \u00d7<\/p>\n<p>         (<\/p>\n<p>         \u2212<\/p>\n<p>         0.30<\/p>\n<p>         )<\/p>\n<p>         &#043;<\/p>\n<p>         1.90<\/p>\n<p>         \u00d7<\/p>\n<p>         0.40<\/p>\n<p>         &#043;<\/p>\n<p>         (<\/p>\n<p>         \u2212<\/p>\n<p>         1.32<\/p>\n<p>         )<\/p>\n<p>         \u00d7<\/p>\n<p>         0.50<\/p>\n<p>         &#061;<\/p>\n<p>         2.20<\/p>\n<p>        2.85 \\\\times 0.70 &#043; (-0.35) \\\\times (-0.30) &#043; 1.90 \\\\times 0.40 &#043; (-1.32) \\\\times 0.50 &#061; 2.20<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">2.85<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">0.70<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">&#043;<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord\">\u2212<\/span><span class=\"mord\">0.35<\/span><span class=\"mclose\">)<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord\">\u2212<\/span><span class=\"mord\">0.30<\/span><span class=\"mclose\">)<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">&#043;<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">1.90<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">0.40<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">&#043;<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mopen\">(<\/span><span class=\"mord\">\u2212<\/span><span class=\"mord\">1.32<\/span><span class=\"mclose\">)<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6444em\"><\/span><span class=\"mord\">0.50<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6444em\"><\/span><span class=\"mord\">2.20<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>8 \u4e2a logits \u5168\u7b97\u51fa\u6765&#xff1a;<\/p>\n<table>\n<tr>\u5019\u9009\u4eca\u6674\u96e8\u591a\u9634\u96ea\u98ce\u5f88<\/tr>\n<tbody>\n<tr>\n<td>\u5206\u6570<\/td>\n<td>0.18<\/td>\n<td>2.20<\/td>\n<td>0.69<\/td>\n<td>0.94<\/td>\n<td>0.73<\/td>\n<td>0.54<\/td>\n<td>0.41<\/td>\n<td>-0.14<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u886810-1 8 \u4e2a\u5019\u9009 token \u7684 logits&#xff08;\u6f14\u793a\u8bcd\u8868&#xff0c;\u771f\u5b9e\u662f 129,280 \u4e2a\u5206\u6570&#xff09;<\/p>\n<p>\u300c\u6674\u300d\u4ee5 2.20 \u4e00\u9a91\u7edd\u5c18\u3002\u4f46\u5206\u6570\u8fd8\u4e0d\u662f\u6982\u7387\u2014\u2014\u5b83\u4eec\u751a\u81f3\u53ef\u4ee5\u662f\u4efb\u610f\u5b9e\u6570&#xff08;\u6709\u8d1f\u6570&#xff0c;\u4e5f\u6ca1\u5f52\u4e00\u5316&#xff09;\u3002\u4ece\u5206\u6570\u5230\u6982\u7387&#xff0c;\u5dee\u4e00\u4e2a Softmax\u3002<\/p>\n<h3>3. Softmax&#xff1a;\u5206\u6570\u53d8\u6982\u7387<\/h3>\n<p>Softmax \u7684\u516c\u5f0f&#xff1a;<\/p>\n<p><span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>          P<\/p>\n<p>          i<\/p>\n<p>         &#061;<\/p>\n<p>           e<\/p>\n<p>            z<\/p>\n<p>            i<\/p>\n<p>            \u2211<\/p>\n<p>            j<\/p>\n<p>            e<\/p>\n<p>             z<\/p>\n<p>             j<\/p>\n<p>        P_i &#061; \\\\frac{e^{z_i}}{\\\\sum_j e^{z_j}}<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.8333em;vertical-align: -0.15em\"><\/span><span class=\"mord\"><span style=\"margin-right: 0.1389em\" class=\"mord mathnormal\">P<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3117em\"><span class=\"\" style=\"top: -2.55em;margin-left: -0.1389em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mathnormal mtight\">i<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.15em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 2.4632em;vertical-align: -1.1218em\"><\/span><span class=\"mord\"><span class=\"mopen nulldelimiter\"><\/span><span class=\"mfrac\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 1.3414em\"><span class=\"\" style=\"top: -2.314em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mop\"><span class=\"mop op-symbol small-op\" style=\"position: relative;top: 0em\">\u2211<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.162em\"><span class=\"\" style=\"top: -2.4003em;margin-left: 0em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span style=\"margin-right: 0.0572em\" class=\"mord mathnormal mtight\">j<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.4358em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\">e<\/span><span class=\"msupsub\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.6065em\"><span class=\"\" style=\"top: -3.0051em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\"><span style=\"margin-right: 0.044em\" class=\"mord mathnormal mtight\">z<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3281em\"><span class=\"\" style=\"top: -2.357em;margin-left: -0.044em;margin-right: 0.0714em\"><span class=\"pstrut\" style=\"height: 2.5em\"><\/span><span class=\"sizing reset-size3 size1 mtight\"><span style=\"margin-right: 0.0572em\" class=\"mord mathnormal mtight\">j<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.2819em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"\" style=\"top: -3.23em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"frac-line\" style=\"border-bottom-width: 0.04em\"><\/span><\/span><span class=\"\" style=\"top: -3.677em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mord\"><span class=\"mord mathnormal\">e<\/span><span class=\"msupsub\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.6644em\"><span class=\"\" style=\"top: -3.063em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\"><span class=\"mord mtight\"><span style=\"margin-right: 0.044em\" class=\"mord mathnormal mtight\">z<\/span><span class=\"msupsub\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.3281em\"><span class=\"\" style=\"top: -2.357em;margin-left: -0.044em;margin-right: 0.0714em\"><span class=\"pstrut\" style=\"height: 2.5em\"><\/span><span class=\"sizing reset-size3 size1 mtight\"><span class=\"mord mathnormal mtight\">i<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.143em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 1.1218em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose nulldelimiter\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p>\u9010\u4e2a\u5019\u9009\u7b97\u6307\u6570\u3001\u518d\u9664\u4ee5\u603b\u548c\u3002\u624b\u7b97\u4e00\u904d&#xff0c;\u53ea\u6709\u4e09\u6b65&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u9010\u683c\u53d6\u6307\u6570 e^z\u3002 \u300c\u6674\u300de^2.20 &#061; 9.03&#xff0c;\u300c\u591a\u300de^0.94 &#061; 2.55&#xff0c;\u300c\u96e8\u300de^0.69 &#061; 1.99\u2026\u2026\u300c\u5f88\u300de^-0.14 &#061; 0.87\u3002\u6307\u6570\u5e72\u7684\u4e8b&#xff1a;\u628a\u5dee\u8ddd\u653e\u5927\u2014\u2014\u5206\u6570\u4e0a\u6674\u53ea\u662f\u591a\u7684 2.3 \u500d&#xff0c;\u6307\u6570\u540e\u62c9\u5f00\u5230 3.5 \u500d&#xff1b;\u5206\u6570\u4e0a\u300c\u5f88\u300d\u662f\u8d1f\u7684&#xff0c;\u6307\u6570\u540e\u53d8\u6210 0.87&#xff0c;\u57ab\u5e95\u4f46\u6ca1\u5f52\u96f6\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u5168\u90e8\u52a0\u8d77\u6765\u3002 1.19 &#043; 9.03 &#043; 1.99 &#043; 2.55 &#043; 2.08 &#043; 1.71 &#043; 1.50 &#043; 0.87 &#061; 20.91\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u6bcf\u683c\u9664\u4ee5\u603b\u548c\u3002 \u300c\u6674\u300d&#061; 9.03 \/ 20.91 &#061; 43.2%&#xff1b;\u300c\u591a\u300d&#061; 2.55 \/ 20.91 &#061; 12.2%\u2026\u20268 \u4e2a\u6982\u7387\u52a0\u8d77\u6765\u6070\u597d 100%\u3002<\/p>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u52a8\u56fe\u6f14\u793a\u5982\u56fe 10-3 \u6240\u793a&#xff08;4 \u5e27\u5faa\u73af&#xff0c;\u6bcf\u5e27\u8ffd\u52a0\u4e00\u6b65\u63a8\u5bfc&#xff09;\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233346-6a921ada41042.gif\" alt=\"Softmax \u624b\u7b97\u52a8\u56fe\" \/><\/p>\n<p>\u56fe10-3 Softmax \u624b\u7b97\u5168\u8fc7\u7a0b&#xff1a;logits \u2192 e^z \u2192 \u6c42\u548c \u2192 \u6982\u7387&#xff08;4 \u5e27\u8ffd\u52a0\u5f0f\u52a8\u56fe&#xff09;<\/p>\n<p>8 \u4e2a\u5019\u9009\u7684\u6700\u7ec8\u6982\u7387&#xff08;\u70ed\u529b\u56fe&#xff09;\u5982\u56fe 10-4 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233347-6a921adb1e153.png\" alt=\"Softmax \u6982\u7387\u70ed\u529b\u56fe\" \/><\/p>\n<p>\u56fe10-4 Softmax \u540e\u7684\u6982\u7387&#xff1a;\u989c\u8272\u8d8a\u6df1\u6982\u7387\u8d8a\u9ad8&#xff08;\u5de6&#xff1a;\u70ed\u529b\u56fe&#xff1b;\u53f3&#xff1a;\u6e29\u5ea6\u5bf9\u6bd4&#xff09;<\/p>\n<ul>\n<li>\u6674 43.2%\u2014\u2014\u4e00\u5bb6\u72ec\u5927<\/li>\n<li>\u591a 12.2%\u3001\u9634 9.9%\u3001\u96e8 9.5%\u2014\u2014\u7b2c\u4e8c\u68af\u961f&#xff0c;\u90fd\u662f\u5408\u7406\u5929\u6c14\u63cf\u8ff0<\/li>\n<li>\u96ea 8.2%\u3001\u98ce 7.2%\u2014\u2014\u8fb9\u7f18\u5019\u9009<\/li>\n<li>\u4eca 5.7%\u3001\u5f88 4.1%\u2014\u2014\u966a\u8dd1<\/li>\n<\/ul>\n<p>\u4e3a\u4ec0\u4e48\u300c\u4eca\u300d\u8fd9\u4e48\u4f4e&#xff1f;\u56e0\u4e3a**\u300c\u4eca\u5929\u300d\u5df2\u7ecf\u5728\u8f93\u5165\u91cc\u4e86**\u2014\u2014\u6ce8\u610f\u529b\u673a\u5236\u8ba9\u300c&#xff1f;\u300d\u5438\u6536\u8fc7\u300c\u4eca\u5929\u300d\u7684\u4fe1\u606f&#xff0c;\u6a21\u578b\u77e5\u9053\u65f6\u95f4\u9650\u5b9a\u5df2\u7ecf\u4ea4\u4ee3\u8fc7&#xff0c;\u7b54\u6848\u4e0d\u9700\u8981\u518d\u8bf4\u4e00\u904d&#034;\u4eca\u5929&#034;\u3002\u4e3a\u4ec0\u4e48\u300c\u5f88\u300d\u57ab\u5e95&#xff1f;\u56e0\u4e3a\u300c\u600e\u4e48\u6837\u300d\u89c4\u5b9a\u7684\u662f\u63cf\u8ff0\u6027\u8bcd\u6027&#xff0c;\u526f\u8bcd\u5f00\u5934&#xff08;\u201c\u5f88\u6674\u201d&#xff1f;&#xff09;\u8bed\u6cd5\u4e0a\u52c9\u5f3a\u3001\u8bed\u4e49\u4e0a\u522b\u626d\u3002\u7bc79 \u7684 6 \u6761\u7ea6\u675f\u94fe&#xff0c;\u5728\u6982\u7387\u5206\u5e03\u4e0a\u5168\u90e8\u5151\u73b0&#xff1a;<\/p>\n<p>\u65f6\u95f4\u9650\u5b9a&#xff08;\u4e0d\u8bf4&#034;\u4eca\u5929&#034;\u4e86&#xff09;\u2713 \u4e3b\u4f53\u9501\u5b9a&#xff08;\u8bf4\u7684\u662f\u897f\u5b89\u4e0d\u662f\u522b\u5904&#xff09;\u2713 \u7ed3\u6784\u9ecf\u5408&#xff08;&#034;\u897f\u5b89\u7684\u5929\u6c14&#034;\u662f\u5b8c\u6574\u4e3b\u8bed&#xff09;\u2713 \u9886\u57df\u9501\u5b9a&#xff08;\u5019\u9009\u5168\u662f\u6c14\u8c61\u8bcd&#xff09;\u2713 \u8bcd\u6027\u9501\u5b9a&#xff08;\u63cf\u8ff0\u6027\u5f00\u5934&#xff09;\u2713 \u5f00\u59cb\u5f00\u5173&#xff08;d1 &#061; 2.85 \u5df2\u7ecf\u6309\u4e0b&#xff09;<\/p>\n<h3>4. \u9009 token&#xff1a;\u4e09\u79cd\u7b56\u7565<\/h3>\n<p>\u6982\u7387\u6709\u4e86&#xff0c;\u600e\u4e48\u9009\u51fa\u90a3\u4e2a token&#xff1f;\u4e09\u79cd\u4e3b\u6d41\u7b56\u7565&#xff0c;\u5982\u56fe 10-5 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233349-6a921add239d8.png\" alt=\"\u9009token\u7b56\u7565\" \/><\/p>\n<p>\u56fe10-5 \u62ff\u5230\u6982\u7387\u4e4b\u540e\u600e\u4e48\u9009&#xff1a;\u4e09\u79cd\u7b56\u7565<\/p>\n<ul>\n<li>\u8d2a\u5fc3\u89e3\u7801&#xff1a;\u6c38\u8fdc\u9009\u6982\u7387\u6700\u9ad8\u7684\u2014\u2014\u5fc5\u9009\u300c\u6674\u300d\u3002\u6bcf\u6b21\u8f93\u51fa\u5b8c\u5168\u4e00\u6837&#xff0c;\u786e\u5b9a\u4f46\u5446\u677f&#xff0c;\u8fde\u7eed\u751f\u6210\u65f6\u5bb9\u6613\u9677\u5165\u91cd\u590d\u5faa\u73af\u3002\u9002\u5408\u4ee3\u7801\u3001\u6570\u5b66\u3002<\/li>\n<li>Top-k \u91c7\u6837&#xff1a;\u53ea\u5728\u524d k \u4e2a\u5019\u9009\u91cc\u968f\u673a\u62bd\u3002\u6bd4\u5982 k&#061;2&#xff1a;\u53d6\u6674\u3001\u591a&#xff0c;\u91cd\u65b0\u5f52\u4e00\u5316\u6210 78% \/ 22%\u2014\u2014\u591a\u6570\u65f6\u5019\u9009\u6674&#xff0c;\u5076\u5c14\u9009\u591a\u3002k \u662f\u786c\u95e8\u69db&#xff0c;\u5206\u5e03\u5f88\u5e73\u65f6\u5019\u9009\u4f1a\u663e\u5f97\u592a\u5c11\u3002<\/li>\n<li>Top-p \u91c7\u6837&#xff08;nucleus&#xff09;&#xff1a;\u6309\u6982\u7387\u964d\u5e8f\u7d2f\u52a0&#xff0c;\u7d2f\u79ef\u5230 p&#xff08;\u6bd4\u5982 0.9&#xff09;\u5c31\u505c&#xff0c;\u5728\u622a\u65ad\u7684\u96c6\u5408\u91cc\u62bd\u3002\u5019\u9009\u6570\u968f\u5206\u5e03\u81ea\u9002\u5e94&#xff1a;\u5206\u5e03\u5c16\u65f6\u5019\u9009\u5c11&#xff0c;\u5e73\u65f6\u5019\u9009\u591a\u3002\u5f53\u524d\u5404\u5bb6 API \u7684\u9ed8\u8ba4\u9009\u9879\u3002<\/li>\n<\/ul>\n<p>**\u6e29\u5ea6&#xff08;Temperature&#xff09;**\u662f\u91c7\u6837\u524d\u7684\u5206\u5e03\u8c03\u8282\u65cb\u94ae&#xff1a;\u628a logits \u9664\u4ee5 T \u518d Softmax\u3002\u56fe 10-4 \u53f3\u4fa7\u662f\u4e09\u79cd\u6e29\u5ea6\u7684\u5bf9\u6bd4\u2014\u2014T&#061;0.5 \u65f6\u300c\u6674\u300d\u653e\u5927\u5230 78.6%&#xff08;\u4fdd\u5b88&#xff09;&#xff0c;T&#061;2.0 \u65f6\u538b\u5e73\u5230 25.0%&#xff08;\u653e\u98de&#xff09;\u3002\u6e29\u5ea6\u4e0d\u6539\u5019\u9009\u6392\u5e8f&#xff0c;\u53ea\u6539&#034;\u96c6\u4e2d\u5ea6&#034;\u3002<\/p>\n<p>\u672c\u7cfb\u5217\u6f14\u793a\u7528\u8d2a\u5fc3&#xff1a;\u9996 token &#061; \u300c\u6674\u300d\u3002<\/p>\n<h3>5. \u9996 token \u8bde\u751f<\/h3>\n<p>\u628a\u5168\u94fe\u8def\u4e32\u4e00\u904d&#xff0c;\u8fd9\u662f\u6574\u4e2a\u7cfb\u5217\u7b49\u4e86 10 \u7bc7\u7684\u65f6\u523b&#xff1a;<\/p>\n<li>\u7bc72&#xff1a;\u300c\u4eca\u5929\u897f\u5b89\u7684\u5929\u6c14\u600e\u4e48\u6837&#xff1f;\u300d\u2192 6 \u4e2a token [5237, 23872, 301, 16652, 19602, 1148]<\/li>\n<li>\u7bc73&#xff1a;\u67e5\u5d4c\u5165\u8868 \u2192 6\u00d74096<\/li>\n<li>\u7bc74&#xff1a;RoPE \u628a\u4f4d\u7f6e\u65cb\u8fdb\u5411\u91cf<\/li>\n<li>\u7bc75~8&#xff1a;\u8fc7\u7b2c 1 \u4e2a Block\u2014\u2014\u5f52\u4e00\u5316\u3001\u6ce8\u610f\u529b\u4ea4\u6362\u4fe1\u606f\u3001\u6b8b\u5dee\u4fdd\u5e95\u3001FFN \u6df1\u52a0\u5de5<\/li>\n<li>\u7bc79&#xff1a;\u518d\u8fc7 31 \u5c42 \u2192 \u8f93\u51fa\u77e9\u9635&#xff0c;\u300c&#xff1f;\u300d\u884c d1 \u5168\u9762\u63a5\u7ba1<\/li>\n<li>\u672c\u7bc7&#xff1a;\u53d6\u300c&#xff1f;\u300d\u884c \u2192 \u4e58 lm_head \u5f97 129,280 \u4e2a\u5206\u6570 \u2192 Softmax \u2192 \u300c\u6674\u300d\u4ee5 43.2% \u80dc\u51fa<\/li>\n<p>\u4ece\u300c\u4eca\u5929\u897f\u5b89\u7684\u5929\u6c14\u600e\u4e48\u6837&#xff1f;\u300d\u5230\u300c\u6674\u300d\u2014\u2014\u4e00\u4e2a token \u8bde\u751f\u4e86\u3002\u8fd9\u4e0d\u662f\u68c0\u7d22\u3001\u4e0d\u662f\u67e5\u8868&#xff0c;\u800c\u662f 80.4 \u4ebf\u4e2a\u53c2\u6570\u63a5\u529b\u52a0\u5de5\u51fa\u6765\u7684\u6982\u7387\u9009\u62e9\u3002\u56de\u7b54\u7684\u5f00\u5934&#xff0c;\u5c31\u6b64\u843d\u5730\u3002<\/p>\n<h3>6. \u81ea\u56de\u5f52&#xff1a;\u7b2c\u4e8c\u4e2a\u5b57\u600e\u4e48\u6765<\/h3>\n<p>\u4e00\u4e2a token \u663e\u7136\u4e0d\u591f\u2014\u2014\u7528\u6237\u8981\u7684\u662f\u5b8c\u6574\u7684\u5929\u6c14\u64ad\u62a5\u3002\u81ea\u56de\u5f52&#xff08;autoregressive&#xff09;&#xff1a;\u628a\u521a\u751f\u6210\u7684\u300c\u6674\u300d\u62fc\u56de\u8f93\u5165\u53e5\u5c3e&#xff0c;\u8f93\u5165\u4ece 6 \u4e2a token \u53d8\u6210 7 \u4e2a&#xff0c;\u518d\u5b8c\u6574\u8d70\u4e00\u904d\u524d\u5411&#xff08;32 \u5c42 \u2192 \u53d6\u6700\u540e\u4e00\u884c \u2192 lm_head \u2192 Softmax \u2192 \u9009 token&#xff09;&#xff0c;\u5f97\u5230\u7b2c\u4e8c\u4e2a token\u300c\u5929\u300d\u3002\u5faa\u73af\u5f80\u590d&#xff0c;\u50cf\u591a\u7c73\u8bfa\u9aa8\u724c&#xff0c;\u5982\u56fe 10-6 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233351-6a921adf663c6.png\" alt=\"\u81ea\u56de\u5f52\u5faa\u73af\" \/><\/p>\n<p>\u56fe10-6 \u81ea\u56de\u5f52&#xff1a;\u9996 token \u62fc\u56de\u53e5\u5c3e&#xff0c;\u751f\u6210\u7b2c\u4e8c\u4e2a\u5b57<\/p>\n<p>\u7528\u4f2a\u4ee3\u7801\u8868\u8fbe&#xff1a;<\/p>\n<p>&#096;&#096;&#096;python<br \/>\ntokens &#061; \u5206\u8bcd(&#034;\u4eca\u5929\u897f\u5b89\u7684\u5929\u6c14\u600e\u4e48\u6837&#xff1f;&#034;)   # 6 \u4e2a<br \/>\nwhile \u672a\u9047\u5230 EOS and \u957f\u5ea6\u672a\u8d85\u9650:<br \/>\n    out_matrix &#061; transformer_32\u5c42(\u5d4c\u5165(tokens))<br \/>\n    v &#061; out_matrix[-1]              # \u53d6\u6700\u540e\u4e00\u884c<br \/>\n    logits &#061; v &#064; lm_head            # \u8bcd\u8868\u5206\u6570<br \/>\n    probs &#061; softmax(logits \/ T)     # \u6982\u7387<br \/>\n    next_tok &#061; \u91c7\u6837(probs)           # \u8d2a\u5fc3 \/ top-k \/ top-p<br \/>\n    tokens.append(next_tok)          # \u62fc\u56de\u53e5\u5c3e<br \/>\n\u56de\u7b54 &#061; \u53cd\u67e5\u8bcd\u8868(tokens[6:])           # \u6674\u5929&#xff0c;\u2026\u2026<br \/>\n&#096;&#096;&#096;<\/p>\n<p>\u6ce8\u610f\u5faa\u73af\u4f53\u7684\u6bcf\u4e00\u8f6e\u90fd\u8981\u8fc7\u5b8c\u6574\u7684 32 \u5c42\u2014\u2014\u751f\u6210\u662f\u9010 token \u7684&#xff0c;\u6bcf\u4e2a\u5b57\u90fd\u662f\u4e00\u6b21\u5168\u91cf\u524d\u5411\u3002\u8fd9\u5e26\u6765\u4e86\u4e00\u4e2a\u660e\u663e\u7684\u6d6a\u8d39&#xff0c;\u4e0b\u4e00\u8282\u89e3\u51b3\u3002<\/p>\n<h3>7. KV-Cache&#xff1a;\u65e7 token \u7684 K\/V \u4e0d\u7528\u91cd\u7b97<\/h3>\n<h4>7.1 \u6d6a\u8d39\u5728\u54ea<\/h4>\n<p>\u751f\u6210\u300c\u5929\u300d\u65f6\u8f93\u5165\u662f 7 \u4e2a token&#xff0c;\u6734\u7d20\u505a\u6cd5 7 \u4e2a\u5168\u90e8\u8fc7 32 \u5c42\u3002\u4f46\u4ed4\u7ec6\u60f3&#xff1a;\u524d 6 \u4e2a token \u7684 K\u3001V \u5411\u91cf&#xff0c;\u548c\u4e0a\u4e00\u8f6e\u7b97\u51fa\u6765\u7684\u4e00\u4e2a\u6570\u90fd\u4e0d\u5dee\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48&#xff1f;\u7bc77 \u8bb2\u8fc7\u56e0\u679c\u63a9\u7801&#xff1a;\u6bcf\u4e2a token \u53ea\u80fd\u770b\u89c1\u81ea\u5df1\u548c\u5de6\u8fb9\u7684 token\u3002\u300c\u6674\u300d\u62fc\u5728\u53e5\u5c3e&#xff0c;\u6539\u53d8\u4e0d\u4e86\u65e7 token \u7684\u89c6\u91ce\u2014\u2014\u300c\u897f\u5b89\u300d\u8be5\u770b\u8c01\u8fd8\u662f\u770b\u8c01&#xff0c;\u5b83\u7684 K\/V \u548c\u6ce8\u610f\u529b\u7ed3\u679c\u7eb9\u4e1d\u4e0d\u52a8\u3002\u8fd9\u662f\u6570\u5b66\u4e0a\u7684\u7b49\u4ef7&#xff0c;\u4e0d\u662f\u8fd1\u4f3c\u3002<\/p>\n<h4>7.2 \u7f13\u5b58\u65b9\u6848<\/h4>\n<p>KV-Cache \u7684\u505a\u6cd5&#xff1a;\u628a\u6bcf\u4e00\u5c42\u7b97\u51fa\u7684 K\u3001V \u7f13\u5b58\u4e0b\u6765&#xff1b;\u4e0b\u4e00\u6b65\u53ea\u7b97\u65b0 token \u4e00\u4e2a\u7684 Q\u3001K\u3001V\u2014\u2014\u65b0 K\/V \u8ffd\u52a0\u8fdb\u7f13\u5b58&#xff0c;\u65b0 Q \u548c\u5168\u90e8\u7f13\u5b58 K \u7b97\u6ce8\u610f\u529b\u3002\u5bf9\u6bd4\u6548\u679c\u5982\u56fe 10-7 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233353-6a921ae1b75fa.png\" alt=\"KV-Cache\" \/><\/p>\n<p>\u56fe10-7 KV-Cache&#xff1a;\u7f13\u5b58\u6bcf\u5c42\u7684 K\/V&#xff0c;\u65b0 token \u53ea\u7b97\u81ea\u5df1\u7684 Q\/K\/V<\/p>\n<p>\u4ece\u77e9\u9635\u89c6\u89d2\u770b\u7f13\u5b58\u6269\u5145&#xff1a;\u751f\u6210\u300c\u6674\u300d\u4e4b\u524d&#xff0c;K \u7f13\u5b58\u662f 6\u00d74&#xff1b;\u300c\u6674\u300d\u62fc\u8fdb\u6765\u540e&#xff0c;\u53ea\u65b0\u7b97\u5b83\u90a3\u4e00\u884c&#xff0c;\u8ffd\u52a0\u6210 7\u00d74\u2014\u2014\u524d 6 \u884c\u539f\u5c01\u4e0d\u52a8&#xff0c;\u5982\u56fe 10-8 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233356-6a921ae48a715.png\" alt=\"KV\u7f13\u5b58\u6269\u5145\u70ed\u529b\u56fe\" \/><\/p>\n<p>\u56fe10-8 KV \u7f13\u5b58\u7684\u6269\u5145&#xff1a;\u4ece 6\u00d74 \u5230 7\u00d74\u2014\u2014\u65e7\u7684\u9010\u683c\u4e0d\u52a8&#xff0c;\u65b0\u7684\u6574\u884c\u8ffd\u52a0&#xff08;\u989c\u8272\u6df1\u6d45 &#061; \u6570\u503c\u5927\u5c0f&#xff09;<\/p>\n<p>\u4f2a\u4ee3\u7801&#xff1a;<\/p>\n<p>&#096;&#096;&#096;python<br \/>\nkv_cache &#061; []                       # \u6bcf\u5c42\u4e00\u4efd (K, V)<br \/>\n# \u9996 token&#xff1a;\u5168\u91cf\u8ba1\u7b97&#xff0c;K\/V \u5168\u90e8\u5165\u7f13\u5b58<br \/>\nout, kv_cache &#061; forward_32\u5c42(\u5d4c\u5165(tokens), cache&#061;None)<br \/>\n# \u540e\u7eed token&#xff1a;\u53ea\u7b97\u65b0\u7684 1 \u4e2a<br \/>\nfor \u6bcf\u4e00\u6b65:<br \/>\n    out, kv_cache &#061; forward_32\u5c42(\u5d4c\u5165(\u65b0token), cache&#061;kv_cache)<br \/>\n    # \u5185\u90e8&#xff1a;\u65b0 Q \u00d7 \u7f13\u5b58 K \u2192 \u6ce8\u610f\u529b&#xff1b;\u65b0 K\/V \u8ffd\u52a0\u8fdb\u7f13\u5b58<br \/>\n&#096;&#096;&#096;<\/p>\n<p>\u628a\u56fe 10-6 \u548c\u56fe 10-7 \u7684\u673a\u5236\u5408\u8d77\u6765&#xff0c;\u5982\u56fe 10-9 \u6240\u793a&#xff08;4 \u5e27\u5faa\u73af\u52a8\u56fe&#xff09;&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233358-6a921ae6c4580.gif\" alt=\"\u81ea\u56de\u5f52+KV-Cache \u52a8\u56fe\" \/><\/p>\n<p>\u56fe10-9 \u81ea\u56de\u5f52\u751f\u6210 &#043; KV-Cache \u5168\u8fc7\u7a0b\u52a8\u56fe<\/p>\n<h4>7.3 \u6536\u76ca\u4e0e\u4ee3\u4ef7<\/h4>\n<p>\u6536\u76ca&#xff1a;\u751f\u6210\u7b2c N \u4e2a token \u7684\u6bcf\u6b65\u8ba1\u7b97\u91cf&#xff0c;\u4ece&#034;\u5168\u90e8 N \u4e2a token \u8fc7 32 \u5c42&#034;\u964d\u5230&#034;1 \u4e2a\u65b0 token \u8fc7 32 \u5c42&#034;\u3002\u957f\u56de\u7b54\u7684\u8ba1\u7b97\u91cf\u4ece\u5e73\u65b9\u7ea7\u964d\u56de\u8fd1\u7ebf\u6027\u2014\u2014\u8fd9\u662f\u6240\u6709\u5927\u6a21\u578b\u63a8\u7406\u5f15\u64ce\u7684\u6807\u914d\u4f18\u5316&#xff0c;\u6ca1\u6709\u5b83&#xff0c;\u9010 token \u751f\u6210\u7684\u5ef6\u8fdf\u4f1a\u968f\u56de\u7b54\u53d8\u957f\u6025\u5267\u6076\u5316\u3002<\/p>\n<p>\u4ee3\u4ef7&#xff1a;\u7f13\u5b58\u8981\u5360\u663e\u5b58\u3002\u7c97\u7565\u516c\u5f0f&#xff1a;2 \u00d7 \u5c42\u6570 \u00d7 \u5e8f\u5217\u957f\u5ea6 \u00d7 \u5bbd\u5ea6&#xff08;K \u548c V \u4e24\u4efd&#xff09;\u3002\u5bf9 LLaMA-3-8B&#xff1a;2 \u00d7 32 \u5c42 \u00d7 \u957f\u5ea6 \u00d7 4096 \u7ef4\u2014\u201432K \u4e0a\u4e0b\u6587\u65f6 KV-Cache \u5c31\u8981\u5360\u7ea6 8GB&#xff08;fp16&#xff09;&#xff0c;\u957f\u4e0a\u4e0b\u6587\u7684\u663e\u5b58\u5927\u5934\u3002\u7bc76 \u57cb\u7684\u4f0f\u7b14\u5728\u6b64\u56de\u6536\u2014\u2014\u600e\u4e48\u7ed9 KV-Cache \u7626\u8eab&#xff1f;\u4e1a\u754c\u6709\u4e24\u628a\u5200\u3002<\/p>\n<h4>7.4 GQA \u4e0e MLA&#xff1a;\u7ed9 KV-Cache \u7626\u8eab\u7684\u4e24\u628a\u5200<\/h4>\n<p>\u7b2c\u4e00\u628a\u5200&#xff1a;GQA&#xff08;\u5206\u7ec4\u67e5\u8be2\u6ce8\u610f\u529b&#xff0c;Grouped-Query Attention&#xff09;\u2014\u2014\u4ece&#034;\u5934\u6570&#034;\u4e0b\u624b\u3002<\/p>\n<p>\u7bc76 \u8bb2\u8fc7&#xff1a;\u6807\u51c6 MHA&#xff08;\u591a\u5934\u6ce8\u610f\u529b&#xff09;\u91cc 32 \u4e2a Q \u5934\u914d 32 \u7ec4 K\/V \u5934\u3002GQA \u7684\u601d\u8def&#xff1a;Q \u5934\u4fdd\u6301 32 \u4e2a\u4e0d\u52a8&#xff0c;K\/V \u5934\u780d\u5230 8 \u7ec4&#xff0c;\u6bcf 4 \u4e2a Q \u5934\u5171\u4eab 1 \u7ec4 K\/V\u3002\u6ce8\u610f\u529b\u7684\u8ba1\u7b97\u7ed3\u6784\u51e0\u4e4e\u4e0d\u53d8&#xff08;Q \u548c K \u7684\u4e58\u6cd5\u7167\u505a&#xff09;&#xff0c;\u4f46\u7f13\u5b58\u91cc\u6bcf\u5c42\u53ea\u9700\u5b58 8 \u7ec4 K\/V\u2014\u2014\u7f13\u5b58\u76f4\u63a5\u7701 4 \u500d\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u6562\u5171\u4eab&#xff1f;\u56e0\u4e3a\u5b9e\u9a8c\u53d1\u73b0&#xff1a;\u4e0d\u540c Q \u5934\u5173\u6ce8\u7684 K\/V \u6a21\u5f0f\u6709\u5927\u91cf\u91cd\u53e0\u2014\u2014\u4f60\u67e5&#034;\u4eca\u5929\u662f\u65f6\u95f4&#034;\u3001\u4ed6\u67e5&#034;\u4eca\u5929\u662f\u65e5\u5b50&#034;&#xff0c;\u7528\u540c\u4e00\u4efd&#034;\u4eca\u5929&#034;\u7684 K\/V \u5b8c\u5168\u591f\u7528\u3002GQA \u7531 Ainslie et al. 2023 \u63d0\u51fa&#xff08;\u300aGQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints\u300b&#xff09;&#xff0c;LLaMA-2\/3\u3001Mistral\u3001Qwen \u5168\u7cfb\u91c7\u7528&#xff08;\u7bc76 \u51fa\u73b0\u7684&#034;W_K \u662f 4096\u00d71024 \u800c\u4e0d\u662f 4096\u00d74096&#034;&#xff0c;\u5c31\u662f GQA \u7684\u75d5\u8ff9\u2014\u2014\u53c2\u6570\u91cf\u4e5f\u968f\u4e4b\u7701\u4e86 4 \u500d&#xff09;\u3002<\/p>\n<p>\u66f4\u6fc0\u8fdb\u7684 MQA&#xff08;Multi-Query&#xff0c;Shazeer 2019&#xff09;\u53ea\u7559 1 \u7ec4 K\/V&#xff08;\u7701 32 \u500d&#xff09;&#xff0c;\u4f46\u7cbe\u5ea6\u635f\u5931\u504f\u5927&#xff0c;\u73b0\u5728\u5c11\u7528\u2014\u2014GQA \u662f\u7cbe\u5ea6\u4e0e\u7701\u5b58\u7684\u5e73\u8861\u70b9\u3002<\/p>\n<p>\u7b2c\u4e8c\u628a\u5200&#xff1a;MLA&#xff08;\u591a\u5934\u6f5c\u5728\u6ce8\u610f\u529b&#xff0c;Multi-head Latent Attention&#xff09;\u2014\u2014\u4ece&#034;\u7ef4\u5ea6&#034;\u4e0b\u624b&#xff0c;DeepSeek-V2\/V3 \u7684\u62db\u724c\u8bbe\u8ba1\u3002<\/p>\n<p>GQA \u53ea\u662f\u628a K\/V \u4ece 32 \u7ec4\u780d\u5230 8 \u7ec4&#xff0c;\u6bcf\u7ec4\u8fd8\u662f 128 \u7ef4\u3002MLA \u66f4\u72e0&#xff1a;\u6839\u672c\u4e0d\u7f13\u5b58 K\/V \u672c\u8eab&#xff0c;\u7f13\u5b58\u4e00\u4e2a 576 \u7ef4\u7684&#034;\u6f5c\u5728\u5411\u91cf&#034;\u3002<\/p>\n<p>\u539f\u7406\u4e00\u53e5\u8bdd&#xff1a;\u8bad\u7ec3\u65f6\u8ba9\u6a21\u578b\u5b66\u4f1a\u628a 4096 \u7ef4\u7684\u4e0a\u4e0b\u6587\u538b\u7f29\u6210 512 \u7ef4\u6f5c\u5728\u8868\u793a&#xff08;\u5916\u52a0 64 \u7ef4 RoPE \u4f4d\u7f6e\u4fe1\u606f&#xff09;&#xff0c;\u7528\u65f6\u518d\u89e3\u538b\u56de K\/V\u3002\u7c7b\u6bd4&#xff1a;\u4e0d\u5b58\u6574\u672c\u4e66&#xff0c;\u5b58\u4e00\u672c&#034;\u6458\u8981&#034;\u2014\u2014\u63a8\u7406\u65f6\u6309\u6458\u8981\u91cd\u5efa\u9700\u8981\u7684\u5185\u5bb9\u3002\u4ee3\u4ef7\u662f\u8ba1\u7b97\u591a\u4e00\u6b65&#034;\u89e3\u538b&#034;&#xff0c;\u6362\u6765\u7684\u662f\u6bcf token \u6bcf\u5c42\u7f13\u5b58\u4ece 8192 \u4e2a\u6570\u964d\u5230\u7ea6 576 \u4e2a&#xff0c;\u51cf\u5c11\u7ea6 93%&#xff08;DeepSeek-V2 \u8bba\u6587\u300aDeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model\u300b\u7684\u5b9e\u6d4b\u53e3\u5f84&#xff09;\u2014\u2014\u8fd9\u5c31\u662f DeepSeek \u6562\u505a\u8d85\u957f\u4e0a\u4e0b\u6587\u7684\u5e95\u6c14\u4e4b\u4e00\u3002<\/p>\n<p>\u56db\u79cd\u65b9\u6848\u5bf9\u8d26&#xff08;\u4ee5 4096 \u5bbd\u300132 \u5934\u3001\u6bcf\u5934 128 \u7ef4\u4e3a\u4f8b&#xff0c;\u6bcf token \u6bcf\u5c42\u7684 KV \u7f13\u5b58\u91cf&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u65b9\u6848K\/V \u5934\u6570\u7f13\u5b58\u7ef4\u5ea6&#xff08;\u00d72 \u4efd&#xff09;\u76f8\u5bf9 MHA\u4ee3\u8868\u6a21\u578b<\/tr>\n<tbody>\n<tr>\n<td>MHA<\/td>\n<td>32 \u7ec4<\/td>\n<td>2 \u00d7 4096 &#061; 8192<\/td>\n<td>1\u00d7<\/td>\n<td>\u539f\u59cb Transformer \/ BERT<\/td>\n<\/tr>\n<tr>\n<td>MQA<\/td>\n<td>1 \u7ec4<\/td>\n<td>2 \u00d7 128 &#061; 256<\/td>\n<td>1\/32<\/td>\n<td>PaLM \u7b49&#xff08;\u5c11\u7528&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>GQA-8<\/td>\n<td>8 \u7ec4<\/td>\n<td>2 \u00d7 1024 &#061; 2048<\/td>\n<td>1\/4<\/td>\n<td>LLaMA-3 \/ Mistral \/ Qwen<\/td>\n<\/tr>\n<tr>\n<td>MLA<\/td>\n<td>\u6f5c\u5728\u538b\u7f29<\/td>\n<td>\u2248 576 &#043; 64<\/td>\n<td>\u22481\/14&#xff08;\u51cf 93%&#xff09;<\/td>\n<td>DeepSeek-V3 \/ R1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u886810-2 \u56db\u79cd\u6ce8\u610f\u529b\u7684 KV-Cache \u5bf9\u6bd4&#xff1a;\u90a3\u4e9b&#034;\u770b\u4e0d\u61c2\u7684\u538b\u7f29\u8bbe\u8ba1&#034;&#xff0c;\u672c\u8d28\u4e0a\u90fd\u662f\u5728\u7ed9 KV-Cache \u7626\u8eab<\/p>\n<h3>8. \u6536\u5b98&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u4e00\u4e2a token<\/h3>\n<h4>8.1 \u5341\u7bc7\u65c5\u7a0b<\/h4>\n<p>\u628a 10 \u7bc7\u4e32\u6210\u4e00\u6761\u7ebf&#xff0c;\u5982\u56fe 10-10 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233359-6a921ae73c0ac.png\" alt=\"\u7cfb\u5217\u6536\u5b98\u5168\u666f\" \/><\/p>\n<p>\u56fe10-10 \u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u4e00\u4e2a token&#xff1a;10 \u7bc7\u7684\u5b8c\u6574\u65c5\u7a0b<\/p>\n<ul>\n<li>\u7bc71 \u7528\u4e00\u6761\u8fc7\u539f\u70b9\u7684\u76f4\u7ebf&#xff08;1 \u4e2a\u53c2\u6570&#xff09;\u51fa\u53d1&#xff0c;\u7bc71 \u672b\u52a0\u622a\u8ddd&#xff08;2 \u4e2a&#xff09;<\/li>\n<li>\u7bc72 \u5206\u8bcd\u2014\u2014\u53e5\u5b50\u53d8\u6210 token \u5e8f\u5217&#xff1b;\u7bc73 \u5d4c\u5165\u67e5\u8868&#xff08;5.3 \u4ebf&#xff09;<\/li>\n<li>\u7bc74 RoPE&#xff1b;\u7bc75 Block \u516d\u6b65&#xff1b;\u7bc76 QKV&#xff1b;\u7bc77 \u6ce8\u610f\u529b&#xff1b;\u7bc78 FFN\u2014\u2014\u7ec4\u4ef6\u9010\u4e2a\u4e0a\u9f50<\/li>\n<li>\u7bc79 \u5806 32 \u5c42 &#043; \u8f93\u51fa\u77e9\u9635&#xff08;75.1 \u4ebf&#xff09;&#xff1b;\u7bc710 lm_head &#043; Softmax&#xff08;80.4 \u4ebf&#xff09;\u2192 \u300c\u6674\u300d<\/li>\n<\/ul>\n<p>\u4e00\u53e5\u8bdd\u603b\u7ed3\u7cfb\u5217&#xff1a;\u5927\u6a21\u578b &#061; \u628a\u300c\u4e00\u884c\u4e58\u4e00\u5217\u300d\u8fd9\u4e2a\u52a8\u4f5c&#xff0c;\u5728 80 \u4ebf\u4e2a\u6570\u5b57\u4e0a\u91cd\u590d\u51e0\u4e07\u4ebf\u6b21&#xff0c;\u518d\u8ba9\u4e0b\u4e00\u4e2a token \u4ece\u6982\u7387\u91cc\u8bde\u751f\u3002<\/p>\n<h4>8.2 230B \u7684\u6700\u540e\u4e00\u73af<\/h4>\n<p>\u7bc79 \u627f\u8bfa\u8fc7&#xff1a;\u7bc710 \u7ed3\u5c3e\u56de\u8865 230B \u7684\u95ed\u73af\u3002\u73b0\u5728\u6240\u6709\u7ec4\u4ef6\u90fd\u5728\u624b\u4e0a\u4e86&#xff0c;\u53ef\u4ee5\u628a\u5b83\u8bf4\u900f&#xff1a;<\/p>\n<p>\u8c46\u5305 Seed-1.6 \u7684 230B \u548c\u672c\u7cfb\u5217\u7684 80.4 \u4ebf\u5171\u4eab\u5168\u90e8\u539f\u7406\u2014\u2014\u5206\u8bcd\u3001\u5d4c\u5165\u3001RoPE\u3001\u6ce8\u610f\u529b\u3001FFN\u3001\u6b8b\u5dee\u3001\u5806\u53e0\u3001lm_head\u3001Softmax\u3001\u81ea\u56de\u5f52\u3001KV-Cache&#xff0c;\u4e00\u4e2a\u7ec4\u4ef6\u90fd\u4e0d\u591a\u3002\u533a\u522b\u53ea\u5728\u4e09\u4e2a\u65cb\u94ae&#xff1a;<\/p>\n<table>\n<tr>LLaMA-3-8B&#xff08;\u672c\u7cfb\u5217\u5bf9\u8d26\u57fa\u51c6&#xff09;Seed-1.6&#xff08;\u7bc71 \u89c4\u6a21\u611f\u8d77\u70b9&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>\u5bbd\u5ea6<\/td>\n<td>4096<\/td>\n<td>\u7ea6 7168<\/td>\n<\/tr>\n<tr>\n<td>\u6df1\u5ea6<\/td>\n<td>32 \u5c42<\/td>\n<td>\u6570\u5341\u5c42<\/td>\n<\/tr>\n<tr>\n<td>FFN<\/td>\n<td>\u6bcf\u5c42 1 \u4e2a<\/td>\n<td>\u6bcf\u5c42\u82e5\u5e72\u4e13\u5bb6&#xff0c;\u6bcf token \u6311\u7740\u6fc0\u6d3b<\/td>\n<\/tr>\n<tr>\n<td>\u603b\u53c2\u6570<\/td>\n<td>8.03B<\/td>\n<td>230B<\/td>\n<\/tr>\n<tr>\n<td>\u5355 token \u6fc0\u6d3b<\/td>\n<td>8.03B&#xff08;\u5168\u6fc0\u6d3b&#xff09;<\/td>\n<td>23B&#xff08;\u7a00\u758f\u6fc0\u6d3b&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u886810-3 \u7a20\u5bc6 8B \u4e0e MoE 230B&#xff1a;\u540c\u4e00\u5957\u539f\u7406\u7684\u4e24\u79cd\u914d\u6bd4<\/p>\n<p>MoE \u7684&#034;230B \u603b\u53c2\u6570\u300123B \u6fc0\u6d3b&#034;&#xff0c;\u7ffb\u8bd1\u8fc7\u6765\u5c31\u662f&#xff1a;\u6a21\u578b\u8bb0\u5f97\u591a&#xff08;230B \u7684\u77e5\u8bc6\u5b58\u91cf&#xff09;&#xff0c;\u4f46\u6bcf\u6b21\u53ea\u60f3\u5c11&#xff08;23B \u7684\u8ba1\u7b97\u91cf&#xff09;\u2014\u2014\u50cf\u4e00\u4e2a\u85cf\u4e66 230 \u4e07\u518c\u7684\u56fe\u4e66\u9986&#xff0c;\u6bcf\u6b21\u67e5\u8be2\u53ea\u52a8 23 \u4e07\u518c\u76f8\u5173\u7684\u4e66\u67b6\u3002KV-Cache \u4f18\u5316\u7684\u4e5f\u662f\u540c\u4e00\u4ef6\u4e8b\u7684\u4e24\u9762&#xff1a;\u77e5\u8bc6\u8981\u591a\u5b58\u3001\u8ba1\u7b97\u8981\u5c11\u505a\u3002<\/p>\n<p>\u7bc71 \u90a3\u4e2a&#034;\u628a 230B \u780d\u5230 1 \u4e2a\u53c2\u6570&#034;\u7684\u601d\u60f3\u5b9e\u9a8c&#xff0c;\u81f3\u6b64\u5b8c\u5168\u95ed\u5408&#xff1a;\u780d\u6389\u7684\u662f\u89c4\u6a21&#xff0c;\u7559\u4e0b\u7684\u662f\u539f\u7406&#xff1b;\u52a0\u56de\u6765\u7684\u662f\u8d26\u672c&#xff0c;\u770b\u6e05\u7684\u662f\u9aa8\u67b6\u3002<\/p>\n<h4>8.3 \u5199\u5728\u7cfb\u5217\u5b8c\u7ed3<\/h4>\n<p>\u5199\u8fd9\u4e2a\u7cfb\u5217\u7684\u521d\u8877\u5f88\u7b80\u5355&#xff1a;\u5e02\u9762\u4e0a\u7684 Transformer \u6559\u7a0b&#xff0c;\u8981\u4e48\u4ece\u8bba\u6587\u516c\u5f0f\u5f00\u59cb\u529d\u9000&#xff0c;\u8981\u4e48\u505c\u5728&#034;\u6ce8\u610f\u529b\u5c31\u50cf\u67e5\u5b57\u5178&#034;\u7684\u6bd4\u55bb\u5c42\u9762\u3002\u6211\u60f3\u8bd5\u8bd5\u7b2c\u4e09\u6761\u8def\u2014\u2014\u5047\u8bbe\u8bfb\u8005\u53ea\u5b66\u8fc7\u9ad8\u7b49\u6570\u5b66&#xff0c;\u80fd\u4e0d\u80fd\u628a&#034;\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2a token&#034;\u8fd9\u4ef6\u4e8b&#xff0c;\u4ece y&#061;wx \u4e00\u8def\u63a8\u5230\u5e95\u3002<\/p>\n<p>10 \u7bc7\u5199\u4e0b\u6765&#xff0c;\u6700\u5927\u7684\u611f\u53d7\u662f&#xff1a;\u5927\u6a21\u578b\u6ca1\u6709\u9b54\u6cd5&#xff0c;\u53ea\u6709\u5de5\u7a0b\u3002\u6240\u8c13\u7684&#034;\u667a\u80fd\u6d8c\u73b0&#034;&#xff0c;\u62c6\u5f00\u770b\u662f\u5d4c\u5165\u67e5\u8868\u3001\u4e00\u884c\u4e58\u4e00\u5217\u3001\u6307\u6570\u5f52\u4e00\u5316\u8fd9\u4e9b\u672c\u79d1\u751f\u90fd\u80fd\u770b\u61c2\u7684\u52a8\u4f5c&#xff1b;\u590d\u6742\u5ea6\u4e0d\u5728\u4efb\u4f55\u5355\u4e2a\u7ec4\u4ef6&#xff0c;\u800c\u5728&#034;\u7b80\u5355\u52a8\u4f5c \u00d7 \u5929\u6587\u6570\u5b57\u7684\u91cd\u590d&#034;\u3002<\/p>\n<p>\u5982\u679c\u8fd9\u4e2a\u7cfb\u5217\u8ba9\u4f60\u4e0b\u6b21\u518d\u770b\u5230&#034;\u6ce8\u610f\u529b\u5934&#034;\u201cKV-Cache\u201d&#034;MoE \u7a00\u758f\u6fc0\u6d3b&#034;\u8fd9\u4e9b\u8bcd\u65f6&#xff0c;\u8111\u5b50\u91cc\u6d6e\u73b0\u7684\u662f\u5177\u4f53\u7684\u5c0f\u77e9\u9635\u548c\u5b83\u7684\u8ba1\u7b97\u8fc7\u7a0b\u2014\u2014\u8fd9\u4e2a\u7cfb\u5217\u7684\u4efb\u52a1\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u4ece\u4e00\u6761\u76f4\u7ebf&#xff0c;\u5230\u300c\u6674\u300d\u3002\u8c22\u8c22\u4e00\u8def\u770b\u5230\u8fd9\u91cc\u3002<\/p>\n<h3>9. \u4e0b\u4e00\u7cfb\u5217\u9884\u544a&#xff1a;17 \u4e2a\u95ee\u9898<\/h3>\n<p>\u5199\u5b8c\u8fd9\u4e2a\u7cfb\u5217&#xff0c;\u6700\u81ea\u7136\u7684\u611f\u53d7\u662f&#xff1a;&#034;\u4e00\u4e2a token \u5982\u4f55\u8bde\u751f&#034;\u8bb2\u6e05\u695a\u4e86&#xff0c;\u4f46\u56f4\u7ed5\u5927\u6a21\u578b\u8fd8\u6709\u4e00\u5927\u7247\u6ca1\u8bb2\u7684\u5730\u3002\u987a\u7740\u672c\u7cfb\u5217\u7684\u601d\u8def\u5f80\u4e0b\u95ee&#xff0c;\u81f3\u5c11\u8fd8\u6709 17 \u4e2a\u597d\u95ee\u9898\u3002<\/p>\n<p>\u5148\u629b\u4e09\u4e2a\u6700\u624e\u5fc3\u7684&#xff1a;<\/p>\n<p>\u95ee\u9898\u4e00&#xff1a;\u5927\u6a21\u578b\u5176\u5b9e\u4e0d\u77e5\u9053\u4eca\u5929\u662f\u51e0\u53f7\u3002 \u5b83\u7684\u77e5\u8bc6\u51bb\u7ed3\u5728\u8bad\u7ec3\u622a\u6b62\u90a3\u5929\u2014\u2014\u4f60\u95ee&#034;\u4eca\u5929\u897f\u5b89\u7684\u5929\u6c14&#034;&#xff0c;\u5b83\u7b54\u7684&#034;\u6674&#034;\u53ea\u662f\u6982\u7387\u4e0a\u6700\u50cf\u7b54\u6848\u7684\u8bcd&#xff0c;\u4e0d\u662f\u771f\u5929\u6c14\u3002\u600e\u4e48\u8ba9\u5b83\u611f\u77e5&#034;\u4eca\u5929&#034;&#xff1f;\u6700\u76f4\u63a5\u7684\u65b9\u6848\u662f Prompt&#xff1a;\u628a\u65e5\u671f\u3001\u5929\u6c14\u6570\u636e\u585e\u8fdb\u4e0a\u4e0b\u6587&#xff08;\u672c\u7cfb\u5217\u7684\u8f93\u5165\u53e5\u5c31\u662f\u8fd9\u4e48\u6765\u7684&#xff09;&#xff1b;\u66f4\u8fdb\u4e00\u6b65\u662f MCP \u5de5\u5177\u8c03\u7528&#xff1a;\u8ba9\u6a21\u578b\u81ea\u5df1\u51b3\u5b9a&#034;\u5148\u67e5\u5929\u6c14 API&#xff0c;\u518d\u56de\u7b54&#034;\u3002<\/p>\n<p>\u95ee\u9898\u4e8c&#xff1a;\u56de\u7b54\u603b\u662f\u300c\u6674\u300d&#xff0c;\u600e\u4e48\u7834&#xff1f; \u5c31\u7b97\u63a5\u4e86\u5de5\u5177&#xff0c;\u6a21\u578b\u4e5f\u53ef\u80fd\u5077\u61d2\u6bcf\u6b21\u90fd\u8fd4\u56de\u540c\u4e00\u4e2a\u7b54\u6848\u3002RAG&#xff08;\u68c0\u7d22\u589e\u5f3a\u751f\u6210&#xff09;\u4ece\u4f60\u7684\u79c1\u6709\u5927\u6587\u6863\u91cc\u68c0\u7d22\u771f\u5b9e\u6750\u6599\u518d\u56de\u7b54&#xff1b;AI-Memory \u8ba9\u6a21\u578b\u8bb0\u4f4f\u4f60\u662f\u8c01\u3001\u4f60\u4e4b\u524d\u8bf4\u8fc7\u4ec0\u4e48\u2014\u2014\u53d8\u5e9f\u4e3a\u5b9d&#xff0c;\u4ece&#034;\u5783\u573e\u6570\u636e&#034;\u91cc\u63d0\u53d6&#034;\u5b9d\u8d1d\u77e5\u8bc6&#034;\u3002<\/p>\n<p>\u95ee\u9898\u4e09&#xff1a;\u672c\u7cfb\u5217\u53ea\u7ed9\u4e86 6 \u4e2a token \u7684\u4e0a\u4e0b\u6587&#xff0c;\u771f\u5b9e\u5bf9\u8bdd\u52a8\u8f84\u51e0\u4e07 token\u2014\u2014\u4e0a\u4e0b\u6587\u7206\u70b8\u4e86\u600e\u4e48\u529e&#xff1f; SubAgent&#xff08;\u5b50\u4ee3\u7406&#xff09;\u7684\u601d\u8def&#xff1a;\u4e3b Agent \u53ea\u7559\u6458\u8981&#xff0c;\u7ec6\u8282\u6d3e\u7ed9\u5b50 Agent \u5904\u7406\u3002<\/p>\n<p>\u628a\u8fd9 17 \u4e2a\u95ee\u9898\u5168\u90e8\u5217\u51fa&#xff0c;\u6309&#034;\u61c2\u4f60 \/ \u6709\u636e \/ \u770b\u89c1\u66f4\u591a \/ \u53d8\u5f3a&#034;\u5206\u6210\u56db\u7ec4&#xff0c;\u5982\u56fe 10-11 \u6240\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233401-6a921ae9d0637.png\" alt=\"\u4e0b\u4e00\u7cfb\u5217\u4e3b\u9898\u5730\u56fe\" \/><\/p>\n<p>\u56fe10-11 \u4e0b\u4e00\u7cfb\u5217\u5019\u9009\u4e3b\u9898&#xff1a;17 \u4e2a\u95ee\u9898\u5206\u56db\u7ec4&#xff08;\u987a\u5e8f\u548c\u5185\u5bb9\u90fd\u53ef\u80fd\u8c03\u6574&#xff0c;\u6b22\u8fce\u7559\u8a00\u70b9\u5355&#xff09;<\/p>\n<ul>\n<li>A \u7ec4\u00b7\u8ba9\u6a21\u578b\u66f4\u61c2\u4f60&#xff1a;01 \u5927\u6a21\u578b\u5982\u4f55\u611f\u77e5\u3010\u4eca\u5929\u3011&#xff08;Prompt&#xff09;\u300103 \u5982\u4f55\u8ba9\u5bf9\u8bdd\u66f4\u62df\u4eba&#xff08;\u89d2\u8272\u626e\u6f14&#xff09;\u300106 \u8ba9\u5927\u6a21\u578b\u4e86\u89e3\u7ec6\u8282&#xff08;Skill&#xff09;\u300108 \u8ba9\u5927\u6a21\u578b\u9002\u914d\u4f60&#xff08;AI-Memory&#xff09;<\/li>\n<li>B \u7ec4\u00b7\u8ba9\u6a21\u578b\u6709\u636e\u53ef\u4f9d&#xff1a;02 \u56de\u7b54\u603b\u662f\u3010\u6674\u3011\u600e\u4e48\u529e&#xff08;MCP&#xff09;\u300109 \u4ece\u5783\u573e\u91cc\u63d0\u53d6\u5b9d\u8d1d&#xff08;RAG&#xff09;\u300107 \u4e0a\u4e0b\u6587\u7206\u70b8\u4e86\u600e\u4e48\u529e&#xff08;SubAgent&#xff09;<\/li>\n<li>C \u7ec4\u00b7\u8ba9\u6a21\u578b\u770b\u89c1\u66f4\u591a&#xff1a;04 \u5927\u6a21\u578b\u5982\u4f55\u770b\u56fe&#xff08;\u591a\u6a21\u6001-\u56fe\u7247&#xff09;\u300105 \u5927\u6a21\u578b\u5982\u4f55\u611f\u77e5\u65f6\u95f4&#xff08;\u591a\u6a21\u6001-\u89c6\u9891&#xff09;\u300116 \u64cd\u4f5c\u4f60\u7684\u7535\u8111&#xff08;GUI\/Computer Use&#xff09;\u300115 \u591a\u4e2a\u5927\u6a21\u578b\u534f\u4f5c&#xff08;Multi-Agent&#xff09;\u300117 Agent \u793e\u4f1a&#xff08;\u65af\u5766\u798f AI \u5c0f\u9547&#xff09;<\/li>\n<li>D \u7ec4\u00b7\u8ba9\u6a21\u578b\u53d8\u5f3a&#xff1a;10 \u77e5\u8bc6\u4ece\u54ea\u6765&#xff08;\u9884\u8bad\u7ec3&#xff09;\u300111 \u5b66\u4f1a\u542c\u6307\u4ee4&#xff08;SFT&#xff09;\u300112 \u5b66\u4f1a\u504f\u597d&#xff08;RL&#xff09;\u300113 \u81ea\u5df1\u53d8\u5f3a&#xff08;\u81ea\u8fdb\u5316&#xff09;\u300114 \u5feb\u601d\u8003\u4e0e\u6162\u601d\u8003&#xff08;\u63a8\u7406\u6a21\u578b&#xff09;<\/li>\n<\/ul>\n<p>A\/B \u7ec4\u56de\u7b54&#034;\u600e\u4e48\u7528\u597d\u4e00\u4e2a\u5927\u6a21\u578b&#034;&#xff08;\u5e94\u7528\u5c42&#xff09;&#xff0c;C \u7ec4\u56de\u7b54&#034;\u600e\u4e48\u6269\u5c55\u5b83\u7684\u611f\u5b98\u4e0e\u624b\u8db3&#034;&#xff08;\u591a\u6a21\u6001\u4e0e Agent&#xff09;&#xff0c;D \u7ec4\u56de\u7b54&#034;\u600e\u4e48\u70bc\u6210\u4e00\u4e2a\u5927\u6a21\u578b&#034;&#xff08;\u8bad\u7ec3\u5c42&#xff09;\u3002\u672c\u7cfb\u5217&#xff08;\u539f\u7406\u7bc7&#xff09;\u56de\u7b54\u7684\u662f&#034;\u5b83\u600e\u4e48\u5de5\u4f5c&#034;\u2014\u2014\u56db\u4e2a\u7cfb\u5217\u8fde\u8d77\u6765&#xff0c;\u5c31\u662f\u4ece\u539f\u7406\u5230\u5e94\u7528\u7684\u5b8c\u6574\u5730\u56fe\u3002<\/p>\n<p>\u987a\u5e8f\u548c\u5185\u5bb9\u90fd\u53ef\u80fd\u8c03\u6574\u3002\u60f3\u5148\u770b\u54ea\u4e2a&#xff1f;\u8bc4\u8bba\u533a\u70b9\u5355\u3002<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u8fd9\u4e00\u7bc7\u8ba9\u9996 token \u771f\u6b63\u8bde\u751f&#xff0c;\u7cfb\u5217\u6536\u5b98&#xff1a;<\/p>\n<ul>\n<li>\u53d6\u6700\u540e\u4e00\u884c&#xff1a;\u56e0\u679c\u8bed\u8a00\u6a21\u578b\u53ea\u6709\u6700\u540e\u4e00\u4e2a token&#xff08;\u300c&#xff1f;\u300d&#xff09;\u89c1\u8fc7\u5168\u90e8\u524d\u6587&#xff0c;\u5b83\u7684\u884c\u5411\u91cf v&#xff08;1\u00d74096&#xff09;\u662f\u9884\u6d4b\u9996 token \u7684\u552f\u4e00\u539f\u6599&#xff1b;d1&#061;2.85 \u6b63\u662f\u7bc79 \u7684&#034;\u8be5\u4f5c\u7b54&#034;\u5f00\u5173<\/li>\n<li>lm_head&#xff1a;v \u00d7 W_L&#xff08;4096\u00d7129,280 &#061; 5.3 \u4ebf\u53c2\u6570&#xff09;&#061; 129,280 \u4e2a logits\u2014\u2014\u5168\u7cfb\u5217\u6700\u540e\u4e00\u6b21\u300c\u4e00\u884c\u4e58\u4e00\u5217\u300d&#xff0c;\u6f14\u793a 8 \u4e2a\u5019\u9009\u4e2d\u300c\u6674\u300d2.20 \u6700\u9ad8<\/li>\n<li>Softmax&#xff1a;\u624b\u7b97\u4e09\u6b65&#xff08;\u9010\u683c e^z \u2192 \u6c42\u548c 20.91 \u2192 \u76f8\u9664&#xff09;\u2014\u2014\u6307\u6570\u653e\u5927\u5dee\u8ddd&#xff0c;\u300c\u6674\u300d9.03\/20.91 &#061; 43.2% \u4e00\u5bb6\u72ec\u5927&#xff1b;\u7bc79 \u7684 6 \u6761\u7ea6\u675f\u94fe\u5728\u6982\u7387\u4e0a\u5168\u90e8\u5151\u73b0&#xff08;&#034;\u4eca&#034;\u4ec5 5.7% \u56e0\u4e3a\u65f6\u95f4\u5df2\u4ea4\u4ee3\u3001&#034;\u5f88&#034;\u57ab\u5e95\u56e0\u4e3a\u8bcd\u6027\u4e0d\u7b26&#xff09;<\/li>\n<li>\u9009 token \u4e09\u7b56\u7565&#xff1a;\u8d2a\u5fc3&#xff08;\u786e\u5b9a&#xff09;\u3001top-k&#xff08;\u786c\u95e8\u69db&#xff09;\u3001top-p&#xff08;\u81ea\u9002\u5e94\u622a\u65ad&#xff09;&#xff1b;\u6e29\u5ea6\u662f\u5206\u5e03\u96c6\u4e2d\u5ea6\u65cb\u94ae&#xff08;T&#061;0.5\u219278.6%&#xff0c;T&#061;2.0\u219225.0%&#xff09;<\/li>\n<li>\u9996 token &#061;\u300c\u6674\u300d&#xff1a;\u4ece\u5206\u8bcd\u5230\u8f93\u51fa&#xff0c;10 \u7bc7\u5168\u94fe\u8def\u7b2c\u4e00\u6b21\u5b8c\u6574\u8dd1\u901a<\/li>\n<li>\u81ea\u56de\u5f52&#xff1a;\u8f93\u51fa\u62fc\u56de\u8f93\u5165&#xff0c;\u9010 token \u751f\u6210\u5b8c\u6574\u56de\u7b54&#xff1b;\u6bcf\u6b65\u90fd\u662f\u5168\u91cf\u524d\u5411<\/li>\n<li>KV-Cache&#xff1a;\u56e0\u679c\u63a9\u7801\u4fdd\u8bc1\u65e7 K\/V \u6c38\u4e0d\u53d8 \u2192 \u7f13\u5b58\u590d\u7528\u3001\u53ea\u7b97\u65b0 token&#xff0c;\u957f\u56de\u7b54\u4ece\u5e73\u65b9\u7ea7\u964d\u56de\u8fd1\u7ebf\u6027&#xff1b;\u4ee3\u4ef7\u662f\u663e\u5b58&#xff08;2\u00d7\u5c42\u6570\u00d7\u957f\u5ea6\u00d7\u5bbd\u5ea6&#xff09;<\/li>\n<li>GQA \u4e0e MLA&#xff08;\u7626\u8eab\u4e24\u628a\u5200&#xff09;&#xff1a;GQA \u4ece\u5934\u6570\u4e0b\u624b&#xff08;32 Q \u5934\u5171\u4eab 8 \u7ec4 K\/V&#xff0c;\u7f13\u5b58\u7701 4 \u500d&#xff0c;LLaMA-3\/Mistral\/Qwen \u5168\u7cfb&#xff09;&#xff1b;MLA \u4ece\u7ef4\u5ea6\u4e0b\u624b&#xff08;\u7f13\u5b58 576 \u7ef4\u6f5c\u5728\u5411\u91cf\u800c\u975e K\/V \u672c\u8eab&#xff0c;\u51cf\u7ea6 93%&#xff0c;DeepSeek \u62db\u724c&#xff09;&#xff1b;MHA\/MQA\/GQA\/MLA \u56db\u65b9\u6848\u5bf9\u8d26<\/li>\n<li>230B \u95ed\u73af&#xff1a;Seed-1.6 \u4e0e LLaMA-3-8B \u5171\u4eab\u5168\u90e8\u539f\u7406&#xff0c;\u533a\u522b\u53ea\u662f\u5bbd\u5ea6\/\u6df1\u5ea6\/MoE \u4e09\u65cb\u94ae\u2014\u2014\u201c\u77e5\u8bc6\u591a\u5b58\u3001\u8ba1\u7b97\u5c11\u505a\u201d<\/li>\n<li>\u4e0b\u4e00\u7cfb\u5217\u9884\u544a&#xff1a;17 \u4e2a\u95ee\u9898\u5206\u56db\u7ec4\u2014\u2014\u61c2\u4f60&#xff08;Prompt\/\u89d2\u8272\u626e\u6f14\/Skill\/Memory&#xff09;\u3001\u6709\u636e&#xff08;MCP\/RAG\/SubAgent&#xff09;\u3001\u770b\u89c1\u66f4\u591a&#xff08;\u591a\u6a21\u6001\/Agent\/GUI\/AI \u5c0f\u9547&#xff09;\u3001\u53d8\u5f3a&#xff08;\u9884\u8bad\u7ec3\/SFT\/RL\/\u81ea\u8fdb\u5316\/\u5feb\u6162\u601d\u8003&#xff09;<\/li>\n<\/ul>\n<h3>\u7cfb\u5217\u5b8c\u7ed3<\/h3>\n<p>\u539f\u7406\u7bc7\u5230\u6b64\u5b8c\u7ed3&#xff0c;\u5e94\u7528\u4e0e\u8bad\u7ec3\u7bc7&#xff08;17 \u4e2a\u5019\u9009\u4e3b\u9898&#xff0c;\u89c1\u7b2c 9 \u8282&#xff09;\u62e9\u65e5\u5f00\u5199\u3002<\/p>\n<p>\u7cfb\u5217\u76ee\u5f55&#xff08;\u5168 10 \u7bc7&#xff09;&#xff1a;<\/p>\n<li>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u9ad8\u7ef4\u7a7a\u95f4<\/li>\n<li>\u5206\u8bcd\u4e0e token \u8868<\/li>\n<li>\u9690\u85cf\u5c42\u4e0e\u5d4c\u5165<\/li>\n<li>\u4f4d\u7f6e\u7f16\u7801 RoPE<\/li>\n<li>Transformer Block \u5168\u666f\u4e0e\u5c42\u5f52\u4e00\u5316<\/li>\n<li>QKV \u4e09\u5251\u5ba2<\/li>\n<li>\u6ce8\u610f\u529b\u6743\u91cd\u4e0e\u591a\u5934\u673a\u5236<\/li>\n<li>\u6b8b\u5dee\u8fde\u63a5\u4e0e\u524d\u9988\u7f51\u7edc<\/li>\n<li>\u8f93\u51fa\u77e9\u9635\u4e0e\u591a\u5c42\u5806\u53e0<\/li>\n<li>\u9996 token \u8bde\u751f\u4e0e KV-Cache&#xff08;\u5f53\u524d\u7bc7&#xff0c;\u5b8c\u7ed3&#xff09;<\/li>\n<hr \/>\n<p>\u7248\u6743\u58f0\u660e&#xff1a;\u672c\u6587\u4e3a\u535a\u4e3b\u539f\u521b\u6587\u7ae0&#xff0c;\u9075\u5faa CC 4.0 BY-SA \u7248\u6743\u534f\u8bae&#xff0c;\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u548c\u672c\u58f0\u660e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache \u5efa\u8bae\u5148\u770b&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u4e5d&#xff09;&#xff1a;\u8f93\u51fa\u77e9\u9635\u4e0e\u591a\u5c42\u5806\u53e0 \u4e0a\u4e00\u7bc7\u62ff\u5230\u4e86\u8f93\u51fa\u77e9\u9635&#xff0c;6 \u6761\u7ea6\u675f\u94fe\u5168\u90e8\u6c89\u6dc0\u5728\u6700\u540e\u4e00\u884c\u3002\u8fd9\u4e00\u7bc7\u8ba9\u9996 token \u771f\u6b63\u8bde\u751f\u2014\u2014\u7136\u540e\u662f\u81ea\u56de\u5f52\u3001KV-Cache&#xff0c;\u4ee5\u53ca\u6574\u4e2a\u7cfb\u5217\u7684\u6536\u5b98\u3002 \u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&amp;#xff08<\/p>\n","protected":false},"author":2,"featured_media":97219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10187,10782,11153,11154,66,841],"topic":[],"class_list":["post-97230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-codingplan","tag-kv-cache","tag-softmax","tag-11154","tag-ai","tag-transformer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/97230.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache \u5efa\u8bae\u5148\u770b&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u4e5d&#xff09;&#xff1a;\u8f93\u51fa\u77e9\u9635\u4e0e\u591a\u5c42\u5806\u53e0 \u4e0a\u4e00\u7bc7\u62ff\u5230\u4e86\u8f93\u51fa\u77e9\u9635&#xff0c;6 \u6761\u7ea6\u675f\u94fe\u5168\u90e8\u6c89\u6dc0\u5728\u6700\u540e\u4e00\u884c\u3002\u8fd9\u4e00\u7bc7\u8ba9\u9996 token \u771f\u6b63\u8bde\u751f\u2014\u2014\u7136\u540e\u662f\u81ea\u56de\u5f52\u3001KV-Cache&#xff0c;\u4ee5\u53ca\u6574\u4e2a\u7cfb\u5217\u7684\u6536\u5b98\u3002 \u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&amp;#xff08\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/97230.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-28T23:34:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233341-6a921ad54728a.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97230.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/97230.html\",\"name\":\"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-28T23:34:06+00:00\",\"dateModified\":\"2026-08-28T23:34:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/97230.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/97230.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97230.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/97230.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u5341&#xff09;&#xff1a;\u9996 token \u8bde\u751f\u4e0e KV-Cache \u5efa\u8bae\u5148\u770b&#xff1a;\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&#xff08;\u4e5d&#xff09;&#xff1a;\u8f93\u51fa\u77e9\u9635\u4e0e\u591a\u5c42\u5806\u53e0 \u4e0a\u4e00\u7bc7\u62ff\u5230\u4e86\u8f93\u51fa\u77e9\u9635&#xff0c;6 \u6761\u7ea6\u675f\u94fe\u5168\u90e8\u6c89\u6dc0\u5728\u6700\u540e\u4e00\u884c\u3002\u8fd9\u4e00\u7bc7\u8ba9\u9996 token \u771f\u6b63\u8bde\u751f\u2014\u2014\u7136\u540e\u662f\u81ea\u56de\u5f52\u3001KV-Cache&#xff0c;\u4ee5\u53ca\u6574\u4e2a\u7cfb\u5217\u7684\u6536\u5b98\u3002 \u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken&amp;#xff08","og_url":"https:\/\/www.wsisp.com\/helps\/97230.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-28T23:34:06+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260828233341-6a921ad54728a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/97230.html","url":"https:\/\/www.wsisp.com\/helps\/97230.html","name":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-28T23:34:06+00:00","dateModified":"2026-08-28T23:34:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/97230.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/97230.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/97230.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece\u4e00\u6761\u76f4\u7ebf\u5230\u5927\u6a21\u578b\u8f93\u51fa\u4e00\u4e2atoken\uff08\u5341\uff09\uff1a\u9996 token \u8bde\u751f\u4e0e KV-Cache"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=97230"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97230\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/97219"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=97230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=97230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=97230"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=97230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}