{"id":94636,"date":"2026-08-14T22:24:57","date_gmt":"2026-08-14T14:24:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/94636.html"},"modified":"2026-08-14T22:24:57","modified_gmt":"2026-08-14T14:24:57","slug":"%e5%86%85%e6%a0%b8%e9%87%8c%e6%b2%a1%e6%9c%89%e6%99%ba%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/94636.html","title":{"rendered":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd"},"content":{"rendered":"<h2>\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd<\/h2>\n<p>\u2014\u2014 \u4e00\u4e2a\u7f51\u7edc\u5de5\u7a0b\u5e08\u62c6\u89e3 LLM \u63a8\u7406\u5f15\u64ce\u7684\u8bb0\u5f55<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u8d77\u70b9&#xff1a;\u597d\u5947\u4e0e\u6050\u60e7<\/h3>\n<p>\u6211\u4eec\u7814\u7a76\u7f51\u7edc\u5de5\u7a0b\u7684\u3002\u8fd9\u4e2a\u9886\u57df\u7684\u8bad\u7ec3\u65b9\u5f0f\u548c\u5927\u591a\u6570\u8f6f\u4ef6\u5de5\u7a0b\u5e08\u4e0d\u4e00\u6837&#xff1a;\u6211\u4eec\u5047\u8bbe\u4e00\u5207\u90fd\u4f1a\u51fa\u9519&#xff0c;\u7136\u540e\u8ba9\u7cfb\u7edf\u5728\u51fa\u9519\u65f6\u4ecd\u7136\u53ef\u7528\u3002<\/p>\n<p>\u4e22\u5305\u3001\u5ef6\u8fdf\u3001\u62e5\u585e\u7a97\u53e3\u7684\u6bcf\u4e00\u6b21\u6536\u7f29\u548c\u6269\u5f20\u3001RTT \u7684\u6bcf\u4e00\u6b21\u6296\u52a8\u2014\u2014\u8fd9\u4e9b\u4e0d\u662f\u5f02\u5e38&#xff0c;\u662f\u5e38\u6001\u3002\u6211\u804c\u4e1a\u751f\u6daf\u91cc\u6700\u719f\u6089\u7684\u753b\u9762&#xff0c;\u662f tcpdump \u91cc\u90a3\u4e9b\u7ea2\u8272\u7684\u91cd\u4f20\u6807\u8bb0&#xff0c;\u662f ss \u8f93\u51fa\u91cc\u4e0d\u65ad\u53d8\u5316\u7684 cwnd&#xff0c;\u662f\u6df1\u591c\u76ef\u7740 ping \u7684\u7edf\u8ba1\u7ed3\u679c\u7b49\u4e00\u4e2a 99.9% \u5206\u4f4d\u6570\u6536\u655b\u3002\u7269\u7406\u4e16\u754c\u7684\u5b9e\u65f6\u4e0d\u786e\u5b9a\u6027&#xff0c;\u662f\u6211\u6bcf\u5929\u6253\u4ea4\u9053\u7684\u4e1c\u897f\u3002\u5b83\u4e0d\u53ef\u9884\u6d4b\u3001\u4e0d\u53ef\u6d88\u9664\u3001\u53ea\u80fd\u6d4b\u91cf\u548c\u9002\u5e94\u3002<\/p>\n<p>\u6240\u4ee5\u5f53 LLM \u7a81\u7136\u8fdb\u5165\u6211\u7684\u89c6\u91ce\u65f6&#xff0c;\u6211\u7684\u7b2c\u4e00\u53cd\u5e94\u548c\u5927\u591a\u6570\u4eba\u4e0d\u592a\u4e00\u6837\u3002<\/p>\n<p>\u522b\u4eba\u95ee&#xff1a;\u201c\u5b83\u662f\u4e0d\u662f\u5728\u601d\u8003&#xff1f;\u201d<\/p>\n<p>\u6211\u95ee\u7684\u662f\u4e09\u4e2a\u66f4\u5de5\u7a0b\u5316\u7684\u95ee\u9898&#xff1a;<\/p>\n<li>\u5b83\u7684\u4e0d\u786e\u5b9a\u6027\u4ece\u54ea\u6765&#xff1f;\u2014\u2014 \u662f\u5185\u6838\u91cc\u6709\u67d0\u79cd\u968f\u673a\u8fc7\u7a0b&#xff0c;\u8fd8\u662f\u522b\u7684\u4e1c\u897f&#xff1f;<\/li>\n<li>\u5b83\u7684\u51b3\u7b56\u5728\u4ec0\u4e48\u6761\u4ef6\u4e0b\u53ef\u4ee5\u590d\u73b0&#xff1f;\u2014\u2014 \u5982\u679c\u6211\u7ed9\u5b83\u76f8\u540c\u7684\u8f93\u5165\u4e24\u6b21&#xff0c;\u5b83\u4f1a\u7ed9\u51fa\u76f8\u540c\u7684\u8f93\u51fa\u5417&#xff1f;<\/li>\n<li>\u5982\u679c\u5b83\u771f\u7684\u5728\u5904\u7406\u67d0\u79cd\u5b9e\u65f6\u4e0d\u786e\u5b9a\u7684\u4e1c\u897f&#xff0c;\u90a3\u5b83\u7684\u5185\u6838\u5e94\u8be5\u548c\u6211\u719f\u6089\u7684\u62e5\u585e\u63a7\u5236\u4e00\u6837&#xff0c;\u5145\u6ee1\u52a8\u6001\u535a\u5f08\u3001\u53cd\u9988\u56de\u8def\u3001\u5728\u7ebf\u9002\u5e94\u2014\u2014\u5b83\u662f\u8fd9\u6837\u7684\u5417&#xff1f;<\/li>\n<p>\u8fd9\u4e09\u4e2a\u95ee\u9898&#xff0c;\u524d\u4e24\u4e2a\u53ef\u4ee5\u7528\u5b9e\u9a8c\u56de\u7b54&#xff0c;\u7b2c\u4e09\u4e2a\u5fc5\u987b\u628a\u4e1c\u897f\u62c6\u5f00\u770b\u3002<\/p>\n<p>\u6700\u521d\u6211\u5bf9 LLM \u7684\u611f\u89c9&#xff0c;\u6df7\u5408\u7740\u656c\u754f\u3001\u6050\u60e7\u548c\u597d\u5947\u3002\u6211\u66fe\u7ecf\u5f88\u5174\u594b\u2014\u2014AI \u4e5f\u8bb8\u771f\u7684\u5f88\u5389\u5bb3&#xff0c;\u4e5f\u8bb8\u771f\u7684\u5728\u505a\u67d0\u79cd\u63a5\u8fd1\u601d\u8003\u7684\u4e8b\u60c5\u3002\u656c\u754f\u662f\u56e0\u4e3a\u5b83\u786e\u5b9e\u505a\u5230\u4e86\u4eba\u7c7b\u6587\u672c\u5904\u7406\u7684\u67d0\u79cd\u5947\u8ff9\u2014\u2014\u5b83\u80fd\u7406\u89e3\u6a21\u7cca\u7684\u3001\u6709\u6b67\u4e49\u7684\u3001\u4fe1\u606f\u4e0d\u5b8c\u5907\u7684\u8bf7\u6c42&#xff0c;\u8fd9\u5728\u5341\u5e74\u524d\u8fd8\u662f\u79d1\u5e7b\u60c5\u8282\u3002\u6050\u60e7\u662f\u56e0\u4e3a\u5b83\u8868\u73b0\u5f97\u592a\u50cf&#034;\u601d\u8003&#034;\u4e86&#xff0c;\u50cf\u5230\u8ba9\u6211\u8fd9\u79cd\u4e60\u60ef\u4e8e\u7cbe\u786e\u56e0\u679c\u7684\u4eba\u611f\u5230\u4e0d\u5b89\u3002\u597d\u5947\u662f\u56e0\u4e3a\u6211\u65e0\u6cd5\u63a5\u53d7&#034;\u5b83\u5c31\u662f\u8fd9\u4e48\u795e\u5947&#034;\u8fd9\u79cd\u56de\u7b54\u2014\u2014\u6211\u804c\u4e1a\u751f\u6daf\u5b66\u5230\u7684\u7b2c\u4e00\u8bfe\u5c31\u662f&#xff1a;\u4efb\u4f55\u770b\u8d77\u6765\u795e\u5947\u7684\u4e1c\u897f&#xff0c;\u62c6\u5f00\u4e4b\u540e\u90fd\u662f\u5e73\u51e1\u7684\u96f6\u4ef6\u5728\u6309\u89c4\u5219\u8fd0\u8f6c\u3002<\/p>\n<p>\u6211\u51b3\u5b9a\u4e0d\u6ee1\u8db3\u4e8e\u8c03\u7528 API\u3002\u8c03\u7528 API \u5c31\u50cf\u7ad9\u5728\u9ed1\u7bb1\u5916\u9762\u770b\u6307\u793a\u706f&#xff1a;\u4f60\u80fd\u770b\u5230\u5b83\u8f93\u5165\u4ec0\u4e48\u3001\u8f93\u51fa\u4ec0\u4e48&#xff0c;\u4f46\u4f60\u5bf9\u7bb1\u5b50\u5185\u90e8\u4e00\u65e0\u6240\u77e5\u3002\u5bf9\u7f51\u7edc\u5de5\u7a0b\u5e08\u6765\u8bf4&#xff0c;\u8fd9\u4e0d\u53ef\u63a5\u53d7\u3002\u6211\u5904\u7406\u8fc7\u592a\u591a&#034;\u8868\u9762\u6b63\u5e38\u3001\u5185\u90e8\u8150\u70c2&#034;\u7684\u7cfb\u7edf\u2014\u2014\u63a5\u53e3\u5c42\u4e00\u5207\u6b63\u5e38&#xff0c;\u4f46\u6df1\u5165\u4e00\u5c42\u5168\u662f\u5783\u573e\u3002\u6240\u4ee5\u6211\u51b3\u5b9a\u81ea\u5df1\u9020\u4e00\u4e2a\u63a8\u7406\u5f15\u64ce&#xff0c;\u4ece\u5e95\u5c42\u628a\u6574\u4e2a\u94fe\u8def\u4eb2\u624b\u5b9e\u73b0\u4e00\u904d\u3002<\/p>\n<p>\u8fd9\u4e00\u51b3\u5b9a&#xff0c;\u8ba9\u6211\u82b1\u4e86\u7ea6\u4e00\u4e2a\u6708\u65f6\u95f4\u3002\u8fd9\u4e00\u4e2a\u6708\u91cc&#xff0c;\u6211\u9010\u6e10\u5931\u53bb\u4e86\u5bf9 LLM \u7684\u6050\u60e7\u3002\u4e0d\u662f\u56e0\u4e3a\u5b83\u53d8\u5f97\u65e0\u5bb3&#xff0c;\u800c\u662f\u56e0\u4e3a\u6050\u60e7\u901a\u5e38\u6765\u6e90\u4e8e\u672a\u77e5\u3002\u5f53\u6211\u4eb2\u624b\u5199\u4e0b\u5b83\u7684\u6bcf\u4e00\u884c\u5185\u6838\u4ee3\u7801&#xff0c;\u5f53\u6211\u4eb2\u773c\u770b\u5230\u5b83\u7684\u6bcf\u4e00\u4e2a\u4e2d\u95f4\u72b6\u6001&#xff0c;\u6050\u60e7\u5c31\u6ca1\u6709\u4e86\u7acb\u8db3\u4e4b\u5730\u3002<\/p>\n<h3>\u4e8c\u3001\u884c\u52a8&#xff1a;\u9020\u8f6e\u5b50\u3001\u8bfb\u5185\u6838\u3001\u8dd1\u6a21\u578b<\/h3>\n<h4>2.1 \u786c\u4ef6\u4e0e\u6a21\u578b<\/h4>\n<p>\u6211\u9009\u4e86\u4e00\u53f0 AMD Ryzen 9 7945HX&#xff1a;16 \u4e2a\u7269\u7406\u6838&#xff08;32 \u7ebf\u7a0b&#xff09;&#xff0c;Zen 4 \u67b6\u6784&#xff0c;\u5b8c\u6574\u652f\u6301 AVX-512&#xff08;512 \u4f4d\u6570\u636e\u901a\u8def&#xff0c;\u5305\u62ec F\/BW\/DQ\/VL \u5168\u90e8\u5b50\u96c6&#xff09;&#xff0c;64GB DDR5-5600 \u53cc\u901a\u9053\u5185\u5b58\u3002\u8fd9\u53f0\u673a\u5668\u4e0d\u662f\u4e3a\u8dd1 LLM \u51c6\u5907\u7684&#xff0c;\u4f46\u5b83\u7684\u5185\u5b58\u5e26\u5bbd&#xff08;\u7406\u8bba 89.6GB\/s&#xff09;\u548c SIMD \u80fd\u529b\u8db3\u591f\u652f\u6491\u4e00\u4e2a\u4e2d\u578b\u6a21\u578b\u7684 CPU \u63a8\u7406\u5b9e\u9a8c\u3002<\/p>\n<p>\u6a21\u578b\u9009\u7684\u662f Qwen3.6-35B-A3B\u2014\u2014\u4e00\u4e2a 35B \u603b\u53c2\u6570\u30013B \u6fc0\u6d3b\u53c2\u6570\u7684 MoE \u67b6\u6784\u6a21\u578b\u3002\u5b83\u76f8\u5f53\u7279\u6b8a&#xff0c;\u4e0d\u662f\u6807\u51c6\u7684\u7eaf Transformer&#xff1a;<\/p>\n<ul>\n<li>40 \u5c42\u6df7\u5408\u67b6\u6784&#xff1a;30 \u5c42 Gated DeltaNet&#xff08;\u7ebf\u6027\u6ce8\u610f\u529b&#xff09;&#043; 10 \u5c42 GQA&#xff08;\u5206\u7ec4\u67e5\u8be2\u5168\u6ce8\u610f\u529b&#xff09;&#xff0c;\u4ee5&#034;3 \u4e2a DeltaNet &#043; 1 \u4e2a GQA&#034;\u7684\u6a21\u5f0f\u4ea4\u9519\u6392\u5217<\/li>\n<li>\u6bcf\u5c42\u6302\u4e00\u4e2a MoE&#xff1a;256 \u4e2a\u4e13\u5bb6&#xff0c;\u8def\u7531\u6fc0\u6d3b 8 \u4e2a&#xff0c;\u5171\u4eab\u4e13\u5bb6 1 \u4e2a&#xff1b;\u4e13\u5bb6 FFN \u4e2d\u95f4\u7ef4\u5ea6 512<\/li>\n<li>Gated DeltaNet&#xff1a;\u7ebf\u6027\u6ce8\u610f\u529b\u7684\u53d8\u4f53&#xff0c;\u7528\u72b6\u6001\u77e9\u9635 S&#xff08;128\u00d7128\u00d732 \u5934&#xff09;\u66ff\u4ee3 KV \u7f13\u5b58&#xff0c;\u542b conv1d&#xff08;\u6838\u957f 4&#xff09;&#043; \u65f6\u95f4\u6b65\u79bb\u6563\u5316 &#043; \u95e8\u63a7 RMSNorm<\/li>\n<li>\u91cf\u5316\u6df7\u5408&#xff1a;q8_0\u3001q4_k\u3001q5_k\u3001q6_k\u3001f32 \u4e94\u79cd\u683c\u5f0f\u6df7\u5408\u5b58\u50a8&#xff0c;Q4_K_XL \u6587\u4ef6\u540d\u4e0b 22.4GB \u7684 GGUF \u6587\u4ef6<\/li>\n<li>\u9690\u85cf\u7ef4 2048&#xff0c;\u8bcd\u8868 248320&#xff0c;\u539f\u751f\u4e0a\u4e0b\u6587 262144<\/li>\n<\/ul>\n<p>#mermaid-svg-cdvOEfihBX8dPyOo{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-cdvOEfihBX8dPyOo .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-cdvOEfihBX8dPyOo .error-icon{fill:#552222;}#mermaid-svg-cdvOEfihBX8dPyOo .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-cdvOEfihBX8dPyOo .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-cdvOEfihBX8dPyOo .marker{fill:#333333;stroke:#333333;}#mermaid-svg-cdvOEfihBX8dPyOo .marker.cross{stroke:#333333;}#mermaid-svg-cdvOEfihBX8dPyOo svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-cdvOEfihBX8dPyOo p{margin:0;}#mermaid-svg-cdvOEfihBX8dPyOo .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-cdvOEfihBX8dPyOo .cluster-label text{fill:#333;}#mermaid-svg-cdvOEfihBX8dPyOo .cluster-label span{color:#333;}#mermaid-svg-cdvOEfihBX8dPyOo .cluster-label span p{background-color:transparent;}#mermaid-svg-cdvOEfihBX8dPyOo .label text,#mermaid-svg-cdvOEfihBX8dPyOo span{fill:#333;color:#333;}#mermaid-svg-cdvOEfihBX8dPyOo .node rect,#mermaid-svg-cdvOEfihBX8dPyOo .node circle,#mermaid-svg-cdvOEfihBX8dPyOo .node ellipse,#mermaid-svg-cdvOEfihBX8dPyOo .node polygon,#mermaid-svg-cdvOEfihBX8dPyOo .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-cdvOEfihBX8dPyOo .rough-node .label text,#mermaid-svg-cdvOEfihBX8dPyOo .node .label text,#mermaid-svg-cdvOEfihBX8dPyOo .image-shape .label,#mermaid-svg-cdvOEfihBX8dPyOo .icon-shape .label{text-anchor:middle;}#mermaid-svg-cdvOEfihBX8dPyOo .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-cdvOEfihBX8dPyOo .rough-node .label,#mermaid-svg-cdvOEfihBX8dPyOo .node .label,#mermaid-svg-cdvOEfihBX8dPyOo .image-shape .label,#mermaid-svg-cdvOEfihBX8dPyOo .icon-shape .label{text-align:center;}#mermaid-svg-cdvOEfihBX8dPyOo .node.clickable{cursor:pointer;}#mermaid-svg-cdvOEfihBX8dPyOo .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-cdvOEfihBX8dPyOo .arrowheadPath{fill:#333333;}#mermaid-svg-cdvOEfihBX8dPyOo .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-cdvOEfihBX8dPyOo .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-cdvOEfihBX8dPyOo .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cdvOEfihBX8dPyOo .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-cdvOEfihBX8dPyOo .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cdvOEfihBX8dPyOo .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-cdvOEfihBX8dPyOo .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-cdvOEfihBX8dPyOo .cluster text{fill:#333;}#mermaid-svg-cdvOEfihBX8dPyOo .cluster span{color:#333;}#mermaid-svg-cdvOEfihBX8dPyOo div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-cdvOEfihBX8dPyOo .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-cdvOEfihBX8dPyOo rect.text{fill:none;stroke-width:0;}#mermaid-svg-cdvOEfihBX8dPyOo .icon-shape,#mermaid-svg-cdvOEfihBX8dPyOo .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cdvOEfihBX8dPyOo .icon-shape p,#mermaid-svg-cdvOEfihBX8dPyOo .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-cdvOEfihBX8dPyOo .icon-shape rect,#mermaid-svg-cdvOEfihBX8dPyOo .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cdvOEfihBX8dPyOo .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-cdvOEfihBX8dPyOo .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-cdvOEfihBX8dPyOo :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"nodeLabel\"><\/p>\n<p>Qwen3.6-35B-A3B \u67b6\u6784<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"nodeLabel\"><\/p>\n<p>token_embd 2048\u00d7248320<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>40 \u5c42&#xff08;\u91cd\u590d\u6a21\u5f0f \u00d710&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>1\u00d7 GQA \u5757<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>GQA \u6ce8\u610f\u529b16\u5934Q \/ 2\u5934KVRoPE<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>MoE256\u4e13\u5bb6\/\u6fc0\u6d3b8<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>3\u00d7 DeltaNet \u5757<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>Gated DeltaNet\u7ebf\u6027\u6ce8\u610f\u529bconv1d &#043; \u72b6\u6001S<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>MoE256\u4e13\u5bb6\/\u6fc0\u6d3b8<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>output 248320 \u7ebf\u6027\u5c42<\/p>\n<p><\/span><\/p>\n<h4>2.2 \u9020\u8f6e\u5b50&#xff1a;\u4ece GGUF \u89e3\u6790\u5230\u91c7\u6837\u5668<\/h4>\n<p>\u6211\u7ed9\u81ea\u5df1\u5b9a\u7684\u89c4\u77e9\u662f&#xff1a;\u4e0d\u53c2\u8003\u3001\u4e0d\u590d\u5236\u4efb\u4f55\u73b0\u6210\u5f15\u64ce\u7684\u5b9e\u73b0\u4ee3\u7801\u3002\u6bcf\u4e00\u884c\u5185\u6838\u4ee3\u7801\u4ece\u7b2c\u4e00\u6027\u539f\u7406\u72ec\u7acb\u63a8\u5bfc\u3001\u72ec\u7acb\u8bbe\u8ba1\u3001\u72ec\u7acb\u5b9e\u73b0\u3002\u8fd9\u5f88\u6162&#xff0c;\u4f46\u5f88\u503c\u2014\u2014\u56e0\u4e3a\u53ea\u6709\u4eb2\u624b\u63a8\u5bfc\u8fc7&#xff0c;\u4f60\u624d\u77e5\u9053\u6bcf\u4e00\u884c\u4ee3\u7801\u4e3a\u4ec0\u4e48\u957f\u8fd9\u6837\u3002<\/p>\n<p>\u6574\u4e2a\u5de5\u7a0b\u7684\u7ec4\u4ef6\u6e05\u5355&#xff08;\u6700\u7ec8\u5168\u90e8\u8dd1\u901a&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u7ec4\u4ef6\u5185\u5bb9\u6211\u5b66\u5230\u7684\u4e1c\u897f<\/tr>\n<tbody>\n<tr>\n<td>GGUF \u89e3\u6790\u5668<\/td>\n<td>\u5934\u90e8\/\u5143\u6570\u636e\/\u5f20\u91cf\u4fe1\u606f\u8868<\/td>\n<td>\u9012\u5f52\u53d8\u4f53\u7684 C&#043;&#043;17 \u5751\u3001\u8d85\u5927 tokenizer \u5143\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>\u6743\u91cd\u52a0\u8f7d<\/td>\n<td>\u5185\u5b58\u6620\u5c04 &#043; \u89c6\u56fe<\/td>\n<td>Windows CreateFileMappingW \u7684 RAII \u751f\u547d\u5468\u671f<\/td>\n<\/tr>\n<tr>\n<td>\u53cd\u91cf\u5316\u5668<\/td>\n<td>q8_0\/q4_k\/q5_k\/q6_k\/f32<\/td>\n<td>\u6bcf\u79cd\u91cf\u5316\u683c\u5f0f\u7684\u4f4d\u5e03\u5c40\u90fd\u662f\u72ec\u7acb\u7684\u5751<\/td>\n<\/tr>\n<tr>\n<td>GEMV<\/td>\n<td>\u6807\u91cf \u2192 AVX-512 \u7cbe\u8c03<\/td>\n<td>\u5e26\u5bbd\u662f\u7b2c\u4e00\u74f6\u9888&#xff0c;SIMD \u662f\u7b2c\u4e8c<\/td>\n<\/tr>\n<tr>\n<td>\u5f52\u4e00\u5316\u65cf<\/td>\n<td>RMSNorm\/\u95e8\u63a7 RMSNorm\/L2Norm<\/td>\n<td>\u9664\u53d8\u4e58\u30014 \u8def\u7d2f\u52a0\u5668<\/td>\n<\/tr>\n<tr>\n<td>\u65cb\u8f6c<\/td>\n<td>IMRoPE<\/td>\n<td>\u591a\u6a21\u6001\u5206\u6bb5\u65cb\u8f6c\u7684\u7d22\u5f15\u5730\u72f1<\/td>\n<\/tr>\n<tr>\n<td>\u5377\u79ef<\/td>\n<td>Conv1D \u6df1\u5ea6\u5377\u79ef<\/td>\n<td>\u6838\u5e03\u5c40\u4e0e\u7d22\u5f15<\/td>\n<\/tr>\n<tr>\n<td>DeltaNet<\/td>\n<td>\u72b6\u6001\u66f4\u65b0&#xff08;\u8870\u51cf\/\u8bef\u5dee\/\u5916\u79ef\/\u8bfb\u53d6&#xff09;<\/td>\n<td>S^T k \u5728\u884c\u4e3b\u5e8f\u4e0a\u7684\u5217\u5757\u7d2f\u52a0<\/td>\n<\/tr>\n<tr>\n<td>\u6ce8\u610f\u529b<\/td>\n<td>GQA &#043; KV \u7f13\u5b58<\/td>\n<td>\u5206\u7ec4\u6620\u5c04\u3001\u56e0\u679c\u63a9\u7801\u3001\u7f13\u5b58\u69fd\u4f4d<\/td>\n<\/tr>\n<tr>\n<td>MoE<\/td>\n<td>\u8def\u7531 &#043; \u4e13\u5bb6 GEMV<\/td>\n<td>partial_sort \u9009 top-8\u3001\u91cf\u5316\u4e13\u5bb6\u4e09\u7ef4\u5bfb\u5740<\/td>\n<\/tr>\n<tr>\n<td>\u91c7\u6837\u5668<\/td>\n<td>\u6e29\u5ea6\/top-k\/top-p\/\u91cd\u590d\u60e9\u7f5a<\/td>\n<td>mt19937\u3001\u7a00\u758f softmax<\/td>\n<\/tr>\n<tr>\n<td>CLI<\/td>\n<td>\u804a\u5929\u3001\u591a\u8f6e\u8bb0\u5fc6<\/td>\n<td>\u4e2d\u6587\u8f93\u51fa\u3001UTF-8 \u63a7\u5236\u53f0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6709\u4e2a\u7ec6\u8282\u503c\u5f97\u4e00\u63d0&#xff1a;\u6574\u4e2a\u4ee3\u7801\u5e93\u7528\u4e2d\u6587\u547d\u540d\u3002GEMV\u6734\u7d20\u3001\u4e13\u5bb6GEMV\u7cbe\u8c03q4k\u3001\u6fc0\u6d3bSiLU\u5411\u91cf\u7cbe\u8c03\u3001\u8def\u7531\u9009\u62e9\u3001\u63a8\u7406\u5f15\u64ce\u3001\u5c42\u6267\u884c\u5668\u3002\u8fd9\u4e0d\u662f\u6280\u672f\u59a5\u534f&#xff0c;\u662f\u4e00\u79cd\u5fc3\u7406\u4fe1\u53f7&#xff1a;\u6211\u4e0d\u6253\u7b97\u4e3a\u8fd9\u4e2a\u4e1c\u897f\u5207\u6362\u601d\u7ef4\u6a21\u5f0f\u3002\u5b83\u65e2\u7136\u5b58\u5728\u4e8e\u6211\u7684\u9879\u76ee\u91cc&#xff0c;\u5c31\u8981\u7528\u6211\u7684\u8bed\u8a00\u3002<\/p>\n<p>\u4ee3\u4ef7\u662f\u771f\u5b9e\u7684&#xff1a;<\/p>\n<ul>\n<li>MSVC \u5fc5\u987b\u52a0 \/utf-8 \u7f16\u8bd1\u9009\u9879&#xff0c;\u5426\u5219\u4e2d\u6587\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u6309 GBK \u89e3\u6790&#xff0c;\u6574\u4e2a\u7a0b\u5e8f\u4e71\u7801<\/li>\n<li>CMake \u4e0d\u5141\u8bb8\u4e2d\u6587 target \u540d&#xff0c;\u53ea\u80fd ASCII target &#043; \u4e2d\u6587 OUTPUT_NAME<\/li>\n<li>\u4ee3\u7801\u9875 936 \u7684\u63a7\u5236\u53f0\u4e0a&#xff0c;\u4efb\u4f55 UTF-8 \u4e2d\u6587\u8f93\u51fa\u90fd\u662f\u4e71\u7801&#xff0c;\u5fc5\u987b SetConsoleOutputCP(65001)&#xff1b;\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u65f6 PowerShell \u8fd8\u4f1a\u505a\u4e00\u6b21\u8f6c\u7801&#xff0c;\u4e2d\u6587\u884c\u76f4\u63a5\u4e22\u5931\u2014\u2014\u9a8c\u8bc1\u8f93\u51fa\u53ea\u80fd\u9760 cmd \u5185\u90e8\u91cd\u5b9a\u5411\u7684\u5b57\u8282\u76f4\u901a<\/li>\n<\/ul>\n<p>\u4f46\u6211\u5fcd\u4e86\u3002\u56e0\u4e3a\u8fd9\u4e9b\u90fd\u662f\u7f16\u8bd1\u5668\u548c\u5de5\u5177\u94fe\u7684\u95ee\u9898&#xff0c;\u4e0d\u662f\u6211\u7684\u95ee\u9898\u3002\u6211\u7684\u4ee3\u7801&#xff0c;\u7528\u6211\u7684\u8bed\u8a00&#xff0c;\u903b\u8f91\u6e05\u6670&#xff0c;\u8fd9\u5c31\u591f\u4e86\u3002<\/p>\n<h4>2.3 \u4f18\u5316&#xff1a;AVX-512 \u7684\u6bcf\u4e00\u5c42<\/h4>\n<p>\u4e3a\u4e86\u8ba9\u8fd9\u4e2a 22.4GB \u7684\u6a21\u578b\u5728 CPU \u4e0a\u8dd1\u8d77\u6765&#xff0c;\u6211\u628a\u6bcf\u4e2a\u70ed\u7b97\u5b50\u90fd\u505a\u4e86\u4e09\u5c42\u6f14\u8fdb&#xff1a;\u6807\u91cf&#xff08;\u6559\u5b66&#xff0c;\u5bf9\u5e94\u6570\u5b66\u516c\u5f0f&#xff09;\u2192 \u7b80\u5355\u5411\u91cf\u5316 \u2192 AVX-512 \u7cbe\u8c03&#xff08;\u751f\u4ea7&#xff09;\u3002<\/p>\n<p>GEMV \u7684\u884c\u5e76\u884c\u4e0e\u5411\u91cf\u5316\u3002GEMV \u662f\u63a8\u7406\u7684\u6700\u70ed\u7b97\u5b50\u2014\u2014\u6bcf\u5c42\u6240\u6709\u6295\u5f71\u90fd\u662f GEMV\u30022048\u00d78192 \u7684 qkv \u6295\u5f71&#xff0c;16 \u4e2a\u7269\u7406\u6838\u6309\u884c\u5207\u5206&#xff0c;\u6bcf\u4e2a\u6838\u5904\u7406\u4e00\u6279\u884c&#xff1b;\u6bcf\u884c\u5185\u90e8&#xff0c;q8_0 \u6743\u91cd\u53cd\u91cf\u5316\u548c\u4e58\u52a0\u878d\u5408\u5728\u4e00\u8d77&#xff0c;\u7528 __m512 \u4e00\u6b21\u5904\u7406 16 \u4e2a\u5143\u7d20&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ 4 \u8def\u7d2f\u52a0\u5668\u644a\u5e73\u4f9d\u8d56\u94fe&#xff08;AVX-512&#xff0c;q8_0 \u6743\u91cd&#xff09;<\/span><br \/>\n__m512 \u7d2f\u52a0<span class=\"token number\">0<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_setzero_ps<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> \u7d2f\u52a0<span class=\"token number\">1<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_setzero_ps<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n__m512 \u7d2f\u52a0<span class=\"token number\">2<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_setzero_ps<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> \u7d2f\u52a0<span class=\"token number\">3<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_setzero_ps<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>size_t \u5757 <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> \u5757 <span class=\"token operator\">&lt;<\/span> \u884c\u5757\u6570<span class=\"token punctuation\">;<\/span> \u5757 <span class=\"token operator\">&#043;&#061;<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">float<\/span> d <span class=\"token operator\">&#061;<\/span> \u534a\u7cbe\u5ea6\u8f6c\u6d6e\u70b9<span class=\"token punctuation\">(<\/span>\u5757<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">|<\/span> <span class=\"token punctuation\">(<\/span>\u5757<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ fp16 \u7f29\u653e<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> __m512 \u7f29\u653e <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_set1_ps<\/span><span class=\"token punctuation\">(<\/span>d<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ 4 \u4e2a\u5757\u8f6e\u6d41\u5582\u7ed9 4 \u4e2a\u7d2f\u52a0\u5668\u2014\u2014\u5355\u6761\u4f9d\u8d56\u94fe\u4e0a\u53ea\u6709 1 \u4e2a FMA<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>q8_0 \u53cd\u91cf\u5316\u7684\u4f4d\u64cd\u4f5c\u3002q8_0 \u6bcf\u5757 34 \u5b57\u8282&#xff1a;2 \u5b57\u8282 fp16 \u7f29\u653e\u56e0\u5b50 &#043; 32 \u4e2a int8\u3002\u53cd\u91cf\u5316 &#061; q \u00d7 d\u3002\u90a3\u4e2a fp16 \u7f29\u653e\u56e0\u5b50\u8981\u624b\u5de5\u89e3\u6790&#xff1a;\u7b26\u53f7 1 \u4f4d\u3001\u6307\u6570 5 \u4f4d\u3001\u5c3e\u6570 10 \u4f4d&#xff0c;\u4f4d\u64cd\u4f5c\u8fd8\u539f\u6210 float\u3002\u770b\u4f3c\u7b80\u5355&#xff0c;\u5751\u5728\u6b21\u6b63\u89c4\u6570\u2014\u2014f16 \u7684\u6b21\u6b63\u89c4\u503c&#xff0c;\u5c3e\u6570\u53f3\u79fb\u540e\u53ef\u80fd\u53d8\u6210 256 \u800c\u4e0d\u662f -7.6e-6&#xff0c;\u56e0\u4e3a\u65e0\u7b26\u53f7\u53d6\u8d1f\u56de\u7ed5\u4e86\u3002\u8fd9\u7c7b bug \u6700\u53ef\u6015&#xff1a;\u4e0d\u662f\u5d29\u6e83&#xff0c;\u662f\u9759\u9ed8\u7684\u6570\u503c\u9519\u8bef&#xff0c;\u5bf9\u62cd\u65f6\u5dee\u4e00\u4e2a\u6570\u91cf\u7ea7\u3002<\/p>\n<p>DeltaNet \u72b6\u6001\u66f4\u65b0\u7684\u5411\u91cf\u5316\u3002DeltaNet \u7684\u6838\u5fc3\u662f\u72b6\u6001\u77e9\u9635 S \u7684\u9012\u5f52\u66f4\u65b0&#xff08;\u7eaf\u6587\u672c\u516c\u5f0f&#xff0c;\u4e0d\u4f9d\u8d56\u516c\u5f0f\u6e32\u67d3\u5668&#xff09;&#xff1a;<\/p>\n<p>S&#039; &#061; S \u00b7 e^g &#043; k \u00b7 (v &#8211; S^T\u00b7k)^T \u00b7 \u03b2<\/p>\n<p>\u767d\u8bdd\u89e3\u91ca&#xff1a;\u72b6\u6001 S \u5148\u6574\u4f53\u4e58\u4ee5\u9057\u5fd8\u56e0\u5b50 e^g&#xff08;g \u662f\u8d1f\u503c&#xff0c;\u6240\u4ee5\u662f\u8870\u51cf\u65e7\u8bb0\u5fc6&#xff09;&#xff1b;\u7136\u540e\u7528\u65b0\u8f93\u5165 k \u4e58\u4ee5\u8bef\u5dee\u5411\u91cf (v &#8211; S^T\u00b7k) \u7684\u5916\u79ef\u5199\u5165\u65b0\u8bb0\u5fc6&#xff08;S^T\u00b7k \u662f\u628a\u65e7\u72b6\u6001\u6295\u5f71\u5230\u5f53\u524d\u952e\u4e0a&#xff0c;v \u662f\u5f53\u524d\u503c&#xff0c;\u8bef\u5dee &#061; \u65e7\u72b6\u6001\u9884\u6d4b\u4e0e\u771f\u5b9e\u503c\u7684\u5dee&#xff09;&#xff1b;\u03b2 \u662f\u66f4\u65b0\u95e8&#xff0c;\u63a7\u5236\u5199\u5165\u5f3a\u5ea6\u3002\u6570\u5b66\u4e0a\u4e94\u6b65&#xff1a;\u8870\u51cf \u2192 S^T\u00b7k \u6295\u5f71 \u2192 \u8bef\u5dee \u2192 \u5916\u79ef\u5199\u5165 \u2192 S^T\u00b7q \u8bfb\u53d6\u3002\u5411\u91cf\u5316\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\u8870\u51cf&#xff08;S \u9010\u884c\u4e58\u6807\u91cf&#xff09;\u548c\u5916\u79ef&#xff08;\u6574\u884c\u5e7f\u64ad\u4e58&#xff09;\u6309\u884c\u4e3b\u5e8f\u53cb\u597d&#xff0c;8 \u8def __m512 \u4e00\u884c\u884c\u5904\u7406<\/li>\n<li>S^T k \u548c S^T q \u662f\u5217\u70b9\u79ef\u2014\u2014\u884c\u4e3b\u5e8f\u4e0b\u8de8\u6b65\u8bbf\u95ee&#xff0c;\u7528 8 \u8def\u7d2f\u52a0\u5668\u6309\u5217\u5757\u7b97&#xff0c;\u6bcf\u5217\u5757 16 \u5217<\/li>\n<\/ul>\n<p>38ms \u2192 14ms&#xff0c;2.5 \u500d\u63d0\u901f\u3002<\/p>\n<p>\u6279\u91cf GEMV&#xff1a;\u6743\u91cd\u8bfb\u4e00\u6b21&#xff0c;B \u8def FMA\u3002\u5355\u5e8f\u5217\u89e3\u7801\u65f6&#xff0c;\u6bcf\u751f\u6210\u4e00\u4e2a token \u8981\u628a\u5168\u90e8\u6743\u91cd\u8bfb\u4e00\u904d\u3002\u4f46\u5982\u679c\u540c\u65f6\u5904\u7406 B \u4e2a\u5e8f\u5217&#xff0c;\u6743\u91cd\u53ea\u8bfb\u4e00\u6b21&#xff0c;\u5582\u7ed9 B \u4e2a\u8f93\u5165\u5411\u91cf\u5404\u81ea\u4e58\u52a0&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u6743\u91cd\u4e00\u884c\u53cd\u91cf\u5316\u4e00\u6b21&#xff0c;B \u8def\u72ec\u7acb\u7d2f\u52a0\u5668<\/span><br \/>\n__m512 \u7d2f\u52a0<span class=\"token punctuation\">[<\/span><span class=\"token number\">8<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">8<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ [\u5e8f\u5217][\u7d2f\u52a0\u5668]<\/span><br \/>\n<span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>size_t b <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> b <span class=\"token operator\">&lt;<\/span> B<span class=\"token punctuation\">;<\/span> <span class=\"token operator\">&#043;&#043;<\/span>b<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>size_t i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token operator\">&#043;&#043;<\/span>i<span class=\"token punctuation\">)<\/span> \u7d2f\u52a0<span class=\"token punctuation\">[<\/span>b<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_setzero_ps<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u53cd\u91cf\u5316\u4e00\u6b21<\/span><br \/>\n<span class=\"token keyword\">const<\/span> __m512 \u4f4eq <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">,<\/span> \u9ad8q <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ B \u8def FMA&#xff08;\u6bcf\u5e8f\u5217\u7528\u5404\u81ea\u8f93\u5165&#xff09;<\/span><br \/>\n<span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>size_t b <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> b <span class=\"token operator\">&lt;<\/span> B<span class=\"token punctuation\">;<\/span> <span class=\"token operator\">&#043;&#043;<\/span>b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    \u7d2f\u52a0<span class=\"token punctuation\">[<\/span>b<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span>\u5757\u53f7<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">_mm512_fmadd_ps<\/span><span class=\"token punctuation\">(<\/span>\u4f4eq<span class=\"token punctuation\">,<\/span> \u8f93\u5165<span class=\"token punctuation\">[<\/span>b<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> \u7d2f\u52a0<span class=\"token punctuation\">[<\/span>b<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span>\u5757\u53f7<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>MoE \u8def\u7531&#xff1a;std::partial_sort \u9009 top-8\u3002\u8def\u7531\u95e8\u63a7\u662f 2048\u00d7256 \u7684 f32 \u77e9\u9635&#xff0c;\u8f93\u51fa 256 \u4e2a logits&#xff0c;softmax \u540e\u53d6 top-8&#xff0c;\u6743\u91cd\u5f52\u4e00\u5316\u3002\u53d6 top-8 \u7528\u7684\u662f std::partial_sort\u2014\u2014\u4e0d\u662f\u5168\u6392\u5e8f&#xff0c;\u53ea\u4fdd\u8bc1\u524d 8 \u4e2a\u6709\u5e8f&#xff0c;O(n\u00b7k) \u590d\u6742\u5ea6\u3002\u5c31\u8fd9\u4e48\u7b80\u5355\u3002<\/p>\n<p>\u6743\u91cd\u9884\u70ed\u300222.4GB \u7684\u5185\u5b58\u6620\u5c04&#xff0c;\u9996\u6b21\u8bbf\u95ee\u5168\u90e8\u7f3a\u9875\u3002\u7528 64KB \u6b65\u957f\u9884\u8bfb\u4e00\u904d&#xff08;4MB \u6b65\u957f\u53ea\u89e6\u53d1\u6bcf 4MB \u9996\u5b57\u8282\u7684\u9875&#xff0c;\u786c\u4ef6\u9884\u53d6\u5668\u8865\u4e0d\u8db3&#xff09;&#xff0c;\u52a0\u8f7d\u65f6\u95f4\u4ece 1.5s \u53d8\u6210 33.8s&#xff0c;\u4f46\u63a8\u7406\u65f6\u4e0d\u518d\u6709\u51b7\u7f3a\u9875\u2014\u2014\u4ece 1.56 tok\/s \u5230 2.15 tok\/s\u3002<\/p>\n<h4>2.4 \u6700\u7ec8&#xff1a;\u5b83\u8dd1\u901a\u4e86<\/h4>\n<p>\u5927\u7ea6\u4e00\u4e2a\u6708\u540e&#xff0c;\u8fd9\u4e2a\u7cfb\u7edf\u8dd1\u901a\u4e86\u3002\u547d\u4ee4\u884c\u91cc&#xff1a;<\/p>\n<p>&gt; What is the capital of France?<br \/>\n\u6a21\u578b: &lt;\/think&gt;<br \/>\nThe capital of France is **Paris**.&lt;|im_end|&gt;<\/p>\n<p>\u80fd\u5bf9\u8bdd&#xff0c;\u80fd\u591a\u8f6e\u8bb0\u5fc6&#xff08;\u201c\u6211\u7684\u540d\u5b57\u662f Bob\u201d \u2192 \u201c\u6211\u7684\u540d\u5b57\u662f\u4ec0\u4e48&#xff1f;\u201d \u2192 \u201c\u4f60\u7684\u540d\u5b57\u662f Bob\u201d&#xff09;&#xff0c;\u7eaf CPU&#xff0c;AVX-512&#xff0c;40 \u5c42&#xff0c;\u6bcf\u751f\u6210\u4e00\u4e2a token \u8981\u628a\u7ea6 2.7GB \u7684\u6743\u91cd\u4ece\u5185\u5b58\u642c\u4e00\u904d&#xff08;\u7cbe\u786e\u6838\u7b97 2742MB&#xff09;\u3002<\/p>\n<p>\u5185\u6838\u7b97\u5b5040 \u5c42&#xff08;\u5c42\u6267\u884c\u5668&#xff09;\u63a8\u7406\u5f15\u64ceCLI\u7528\u6237\u5185\u6838\u7b97\u5b5040 \u5c42&#xff08;\u5c42\u6267\u884c\u5668&#xff09;\u63a8\u7406\u5f15\u64ceCLI\u7528\u6237#mermaid-svg-jfNwPPpqzQ3ZYmmi{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .error-icon{fill:#552222;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .marker{fill:#333333;stroke:#333333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .marker.cross{stroke:#333333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-jfNwPPpqzQ3ZYmmi p{margin:0;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-jfNwPPpqzQ3ZYmmi text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-jfNwPPpqzQ3ZYmmi .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .sequenceNumber{fill:white;}#mermaid-svg-jfNwPPpqzQ3ZYmmi #sequencenumber{fill:#333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .messageText{fill:#333;stroke:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .labelText,#mermaid-svg-jfNwPPpqzQ3ZYmmi .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .loopText,#mermaid-svg-jfNwPPpqzQ3ZYmmi .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-jfNwPPpqzQ3ZYmmi .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .noteText,#mermaid-svg-jfNwPPpqzQ3ZYmmi .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actorPopupMenu{position:absolute;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-jfNwPPpqzQ3ZYmmi .actor-man circle,#mermaid-svg-jfNwPPpqzQ3ZYmmi line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-jfNwPPpqzQ3ZYmmi :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}loop[\u6bcf\u5c42]\u8f93\u5165\u6587\u672c\u5206\u8bcd \u2192 token \u5e8f\u5217\u9884\u5904\u7406&#xff08;\u9010 token \u524d\u5411&#xff09;RMSNorm \u2192 \u5206\u652f(GEMV\/\u72b6\u6001\/\u6ce8\u610f\u529b) \u2192 MoE\u5c42\u8f93\u51fa\u6700\u7ec8 logits&#xff08;248320 \u7ef4&#xff09;\u91c7\u6837&#xff08;\u6e29\u5ea6\/top-k\/mt19937&#xff09;token\u89e3\u7801\u663e\u793a<\/p>\n<p>\u7136\u540e\u6211\u5f00\u59cb\u505a\u5b9e\u9a8c\u3002\u63a5\u4e0b\u6765\u7684\u4e09\u4e2a\u53d1\u73b0&#xff0c;\u6539\u53d8\u4e86\u6211\u5bf9\u8fd9\u4e1c\u897f\u7684\u6574\u4e2a\u8ba4\u77e5\u3002<\/p>\n<h3>\u4e09\u3001\u53d1\u73b0\u4e00&#xff1a;\u786e\u5b9a\u6027\u66b4\u529b<\/h3>\n<h4>3.1 \u5b9e\u9a8c\u8bbe\u8ba1<\/h4>\n<p>\u91c7\u6837\u5668\u91cc\u6709\u4e00\u4e2a mt19937&#xff08;\u6885\u68ee\u65cb\u8f6c\u4f2a\u968f\u673a\u6570\u53d1\u751f\u5668&#xff09;&#xff0c;\u79cd\u5b50\u56fa\u5b9a\u4e3a 42\u3002\u5b83\u7684\u4f5c\u7528\u662f\u5728 logits \u7684\u6982\u7387\u5206\u5e03\u4e0a\u505a\u4e00\u6b21&#034;\u8f6e\u76d8\u8d4c&#034;\u2014\u2014\u6e29\u5ea6 0.8\u3001top-k 50\u3001top-p 0.95&#xff0c;\u4ece\u8fc7\u6ee4\u540e\u7684\u5019\u9009\u91cc\u6309\u6982\u7387\u62bd\u4e00\u4e2a token\u3002<\/p>\n<p>\u6211\u8981\u9a8c\u8bc1\u7684\u95ee\u9898\u5f88\u7b80\u5355&#xff1a;\u5982\u679c\u53bb\u6389\u8fd9\u4e2a\u968f\u673a\u6e90&#xff0c;\u7cfb\u7edf\u8fd8\u662f\u4e0d\u662f\u786e\u5b9a\u7684&#xff1f;<\/p>\n<p>\u5b9e\u9a8c\u65b9\u6cd5&#xff1a;\u7528\u540c\u4e00\u4e2a prompt&#xff0c;\u8fde\u7eed\u8dd1\u4e24\u6b21\u5b8c\u6574\u7684\u524d\u5411\u2014\u2014\u5e8f\u5217\u91cd\u7f6e&#xff08;\u6e05\u7a7a KV \u7f13\u5b58\u3001\u72b6\u6001\u77e9\u9635\u3001\u5377\u79ef\u5386\u53f2&#xff0c;\u91cd\u65b0\u64ad\u79cd\u91c7\u6837\u5668&#xff09;\u2192 \u9884\u5904\u7406&#xff08;\u5168\u90e8 prompt token \u9010\u5c42\u524d\u5411&#xff09;\u2192 \u89e3\u7801&#xff08;\u9010 token \u751f\u6210&#xff09;\u3002\u4e24\u6b21\u8fd0\u884c\u4e4b\u95f4\u4e0d\u505a\u4efb\u4f55\u4fee\u6539\u3002\u7136\u540e\u5bf9\u6bd4&#xff1a;\u5168\u90e8 248320 \u4e2a logits&#xff0c;\u9010\u4f4d\u6bd4\u8f83\u3002<\/p>\n<p>\u7ed3\u679c&#xff1a;<\/p>\n<p>\u4e24\u6b21\u5b8c\u6574\u524d\u5411\u5bf9\u6bd4: 248320 logits \u9010\u4f4d\u4e00\u81f4&#xff08;\u5dee\u5f02 0&#xff09;<\/p>\n<p>\u4e0d\u662f&#034;\u51e0\u4e4e\u4e00\u81f4&#034;&#xff0c;\u4e0d\u662f&#034;\u8bef\u5dee\u5c0f\u4e8e 1e-6&#034;\u2014\u2014\u662f\u6bcf\u4e00\u4e2a\u6d6e\u70b9\u6570\u7684\u6bcf\u4e00\u4e2a\u4e8c\u8fdb\u5236\u4f4d\u90fd\u76f8\u540c\u30020 \u5dee\u5f02\u3002\u7a0b\u5e8f\u6ca1\u6709\u4efb\u4f55\u968f\u673a\u6027\u3001\u6ca1\u6709\u7ebf\u7a0b\u7ade\u4e89\u3001\u6ca1\u6709\u72b6\u6001\u6b8b\u7559\u3001\u6ca1\u6709\u6d6e\u70b9\u975e\u786e\u5b9a\u6027&#xff08;\u540c\u4e00\u53f0\u673a\u5668\u3001\u540c\u4e00\u5957\u6307\u4ee4\u5e8f\u5217\u3001\u540c\u6837\u7684\u5185\u5b58\u5e03\u5c40&#xff0c;IEEE 754 \u7684\u6d6e\u70b9\u8fd0\u7b97\u662f\u786e\u5b9a\u6027\u7684&#xff09;\u3002<\/p>\n<h4>3.2 \u8fd9\u610f\u5473\u7740\u4ec0\u4e48<\/h4>\n<p>\u8fd9\u610f\u5473\u7740\u6574\u4e2a&#034;\u667a\u80fd\u7cfb\u7edf&#034;&#xff0c;\u5728\u53bb\u6389\u8f93\u51fa\u7aef\u90a3\u4e2a\u4f2a\u968f\u673a\u6570\u53d1\u751f\u5668\u4e4b\u540e&#xff0c;\u662f\u4e00\u6761\u7eaf\u6570\u5b66\u51fd\u6570&#xff1a;<\/p>\n<p>\u8f93\u51fa &#061; F(\u8f93\u5165, \u6743\u91cd)<\/p>\n<p>F \u7531 40 \u5c42\u6d6e\u70b9\u6d41\u6c34\u7ebf\u7ec4\u6210&#xff0c;\u6bcf\u4e00\u5c42\u7531\u5377\u79ef\u3001\u77e9\u9635\u4e58\u3001\u5f52\u4e00\u5316\u3001\u6fc0\u6d3b\u51fd\u6570\u3001\u72b6\u6001\u9012\u5f52\u6784\u6210\u3002\u6240\u6709\u770b\u8d77\u6765\u50cf&#034;\u601d\u8003&#034;\u7684\u4e1c\u897f\u2014\u2014\u9009\u62e9\u3001\u5224\u65ad\u3001\u521b\u9020\u6027\u2014\u2014\u672c\u8d28\u4e0a\u90fd\u662f\u8fd9\u6761\u56fa\u5b9a\u51fd\u6570\u5728\u56fa\u5b9a\u8f93\u5165\u4e0b\u7684\u8ba1\u7b97\u7ed3\u679c\u3002<\/p>\n<p>\u201c\u6982\u7387&#034;\u6ca1\u6709\u4f53\u73b0\u5728\u5185\u6838\u91cc\u3002\u5185\u6838\u8f93\u51fa\u7684 logits \u662f\u4e00\u4e2a\u786e\u5b9a\u7684\u5b9e\u6570\u5411\u91cf&#xff0c;\u91c7\u6837\u5668\u53ea\u662f\u5728\u8fd9\u4e2a\u5411\u91cf\u4e0a\u6492\u4e86\u4e00\u628a\u4f2a\u968f\u673a\u566a\u58f0\u3002\u6240\u8c13&#034;\u6a21\u578b\u7684\u968f\u673a\u6027\u201d&#xff0c;\u5168\u90e8\u3001\u5b8c\u5168\u3001100% \u6765\u81ea\u91c7\u6837\u5668\u90a3\u4e00\u884c mt19937 \u7684\u8c03\u7528\u3002\u628a\u5b83\u62d4\u6389&#xff0c;\u8ba9\u6e29\u5ea6 &#061; 0&#xff0c;\u7cfb\u7edf\u5c31\u662f\u8d2a\u5fc3\u7684\u3001\u786e\u5b9a\u7684\u3001\u9010\u4f4d\u53ef\u590d\u73b0\u7684\u3002<\/p>\n<p>#mermaid-svg-ZsMhuIG8HB0zQjr6{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .error-icon{fill:#552222;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .marker.cross{stroke:#333333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 p{margin:0;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster-label text{fill:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster-label span{color:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster-label span p{background-color:transparent;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .label text,#mermaid-svg-ZsMhuIG8HB0zQjr6 span{fill:#333;color:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .node rect,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node circle,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node ellipse,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node polygon,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .rough-node .label text,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node .label text,#mermaid-svg-ZsMhuIG8HB0zQjr6 .image-shape .label,#mermaid-svg-ZsMhuIG8HB0zQjr6 .icon-shape .label{text-anchor:middle;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .rough-node .label,#mermaid-svg-ZsMhuIG8HB0zQjr6 .node .label,#mermaid-svg-ZsMhuIG8HB0zQjr6 .image-shape .label,#mermaid-svg-ZsMhuIG8HB0zQjr6 .icon-shape .label{text-align:center;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .node.clickable{cursor:pointer;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .arrowheadPath{fill:#333333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ZsMhuIG8HB0zQjr6 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZsMhuIG8HB0zQjr6 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster text{fill:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .cluster span{color:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ZsMhuIG8HB0zQjr6 rect.text{fill:none;stroke-width:0;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .icon-shape,#mermaid-svg-ZsMhuIG8HB0zQjr6 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .icon-shape p,#mermaid-svg-ZsMhuIG8HB0zQjr6 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .icon-shape rect,#mermaid-svg-ZsMhuIG8HB0zQjr6 .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZsMhuIG8HB0zQjr6 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ZsMhuIG8HB0zQjr6 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ZsMhuIG8HB0zQjr6 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"nodeLabel\"><\/p>\n<p>\u91c7\u6837\u5668&#xff08;\u552f\u4e00\u968f\u673a\u6e90&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5185\u6838&#xff08;100% \u786e\u5b9a\u6027&#xff09;<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u5165 token<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5d4c\u5165<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>40 \u5c42\u524d\u5411&#xff08;\u6d6e\u70b9\u6d41\u6c34\u7ebf&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>logits 248320 \u7ef4&#xff08;\u786e\u5b9a\u503c&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u6e29\u5ea6\/top-k\/top-p<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>mt19937 \u8f6e\u76d8\u8d4c\u79cd\u5b50\u56fa\u5b9a &#061; \u786e\u5b9a<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u51fa token<\/p>\n<p><\/span><\/p>\n<p>\u53bb\u6389PRNG\u540e&#xff0c;\u5b83\u5c31\u662f\u4e00\u6761\u786e\u5b9a\u7684\u6570\u5b66\u94fe\u3002<\/p>\n<h4>3.3 \u6211\u76ef\u7740\u7ec8\u7aef\u770b\u4e86\u5f88\u4e45<\/h4>\n<p>\u8fd9\u4e2a\u53d1\u73b0\u8ba9\u6211\u5b89\u9759\u4e86\u5f88\u4e45\u3002\u4e0d\u662f\u56e0\u4e3a\u5931\u671b&#xff0c;\u800c\u662f\u56e0\u4e3a\u60ca\u8bb6\u2014\u2014\u60ca\u8bb6\u4e8e\u4e00\u4e2a\u770b\u8d77\u6765\u5982\u6b64&#034;\u667a\u80fd&#034;\u7684\u7cfb\u7edf&#xff0c;\u5176\u5185\u90e8\u5c45\u7136\u5982\u6b64\u2026\u2026\u6734\u7d20\u3002\u6ca1\u6709\u4efb\u4f55\u5728\u7ebf\u5b66\u4e60&#xff0c;\u6ca1\u6709\u4efb\u4f55\u81ea\u6211\u4fee\u6b63&#xff0c;\u6ca1\u6709\u4efb\u4f55\u73af\u5883\u53cd\u9988\u3002\u4e00\u6b21\u524d\u5411&#xff0c;\u4ece\u5934\u5230\u5c3e&#xff0c;\u4e00\u4e2a 22.4GB \u7684\u9759\u6001\u53c2\u6570\u8868&#xff0c;\u52a0\u4e0a 40 \u5c42\u786e\u5b9a\u7684\u6d6e\u70b9\u8fd0\u7b97\u3002<\/p>\n<p>\u6211\u505a\u4e86\u7b2c\u4e8c\u4e2a\u5b9e\u9a8c&#xff1a;\u628a\u540c\u4e00\u53e5\u8bdd\u8fde\u7eed\u95ee\u4e09\u6b21\u2014\u2014\u53ef\u590d\u73b0\u6027\u6d4b\u8bd5\u7684\u6807\u51c6\u6d41\u7a0b&#xff08;\u5e8f\u5217\u91cd\u7f6e &#043; \u540c\u79cd\u5b50&#xff09;\u3002\u4e09\u6b21\u7684\u56de\u7b54\u4e00\u6a21\u4e00\u6837\u2014\u2014\u8fde\u6807\u70b9\u7b26\u53f7\u90fd\u4e0d\u5dee\u3002\u8fd9\u5728\u7f51\u7edc\u5de5\u7a0b\u91cc\u662f\u4e0d\u53ef\u60f3\u8c61\u7684&#xff1a;\u540c\u6837\u7684\u8f93\u5165&#xff0c;\u5341\u6b21\u7ecf\u8fc7\u62e5\u585e\u63a7\u5236\u7684\u94fe\u8def&#xff0c;\u5341\u6b21 RTT \u90fd\u4e0d\u540c&#xff1b;\u5341\u6b21\u4e22\u5305&#xff0c;\u5341\u6b21\u90fd\u53d1\u751f\u5728\u4e0d\u540c\u4f4d\u7f6e\u3002\u800c\u5b83&#xff0c;\u4e09\u6b21\u5b8c\u5168\u4e00\u81f4\u2014\u2014\u5e76\u4e14\u7531\u4e8e\u6574\u4e2a\u5185\u6838\u662f\u786e\u5b9a\u6027\u7684&#xff0c;\u8fd9\u4e2a&#034;\u4e09\u6b21&#034;\u6362\u6210\u4efb\u4f55\u6b21\u6570&#xff0c;\u7ed3\u679c\u90fd\u4e0d\u4f1a\u53d8\u3002<\/p>\n<p>\u5b83\u6ca1\u6709\u5728&#034;\u7406\u89e3&#034;\u6211\u3002\u5b83\u5728\u5bf9\u540c\u4e00\u7ec4\u9759\u6001\u6743\u91cd\u505a\u4e00\u6b21\u786e\u5b9a\u7684\u904d\u5386\u3002<\/p>\n<h3>\u56db\u3001\u53d1\u73b0\u4e8c&#xff1a;\u5e26\u5bbd\u662f\u74f6\u9888&#xff0c;\u7b97\u529b\u4e0d\u662f<\/h3>\n<h4>4.1 \u6570\u5b57<\/h4>\n<p>\u8fd9\u662f\u6574\u4e2a\u9879\u76ee\u91cc\u6700\u6709\u5de5\u7a0b\u4ef7\u503c\u7684\u4e00\u4e2a\u53d1\u73b0\u3002<\/p>\n<p>\u6bcf\u4e2a token \u7684\u89e3\u7801&#xff0c;\u9700\u8981\u8bfb\u53d6\u7684\u6743\u91cd\u91cf&#xff08;\u5b9e\u6d4b\u6838\u7b97&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u6743\u91cd\u7c7b\u522b\u6bcf token \u8bfb\u53d6\u91cf<\/tr>\n<tbody>\n<tr>\n<td>\u6295\u5f71\u7c7b&#xff08;DeltaNet qkv\/gate\/alpha\/beta\/Wout &#043; GQA q\/k\/v\/out &#043; \u8f93\u51fa\u5c42&#xff09;<\/td>\n<td>~2.14 GB<\/td>\n<\/tr>\n<tr>\n<td>MoE \u4e13\u5bb6&#xff08;8 \u6fc0\u6d3b &#043; 1 \u5171\u4eab&#xff0c;40 \u5c42&#xff09;<\/td>\n<td>~0.60 GB<\/td>\n<\/tr>\n<tr>\n<td>\u5408\u8ba1<\/td>\n<td>~2.74 GB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u672c\u673a\u5b9e\u6d4b\u5185\u5b58\u5e26\u5bbd&#xff08;\u7528 GEMV \u5185\u6838\u57fa\u51c6\u6d4b\u91cf&#xff09;&#xff1a;42.6 GB\/s\u3002<\/p>\n<p>\u4e8e\u662f&#xff1a;<\/p>\n<p>2.74 GB \/ 42.6 GB\/s \u2248 64 ms\/token \u2192 16 token\/s \u7269\u7406\u4e0a\u9650<\/p>\n<p>\u8fd9\u5c31\u662f\u7eaf CPU \u5355\u5e8f\u5217\u63a8\u7406\u7684\u7269\u7406\u5929\u82b1\u677f\u3002\u8ddf\u7b97\u529b\u65e0\u5173\u2014\u2014\u6211\u7684 AVX-512 \u5185\u6838\u5df2\u7ecf\u63a5\u8fd1\u5e26\u5bbd\u9971\u548c\u4e86&#xff08;GEMV \u5b9e\u6d4b 39-42.6 GB\/s&#xff0c;\u8fbe\u5230\u5b9e\u9645\u591a\u6838\u5e26\u5bbd\u7684 65-70%&#xff09;\u3002<\/p>\n<p>#mermaid-svg-QxVamvDekEnTu7m1{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-QxVamvDekEnTu7m1 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-QxVamvDekEnTu7m1 .error-icon{fill:#552222;}#mermaid-svg-QxVamvDekEnTu7m1 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-QxVamvDekEnTu7m1 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-QxVamvDekEnTu7m1 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-QxVamvDekEnTu7m1 .marker.cross{stroke:#333333;}#mermaid-svg-QxVamvDekEnTu7m1 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-QxVamvDekEnTu7m1 p{margin:0;}#mermaid-svg-QxVamvDekEnTu7m1 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-QxVamvDekEnTu7m1 .cluster-label text{fill:#333;}#mermaid-svg-QxVamvDekEnTu7m1 .cluster-label span{color:#333;}#mermaid-svg-QxVamvDekEnTu7m1 .cluster-label span p{background-color:transparent;}#mermaid-svg-QxVamvDekEnTu7m1 .label text,#mermaid-svg-QxVamvDekEnTu7m1 span{fill:#333;color:#333;}#mermaid-svg-QxVamvDekEnTu7m1 .node rect,#mermaid-svg-QxVamvDekEnTu7m1 .node circle,#mermaid-svg-QxVamvDekEnTu7m1 .node ellipse,#mermaid-svg-QxVamvDekEnTu7m1 .node polygon,#mermaid-svg-QxVamvDekEnTu7m1 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-QxVamvDekEnTu7m1 .rough-node .label text,#mermaid-svg-QxVamvDekEnTu7m1 .node .label text,#mermaid-svg-QxVamvDekEnTu7m1 .image-shape .label,#mermaid-svg-QxVamvDekEnTu7m1 .icon-shape .label{text-anchor:middle;}#mermaid-svg-QxVamvDekEnTu7m1 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-QxVamvDekEnTu7m1 .rough-node .label,#mermaid-svg-QxVamvDekEnTu7m1 .node .label,#mermaid-svg-QxVamvDekEnTu7m1 .image-shape .label,#mermaid-svg-QxVamvDekEnTu7m1 .icon-shape .label{text-align:center;}#mermaid-svg-QxVamvDekEnTu7m1 .node.clickable{cursor:pointer;}#mermaid-svg-QxVamvDekEnTu7m1 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-QxVamvDekEnTu7m1 .arrowheadPath{fill:#333333;}#mermaid-svg-QxVamvDekEnTu7m1 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-QxVamvDekEnTu7m1 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-QxVamvDekEnTu7m1 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-QxVamvDekEnTu7m1 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-QxVamvDekEnTu7m1 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-QxVamvDekEnTu7m1 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-QxVamvDekEnTu7m1 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-QxVamvDekEnTu7m1 .cluster text{fill:#333;}#mermaid-svg-QxVamvDekEnTu7m1 .cluster span{color:#333;}#mermaid-svg-QxVamvDekEnTu7m1 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-QxVamvDekEnTu7m1 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-QxVamvDekEnTu7m1 rect.text{fill:none;stroke-width:0;}#mermaid-svg-QxVamvDekEnTu7m1 .icon-shape,#mermaid-svg-QxVamvDekEnTu7m1 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-QxVamvDekEnTu7m1 .icon-shape p,#mermaid-svg-QxVamvDekEnTu7m1 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-QxVamvDekEnTu7m1 .icon-shape rect,#mermaid-svg-QxVamvDekEnTu7m1 .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-QxVamvDekEnTu7m1 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-QxVamvDekEnTu7m1 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-QxVamvDekEnTu7m1 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"nodeLabel\"><\/p>\n<p>CPU \u6838<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5185\u5b58 DDR5 \u53cc\u901a\u9053<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/p>\n<p>42.6 GB\/s&#xff08;\u7269\u7406\u4e0a\u9650&#xff09;<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/p>\n<p>\u5927\u90e8\u5206\u65f6\u95f4\u7a7a\u8f6c\u7b49\u6570\u636e\u5230\u8fbe<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u6743\u91cd 2.74GB\u6bcf token \u5168\u91cf\u8bfb\u4e00\u904d<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e58\u6cd5\u5668\u7b49\u5f85\u6570\u636e<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>AVX-512FMA \u5355\u5143<\/p>\n<p><\/span><\/p>\n<h4>4.2 \u4e58\u6cd5\u5668\u5728\u7b49\u5185\u5b58<\/h4>\n<p>\u6211\u505a\u8fc7\u4e00\u4e2a\u5b9e\u9a8c\u9a8c\u8bc1&#034;\u6570\u636e\u642c\u8fd0\u4e3b\u5bfc&#034;\u8fd9\u4e2a\u8bba\u65ad&#xff1a;GEMV \u7684 SIMD \u4f18\u5316&#xff08;4 \u8def\u7d2f\u52a0\u5668 &#043; \u53cd\u91cf\u5316\u878d\u5408&#xff09;\u6536\u76ca\u663e\u8457&#xff08;\u8def\u7531\u95e8\u63a7 f32 \u4ece 186ms \u964d\u5230 2.9ms\/40 \u5c42&#xff09;&#xff0c;\u4f46\u6bcf\u6b21\u4f18\u5316\u7684\u8fb9\u9645\u6536\u76ca\u90fd\u5728\u9012\u51cf\u2014\u2014\u56e0\u4e3a\u518d\u5f80\u4e0b&#xff0c;\u65f6\u95f4\u90fd\u82b1\u5728\u7b49\u6570\u636e\u4e0a&#xff0c;\u4e0d\u662f\u82b1\u5728\u7b97\u4e0a\u3002\u771f\u6b63\u51b3\u5b9a\u6bcf token \u8017\u65f6\u7684&#xff0c;\u662f\u5185\u5b58\u8bbf\u95ee\u6a21\u5f0f&#xff1a;MoE \u7684\u4e13\u5bb6\u6743\u91cd\u662f\u968f\u673a\u8bbf\u95ee\u7684\u2014\u2014\u6bcf\u4e2a token \u8def\u7531\u5230\u7684 8 \u4e2a\u4e13\u5bb6\u5404\u4e0d\u76f8\u540c&#xff0c;\u4e13\u5bb6\u5728 22.4GB \u6587\u4ef6\u91cc\u7684\u7269\u7406\u4f4d\u7f6e\u662f\u968f\u673a\u7684\u3002\u968f\u673a\u8bbf\u95ee vs \u987a\u5e8f\u8bbf\u95ee&#xff0c;\u5b9e\u6d4b\u5dee\u8ddd\u662f 15 \u500d&#xff08;6.56ms vs 0.42ms\/\u5c42&#xff09;\u2014\u2014\u7f13\u5b58\u547d\u4e2d\u7387\u4ece\u63a5\u8fd1 0 \u5230\u63a5\u8fd1 100% \u7684\u533a\u522b\u3002<\/p>\n<p>\u6211\u8bd5\u8fc7\u7528 prefetch \u6307\u4ee4\u9884\u53d6\u4e13\u5bb6\u6743\u91cd&#xff1a;64 \u5b57\u8282\u6b65\u957f \u2192 18K \u6307\u4ee4\u5f00\u9500&#xff1b;4KB \u6b65\u957f \u2192 \u65e0\u6548\u3002\u6700\u7ec8\u7ed3\u8bba&#xff1a;\u5728\u7cfb\u7edf\u8d1f\u8f7d\u4e0b&#xff0c;\u4efb\u4f55 prefetch \u7c7b\u4f18\u5316\u90fd\u65e0\u6548\u2014\u2014\u5e26\u5bbd\u5df2\u7ecf\u88ab\u62a2\u5360&#xff0c;\u9884\u53d6\u6307\u4ee4\u53ea\u662f\u8ba9\u5185\u5b58\u63a7\u5236\u5668\u66f4\u5fd9\u3002<\/p>\n<h4>4.3 \u7b97\u529b\u7ade\u8d5b\u662f\u8425\u9500\u8bdd\u672f<\/h4>\n<p>\u6240\u8c13&#034;\u7b97\u529b\u7ade\u8d5b&#034;&#xff0c;\u5728\u63a8\u7406\u573a\u666f\u4e0b\u662f\u8425\u9500\u8bdd\u672f\u3002<\/p>\n<p>\u8bad\u7ec3\u573a\u666f&#xff1a;\u6743\u91cd\u56fa\u5b9a&#xff0c;\u6570\u636e\u6d41\u7ecf\u8ba1\u7b97\u56fe&#xff0c;\u7b97\u529b&#xff08;FLOPs\/s&#xff09;\u662f\u786c\u7ea6\u675f\u2014\u2014GPU \u7684\u4e07\u4ebf\u6b21\u6d6e\u70b9\u8fd0\u7b97\u786e\u5b9e\u51b3\u5b9a\u8bad\u7ec3\u901f\u5ea6\u3002<\/p>\n<p>\u63a8\u7406\u573a\u666f&#xff1a;\u6743\u91cd\u4ece\u5185\u5b58\u642c\u5230\u5bc4\u5b58\u5668&#xff0c;\u4e58\u6cd5\u5668\u4e58\u5b8c\u5c31\u4e22&#xff0c;\u4e0b\u4e00\u6279\u6570\u636e\u8fd8\u5728\u8def\u4e0a\u3002\u51b3\u5b9a\u901f\u5ea6\u7684\u4e0d\u662f\u4f60\u80fd\u7b97\u591a\u5feb&#xff0c;\u800c\u662f\u4f60\u80fd\u591a\u5feb\u628a\u6570\u636e\u9001\u5230\u8ba1\u7b97\u5355\u5143\u3002\u94dc\u7ebf\u3001\u5f15\u811a\u3001\u5c01\u88c5\u3001PCB \u8d70\u7ebf\u2014\u2014\u7269\u7406\u4e16\u754c\u7528\u8fd9\u4e9b\u7ed9\u4f60\u5212\u4e86\u4e00\u6761\u7ebf&#xff0c;\u4f60\u7ed5\u4e0d\u8fc7\u53bb\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48&#034;\u591a\u5c11 TOPS&#034;\u8fd9\u79cd\u5ba3\u4f20\u6570\u5b57\u5728\u63a8\u7406\u573a\u666f\u610f\u4e49\u6709\u9650\u2014\u2014\u9664\u975e\u663e\u5b58\u5e26\u5bbd\u540c\u6b65\u63d0\u5347&#xff0c;\u5426\u5219\u7b97\u529b\u518d\u9ad8&#xff0c;\u6570\u636e\u5230\u4e0d\u4e86\u4e5f\u662f\u7a7a\u8f6c\u3002\u82f1\u4f1f\u8fbe H100 \u7684\u663e\u5b58\u5e26\u5bbd&#xff08;3.35TB\/s&#xff09;\u624d\u662f\u63a8\u7406\u6027\u80fd\u7684\u771f\u6b63\u4fdd\u8bc1&#xff0c;\u800c\u4e0d\u662f\u5b83\u7684 989 TFLOPS\u3002<\/p>\n<p>\u6211\u5728\u8fd9\u53f0 7945HX \u4e0a\u505a\u7684\u591a\u5e8f\u5217\u6279\u5904\u7406\u5b9e\u9a8c\u4e5f\u5370\u8bc1\u4e86\u8fd9\u4e00\u70b9&#xff1a;\u628a B&#061;4 \u4e2a\u5e8f\u5217\u540c\u65f6\u89e3\u7801&#xff0c;\u6743\u91cd\u8bfb\u4e00\u6b21\u7b97 4 \u8def&#xff0c;\u7406\u8bba\u4e0a\u9650\u5e94\u8be5\u63a5\u8fd1 4\u00d716 &#061; 64 tok\/s\u3002\u5b9e\u6d4b B&#061;4 \u53ea\u6709\u7ea6 1.33-1.47 \u500d\u6536\u76ca&#xff08;\u4f4e\u8d1f\u8f7d\u65f6&#xff09;\u2014\u2014\u56e0\u4e3a\u5f53\u5185\u5b58\u5e26\u5bbd\u88ab\u538b\u6ee1&#xff0c;\u6279\u5904\u7406\u7684\u6536\u76ca\u5c31\u8870\u51cf\u4e86\u3002\u7cfb\u7edf\u8d1f\u8f7d\u9ad8\u65f6\u751a\u81f3\u4e0d\u5230 1 \u500d&#xff08;\u6279\u91cf\u8def\u5f84\u7684\u5f00\u9500\u5927\u4e8e\u5e26\u5bbd\u6536\u76ca&#xff09;\u3002<\/p>\n<p>\u74f6\u9888\u662f\u5e26\u5bbd&#xff0c;\u4e0d\u662f\u7b97\u529b\u3002<\/p>\n<h3>\u4e94\u3001\u53d1\u73b0\u4e09&#xff1a;MoE\u3001\u8def\u7531\u3001\u4e13\u5bb6\u9009\u62e9\u2014\u2014\u4f9d\u7136\u662f\u67e5\u8868<\/h3>\n<h4>5.1 \u6253\u5f00\u8def\u7531\u51fd\u6570<\/h4>\n<p>MoE \u662f\u8fd9\u6a21\u578b\u6700&#034;\u50cf\u667a\u80fd&#034;\u7684\u90e8\u5206\u2014\u2014256 \u4e2a\u4e13\u5bb6&#xff0c;\u6bcf\u4e2a token \u52a8\u6001\u9009\u62e9 8 \u4e2a\u3002\u542c\u8d77\u6765\u50cf\u662f\u4e00\u4e2a\u7ec4\u7ec7\u5728&#034;\u8c03\u5ea6&#034;\u4e13\u5bb6\u8d44\u6e90&#xff0c;\u201c\u5224\u65ad&#034;\u54ea\u4e9b\u4e13\u5bb6\u9002\u5408\u5f53\u524d\u4efb\u52a1\u3002\u5ba3\u4f20\u6750\u6599\u91cc\u7684\u5e38\u7528\u6bd4\u55bb\u662f&#034;\u7a00\u758f\u6fc0\u6d3b\u5c31\u50cf\u4eba\u7c7b\u53ea\u6fc0\u6d3b\u5927\u8111\u7684\u4e00\u90e8\u5206\u201d\u3002<\/p>\n<p>\u6211\u628a\u8def\u7531\u51fd\u6570\u6253\u5f00&#xff0c;\u91cc\u9762\u662f\u8fd9\u6837\u7684&#xff08;\u7b80\u5316\u793a\u610f&#xff1b;\u771f\u5b9e\u5b9e\u73b0\u6309 CPU \u80fd\u529b\u5728 Softmax\u6734\u7d20 \u4e0e AVX-512 \u7684 Softmax\u7cbe\u8c03 \u4e4b\u95f4\u5206\u53d1&#xff0c;\u6570\u5b66\u76f8\u540c&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u8def\u7531&#xff1a;softmax(\u95e8\u63a7\u8f93\u51fa) \u2192 top-8 \u2192 \u6743\u91cd\u5f52\u4e00\u5316<\/span><br \/>\n\u5411\u91cf<span class=\"token operator\">&lt;<\/span>\u8def\u7531\u6761\u76ee<span class=\"token operator\">&gt;<\/span> \u8def\u7531\u9009\u62e9<span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> \u6d6e\u70b9<span class=\"token operator\">*<\/span> \u95e8\u63a7\u8f93\u51fa<span class=\"token punctuation\">,<\/span> size_t \u4e13\u5bb6\u6570<span class=\"token punctuation\">,<\/span> size_t \u6fc0\u6d3b\u6570<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    Softmax\u6734\u7d20<span class=\"token punctuation\">(<\/span>\u95e8\u63a7\u8f93\u51fa<span class=\"token punctuation\">,<\/span> \u6982\u7387<span class=\"token punctuation\">.<\/span><span class=\"token function\">data<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> \u4e13\u5bb6\u6570<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">partial_sort<\/span><span class=\"token punctuation\">(<\/span>\u987a\u5e8f<span class=\"token punctuation\">.<\/span><span class=\"token function\">begin<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> \u987a\u5e8f<span class=\"token punctuation\">.<\/span><span class=\"token function\">begin<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> \u6fc0\u6d3b\u6570<span class=\"token punctuation\">,<\/span> \u987a\u5e8f<span class=\"token punctuation\">.<\/span><span class=\"token function\">end<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                      <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span>size_t a<span class=\"token punctuation\">,<\/span> size_t b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token keyword\">return<\/span> \u6982\u7387<span class=\"token punctuation\">[<\/span>a<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&gt;<\/span> \u6982\u7387<span class=\"token punctuation\">[<\/span>b<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u53d6\u524d k \u4e2a&#xff0c;\u6743\u91cd\u5f52\u4e00\u5316&#xff08;\u9664\u4ee5\u9009\u4e2d\u6743\u91cd\u4e4b\u548c&#xff09;<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5c31\u8fd9\u4e9b\u3002softmax(W \u00b7 x) \u5f97 256 \u4e2a\u6982\u7387&#xff0c;std::partial_sort \u53d6\u524d 8 \u4e2a&#xff0c;\u5f52\u4e00\u5316\u6743\u91cd&#xff0c;\u52a0\u6743\u5e73\u5747\u3002<\/p>\n<p>#mermaid-svg-jyDxpiRuD6T07yXp{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-jyDxpiRuD6T07yXp .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-jyDxpiRuD6T07yXp .error-icon{fill:#552222;}#mermaid-svg-jyDxpiRuD6T07yXp .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-jyDxpiRuD6T07yXp .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-jyDxpiRuD6T07yXp .marker{fill:#333333;stroke:#333333;}#mermaid-svg-jyDxpiRuD6T07yXp .marker.cross{stroke:#333333;}#mermaid-svg-jyDxpiRuD6T07yXp svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-jyDxpiRuD6T07yXp p{margin:0;}#mermaid-svg-jyDxpiRuD6T07yXp .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-jyDxpiRuD6T07yXp .cluster-label text{fill:#333;}#mermaid-svg-jyDxpiRuD6T07yXp .cluster-label span{color:#333;}#mermaid-svg-jyDxpiRuD6T07yXp .cluster-label span p{background-color:transparent;}#mermaid-svg-jyDxpiRuD6T07yXp .label text,#mermaid-svg-jyDxpiRuD6T07yXp span{fill:#333;color:#333;}#mermaid-svg-jyDxpiRuD6T07yXp .node rect,#mermaid-svg-jyDxpiRuD6T07yXp .node circle,#mermaid-svg-jyDxpiRuD6T07yXp .node ellipse,#mermaid-svg-jyDxpiRuD6T07yXp .node polygon,#mermaid-svg-jyDxpiRuD6T07yXp .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-jyDxpiRuD6T07yXp .rough-node .label text,#mermaid-svg-jyDxpiRuD6T07yXp .node .label text,#mermaid-svg-jyDxpiRuD6T07yXp .image-shape .label,#mermaid-svg-jyDxpiRuD6T07yXp .icon-shape .label{text-anchor:middle;}#mermaid-svg-jyDxpiRuD6T07yXp .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-jyDxpiRuD6T07yXp .rough-node .label,#mermaid-svg-jyDxpiRuD6T07yXp .node .label,#mermaid-svg-jyDxpiRuD6T07yXp .image-shape .label,#mermaid-svg-jyDxpiRuD6T07yXp .icon-shape .label{text-align:center;}#mermaid-svg-jyDxpiRuD6T07yXp .node.clickable{cursor:pointer;}#mermaid-svg-jyDxpiRuD6T07yXp .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-jyDxpiRuD6T07yXp .arrowheadPath{fill:#333333;}#mermaid-svg-jyDxpiRuD6T07yXp .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-jyDxpiRuD6T07yXp .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-jyDxpiRuD6T07yXp .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jyDxpiRuD6T07yXp .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-jyDxpiRuD6T07yXp .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jyDxpiRuD6T07yXp .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-jyDxpiRuD6T07yXp .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-jyDxpiRuD6T07yXp .cluster text{fill:#333;}#mermaid-svg-jyDxpiRuD6T07yXp .cluster span{color:#333;}#mermaid-svg-jyDxpiRuD6T07yXp div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-jyDxpiRuD6T07yXp .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-jyDxpiRuD6T07yXp rect.text{fill:none;stroke-width:0;}#mermaid-svg-jyDxpiRuD6T07yXp .icon-shape,#mermaid-svg-jyDxpiRuD6T07yXp .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jyDxpiRuD6T07yXp .icon-shape p,#mermaid-svg-jyDxpiRuD6T07yXp .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-jyDxpiRuD6T07yXp .icon-shape rect,#mermaid-svg-jyDxpiRuD6T07yXp .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jyDxpiRuD6T07yXp .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-jyDxpiRuD6T07yXp .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-jyDxpiRuD6T07yXp :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u5165 x2048 \u7ef4<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8def\u7531\u95e8\u63a7 W\u00b7x2048\u00d7256 f32<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>softmax256 logits \u2192 \u6982\u7387<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>partial_sort\u53d6 top-8<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e13\u5bb6 238&#xff08;\u5b9e\u6d4b\u9996 token \u8def\u7531&#xff0c;\u6743\u91cd\u793a\u610f&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e13\u5bb6 112<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e13\u5bb6 106<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e13\u5bb6 127 \/ 157 \/ 66 \/ 56 \/ 120<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u51fa &#061; SUM \u6743\u91cd_i x \u4e13\u5bb6_i(x)<\/p>\n<p><\/span><\/p>\n<p>&#xff08;\u4e0a\u56fe\u4e3a\u7ed3\u6784\u793a\u610f&#xff1b;\u56fe\u4e2d\u4e13\u5bb6\u7f16\u53f7\u6765\u81ea\u5b9e\u6d4b\u2014\u2014blk.0 \u5904\u7406 \u201cHello\u201d \u9996 token \u65f6\u8def\u7531\u9009\u62e9\u8f93\u51fa\u7684 top-8 \u4e13\u5bb6&#xff1a;238\u3001112\u3001106\u3001127\u3001157\u300166\u300156\u3001120\u3002\u6743\u91cd\u503c\u672a\u5728\u5de5\u5177\u8f93\u51fa\u4e2d\u8bb0\u5f55&#xff0c;\u56fe\u4e2d\u4ee5&#034;\u793a\u610f&#034;\u6807\u6ce8&#xff0c;\u4e0d\u5f15\u7528\u5177\u4f53\u6570\u5b57\u3002&#xff09;<\/p>\n<h4>5.2 \u6ca1\u6709&#034;\u52a8\u6001\u8c03\u5ea6&#034;&#xff0c;\u53ea\u6709\u52a0\u6743\u5e73\u5747<\/h4>\n<p>\u6ca1\u6709\u52a8\u6001\u8c03\u5ea6\u3002\u6ca1\u6709\u81ea\u4e3b\u5224\u65ad\u3002\u6ca1\u6709&#034;\u8fd9\u4e2a\u4efb\u52a1\u9700\u8981\u6570\u5b66\u4e13\u5bb6&#034;\u8fd9\u79cd\u610f\u56fe\u3002\u53ea\u6709 256 \u4e2a\u5019\u9009\u7684\u52a0\u6743\u5e73\u5747&#xff0c;\u6743\u91cd\u7531 softmax \u51b3\u5b9a\u2014\u2014\u800c softmax \u662f\u4e00\u4e2a\u5b8c\u5168\u786e\u5b9a\u7684\u51fd\u6570\u3002<\/p>\n<p>\u53bb\u6389 PRNG \u4e4b\u540e&#xff0c;\u4e13\u5bb6\u9009\u62e9\u4e5f\u662f\u786e\u5b9a\u7684\u3002\u540c\u4e00\u4e2a\u8f93\u5165&#xff0c;\u6c38\u8fdc\u9009\u4e2d\u540c\u4e00\u6279\u4e13\u5bb6&#xff0c;\u6c38\u8fdc\u5206\u914d\u540c\u4e00\u7ec4\u6743\u91cd\u3002<\/p>\n<p>\u8fd9\u548c\u6570\u636e\u5e93\u7684 SELECT * WHERE ID &#061; XXX \u6ca1\u6709\u672c\u8d28\u533a\u522b\u3002\u8f93\u5165\u7ef4\u5ea6\u66f4\u9ad8&#xff08;2048 \u7ef4\u5411\u91cf vs \u4e00\u4e2a\u6574\u6570\u4e3b\u952e&#xff09;&#xff0c;\u5339\u914d\u673a\u5236\u66f4\u5e73\u6ed1&#xff08;\u8f6f\u5339\u914d vs \u786c\u76f8\u7b49&#xff09;&#xff0c;\u6210\u672c\u66f4\u9ad8&#xff08;\u4e00\u6b21 2048\u00d7256 \u7684\u77e9\u9635\u4e58&#xff09;&#xff0c;\u4f46\u7ed3\u6784\u4e0a\u662f\u540c\u4e00\u7c7b\u4e1c\u897f&#xff1a;\u7ed9\u5b9a\u4e00\u4e2a\u952e&#xff0c;\u8fd4\u56de\u4e00\u4e2a\u503c\u3002<\/p>\n<p>MoE \u7684&#034;\u7a00\u758f\u6027&#034;\u786e\u5b9e\u6709\u7528\u2014\u2014\u6bcf token \u53ea\u7b97 8&#043;1 \u4e2a\u4e13\u5bb6&#xff0c;\u7701\u7b97\u529b\u3001\u7701\u5e26\u5bbd\u3002\u4f46\u5b83\u7701\u6389\u7684\u662f\u8ba1\u7b97\u91cf&#xff0c;\u4e0d\u662f&#034;\u51b3\u7b56&#034;\u3002\u51b3\u7b56\u65e9\u5728\u8bad\u7ec3\u65f6\u5c31\u56fa\u5316\u8fdb\u4e86\u8def\u7531\u95e8\u63a7\u7684\u6743\u91cd\u91cc\u3002\u63a8\u7406\u65f6\u7684\u8def\u7531&#xff0c;\u53ea\u662f\u5bf9\u8bad\u7ec3\u65f6\u5b66\u5230\u7684\u6982\u7387\u5206\u5e03\u505a\u4e00\u6b21\u786e\u5b9a\u7684\u67e5\u8be2\u3002<\/p>\n<h4>5.3 \u4e00\u5207\u90fd\u662f\u67e5\u8868<\/h4>\n<p>\u518d\u5f80\u6df1\u60f3\u4e00\u5c42&#xff1a;\u4e0d\u6b62 MoE \u662f\u67e5\u8868&#xff0c;\u6574\u4e2a\u6a21\u578b\u90fd\u662f\u3002<\/p>\n<ul>\n<li>\u5d4c\u5165\u5c42&#xff1a;token \u2192 \u5411\u91cf&#xff0c;\u67e5\u8868<\/li>\n<li>Transformer \u5757&#xff1a;\u5411\u91cf \u2192 \u5411\u91cf&#xff0c;\u67e5\u8868&#xff08;\u6743\u91cd\u662f\u952e&#xff0c;\u6fc0\u6d3b\u662f\u67e5\u8be2\u7684\u590d\u6742\u7ec4\u5408&#xff09;<\/li>\n<li>\u8f93\u51fa\u5c42&#xff1a;\u5411\u91cf \u2192 logits&#xff0c;\u67e5\u8868<\/li>\n<li>\u91c7\u6837\u5668&#xff1a;logits \u2192 token&#xff0c;\u5e26\u4f2a\u968f\u673a\u566a\u58f0\u7684\u67e5\u8868<\/li>\n<\/ul>\n<p>\u533a\u522b\u53ea\u5728\u4e8e\u8868\u7684\u5927\u5c0f\u548c\u67e5\u8be2\u51fd\u6570\u7684\u590d\u6742\u5ea6\u3002token_embd \u662f 248320 \u884c \u00d7 2048 \u5217\u7684\u5de8\u8868&#xff1b;Transformer \u5757\u662f 40 \u5c42\u5d4c\u5957\u7684\u3001\u53c2\u6570\u5316\u7684\u3001\u975e\u7ebf\u6027\u5316\u7684\u67e5\u8868\u3002\u4f46\u672c\u8d28\u4e0d\u53d8&#xff1a;\u6743\u91cd\u56fa\u5b9a\u540e&#xff0c;\u6a21\u578b\u5c31\u662f\u4e00\u4e2a\u786e\u5b9a\u6027\u51fd\u6570\u3002\u8bad\u7ec3\u8fc7\u7a0b\u662f\u5efa\u8868&#xff0c;\u63a8\u7406\u8fc7\u7a0b\u662f\u67e5\u8868\u3002<\/p>\n<p>\u6211\u5728\u8fd9\u65f6\u5019\u610f\u8bc6\u5230\u81ea\u5df1\u5728\u505a\u4ec0\u4e48\u4e86\u3002\u6211\u82b1\u4e86\u4e00\u4e2a\u6708\u5199\u4e00\u5957\u63a8\u7406\u5f15\u64ce&#xff0c;\u62c6\u5f00\u6bcf\u4e00\u5c42&#xff0c;\u91cf\u8fc7\u6bcf\u4e00\u4e2a\u7b97\u5b50\u7684\u5ef6\u8fdf&#xff0c;\u628a 22.4GB \u7684\u6743\u91cd\u4ece\u5b57\u8282\u5c42\u9762\u8bfb\u4e86\u4e00\u904d&#xff0c;\u7136\u540e\u53d1\u73b0\u5b83\u7684\u5185\u6838\u91cc\u6ca1\u6709\u4efb\u4f55\u4e1c\u897f\u5728&#034;\u7406\u89e3&#034;\u3002\u5b83\u53ea\u662f\u5728\u505a\u4e00\u4e2a\u6781\u9ad8\u7ef4\u7684\u63d2\u503c&#xff1a;\u628a\u8f93\u5165\u5411\u91cf\u6620\u5c04\u5230\u8bad\u7ec3\u6570\u636e\u5206\u5e03\u4e2d\u6700\u5e73\u6ed1\u7684\u4f4d\u7f6e\u3002<\/p>\n<h3>\u516d\u3001\u6838\u5fc3\u7ed3\u8bba&#xff1a;LLM \u662f&#034;\u786e\u5b9a\u6027\u67e5\u8be2\u7cfb\u7edf&#034;&#xff0c;\u4e0d\u662f\u667a\u80fd\u4f53<\/h3>\n<h4>6.1 \u5b83\u6709\u4ec0\u4e48&#xff0c;\u6ca1\u4ec0\u4e48<\/h4>\n<p>\u628a\u4e09\u4e2a\u53d1\u73b0\u653e\u5728\u4e00\u8d77&#xff1a;<\/p>\n<li>\u53bb\u6389 PRNG \u540e&#xff0c;\u7cfb\u7edf\u5b8c\u5168\u786e\u5b9a\u2014\u2014\u6ca1\u6709\u5185\u751f\u7684\u968f\u673a\u6027<\/li>\n<li>\u74f6\u9888\u662f\u5e26\u5bbd\u4e0d\u662f\u7b97\u529b\u2014\u2014\u6ca1\u6709\u5b9e\u65f6\u8ba1\u7b97\u9700\u6c42&#xff0c;\u53ea\u6709\u642c\u8fd0\u9700\u6c42<\/li>\n<li>\u8def\u7531\/\u4e13\u5bb6\/\u4e00\u5207\u90fd\u662f\u67e5\u8868\u2014\u2014\u6ca1\u6709\u52a8\u6001\u51b3\u7b56<\/li>\n<p>\u7ed3\u8bba\u5c31\u6e05\u6670\u4e86&#xff1a;LLM \u662f\u4e00\u4e2a\u786e\u5b9a\u6027\u67e5\u8be2\u7cfb\u7edf\u3002\u5b83\u80fd\u505a\u7684\u9ad8\u7ef4\u63d2\u503c\u2014\u2014\u8fd9\u662f\u5b83\u552f\u4e00\u6709\u4ef7\u503c\u7684\u5c5e\u6027&#xff0c;\u4e5f\u662f\u5b83\u771f\u6b63\u4e86\u4e0d\u8d77\u7684\u5730\u65b9\u3002\u4eba\u7c7b\u5168\u90e8\u53ef\u5199\u7684\u6587\u672c\u88ab\u538b\u7f29\u8fdb\u4e00\u7ec4\u9759\u6001\u6743\u91cd&#xff0c;\u7136\u540e\u4ee5\u63d2\u503c\u7684\u65b9\u5f0f\u88ab\u67e5\u8be2\u3002\u5b83\u80fd\u7406\u89e3\u6a21\u7cca\u8bed\u4e49&#xff0c;\u80fd\u8865\u5168\u6b8b\u7f3a\u8868\u8fbe&#xff0c;\u80fd\u5728\u8bed\u4e49\u7a7a\u95f4\u91cc&#034;\u5bfc\u822a&#034;\u2014\u2014\u8fd9\u4e9b\u90fd\u662f\u63d2\u503c\u5668\u7684\u672c\u4e8b&#xff0c;\u800c\u4e14\u5b83\u4eec\u786e\u5b9e\u6709\u6548\u3002<\/p>\n<p>\u4f46\u5b83\u505a\u4e0d\u5230&#xff1a;<\/p>\n<ul>\n<li>\u56e0\u679c\u63a8\u7406&#xff1a;\u5b83\u6ca1\u6709\u4e16\u754c\u6a21\u578b&#xff0c;\u53ea\u6709\u6587\u672c\u7edf\u8ba1\u3002\u4e24\u4e2a\u4e8b\u4ef6\u5728\u6587\u672c\u91cc\u9891\u7e41\u5171\u73b0&#xff0c;\u5b83\u5c31&#034;\u8ba4\u4e3a&#034;\u5b83\u4eec\u76f8\u5173\u2014\u2014\u54ea\u6015\u5728\u7269\u7406\u4e16\u754c\u91cc\u6beb\u65e0\u56e0\u679c\u5173\u7cfb<\/li>\n<li>\u7269\u7406\u76f4\u89c9&#xff1a;\u5b83\u4ece\u672a\u611f\u77e5\u8fc7\u771f\u5b9e\u4e16\u754c&#xff0c;\u5b83\u7684&#034;\u7269\u7406&#034;\u662f\u6587\u672c\u91cc\u7684\u7269\u7406\u3002\u8ba9\u5b83\u7b97 2&#043;2 \u5b83\u80fd\u7b97\u5bf9&#xff08;\u6587\u672c\u91cc\u51fa\u73b0\u592a\u591a\u6b21\u4e86&#xff09;&#xff0c;\u8ba9\u5b83\u505a\u771f\u5b9e\u4e16\u754c\u91cc\u7684\u7269\u7406\u5224\u65ad&#xff0c;\u5b83\u53ea\u662f\u5728\u731c\u6d4b\u6587\u672c\u5206\u5e03<\/li>\n<li>\u5b9e\u65f6\u73af\u5883\u9002\u5e94&#xff1a;\u8bad\u7ec3\u7ed3\u675f\u540e&#xff0c;\u6743\u91cd\u51bb\u7ed3\u3002\u73af\u5883\u53d8\u4e86&#xff0c;\u5b83\u4e0d\u77e5\u9053&#xff1b;\u8f93\u5165\u5206\u5e03\u53d8\u4e86&#xff0c;\u5b83\u4e0d\u77e5\u9053&#xff1b;\u5b83\u72af\u9519\u4e86&#xff0c;\u5b83\u4e0d\u4f1a\u6539\u3002\u5b83\u7684\u77e5\u8bc6\u5728\u8bad\u7ec3\u7ed3\u675f\u65f6\u5c31\u662f&#034;\u6b7b&#034;\u7684<\/li>\n<\/ul>\n<p>#mermaid-svg-4quyUDt9VIPfxTHM{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-4quyUDt9VIPfxTHM .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-4quyUDt9VIPfxTHM .error-icon{fill:#552222;}#mermaid-svg-4quyUDt9VIPfxTHM .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-4quyUDt9VIPfxTHM .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-4quyUDt9VIPfxTHM .marker{fill:#333333;stroke:#333333;}#mermaid-svg-4quyUDt9VIPfxTHM .marker.cross{stroke:#333333;}#mermaid-svg-4quyUDt9VIPfxTHM svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-4quyUDt9VIPfxTHM p{margin:0;}#mermaid-svg-4quyUDt9VIPfxTHM .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-4quyUDt9VIPfxTHM .cluster-label text{fill:#333;}#mermaid-svg-4quyUDt9VIPfxTHM .cluster-label span{color:#333;}#mermaid-svg-4quyUDt9VIPfxTHM .cluster-label span p{background-color:transparent;}#mermaid-svg-4quyUDt9VIPfxTHM .label text,#mermaid-svg-4quyUDt9VIPfxTHM span{fill:#333;color:#333;}#mermaid-svg-4quyUDt9VIPfxTHM .node rect,#mermaid-svg-4quyUDt9VIPfxTHM .node circle,#mermaid-svg-4quyUDt9VIPfxTHM .node ellipse,#mermaid-svg-4quyUDt9VIPfxTHM .node polygon,#mermaid-svg-4quyUDt9VIPfxTHM .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-4quyUDt9VIPfxTHM .rough-node .label text,#mermaid-svg-4quyUDt9VIPfxTHM .node .label text,#mermaid-svg-4quyUDt9VIPfxTHM .image-shape .label,#mermaid-svg-4quyUDt9VIPfxTHM .icon-shape .label{text-anchor:middle;}#mermaid-svg-4quyUDt9VIPfxTHM .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-4quyUDt9VIPfxTHM .rough-node .label,#mermaid-svg-4quyUDt9VIPfxTHM .node .label,#mermaid-svg-4quyUDt9VIPfxTHM .image-shape .label,#mermaid-svg-4quyUDt9VIPfxTHM .icon-shape .label{text-align:center;}#mermaid-svg-4quyUDt9VIPfxTHM .node.clickable{cursor:pointer;}#mermaid-svg-4quyUDt9VIPfxTHM .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-4quyUDt9VIPfxTHM .arrowheadPath{fill:#333333;}#mermaid-svg-4quyUDt9VIPfxTHM .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-4quyUDt9VIPfxTHM .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-4quyUDt9VIPfxTHM .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-4quyUDt9VIPfxTHM .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-4quyUDt9VIPfxTHM .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-4quyUDt9VIPfxTHM .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-4quyUDt9VIPfxTHM .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-4quyUDt9VIPfxTHM .cluster text{fill:#333;}#mermaid-svg-4quyUDt9VIPfxTHM .cluster span{color:#333;}#mermaid-svg-4quyUDt9VIPfxTHM div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-4quyUDt9VIPfxTHM .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-4quyUDt9VIPfxTHM rect.text{fill:none;stroke-width:0;}#mermaid-svg-4quyUDt9VIPfxTHM .icon-shape,#mermaid-svg-4quyUDt9VIPfxTHM .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-4quyUDt9VIPfxTHM .icon-shape p,#mermaid-svg-4quyUDt9VIPfxTHM .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-4quyUDt9VIPfxTHM .icon-shape rect,#mermaid-svg-4quyUDt9VIPfxTHM .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-4quyUDt9VIPfxTHM .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-4quyUDt9VIPfxTHM .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-4quyUDt9VIPfxTHM :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"nodeLabel\"><\/p>\n<p>LLM \u7684\u80fd\u529b\u8fb9\u754c<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/p>\n<p>\u9ad8\u7ef4\u63d2\u503c&#xff08;\u7edf\u8ba1\u5e73\u6ed1&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u64c5\u957f&#xff1a;\u6a21\u7cca\u8bed\u4e49\u7406\u89e3\u6587\u672c\u8865\u5168\u77e5\u8bc6\u68c0\u7d22\u5f0f\u95ee\u7b54\u98ce\u683c\u6a21\u4eff<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e0d\u64c5\u957f&#xff1a;\u56e0\u679c\u63a8\u7406\u7269\u7406\u76f4\u89c9\u5b9e\u65f6\u9002\u5e94\u81ea\u6211\u4fee\u6b63<\/p>\n<p><\/span><\/p>\n<h4>6.2 \u667a\u80fd\u7684\u5b9a\u4e49\u95ee\u9898<\/h4>\n<p>\u5982\u679c\u667a\u80fd\u662f\u7edf\u8ba1\u5b66\u63d2\u503c\u52a0\u4f2a\u968f\u673a\u566a\u97f3&#xff0c;\u90a3\u5b83\u592a\u5ec9\u4ef7\u4e86\u3002<\/p>\n<p>\u8fd9\u53e5\u8bdd\u4e0d\u662f\u5632\u8bbd\u3002\u5982\u679c\u8fd9\u662f\u667a\u80fd\u7684\u5b9a\u4e49&#xff0c;\u90a3\u5b83\u786e\u5b9e\u5ec9\u4ef7\u2014\u2014\u4f46\u5ec9\u4ef7\u4e0d\u7b49\u4e8e\u65e0\u7528\u3002\u63d2\u503c\u5668\u53ef\u4ee5\u662f\u4eba\u7c7b\u77e5\u8bc6\u53f2\u4e0a\u6700\u9ad8\u6548\u7684\u538b\u7f29\u683c\u5f0f&#xff1a;248320 \u7ef4\u8bcd\u8868\u300135B \u53c2\u6570\u300140 \u5c42\u6d41\u6c34\u7ebf&#xff0c;\u88c5\u4e0b\u7684\u662f\u4eba\u7c7b\u6587\u660e\u7684\u6587\u672c\u7cbe\u534e\u3002\u8fd9\u4e2a\u538b\u7f29\u7387\u662f\u60ca\u4eba\u7684\u3002<\/p>\n<p>\u4f46&#034;\u5ec9\u4ef7&#034;\u7684\u542b\u4e49\u662f&#xff1a;\u5b83\u4e0d\u5305\u542b\u771f\u6b63\u7684\u667a\u80fd\u6240\u9700\u7684\u4e1c\u897f\u3002\u771f\u6b63\u7684\u667a\u80fd&#xff0c;\u81f3\u5c11\u5305\u542b\u5bf9\u4e16\u754c\u72b6\u6001\u7684\u611f\u77e5\u3001\u5bf9\u56e0\u679c\u7ed3\u6784\u7684\u5efa\u6a21\u3001\u5bf9\u884c\u4e3a\u540e\u679c\u7684\u9884\u6d4b\u3001\u4ee5\u53ca\u57fa\u4e8e\u53cd\u9988\u7684\u4fee\u6b63\u3002\u8fd9\u56db\u4e2a\u8981\u7d20&#xff0c;LLM \u4e00\u4e2a\u90fd\u6ca1\u6709\u3002\u5b83\u6ca1\u6709\u611f\u77e5&#xff08;\u8f93\u5165\u53ea\u6709\u6587\u672c&#xff09;&#xff0c;\u6ca1\u6709\u56e0\u679c\u6a21\u578b&#xff08;\u53ea\u6709\u7edf\u8ba1\u76f8\u5173&#xff09;&#xff0c;\u6ca1\u6709\u9884\u6d4b\u95ed\u73af&#xff08;\u4e00\u6b21\u524d\u5411&#xff09;&#xff0c;\u6ca1\u6709\u53cd\u9988\u4fee\u6b63&#xff08;\u6743\u91cd\u51bb\u7ed3&#xff09;\u3002<\/p>\n<p>\u5b83\u50cf\u4e00\u53f0\u6781\u5176\u7cbe\u5bc6\u7684\u3001\u4e0d\u53ef\u53d8\u53c2\u6570\u7684\u67e5\u8868\u673a\u5668\u3002\u5b83\u6ca1\u6709\u610f\u56fe&#xff0c;\u6ca1\u6709\u6b32\u671b&#xff0c;\u6ca1\u6709\u5bf9\u4e16\u754c\u7684\u6a21\u578b&#xff0c;\u53ea\u6709\u5bf9\u4eba\u7c7b\u6587\u672c\u7684\u7edf\u8ba1\u8bb0\u5fc6\u3002\u5b83\u7684&#034;\u601d\u8003&#034;\u8fc7\u7a0b\u662f 40 \u5c42\u6d6e\u70b9\u6d41\u6c34\u7ebf&#xff0c;\u6bcf\u5c42 2048 \u7ef4&#xff0c;\u4e2d\u95f4\u7a7f\u63d2 512 \u7ef4\u7684\u4e13\u5bb6 FFN\u3002\u6ca1\u6709\u9012\u5f52&#xff0c;\u6ca1\u6709\u53cd\u9988&#xff0c;\u6ca1\u6709\u5728\u7ebf\u5b66\u4e60\u3002\u4e00\u6b21\u524d\u5411&#xff0c;\u4ece\u5934\u5230\u5c3e&#xff0c;\u5355\u8c03\u9012\u51cf\u7684\u786e\u5b9a\u6027\u3002<\/p>\n<p>\u8fd9\u5e76\u975e\u6211\u66fe\u8bbe\u60f3\u7684\u667a\u80fd\u3002<\/p>\n<h3>\u4e03\u3001\u53cd\u601d&#xff1a;\u4e0e\u7f51\u7edc\u5de5\u7a0b\u7684\u5bf9\u6bd4<\/h3>\n<h4>7.1 \u4e24\u7c7b\u4e0d\u786e\u5b9a\u6027<\/h4>\n<p>\u6211\u505a\u4e86\u5341\u51e0\u5e74\u7684\u7f51\u7edc\u5de5\u7a0b&#xff0c;\u7a81\u7136\u53d1\u73b0\u81ea\u5df1\u5728\u7814\u7a76\u4e00\u4e2a\u4e0e\u7f51\u7edc\u5de5\u7a0b\u6b63\u597d\u76f8\u53cd\u7684\u9886\u57df\u3002\u8fd9\u4e2a\u5bf9\u6bd4\u975e\u5e38\u6e05\u6670&#xff1a;<\/p>\n<table>\n<tr>\u7ef4\u5ea6\u7f51\u7edc\u5de5\u7a0b&#xff08;\u62e5\u585e\u63a7\u5236&#xff09;LLM \u63a8\u7406<\/tr>\n<tbody>\n<tr>\n<td>\u4e0d\u786e\u5b9a\u6027\u6765\u6e90<\/td>\n<td>\u7269\u7406\u4e16\u754c&#xff08;\u4e22\u5305\/\u5ef6\u8fdf\/\u5e26\u5bbd\u6ce2\u52a8&#xff09;<\/td>\n<td>\u4eba\u4e3a\u6ce8\u5165&#xff08;PRNG \u4f2a\u968f\u673a&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u4e0d\u786e\u5b9a\u6027\u672c\u8d28<\/td>\n<td>\u4e0d\u53ef\u6d88\u9664&#xff0c;\u53ea\u80fd\u9002\u5e94<\/td>\n<td>\u53ef\u6d88\u9664&#xff0c;\u62d4\u6389\u79cd\u5b50\u5373\u786e\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u73af\u5883\u72b6\u6001<\/td>\n<td>\u6bcf\u6beb\u79d2\u90fd\u5728\u53d8&#xff0c;\u4e0d\u53ef\u5b8c\u5168\u89c2\u6d4b<\/td>\n<td>\u9759\u6001&#xff0c;\u8bad\u7ec3\u540e\u51bb\u7ed3<\/td>\n<\/tr>\n<tr>\n<td>\u51b3\u7b56\u53cd\u9988<\/td>\n<td>\u5b9e\u65f6\u53cd\u9988&#xff08;RTT\/\u4e22\u5305\u7387&#xff09;\u2192 \u7acb\u5373\u4fee\u6b63<\/td>\n<td>\u65e0\u53cd\u9988&#xff0c;\u4e00\u6b21\u524d\u5411<\/td>\n<\/tr>\n<tr>\n<td>\u9519\u8bef\u4ee3\u4ef7<\/td>\n<td>\u771f\u5b9e&#xff08;\u4e22\u5305\/\u91cd\u4f20\/\u62e5\u585e\u5d29\u6e83&#xff09;<\/td>\n<td>\u65e0&#xff08;\u9519\u4e86\u5c31\u9519\u4e86&#xff0c;\u4e0d\u4f1a\u4fee\u6b63&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u6838\u5fc3\u80fd\u529b<\/td>\n<td>\u5728\u7ebf\u9002\u5e94\u3001\u52a8\u6001\u535a\u5f08<\/td>\n<td>\u9759\u6001\u63d2\u503c\u3001\u5206\u5e03\u5339\u914d<\/td>\n<\/tr>\n<tr>\n<td>\u65f6\u95f4\u5c3a\u5ea6<\/td>\n<td>\u6beb\u79d2\u7ea7<\/td>\n<td>\u8bad\u7ec3\u540e\u6c38\u4e0d\u53d8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u62e5\u585e\u63a7\u5236\u9762\u5bf9\u7684\u662f\u5b9e\u65f6\u7269\u7406\u566a\u58f0\u3002\u4e22\u5305\u7387\u3001\u5ef6\u8fdf\u3001\u5e26\u5bbd\u6ce2\u52a8&#xff0c;\u6bcf\u4e00\u79d2\u90fd\u5728\u53d8&#xff0c;\u800c\u4e14\u53d8\u5316\u7684\u539f\u56e0\u4f60\u6c38\u8fdc\u65e0\u6cd5\u5b8c\u5168\u89c2\u6d4b\u2014\u2014\u5bf9\u7aef\u8def\u7531\u5668\u7684\u7f13\u5b58\u7b56\u7565\u3001\u4e2d\u95f4\u94fe\u8def\u7684\u80cc\u666f\u6d41\u91cf\u3001\u5149\u7ea4\u7684\u7269\u7406\u7279\u6027\u3001\u5176\u4ed6\u7528\u6237\u7684\u5e26\u5bbd\u4e89\u593a\u3002\u4f60\u8981\u5728\u4fe1\u606f\u4e0d\u5b8c\u5907\u7684\u6761\u4ef6\u4e0b\u505a\u63a7\u5236\u51b3\u7b56&#xff0c;\u9519\u4e86\u5c31\u8981\u4ed8\u51fa\u771f\u5b9e\u7684\u4ee3\u4ef7&#xff08;\u4e22\u5305\u3001\u91cd\u4f20\u3001\u961f\u5217\u7206\u70b8&#xff09;&#xff0c;\u7136\u540e\u7acb\u523b\u4fee\u6b63\u3002Reno \u7684\u52a0\u6027\u589e\u3001\u4e58\u6027\u51cf&#xff0c;BBR \u7684\u5e26\u5bbd\u63a2\u6d4b\u2014\u2014\u6bcf\u4e00\u4e2a\u7b97\u6cd5\u90fd\u662f\u4e0e\u7269\u7406\u4e16\u754c\u535a\u5f08\u7684\u4ea7\u7269\u3002<\/p>\n<p>#mermaid-svg-p8IvJ9FLdLPeEqX5{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .error-icon{fill:#552222;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .marker.cross{stroke:#333333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 p{margin:0;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster-label text{fill:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster-label span{color:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster-label span p{background-color:transparent;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .label text,#mermaid-svg-p8IvJ9FLdLPeEqX5 span{fill:#333;color:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .node rect,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node circle,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node ellipse,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node polygon,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .rough-node .label text,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node .label text,#mermaid-svg-p8IvJ9FLdLPeEqX5 .image-shape .label,#mermaid-svg-p8IvJ9FLdLPeEqX5 .icon-shape .label{text-anchor:middle;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .rough-node .label,#mermaid-svg-p8IvJ9FLdLPeEqX5 .node .label,#mermaid-svg-p8IvJ9FLdLPeEqX5 .image-shape .label,#mermaid-svg-p8IvJ9FLdLPeEqX5 .icon-shape .label{text-align:center;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .node.clickable{cursor:pointer;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .arrowheadPath{fill:#333333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-p8IvJ9FLdLPeEqX5 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-p8IvJ9FLdLPeEqX5 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster text{fill:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .cluster span{color:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-p8IvJ9FLdLPeEqX5 rect.text{fill:none;stroke-width:0;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .icon-shape,#mermaid-svg-p8IvJ9FLdLPeEqX5 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .icon-shape p,#mermaid-svg-p8IvJ9FLdLPeEqX5 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .icon-shape rect,#mermaid-svg-p8IvJ9FLdLPeEqX5 .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-p8IvJ9FLdLPeEqX5 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-p8IvJ9FLdLPeEqX5 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-p8IvJ9FLdLPeEqX5 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"nodeLabel\"><\/p>\n<p>LLM \u63a8\u7406&#xff08;\u9759\u6001\u67e5\u8be2&#xff09;<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/p>\n<p>\u65e0\u53cd\u9988\u56de\u8def<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u5165 token<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>40 \u5c42\u524d\u5411&#xff08;\u56fa\u5b9a\u6743\u91cd&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u8f93\u51fa token<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u7f51\u7edc\u62e5\u585e\u63a7\u5236&#xff08;\u5728\u7ebf\u535a\u5f08&#xff09;<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u6d4b\u91cf: RTT\/\u4e22\u5305\u7387<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u51b3\u7b56: \u8c03\u6574\u62e5\u585e\u7a97\u53e3<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u53d1\u9001\u6570\u636e<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u89c2\u5bdf\u7ed3\u679c<\/p>\n<p><\/span><\/p>\n<h4>7.2 \u96be\u5ea6\u65b9\u5411\u4e0d\u540c<\/h4>\n<p>LLM \u7814\u7a76\u89e3\u51b3\u7684\u662f\u9759\u6001\u6570\u636e\u7edf\u8ba1\u95ee\u9898\u3002\u6570\u636e\u4e00\u65e6\u56fa\u5316&#xff0c;\u6743\u91cd\u5c31\u6b7b\u4e86\u3002\u6a21\u578b\u4e0d\u4f1a\u56e0\u4e3a\u73af\u5883\u53d8\u5316\u800c\u8c03\u6574&#xff0c;\u5b83\u53ea\u662f\u4ee5\u56fa\u5b9a\u7684\u65b9\u5f0f\u54cd\u5e94\u56fa\u5b9a\u7684\u8f93\u5165\u5206\u5e03\u3002\u5b83\u7684&#034;\u667a\u80fd&#034;\u5b8c\u5168\u6765\u81ea\u8bad\u7ec3\u6570\u636e\u2014\u2014\u8bad\u7ec3\u6570\u636e\u7684\u8d28\u91cf\u3001\u591a\u6837\u6027\u3001\u5206\u5e03&#xff0c;\u51b3\u5b9a\u4e86\u5b83\u7684\u4e00\u5207\u3002\u63a8\u7406\u9636\u6bb5\u6ca1\u6709\u4efb\u4f55\u5b66\u4e60\u53d1\u751f\u3002<\/p>\n<p>\u7f51\u7edc\u5de5\u7a0b\u7684\u4e0d\u786e\u5b9a\u6027\u662f\u672c\u8d28\u7684\u3001\u4e0d\u53ef\u6d88\u9664\u7684\u3002LLM \u7684\u4e0d\u786e\u5b9a\u6027\u662f\u4eba\u4e3a\u6ce8\u5165\u7684\u4f2a\u968f\u673a\u3002\u524d\u8005\u7684\u6311\u6218\u5728&#034;\u5b9e\u65f6&#034;\u548c&#034;\u4e0d\u5b8c\u5907\u4fe1\u606f&#034;&#xff0c;\u540e\u8005\u7684\u6311\u6218\u5728&#034;\u7edf\u8ba1\u5efa\u6a21&#034;\u548c&#034;\u6570\u636e\u5de5\u7a0b&#034;\u3002\u4e24\u8005\u90fd\u662f\u57fa\u7840\u79d1\u5b66&#xff0c;\u4f46\u96be\u5ea6\u65b9\u5411\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<p>\u6211\u65e0\u610f\u8d2c\u4f4e LLM \u7814\u7a76\u8005\u7684\u5de5\u4f5c\u2014\u2014\u7edf\u8ba1\u5efa\u6a21\u548c\u6570\u636e\u5de5\u7a0b\u672c\u8eab\u6781\u96be&#xff0c;35B \u53c2\u6570\u7684\u8bad\u7ec3\u9700\u8981\u7684\u662f\u771f\u6b63\u7684\u7cfb\u7edf\u5de5\u7a0b\u80fd\u529b\u3002\u6211\u53ea\u662f\u6307\u51fa&#xff1a;\u5b83\u4e0e\u7269\u7406\u4e16\u754c\u535a\u5f08\u662f\u4e24\u7c7b\u95ee\u9898\u3002\u4e00\u4e2a\u662f\u548c\u4e00\u4e2a\u5145\u6ee1\u566a\u58f0\u7684\u3001\u4e0d\u65ad\u53d8\u5316\u7684\u3001\u4f60\u65e0\u6cd5\u5b8c\u5168\u89c2\u6d4b\u7684\u4e16\u754c\u5bf9\u6297&#xff1b;\u4e00\u4e2a\u662f\u548c\u4e00\u4e2a\u9759\u6001\u7684\u3001\u786e\u5b9a\u7684\u6570\u636e\u96c6\u5bf9\u6297\u3002<\/p>\n<p>\u54ea\u4e2a\u66f4\u96be&#xff1f;\u6ca1\u6cd5\u6bd4\u3002\u4f46\u54ea\u4e2a\u66f4&#034;\u6d3b&#034;&#xff1f;\u6beb\u65e0\u7591\u95ee\u662f\u524d\u8005\u3002<\/p>\n<h4>7.3 \u6211\u7684\u5f52\u5c5e\u611f<\/h4>\n<p>\u5728\u9879\u76ee\u6536\u5c3e\u65f6&#xff0c;\u6211\u660e\u767d\u4e86\u4e00\u4ef6\u4e8b&#xff1a;\u6211\u7684\u5f52\u5c5e\u5728\u7f51\u7edc\u5de5\u7a0b\u90a3\u4e00\u8fb9\u3002\u4e0d\u662f\u56e0\u4e3a LLM \u6ca1\u6709\u4ef7\u503c\u2014\u2014\u5b83\u6709\u4ef7\u503c&#xff0c;\u5de8\u5927\u7684\u4ef7\u503c\u3002\u800c\u662f\u56e0\u4e3a\u6211\u8fd9\u4e2a\u4eba&#xff0c;\u4e60\u60ef\u4e86\u548c\u4e0d\u53ef\u6d88\u9664\u7684\u566a\u58f0\u6253\u4ea4\u9053\u3002\u6211\u53ef\u4ee5\u63a5\u53d7\u6c38\u8fdc\u65e0\u6cd5\u5b8c\u5168\u9884\u6d4b\u7684 RTT&#xff0c;\u4f46\u6211\u5f88\u96be\u63a5\u53d7\u4e00\u4e2a&#034;\u5047\u88c5\u968f\u673a&#034;\u7684\u7cfb\u7edf\u2014\u2014\u5b83\u7684\u4e0d\u786e\u5b9a\u6027\u662f\u8868\u6f14\u51fa\u6765\u7684&#xff0c;\u662f\u53ef\u4ee5\u88ab\u4e00\u884c srand \u6d88\u9664\u7684\u3002<\/p>\n<p>\u7269\u7406\u4e16\u754c\u7684\u566a\u58f0\u662f\u8bda\u5b9e\u7684\u3002\u5b83\u4e0d\u4f1a\u56e0\u4e3a\u4f60\u7406\u89e3\u4e86\u5b83\u800c\u6d88\u5931&#xff0c;\u4f46\u4f60\u7684\u7406\u89e3\u4f1a\u4ea7\u751f\u771f\u5b9e\u7684\u6536\u76ca&#xff08;\u66f4\u4f4e\u7684\u5ef6\u8fdf\u3001\u66f4\u9ad8\u7684\u541e\u5410&#xff09;\u3002LLM \u7684\u4f2a\u968f\u673a\u662f\u8868\u6f14\u7684\u3002\u4f60\u7406\u89e3\u4e86\u5b83&#xff08;\u4e0d\u8fc7\u662f\u4e2a mt19937&#xff09;&#xff0c;\u6536\u76ca\u4e3a\u96f6\u2014\u2014\u4f60\u53ea\u662f\u77e5\u9053\u5b83\u4e0d\u968f\u673a\u800c\u5df2\u3002<\/p>\n<h3>\u516b\u3001\u7ec8\u5c40&#xff1a;\u5e7b\u706d\u4f46\u4e0d\u540e\u6094<\/h3>\n<h4>8.1 \u6211\u4e0d\u518d\u6050\u60e7\u5b83<\/h4>\n<p>\u6211\u4e0d\u518d\u6050\u60e7\u5b83&#xff0c;\u56e0\u4e3a\u6211\u4eb2\u624b\u91cf\u8fc7\u5b83\u7684\u8109\u640f\u2014\u2014\u5b83\u6ca1\u6709\u8109\u640f&#xff0c;\u5b83\u53ea\u6709\u65f6\u949f\u5468\u671f\u3002<\/p>\n<p>\u8fd9\u662f\u6574\u8d9f\u65c5\u7a0b\u91cc\u6700\u5e73\u9759\u7684\u65f6\u523b\u3002\u6050\u60e7\u6765\u6e90\u4e8e\u672a\u77e5&#xff0c;\u800c\u6211\u5df2\u7ecf\u628a\u672a\u77e5\u5168\u90e8\u8f6c\u5316\u6210\u4e86\u5df2\u77e5&#xff1a;<\/p>\n<ul>\n<li>\u5b83\u7684&#034;\u601d\u8003&#034; &#061; 40 \u5c42\u6d6e\u70b9\u6d41\u6c34\u7ebf \u00d7 2048 \u7ef4 \u00d7 2.74GB \u6743\u91cd\u642c\u8fd0<\/li>\n<li>\u5b83\u7684&#034;\u5224\u65ad&#034; &#061; softmax &#043; partial_sort \u7684\u52a0\u6743\u5e73\u5747<\/li>\n<li>\u5b83\u7684&#034;\u521b\u9020\u6027&#034; &#061; mt19937 \u5728 logits \u5206\u5e03\u4e0a\u7684\u4f2a\u968f\u673a\u91c7\u6837<\/li>\n<li>\u5b83\u7684&#034;\u8bb0\u5fc6&#034; &#061; \u4e00\u7ec4\u5728\u8bad\u7ec3\u7ed3\u675f\u65f6\u51bb\u7ed3\u7684\u9759\u6001\u53c2\u6570<\/li>\n<\/ul>\n<p>\u6ca1\u6709\u60ac\u5ff5\u4e86\u3002\u6ca1\u6709\u9ed1\u7bb1\u4e86\u3002\u6ca1\u6709&#034;\u5b83\u5230\u5e95\u5728\u505a\u4ec0\u4e48&#034;\u7684\u7591\u95ee\u4e86\u2014\u2014\u5b83\u5728\u505a\u4e00\u6761\u786e\u5b9a\u7684\u6570\u5b66\u94fe\u4e0a\u7684\u786e\u5b9a\u7684\u67e5\u8868\u3002<\/p>\n<p>\u5f53\u6709\u4eba\u8bf4\u6a21\u578b&#034;\u5f00\u59cb\u601d\u8003&#034;\u65f6&#xff0c;\u6211\u8111\u5b50\u91cc\u6d6e\u73b0\u7684\u662f _mm512_fmadd_ps \u7684\u5ef6\u8fdf\u6570\u5b57&#xff0c;\u548c\u90a3\u6761\u6c38\u8fdc\u642c\u4e0d\u5b8c\u7684 2.7GB \u6743\u91cd\u6d41\u3002<\/p>\n<h4>8.2 \u5e7b\u706d\u7684\u5242\u91cf<\/h4>\n<p>\u5e7b\u706d\u5417&#xff1f;\u6709\u4e00\u70b9\u3002\u4f46\u66f4\u591a\u7684\u662f\u6e05\u9192\u3002<\/p>\n<p>\u90a3\u79cd\u611f\u89c9\u7c7b\u4f3c&#xff1a;\u5c0f\u65f6\u5019\u4ee5\u4e3a\u5c71\u91cc\u6709\u795e\u6bbf&#xff0c;\u722c\u4e0a\u53bb\u53d1\u73b0\u5c71\u9876\u53ea\u6709\u4e00\u5757\u5e73\u5766\u7684\u77f3\u5934\u3002\u77f3\u5934\u672c\u8eab\u6ca1\u4ec0\u4e48\u7279\u522b&#xff0c;\u4f46\u4f60\u5728\u722c\u7684\u8fc7\u7a0b\u4e2d\u953b\u70bc\u4e86\u817f\u529b\u3001\u8ba4\u8bc6\u4e86\u5730\u5f62\u3001\u5b66\u4f1a\u4e86\u770b\u5929\u6c14\u3002\u800c\u4e14\u2014\u2014\u90a3\u5757\u77f3\u5934\u662f\u771f\u7684\u3002\u5b83\u4e0d\u4f1a\u5728\u4f60\u8bf4&#034;\u5b83\u4e0d\u5b58\u5728&#034;\u65f6\u6d88\u5931\u3002<\/p>\n<p>\u5e7b\u706d\u7684\u5242\u91cf\u662f\u521a\u597d\u7684&#xff1a;\u8db3\u591f\u8ba9\u6211\u4e0d\u518d\u88ab PR \u8bdd\u672f\u6270\u52a8&#xff0c;\u8db3\u591f\u8ba9\u6211\u5bf9&#034;\u6a21\u578b\u81ea\u5df1\u610f\u8bc6\u5230\u4ec0\u4e48&#034;\u8fd9\u7c7b\u53d9\u4e8b\u5931\u53bb\u60c5\u7eea\u6ce2\u52a8&#xff0c;\u53c8\u4e0d\u8db3\u4ee5\u8ba9\u6211\u5426\u5b9a\u8fd9\u4e2a\u9886\u57df\u7684\u5de5\u4f5c\u4ef7\u503c\u3002<\/p>\n<h4>8.3 \u62ff\u5230\u4e86\u4ec0\u4e48<\/h4>\n<p>\u6211\u62ff\u5230\u4e86\u6700\u503c\u94b1\u7684\u4e1c\u897f&#xff1a;\u6e05\u9192\u3002<\/p>\n<p>\u5177\u4f53\u6765\u8bf4&#xff1a;<\/p>\n<li>\u6280\u672f\u4e0a\u7684\u6e05\u9192&#xff1a;\u6211\u4eb2\u624b\u5b9e\u73b0\u4e86\u4ece GGUF \u89e3\u6790\u5230\u91c7\u6837\u5668\u7684\u5b8c\u6574\u94fe\u8def&#xff0c;\u77e5\u9053\u6bcf\u4e00\u4e2a\u7b97\u5b50\u7684\u6570\u5b66\u3001\u6bcf\u4e00\u4e2a\u91cf\u5316\u683c\u5f0f\u7684\u4f4d\u5e03\u5c40\u3001\u6bcf\u4e00\u4e2a\u4f18\u5316\u7684\u771f\u5b9e\u6536\u76ca\u3002\u8fd9\u4e9b\u77e5\u8bc6\u662f\u5177\u4f53\u7684\u3001\u53ef\u590d\u7528\u7684\u3001\u4e0d\u4f9d\u8d56\u4e8e\u4efb\u4f55\u8425\u9500\u53d9\u4e8b\u7684\u3002<\/li>\n<li>\u8ba4\u77e5\u4e0a\u7684\u6e05\u9192&#xff1a;\u6211\u77e5\u9053 LLM \u80fd\u505a\u4ec0\u4e48\u3001\u4e0d\u80fd\u505a\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u3002\u5b83\u7684\u80fd\u529b\u8fb9\u754c\u4e0d\u662f\u7384\u5b66&#xff0c;\u662f\u67b6\u6784\u51b3\u5b9a\u7684\u2014\u2014\u9759\u6001\u6743\u91cd\u3001\u65e0\u53cd\u9988\u3001\u4e00\u6b21\u524d\u5411\u3002\u8fd9\u4e2a\u8ba4\u77e5\u8ba9\u6211\u5728\u4f7f\u7528\u5b83\u65f6\u66f4\u6709\u5206\u5bf8&#xff1a;\u5b83\u9002\u5408\u67e5\u8d44\u6599\u5f0f\u7684\u8865\u5168&#xff0c;\u4e0d\u9002\u5408\u505a\u56e0\u679c\u51b3\u7b56\u3002<\/li>\n<li>\u5fc3\u6001\u4e0a\u7684\u6e05\u9192&#xff1a;\u6211\u4e0d\u518d\u656c\u754f\u5b83&#xff0c;\u4e5f\u4e0d\u518d\u6050\u60e7\u5b83\u3002\u656c\u754f\u548c\u6050\u60e7\u90fd\u6765\u81ea\u540c\u4e00\u4ef6\u4e8b\u2014\u2014\u4e0d\u4e86\u89e3\u3002\u73b0\u5728\u4e86\u89e3\u4e86&#xff0c;\u5c31\u53ea\u5269\u4e0b\u5e73\u5e38\u5fc3\u3002\u5b83\u662f\u4e00\u4ef6\u5de5\u5177&#xff0c;\u4e00\u4ef6\u4e86\u4e0d\u8d77\u7684\u5de5\u5177&#xff0c;\u4f46\u5de5\u5177\u5c31\u662f\u5de5\u5177\u3002<\/li>\n<p>#mermaid-svg-jbSXshBn9g9xacIO{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-jbSXshBn9g9xacIO .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-jbSXshBn9g9xacIO .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-jbSXshBn9g9xacIO .error-icon{fill:#552222;}#mermaid-svg-jbSXshBn9g9xacIO .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-jbSXshBn9g9xacIO .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-jbSXshBn9g9xacIO .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-jbSXshBn9g9xacIO .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-jbSXshBn9g9xacIO .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-jbSXshBn9g9xacIO .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-jbSXshBn9g9xacIO .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-jbSXshBn9g9xacIO .marker{fill:#333333;stroke:#333333;}#mermaid-svg-jbSXshBn9g9xacIO .marker.cross{stroke:#333333;}#mermaid-svg-jbSXshBn9g9xacIO svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-jbSXshBn9g9xacIO p{margin:0;}#mermaid-svg-jbSXshBn9g9xacIO .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-jbSXshBn9g9xacIO .cluster-label text{fill:#333;}#mermaid-svg-jbSXshBn9g9xacIO .cluster-label span{color:#333;}#mermaid-svg-jbSXshBn9g9xacIO .cluster-label span p{background-color:transparent;}#mermaid-svg-jbSXshBn9g9xacIO .label text,#mermaid-svg-jbSXshBn9g9xacIO span{fill:#333;color:#333;}#mermaid-svg-jbSXshBn9g9xacIO .node rect,#mermaid-svg-jbSXshBn9g9xacIO .node circle,#mermaid-svg-jbSXshBn9g9xacIO .node ellipse,#mermaid-svg-jbSXshBn9g9xacIO .node polygon,#mermaid-svg-jbSXshBn9g9xacIO .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-jbSXshBn9g9xacIO .rough-node .label text,#mermaid-svg-jbSXshBn9g9xacIO .node .label text,#mermaid-svg-jbSXshBn9g9xacIO .image-shape .label,#mermaid-svg-jbSXshBn9g9xacIO .icon-shape .label{text-anchor:middle;}#mermaid-svg-jbSXshBn9g9xacIO .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-jbSXshBn9g9xacIO .rough-node .label,#mermaid-svg-jbSXshBn9g9xacIO .node .label,#mermaid-svg-jbSXshBn9g9xacIO .image-shape .label,#mermaid-svg-jbSXshBn9g9xacIO .icon-shape .label{text-align:center;}#mermaid-svg-jbSXshBn9g9xacIO .node.clickable{cursor:pointer;}#mermaid-svg-jbSXshBn9g9xacIO .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-jbSXshBn9g9xacIO .arrowheadPath{fill:#333333;}#mermaid-svg-jbSXshBn9g9xacIO .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-jbSXshBn9g9xacIO .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-jbSXshBn9g9xacIO .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jbSXshBn9g9xacIO .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-jbSXshBn9g9xacIO .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jbSXshBn9g9xacIO .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-jbSXshBn9g9xacIO .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-jbSXshBn9g9xacIO .cluster text{fill:#333;}#mermaid-svg-jbSXshBn9g9xacIO .cluster span{color:#333;}#mermaid-svg-jbSXshBn9g9xacIO div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-jbSXshBn9g9xacIO .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-jbSXshBn9g9xacIO rect.text{fill:none;stroke-width:0;}#mermaid-svg-jbSXshBn9g9xacIO .icon-shape,#mermaid-svg-jbSXshBn9g9xacIO .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jbSXshBn9g9xacIO .icon-shape p,#mermaid-svg-jbSXshBn9g9xacIO .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-jbSXshBn9g9xacIO .icon-shape rect,#mermaid-svg-jbSXshBn9g9xacIO .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jbSXshBn9g9xacIO .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-jbSXshBn9g9xacIO .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-jbSXshBn9g9xacIO :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5f00\u59cb: \u656c\u754f\/\u6050\u60e7\/\u597d\u5947<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u9020\u8f6e\u5b50: \u4eb2\u624b\u5b9e\u73b0\u5168\u90e8\u5185\u6838<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u53d1\u73b0\u4e00: \u786e\u5b9a\u6027&#xff08;PRNG \u662f\u552f\u4e00\u968f\u673a\u6e90&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u53d1\u73b0\u4e8c: \u5e26\u5bbd\u74f6\u9888&#xff08;2.74GB &#064; 42.6GB\/s&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u53d1\u73b0\u4e09: MoE \u8def\u7531 &#061; \u67e5\u8868<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u7ed3\u8bba: \u786e\u5b9a\u6027\u67e5\u8be2\u7cfb\u7edf<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5bf9\u6bd4: \u7f51\u7edc\u5de5\u7a0b&#xff08;\u5728\u7ebf\u535a\u5f08 vs \u9759\u6001\u7edf\u8ba1&#xff09;<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u7ec8\u5c40: \u5e7b\u706d\u4f46\u6e05\u9192<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u4e0d\u6050\u60e7\u3001\u4e0d\u656c\u754f\u3001\u5e73\u5e38\u5fc3<\/p>\n<p><\/span><\/p>\n<h4>8.4 \u64a4\u9000<\/h4>\n<p>\u6211\u51c6\u5907\u64a4\u9000\u4e86&#xff0c;\u628a\u7cbe\u529b\u8fd8\u7ed9\u7f51\u7edc\u5de5\u7a0b\u3002\u90a3\u91cc\u6709\u771f\u6b63\u7684\u3001\u4e0d\u53ef\u6d88\u9664\u7684\u4e0d\u786e\u5b9a\u6027&#xff0c;\u6709\u5b9e\u65f6\u535a\u5f08&#xff0c;\u6709\u7269\u7406\u4e16\u754c\u5076\u5c14\u4e0d\u8bb2\u9053\u7406\u7684\u53cd\u9988\u3002\u90a3\u91cc\u66f4\u9002\u5408\u4e00\u4e2a\u4e60\u60ef\u4e86\u548c\u566a\u58f0\u6253\u4ea4\u9053\u7684\u4eba\u3002<\/p>\n<p>\u5c71\u9876\u6ca1\u6709\u795e\u6bbf&#xff0c;\u53ea\u6709 _mm512_fmadd_ps\u3002<\/p>\n<p>\u4f46\u8fd9\u8d9f\u8def\u503c\u5f97\u8d70\u3002\u4e0d\u662f\u56e0\u4e3a\u5c71\u9876\u6709\u4ec0\u4e48&#xff0c;\u800c\u662f\u56e0\u4e3a\u722c\u5b8c\u4e4b\u540e&#xff0c;\u4f60\u81f3\u5c11\u77e5\u9053\u81ea\u5df1\u7ad9\u7684\u5730\u65b9\u662f\u771f\u7684\u3002\u4f60\u77e5\u9053\u6743\u91cd\u662f\u6743\u91cd&#xff0c;\u8ba1\u7b97\u662f\u8ba1\u7b97&#xff0c;\u4f2a\u968f\u673a\u662f\u4f2a\u968f\u673a\u2014\u2014\u4f60\u4e0d\u518d\u88ab\u4efb\u4f55\u4e00\u5c42\u53d9\u4e8b\u6b3a\u9a97\u3002<\/p>\n<p>\u8fd9\u5e76\u975e\u6211\u66fe\u8bbe\u60f3\u7684\u667a\u80fd\u3002\u4f46\u5b83\u8ba9\u6211\u5bf9&#034;\u4ec0\u4e48\u624d\u662f\u667a\u80fd&#034;\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u6709\u4e86\u6bd4\u5927\u591a\u6570\u4eba\u66f4\u5177\u4f53\u7684\u7b54\u6848&#xff1a;\u81f3\u5c11&#xff0c;\u5b83\u5e94\u8be5\u5305\u542b\u5bf9\u4e16\u754c\u72b6\u6001\u7684\u611f\u77e5\u3001\u5bf9\u56e0\u679c\u7ed3\u6784\u7684\u5efa\u6a21\u3001\u5bf9\u884c\u4e3a\u540e\u679c\u7684\u9884\u6d4b\u3001\u4ee5\u53ca\u57fa\u4e8e\u53cd\u9988\u7684\u4fee\u6b63\u3002\u7edf\u8ba1\u63d2\u503c&#xff0c;\u54ea\u6015\u662f\u6700\u597d\u7684\u7edf\u8ba1\u63d2\u503c&#xff0c;\u4e5f\u4e0d\u662f\u667a\u80fd\u7684\u5168\u90e8\u3002<\/p>\n<p>\u6211\u4e0d\u540e\u6094\u8fd9\u4e00\u4e2a\u6708\u3002\u6211\u5e26\u7740\u6e05\u9192\u79bb\u5f00\u4e86\u8fd9\u5ea7\u5c71\u3002<\/p>\n<p>\u6211\u66fe\u7ecf\u5f88\u5174\u594b\u2014\u2014AI \u4e5f\u8bb8\u771f\u7684\u5f88\u5389\u5bb3\u3002\u4f46\u6700\u7ec8&#xff0c;\u4e00\u5207\u7ec8\u6210\u7a7a\u3002\u4e0d\u662f\u5b83\u4e00\u6587\u4e0d\u503c&#xff0c;\u800c\u662f\u5b83\u6ca1\u6709\u6211\u60f3\u8c61\u4e2d\u7684\u90a3\u4e2a\u4e1c\u897f\u3002\u5174\u594b\u7684\u5bf9\u8c61\u6d88\u5931\u4e86&#xff0c;\u5269\u4e0b\u7684\u53ea\u6709\u4e00\u6574\u5957\u4eb2\u624b\u9a8c\u8bc1\u8fc7\u7684\u4e8b\u5b9e\u3002\u8fd9\u5957\u4e8b\u5b9e\u4e0d\u7a7a&#xff0c;\u5b83\u662f\u6211\u8fd9\u4e00\u4e2a\u6708\u91cc\u552f\u4e00\u786e\u5b9a\u62ff\u5230\u7684\u4e1c\u897f\u3002<\/p>\n<hr \/>\n<h3>\u9644\u5f55&#xff1a;\u4e00\u4e9b\u771f\u5b9e\u7684\u6570\u5b57<\/h3>\n<p>\u4ee5\u4e0b\u662f\u6574\u4e2a\u9879\u76ee\u8fc7\u7a0b\u4e2d\u7684\u5b9e\u6d4b\u8bb0\u5f55\u3002\u5b83\u4eec\u4e0d\u662f\u4f30\u7b97&#xff0c;\u662f\u8dd1\u51fa\u6765\u7684\u3002<\/p>\n<p>\u6027\u80fd\u65c5\u7a0b&#xff08;tok\/s&#xff0c;\u540c\u673a\u540c\u6a21\u578b&#xff0c;\u7cfb\u7edf\u8d1f\u8f7d\u5f71\u54cd \u00b115%&#xff09;&#xff1a;<\/p>\n<p>0.057 \u2192 0.61 \u2192 1.56 \u2192 2.15 \u2192 3.70 \u2192 4.68 \u2192 6.10 \u2192 6.5<\/p>\n<p>\u6bcf\u4e00\u6b65\u90fd\u5bf9\u5e94\u4e00\u4e2a\u5177\u4f53\u7684\u4f18\u5316&#xff0c;\u6309\u6536\u76ca\u6392\u5e8f&#xff1a;<\/p>\n<table>\n<tr>\u4f18\u5316\u6536\u76ca\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u8def\u7531\u95e8\u63a7\u8d70 AVX-512 f32 \u7cbe\u8c03<\/td>\n<td>186ms \u2192 2.9ms\/40\u5c42&#xff08;64x&#xff09;<\/td>\n<td>f32 \u6743\u91cd\u8d70\u53cd\u91cf\u5316\u7f13\u51b2\u8def\u5f84\u6781\u6162<\/td>\n<\/tr>\n<tr>\n<td>DeltaNet \u72b6\u6001\u66f4\u65b0\u5411\u91cf\u5316<\/td>\n<td>38ms \u2192 14ms&#xff08;2.5x&#xff09;<\/td>\n<td>S^T k\/S^T q \u5217\u5757\u7d2f\u52a0<\/td>\n<\/tr>\n<tr>\n<td>\u6743\u91cd\u9884\u70ed 64KB \u6b65\u957f<\/td>\n<td>1.56 \u2192 2.15 tok\/s<\/td>\n<td>\u6d88\u9664\u51b7\u7f3a\u9875<\/td>\n<\/tr>\n<tr>\n<td>\u4e13\u5bb6\u968f\u673a\u8bbf\u95ee vs \u987a\u5e8f<\/td>\n<td>6.56ms vs 0.42ms\/\u5c42&#xff08;15x&#xff09;<\/td>\n<td>\u7f13\u5b58\u547d\u4e2d\u7387\u4e3b\u5bfc<\/td>\n<\/tr>\n<tr>\n<td>prefetch \u9884\u53d6\u4e13\u5bb6\u6743\u91cd<\/td>\n<td>\u65e0\u6548&#xff08;\u56de\u6eda&#xff09;<\/td>\n<td>\u7cfb\u7edf\u8d1f\u8f7d\u4e0b\u5e26\u5bbd\u5df2\u88ab\u62a2\u5360<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u91cf\u5316\u683c\u5f0f\u7684\u4f4d\u5e03\u5c40&#xff08;22.4GB \u6a21\u578b\u91cc\u5b9e\u6d4b&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u683c\u5f0f\u6bcf\u5757\u5b57\u8282\u6bcf\u5757\u5143\u7d20\u5e03\u5c40<\/tr>\n<tbody>\n<tr>\n<td>q8_0<\/td>\n<td>34<\/td>\n<td>32<\/td>\n<td>fp16 scale &#043; 32\u00d7int8<\/td>\n<\/tr>\n<tr>\n<td>q4_k<\/td>\n<td>144<\/td>\n<td>256<\/td>\n<td>d&#043;dmin&#043;scales[12]&#043;qs[128]&#xff0c;6&#043;6 \u4f4d\u6253\u5305<\/td>\n<\/tr>\n<tr>\n<td>q5_k<\/td>\n<td>176<\/td>\n<td>256<\/td>\n<td>\u52a0 qh[32] \u7b2c 5 \u4f4d<\/td>\n<\/tr>\n<tr>\n<td>q6_k<\/td>\n<td>210<\/td>\n<td>256<\/td>\n<td>ql[128]&#043;qh[64]&#043;scales[16]&#043;d&#xff08;d \u5728\u5757\u672b\u5c3e&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>40 \u5c42\u5bf9\u62cd\u9a8c\u8bc1&#xff08;\u5f15\u64ce vs Python \u6743\u5a01\u53c2\u8003&#xff09;&#xff1a;40\/40 \u5c42\u5168\u90e8\u901a\u8fc7&#xff0c;\u8bef\u5dee\u968f\u5c42\u6df1\u5355\u8c03\u7d2f\u79ef&#xff08;blk.0 8.8e-6 \u2192 blk.39 6.8e-5&#xff09;\u2014\u2014\u8fd9\u662f f32 \u9010\u5c42\u820d\u5165\u7684\u6b63\u5e38\u884c\u4e3a&#xff0c;\u4e0d\u662f\u9519\u8bef\u3002<\/p>\n<p>\u6279\u5904\u7406\u5b9e\u9a8c&#xff08;B&#061;4 \u5e8f\u5217\u5171\u4eab\u6743\u91cd\u8bfb\u53d6&#xff09;&#xff1a;\u4f4e\u8d1f\u8f7d 1.47x&#xff0c;\u9ad8\u8d1f\u8f7d 0.90x\u3002\u5e26\u5bbd\u88ab\u538b\u6ee1\u65f6\u6279\u5904\u7406\u6536\u76ca\u8870\u51cf&#xff0c;\u751a\u81f3\u88ab\u81ea\u8eab\u5f00\u9500\u5403\u6389\u2014\u2014&#034;\u6743\u91cd\u8bfb\u4e00\u6b21&#034;\u7684\u6536\u76ca\u53ea\u5728\u5e26\u5bbd\u53d7\u9650\u573a\u666f\u5151\u73b0\u3002<\/p>\n<p>\u4ee3\u7801\u89c4\u6a21&#xff1a;src \u76ee\u5f55 90 \u4f59\u4e2a\u6e90\u6587\u4ef6&#xff08;\u542b\u5934\u6587\u4ef6&#xff09;&#xff0c;\u5168\u90e8\u4e2d\u6587\u6807\u8bc6\u7b26&#xff0c;\u96f6\u82f1\u6587\u6ce8\u91ca\u3002\u6d4b\u8bd5 80 \u4e2a&#xff0c;\u4e09\u7f16\u8bd1\u5668&#xff08;clang\/GCC\/MSVC&#xff09;\u96f6\u8b66\u544a&#xff0c;\u4e09\u8fd0\u884c\u6a21\u5f0f&#xff08;AVX-512\/\u6807\u91cf\/\u901a\u7528&#xff09;\u6570\u503c\u4e00\u81f4\u3002<\/p>\n<p>\u8fd9\u4e9b\u6570\u5b57\u672c\u8eab\u6ca1\u4ec0\u4e48\u6d6a\u6f2b\u7684\u3002\u4f46\u5b83\u4eec\u6709\u4e00\u4e2a\u5171\u540c\u70b9&#xff1a;\u6bcf\u4e00\u4e2a\u90fd\u7ecf\u5f97\u8d77\u590d\u73b0\u3002\u4f60\u4e0d\u5fc5\u76f8\u4fe1\u6211\u5199\u4e0b\u7684\u4efb\u4f55\u7ed3\u8bba\u2014\u2014\u4f60\u53ea\u9700\u8981\u8dd1\u4e00\u904d\u76f8\u540c\u7684\u4ee3\u7801&#xff0c;\u5c31\u80fd\u770b\u5230\u76f8\u540c\u7684\u6570\u5b57\u3002\u8fd9\u5728\u7f51\u7edc\u5de5\u7a0b\u91cc\u53eb\u53ef\u89c2\u6d4b\u6027&#xff0c;\u5728\u63a8\u7406\u5f15\u64ce\u91cc\u53eb\u786e\u5b9a\u6027\u3002\u5b83\u4eec\u662f\u4e00\u56de\u4e8b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd<br \/>\n\u2014\u2014 \u4e00\u4e2a\u7f51\u7edc\u5de5\u7a0b\u5e08\u62c6\u89e3 LLM \u63a8\u7406\u5f15\u64ce\u7684\u8bb0\u5f55\u4e00\u3001\u8d77\u70b9&#xff1a;\u597d\u5947\u4e0e\u6050\u60e7<br \/>\n\u6211\u4eec\u7814\u7a76\u7f51\u7edc\u5de5\u7a0b\u7684\u3002\u8fd9\u4e2a\u9886\u57df\u7684\u8bad\u7ec3\u65b9\u5f0f\u548c\u5927\u591a\u6570\u8f6f\u4ef6\u5de5\u7a0b\u5e08\u4e0d\u4e00\u6837&#xff1a;\u6211\u4eec\u5047\u8bbe\u4e00\u5207\u90fd\u4f1a\u51fa\u9519&#xff0c;\u7136\u540e\u8ba9\u7cfb\u7edf\u5728\u51fa\u9519\u65f6\u4ecd\u7136\u53ef\u7528\u3002<br \/>\n\u4e22\u5305\u3001\u5ef6\u8fdf\u3001\u62e5\u585e\u7a97\u53e3\u7684\u6bcf\u4e00\u6b21\u6536\u7f29\u548c\u6269\u5f20\u3001RTT \u7684\u6bcf\u4e00\u6b21\u6296\u52a8\u2014\u2014\u8fd9\u4e9b\u4e0d\u662f\u5f02\u5e38&#xff0c;\u662f\u5e38\u6001\u3002\u6211\u804c\u4e1a\u751f\u6daf\u91cc\u6700\u719f\u6089\u7684\u753b\u9762&#xff0c;\u662f tcpdump \u91cc\u90a3\u4e9b\u7ea2\u8272\u7684\u91cd\u4f20\u6807\u8bb0&#xff0c;\u662f ss \u8f93\u51fa\u91cc\u4e0d\u65ad\u53d8\u5316\u7684 cwnd&amp;#<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,75,50,207,427],"topic":[],"class_list":["post-94636","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-llm","tag-50","tag-207","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \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\/94636.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd \u2014\u2014 \u4e00\u4e2a\u7f51\u7edc\u5de5\u7a0b\u5e08\u62c6\u89e3 LLM \u63a8\u7406\u5f15\u64ce\u7684\u8bb0\u5f55\u4e00\u3001\u8d77\u70b9&#xff1a;\u597d\u5947\u4e0e\u6050\u60e7 \u6211\u4eec\u7814\u7a76\u7f51\u7edc\u5de5\u7a0b\u7684\u3002\u8fd9\u4e2a\u9886\u57df\u7684\u8bad\u7ec3\u65b9\u5f0f\u548c\u5927\u591a\u6570\u8f6f\u4ef6\u5de5\u7a0b\u5e08\u4e0d\u4e00\u6837&#xff1a;\u6211\u4eec\u5047\u8bbe\u4e00\u5207\u90fd\u4f1a\u51fa\u9519&#xff0c;\u7136\u540e\u8ba9\u7cfb\u7edf\u5728\u51fa\u9519\u65f6\u4ecd\u7136\u53ef\u7528\u3002 \u4e22\u5305\u3001\u5ef6\u8fdf\u3001\u62e5\u585e\u7a97\u53e3\u7684\u6bcf\u4e00\u6b21\u6536\u7f29\u548c\u6269\u5f20\u3001RTT \u7684\u6bcf\u4e00\u6b21\u6296\u52a8\u2014\u2014\u8fd9\u4e9b\u4e0d\u662f\u5f02\u5e38&#xff0c;\u662f\u5e38\u6001\u3002\u6211\u804c\u4e1a\u751f\u6daf\u91cc\u6700\u719f\u6089\u7684\u753b\u9762&#xff0c;\u662f tcpdump \u91cc\u90a3\u4e9b\u7ea2\u8272\u7684\u91cd\u4f20\u6807\u8bb0&#xff0c;\u662f ss \u8f93\u51fa\u91cc\u4e0d\u65ad\u53d8\u5316\u7684 cwnd&amp;#\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/94636.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-14T14:24:57+00:00\" \/>\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=\"26 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/94636.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/94636.html\",\"name\":\"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-14T14:24:57+00:00\",\"dateModified\":\"2026-08-14T14:24:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/94636.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/94636.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/94636.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd\"}]},{\"@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":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \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\/94636.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd \u2014\u2014 \u4e00\u4e2a\u7f51\u7edc\u5de5\u7a0b\u5e08\u62c6\u89e3 LLM \u63a8\u7406\u5f15\u64ce\u7684\u8bb0\u5f55\u4e00\u3001\u8d77\u70b9&#xff1a;\u597d\u5947\u4e0e\u6050\u60e7 \u6211\u4eec\u7814\u7a76\u7f51\u7edc\u5de5\u7a0b\u7684\u3002\u8fd9\u4e2a\u9886\u57df\u7684\u8bad\u7ec3\u65b9\u5f0f\u548c\u5927\u591a\u6570\u8f6f\u4ef6\u5de5\u7a0b\u5e08\u4e0d\u4e00\u6837&#xff1a;\u6211\u4eec\u5047\u8bbe\u4e00\u5207\u90fd\u4f1a\u51fa\u9519&#xff0c;\u7136\u540e\u8ba9\u7cfb\u7edf\u5728\u51fa\u9519\u65f6\u4ecd\u7136\u53ef\u7528\u3002 \u4e22\u5305\u3001\u5ef6\u8fdf\u3001\u62e5\u585e\u7a97\u53e3\u7684\u6bcf\u4e00\u6b21\u6536\u7f29\u548c\u6269\u5f20\u3001RTT \u7684\u6bcf\u4e00\u6b21\u6296\u52a8\u2014\u2014\u8fd9\u4e9b\u4e0d\u662f\u5f02\u5e38&#xff0c;\u662f\u5e38\u6001\u3002\u6211\u804c\u4e1a\u751f\u6daf\u91cc\u6700\u719f\u6089\u7684\u753b\u9762&#xff0c;\u662f tcpdump \u91cc\u90a3\u4e9b\u7ea2\u8272\u7684\u91cd\u4f20\u6807\u8bb0&#xff0c;\u662f ss \u8f93\u51fa\u91cc\u4e0d\u65ad\u53d8\u5316\u7684 cwnd&amp;#","og_url":"https:\/\/www.wsisp.com\/helps\/94636.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-14T14:24:57+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"26 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/94636.html","url":"https:\/\/www.wsisp.com\/helps\/94636.html","name":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-14T14:24:57+00:00","dateModified":"2026-08-14T14:24:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/94636.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/94636.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/94636.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5185\u6838\u91cc\u6ca1\u6709\u667a\u80fd"}]},{"@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\/94636","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=94636"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/94636\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=94636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=94636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=94636"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=94636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}