{"id":707,"date":"2026-11-18T18:38:48","date_gmt":"2026-11-18T10:38:48","guid":{"rendered":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/2026\/11\/18\/ascend-chunk-op-fusion-modelagent\/"},"modified":"2026-11-18T18:43:17","modified_gmt":"2026-11-18T10:43:17","slug":"ascend-chunk-op-fusion-modelagent","status":"publish","type":"post","link":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/2026\/11\/18\/ascend-chunk-op-fusion-modelagent\/","title":{"rendered":"\u7b97\u5b50\u8fc1\u79fb\u5931\u8d25\u540e\u4f7f\u7528ModelAgent\u590d\u76d8\u5e76\u8fc1\u79fb\u6210\u529f\u8bb0\u5f55"},"content":{"rendered":"<p>\u4e0a\u6d77\u7ebf\u4e0b\u5b9e\u8bad\u4efb\u52a1\uff0c\u5728\u5b8c\u6210Prefill\u5165\u56fe\u4e4b\u540e\uff0c\u4e3a\u4e86\u8fdb\u4e00\u6b65\u63d0\u5347Prefill\u6548\u7387\uff0c\u964d\u4f4e\u9996\u5b57\u5ef6\u8fdf\uff0c\u6309\u7167\u5bfc\u5e08\u7684\u624b\u518c\u9700\u8981\u5bf9Chunk\u7b97\u5b50\u8fdb\u884c\u878d\u5408\u3002<\/p>\n<p>\u5bfc\u5e08\u7ed9\u51fa\u7684\u4efb\u52a1\u624b\u518c\u63d0\u793a\u5f88\u7b80\u6d01\uff1a<\/p>\n<p>\u4f18\u5316\u65b9\u6cd5\uff1a Prefill \u9636\u6bb5\u5b58\u5728\u5927\u91cf\u7ec6\u7c92\u5ea6 Chunk \u7b97\u5b50\uff0c\u8fd9\u4e9b\u7b97\u5b50\u4f9d\u8d56 CPU \u4e34\u65f6\u4e0b\u53d1\u6307\u4ee4\uff0c\u5bfc\u81f4 Free \u8017\u65f6\u5360\u6bd4\u4f9d\u7136\u504f\u9ad8\uff0c\u6210\u4e3a\u65b0\u7684\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<p>\u53c2\u8003PR\uff1ahttps:\/\/github.com\/vllm-project\/vllm-ascend\/pull\/11687<\/p>\n<p>\u53c2\u8003commit\u9002\u914d\u5bf9\u6a21\u578b\u4fa7\u8c03\u7528\u903b\u8f91\u8fdb\u884c\u9002\u914d\uff1ahttps:\/\/github.com\/shaopeng-666\/vllm-ascend\/commit\/3098432b807a98295f61336efb239e6c627cb98a#diff-e8ab291496b81b062131610fdce9b334e1b51e1560de7853e4f6bdbdef93c38a<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u878d\u5408\u7b56\u7565\u5bf9\u7cbe\u5ea6\u6709\u6781\u5fae\u7684\u5f71\u54cd\uff0c\u8868\u73b0\u4e3a\u8f93\u51fa Token \u7684\u4e2a\u522b\u6570\u503c\u6ce2\u52a8\uff0c\u4f46\u6574\u4f53\u8bed\u4e49\u7406\u89e3\u80fd\u529b\u4fdd\u6301\u5b8c\u6574\u3002<\/p>\n<p>\u7b14\u8005\u4e00\u8fb9\u7406\u89e3PR\u4e2d\u7684\u64cd\u4f5c\u4e00\u8fb9\u501f\u52a9AI\u5de5\u5177\u8fdb\u884c\u8f85\u52a9\u7f16\u7801\uff0c\u597d\u4e0d\u5bb9\u6613\u5b8c\u6210\u4e86\u8fc1\u79fb\u7136\u540e\u9047\u5230\u4e86\u4e71\u7801\u7684\u60c5\u51b5\uff1a<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic1.png\" alt=\"\u56fe 1\" width=\"635\" height=\"187\" loading=\"lazy\"><\/figure>\n<p>\u8fd9\u4e5f\u662f\u5b9e\u8bad\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u6700\u5927\u56f0\u96be\uff1a\u3010commit \u91cc\u878d\u5408\u8def\u5f84\u88ab use_a3_fused_gdn_prefill() \u95e8\u63a7\u3011\uff0c\u8bf4\u660ePR\u53ea\u5bf9 A3 \u751f\u6548\uff0c\u4f46\u5b9e\u8bad\u7684\u73af\u5883\u662fA2\uff0c\u540c\u65f6\u7b97\u5b50\u662f\u5728vllm0.25\u73af\u5883\u4e2d\u7f16\u8bd1\u7684\uff0c\u5b9e\u8bad\u7684\u73af\u5883\u662fvllm0.23\u3002<\/p>\n<p>\u5f53\u7b14\u8005\u7684\u80fd\u529b\u65e0\u6cd5\u7ee7\u7eed\u7684\u65f6\u5019\uff0c\u7b14\u8005\u53ec\u5524\u6c42\u547d\u7a3b\u8349ModelAgent\u5728\u7b14\u8005\u7684MD\u6587\u4ef6\u8bb0\u5f55\u57fa\u7840\u4e0a\u5f00\u59cb\u3010\u63a5\u7ba1\u5b9e\u9a8c\u3011\uff0c\u5e76\u6700\u7ec8\u6210\u529f\u5b8c\u6210\u8fc1\u79fb\u6539\u9020\u3002<\/p>\n<p>\u6539\u52a8\u603b\u5171\u5206\u4e3a4\u5c42\uff1a<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic2.png\" alt=\"\u56fe 2\" width=\"800\" height=\"104\" loading=\"lazy\"><\/figure>\n<p>\u5b9e\u73b0\u6b65\u9aa4\uff1a<\/p>\n<p>1.\u62f7\u5165\u7b97\u5b50\u6e90\u7801\uff1acp -r chunk_gated_delta_rule \/vllm-workspace\/vllm-ascend\/csrc\/attention\/<\/p>\n<p>\u6ce8\u610f\u603b\u517119 \u4e2a\u6587\u4ef6\uff1b\u4e0d\u80fd\u76f4\u63a5\u7528 PR #11687 \u539f\u7248\uff0c\u5b83\u57fa\u4e8e v0.25.1\uff0c\u5bfc\u5e08\u8981\u6c42\u7684\u73af\u5883\u662f\u4ecevllm0.22rc\u5347\u7ea7\u5230\u7684vllm0.23<\/p>\n<p>2.\u5e94\u7528\u8865\u4e01\uff1acd \/vllm-workspace\/vllm-ascend &amp;&amp; git apply &lt;\u5305&gt;\/tracked_changes.patch<\/p>\n<p>\u4e00\u5171\u542b 6 \u6587\u4ef6\uff1abuild_aclnn.sh\u3001torch_binding.cpp\u3001torch_binding_meta.cpp\u3001meta_registration.py\u3001envs.py\u3001gdn.py<\/p>\n<p>3.\u7f16\u8bd1 CANN \u7b97\u5b50\uff1abash csrc\/build_aclnn.sh \/vllm-workspace\/vllm-ascend ascend910b<\/p>\n<p>\u6ce8\u610f\u4e00\u5b9a\u8981\u5148 source set_env.sh<\/p>\n<p>\u4ea7\u7269\u81ea\u52a8\u5b89\u88c5\u5230 vllm_ascend\/_cann_ops_custom\/vendors\/&#8230;\uff0c\u8fd0\u884c\u65f6\u7ecf ASCEND_CUSTOM_OPP_PATH \u52a0\u8f7d<\/p>\n<p>4.ModelAgent\u68c0\u6d4b\u8be5\u8def\u5f84 ninja \u6587\u4ef6\u4f9d\u8d56\u6b63\u5e38\uff0c\u81ea\u52a8\u91cd\u7f16<\/p>\n<p>5.probe_math.py \u2014\u2014 T=1 \u624b\u5199 math \u5bf9\u62cd<\/p>\n<p>test_fused_vs_recurrent.py \u2014\u2014 T=64..2304 \u5bf9\u6bd4\u751f\u4ea7 recurrent \u7b97\u5b50<\/p>\n<p>test_fused_multibatch.py \u2014\u2014 B=2..6 \u5bf9\u6bd4\u9010\u5e8f\u5217\uff08bit-exact\uff09<\/p>\n<p>6.\u6a21\u578b\u7ea7\u9a8c\u8bc1\uff1averify_fused_e2e.py &lt;\u8f93\u51fa\u6587\u4ef6&gt; \u8dd1\u4e24\u6b21\uff08\u4e00\u6b21\u5e26 VLLM_ASCEND_FUSED_GDN_PREFILL=1\uff09\uff0c\u5bf9\u6bd4 JSON \u6587\u672c<\/p>\n<p>7.A\/B \u6027\u80fd\uff1abench_offline.py\uff08\u9884\u70ed\u62c9\u9891 + 30 warmup \u534f\u8bae\uff0c\u540c\u5bbf\u4e3b\u8d1f\u8f7d\u5bf9\u6bd4\uff09<\/p>\n<p>\u6d89\u53ca\u7684\u811a\u672c\u5305\u62ec\uff1a<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic3.png\" alt=\"\u56fe 3\" width=\"800\" height=\"326\" loading=\"lazy\"><\/figure>\n<p>\u5b8c\u6210\u7b97\u5b50\u7f16\u8bd1\u540e\uff0c\u9700\u8981\u8fdb\u884c\u5bf9\u62cd\u9a8c\u8bc1<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic4.png\" alt=\"\u56fe 4\" width=\"671\" height=\"132\" loading=\"lazy\"><\/figure>\n<p>\u4ee5\u4e0b\u662f\u7b97\u5b50\u5bf9\u62cd\u7684\u5168\u90e8\u8bb0\u5f55\uff1a<\/p>\n<p>\u2460 T=1 \u5355\u6b65\uff0c\u624b\u5199 math \u4e09\u65b9\u5bf9\u62cd<\/p>\n<p class=\"cp-log\">fused vs math diff: 0.013187646865844727<\/p>\n<p class=\"cp-log\">rec   vs math diff: 0.0059282779693603516<\/p>\n<p class=\"cp-log\">fused vs rec  diff: 0.015625<\/p>\n<p class=\"cp-log\">fstate: 0.3381098210811615  rec_state: 0.33812153339385986<\/p>\n<p class=\"cp-log\">fstate vs rec_state diff: 8.691722869873047<\/p>\n<p class=\"cp-log\">fstate vs rec_state diff (no transpose): 0.015401840209960938<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic5.png\" alt=\"\u56fe 5\" width=\"504\" height=\"165\" loading=\"lazy\"><\/figure>\n<p>\u2461 \u53d8\u957f\u5355\u5e8f\u5217\uff0c\u4e0e\u751f\u4ea7 recurrent \u5bf9\u62cd<\/p>\n<p class=\"cp-log\">exit=0<\/p>\n<p class=\"cp-log\">ALL PASS<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic6.png\" alt=\"\u56fe 6\" width=\"259\" height=\"220\" loading=\"lazy\"><\/figure>\n<p>\u2462 \u591a\u5e8f\u5217\u62fc\u6279\uff0cB&gt;1 \u4e00\u6b21\u7b97 vs \u9010\u5e8f\u5217\u5206\u7b97\uff0c\u81ea\u6d3d\u5bf9\u62cd<\/p>\n<p class=\"cp-log\">exit=0<\/p>\n<p class=\"cp-log\">[B=3 256\/128\/128] out max|diff|=0.000000  state max|diff|=0.000000<\/p>\n<p class=\"cp-log\">[B=3 256\/128\/128] PASS<\/p>\n<p class=\"cp-log\">[B=2 400\/300] out max|diff|=0.000000  state max|diff|=0.000000<\/p>\n<p class=\"cp-log\">[B=2 400\/300] PASS<\/p>\n<p class=\"cp-log\">[B=6 mixed] out max|diff|=0.000000  state max|diff|=0.000000<\/p>\n<p class=\"cp-log\">[B=6 mixed] PASS<\/p>\n<p class=\"cp-log\">[B=3 short] out max|diff|=0.000000  state max|diff|=0.000000<\/p>\n<p class=\"cp-log\">[B=3 short] PASS<\/p>\n<p class=\"cp-log\">ALL PASS<\/p>\n<p>[B=6 mixed]\uff08\u542b 63\/65\/1\uff09\u4e5f\u662f 0\uff0c\u8bf4\u660e\uff1a<\/p>\n<p>\u25cf actual_seq_lengths \u5206\u6bb5\u540e\uff0cchunk \u4e0d\u4f1a\u8de8\u5e8f\u5217\u8fb9\u754c\u62fc\u63a5\uff1b<\/p>\n<p>\u25cf \u77ed\u6bb5\uff08T=1\u3001T&lt;64\uff09\u7684\u586b\u5145\u4e0e mask \u5904\u7406\uff0c\u4e0e B=1 \u5355\u72ec\u7b97\u5b8c\u5168\u4e00\u81f4\uff1b<\/p>\n<p>\u25cf initial_state \u6309 batch \u7d22\u5f15\u6ca1\u9519\u4f4d\uff1b<\/p>\n<p>\u25cf group \u8c03\u5ea6\u7684 batch \u7ef4\u6620\u5c04\u7cbe\u786e\uff0c\u56e0\u4e3a\u7ed3\u679c\u9010\u4f4d\u4e00\u81f4\uff0c\u8bf4\u660e\u6bcf\u6b21\u8bfb\u53d6\u7684 state \u69fd\u4f4d\u3001\u6bcf\u4e2a chunk \u7684\u504f\u79fb\u5b8c\u5168\u5bf9\u9f50\uff0c\u6ca1\u6709\u5f15\u5165\u989d\u5916\u6570\u503c\u8def\u5f84\u3002<\/p>\n<p>\u4e09\u4e2a\u7b97\u5b50\u7ea7\u53f0\u9636\uff08\u2460\u2461\u2462\uff09\u5168\u90e8\u6536\u5c3e\uff0c\u8bc1\u636e\u94fe\u5b8c\u6574\uff1a\u2460 \u8bc1\u660e\u6570\u503c\u548c\u5e03\u5c40\u5bf9\uff0c\u2461 \u8bc1\u660e\u957f\u5e8f\u5217\u4e0d\u6f02\u79fb\uff0c\u2462 \u8bc1\u660e\u6279\u8c03\u5ea6\u4e0d\u8d70\u6837\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u9700\u8981\u542f\u52a8\u6a21\u578b\u8fdb\u884c\u2463\u6a21\u578b\u7ea7 A\/B\u9a8c\u8bc1\uff0c\u878d\u5408\u5f00\u5173\u540c prompt \u8f93\u51fa\u5bf9\u62cd\uff1a<\/p>\n<p class=\"cp-log\">python3.12 -c &#8220;from vllm_ascend import envs; print(&#8216;off =&#8217;, envs.VLLM_ASCEND_FUSED_GDN_PREFILL)&#8221;<\/p>\n<p class=\"cp-log\">off = False<\/p>\n<p class=\"cp-log\">VLLM_ASCEND_FUSED_GDN_PREFILL=1 python3.12 -c &#8220;from vllm_ascend import envs; print(&#8216;on  =&#8217;, envs.VLLM_ASCEND_FUSED_GDN_PREFILL)&#8221;<\/p>\n<p class=\"cp-log\">on  = True<\/p>\n<p>\u524d\u53f0\u9a8c\u8bc1\uff1a<\/p>\n<p class=\"cp-log\">base1 exit=0<\/p>\n<p class=\"cp-log\">base2 exit=0<\/p>\n<p class=\"cp-log\">fused exit=0<\/p>\n<p class=\"cp-log\">python3.12 verify_logprob_scan.py &#8211;cmp \/workspace\/scan_base1.json \/workspace\/scan_base2.json 2&gt;\/dev\/null | grep -E &#8220;^p[0-9]|pos=&#8221;<\/p>\n<p class=\"cp-log\">p0 positions=139 flips=0 max|dlogp|=0.000000<\/p>\n<p class=\"cp-log\">p1 positions=129 flips=0 max|dlogp|=0.000000<\/p>\n<p class=\"cp-log\">python3.12 verify_logprob_scan.py &#8211;cmp \/workspace\/scan_base1.json \/workspace\/scan_fused.json 2&gt;\/dev\/null | grep -E &#8220;^p[0-9]|pos=&#8221;<\/p>\n<p class=\"cp-log\">p0 positions=139 flips=2 max|dlogp|=0.312196<\/p>\n<p class=\"cp-log\">pos=45 gap=0.1250 dlogp=0.1344 FLIP-OK(gap&lt;dlogp)<\/p>\n<p class=\"cp-log\">pos=113 gap=0.1250 dlogp=0.1262 FLIP-OK(gap&lt;dlogp)<\/p>\n<p class=\"cp-log\">p1 positions=129 flips=0 max|dlogp|=0.248334<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic7.png\" alt=\"\u56fe 7\" width=\"267\" height=\"68\" loading=\"lazy\"><\/figure>\n<p>\u5230\u6b64\uff1a<\/p>\n<p>\u2460 T=1 \u4e09\u65b9\u5bf9\u62cd\u901a\u8fc7\uff08state \u5e03\u5c40\u8f6c\u7f6e 8.69 vs 0.0154\uff0c\u5dee 560 \u500d\uff09<\/p>\n<p>\u2461 \u4e03\u79cd\u957f\u5ea6\u5bf9\u62cd\uff0c\u8f93\u51fa\u5dee\u6052\u4e3a 0.00049\uff081 ULP\uff09\uff0c36 \u4e2a chunk \u65e0\u6f02\u79fb<\/p>\n<p>\u2462 \u62fc\u6279\u81ea\u6d3d\uff0c\u5168\u90e8 0\uff08\u9010\u4f4d\uff09<\/p>\n<p>\u2463 \u5f15\u64ce\u8de8\u8fdb\u7a0b\u786e\u5b9a\uff08268 \u4f4d\u7f6e\u5168\u96f6\uff09\uff0c\u878d\u5408\u8def\u5f84 logprob \u5dee 4~5 ULP\u3001268 \u4f4d\u7f6e\u4e2d 2 \u4e2a argmax \u7ffb\u8f6c\uff0c\u7ffb\u8f6c\u70b9 gap=0.125 &lt; dlogp=0.126~0.134\uff0c\u5c5e\u5fc5\u7136\u7ffb\u8f6c\u3002<\/p>\n<p>\u7ed3\u8bba\uff1a\u6570\u503c\u7b49\u4ef7\uff0c\u6587\u672c\u5206\u53c9\u6e90\u4e8e\u8d2a\u5fc3\u89e3\u7801\u5728\u8fd1\u4f3c\u5e73\u5c40\u5904\u7ffb\u8f6c\u3002<\/p>\n<p>\u6700\u540e\u6267\u884c\u2464\u6293\u5305\u5bf9\u6bd4\uff0c\u4e0b\u53d1\u6b21\u6570\u4e0e\u8bbe\u5907\u8017\u65f6\uff1a<\/p>\n<p>A\u7ec4-\u672a\u878d\u5408\u7b97\u5b50\uff1a<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic8.png\" alt=\"\u56fe 8\" width=\"155\" height=\"113\" loading=\"lazy\"><\/figure>\n<p>B\u7ec4-\u878d\u5408\u7b97\u5b50\uff1a<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic9.png\" alt=\"\u56fe 9\" width=\"155\" height=\"117\" loading=\"lazy\"><\/figure>\n<p>\u5728\u542f\u52a8\u4e4b\u524d\u7b14\u8005\u7279\u5730\u505a\u4e86\u5192\u70df\u6d4b\u8bd5\uff0c\u786e\u8ba4\u6ca1\u6709\u4e71\u7801\u4ee5\u540e\u7ec8\u4e8e\u670d\u4e86ModelAgent\uff08\u4e5f\u53ef\u80fd\u5c31\u662f\u7b14\u8005\u521a\u5f00\u59cb\u63a5\u89e6\uff0c\u6c34\u5e73\u4e0d\u591f\uff09<\/p>\n<p>=====================<\/p>\n<p>\u901a\u8fc7\u5bf9\u6293\u53d6\u5e76\u4e0b\u8f7d\u5230\u672c\u5730\u7684\u4fe1\u606f\u8fdb\u884cAI\u8f85\u52a9\u5206\u6790\u53ef\u77e5\uff1a<\/p>\n<p>\u2460 \u4e0b\u53d1\u6b21\u6570\uff1a\u5355\u5c42\u4ece7\u4e0b\u964d\u52302\uff0c\u6bcf\u8bf7\u6c42\u4ece126\u4e0b\u964d\u523036\uff08\u221271.4%\uff09<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic10.png\" alt=\"\u56fe 10\" width=\"499\" height=\"278\" loading=\"lazy\"><\/figure>\n<p>\u2461 Host CPU \u65f6\u95f4\uff1a\u4ece4.383\u4e0b\u964d\u5230 0.536 ms\/\u8bf7\u6c42\uff08\u221287.8%\uff09\u200b<\/p>\n<p>\u5355\u5c42\u4ece 212.8 \u03bcs \u964d\u5230 29.7 \u03bcs\uff0c\u4e3b\u8981\u6765\u6e90\u662fworkspace \u67e5\u8be2\u6d88\u5931\uff1b<\/p>\n<p>\u57fa\u7ebf\u6bcf\u6b21 aclnn \u8c03\u7528\u8981\u91cd\u7b97\u4e00\u6b21 workspace\uff0849.5 \u03bcs \/ 62.1 \u03bcs \u5404 1800 \u6b21\uff09\uff0c\u878d\u5408\u540e\u53ea\u5269 10.4 \u03bcs\u3002<\/p>\n<p>\u2462 \u4e0b\u53d1\u95f4\u9694\uff1a\u4ece\u201c\u5bc6\u96c6\u4e0b\u53d1\u201d\u53d8\u6210\u201c\u957f\u95f4\u9694\u5355\u6b21\u201d<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic11.png\" alt=\"\u56fe 11\" width=\"494\" height=\"183\" loading=\"lazy\"><\/figure>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic12.png\" alt=\"\u56fe 12\" width=\"527\" height=\"205\" loading=\"lazy\"><\/figure>\n<p>\u57fa\u7ebf\u5448\u53cc\u5cf0\u5206\u5e03\uff1a\u540c\u5c42\u5185 kkt\u2192FwdH \u8fde\u7eed\u4e0b\u53d1\uff08&lt;5 \u03bcs\uff09\uff0c\u5c42\u95f4 100~200 \u03bcs\uff0c\u5171 12,500 \u4e2a\u95f4\u9694\uff1b<\/p>\n<p>\u878d\u5408\u540e\u53ea\u5269 3,500 \u4e2a\uff0c\u5168\u90e8\u96c6\u4e2d\u5728 200~500 \u03bcs\uff1bCPU \u4e0d\u518d\u88ab\u5207\u6210 7 \u6bb5\u53bb\u8ffd\uff0c\u4ece\u201c\u4e0b\u53d1\u5bc6\u5ea6\u201d\u5c42\u9762\u5f97\u5230\u6539\u5584\u3002<\/p>\n<p>=======================<\/p>\n<p>\u867d\u7136\u7b14\u8005\u624b\u6413\u5931\u8d25\uff0c\u4f46\u662f\u501f\u52a9ModelAgent\u8fd8\u662f\u5b8c\u6210\u4e86\u5bfc\u5e08\u7684\u4f5c\u4e1a\u8981\u6c42\uff1a<\/p>\n<p>\u603b\u7ed3\u800c\u8a00\uff1a<\/p>\n<p>1.\u94fe\u8def\u5408\u5e76\u6210\u7acb\u3002<\/p>\n<p>\u57fa\u7ebf\u6bcf\u5c42 12 \u6b21\u4e0b\u53d1\uff08cumsum\u00d71\u3001kkt\u00d72\u3001solve\u00d71\u3001merge\u00d72\u3001recompute\u00d72\u3001 FwdH\u00d72\u3001FwdO\u00d72\uff09\uff0c\u878d\u5408\u540e 2 \u6b21\uff08ChunkGatedDeltaRule\u00d72\uff09\uff1b18 \u5c42\u5408\u8ba1 216 \u2192 36 \u6b21\/\u8bf7\u6c42\uff0c\u964d\u5e45 83.3%\u3002<\/p>\n<p>2.\u94fe\u8def host \u65f6\u95f4\u7531 4.38 ms\/\u8bf7\u6c42 \u964d\u5230 0.536 ms\/\u8bf7\u6c42 \uff08-87.8%\uff09\uff0c\u5355\u5c42\u4ece 243.5 \u03bcs \u964d\u5230 29.8 \u03bcs\uff0c \u590d\u7b97\u6bd4 8.2\u00d7\uff1b\u8fd9\u662f&#8221;CPU \u4fa7\u4e34\u65f6\u62fc\u88c5\u4e0b\u53d1&#8221;\u8fd9\u4e00\u74f6\u9888\u88ab\u76f4\u63a5\u524a\u6389\u7684\u91cf\u5316\u8bc1\u636e\u3002<\/p>\n<p>3.\u4e0b\u53d1\u8282\u594f\u4ece&#8221;\u788e&#8221;\u53d8&#8221;\u6574&#8221;\u3002\u94fe\u8def\u5185\u95f4\u9694\u4e2d\u4f4d\u6570 19.0 \u03bcs \u2192 &lt;1 \u03bcs \uff08\u540c\u5c42\u4e24\u6b21\u4e0b\u53d1\u80cc\u9760\u80cc\uff09\uff0c\u95f4\u9694\u603b\u6570 21500 \u2192 3500\uff1b &gt;100 \u03bcs \u7684\u5c42\u95f4\u5927\u95f4\u9694\u5360\u6bd4\u4ece 8.0% \u6da8\u5230 48.6%\uff0c\u8fd9\u8bf4\u660e\u5370\u8bc1&#8221;\u5c42\u5185\u4e0d\u518d\u6709 11 \u6b21\u5f80\u8fd4\u3001\u53ea\u5269 1 \u6b21&#8221;\u3002<\/p>\n<p>4.\u6574\u8bf7\u6c42\u4e0b\u53d1\u91cf\u964d\u5e45\u6709\u9650\u3002<\/p>\n<p>KERNEL+MEMCPY \u603b\u6570 5064 \u2192 4560 \u6b21\/\u8bf7\u6c42 \uff08-504\uff0c-10.0%\uff09\u3002<\/p>\n<p>\u56e0\u4e3a decode \u9636\u6bb5\u7684 MEMCPY_ASYNC\uff082248 \u6b21\/\u8bf7\u6c42\uff09\u4e0e KERNEL_AIVEC \u5360\u7edd\u5bf9\u591a\u6570\uff0cchunk \u94fe\u8def\u53ea\u662f\u5176\u4e2d\u4e00\u6bb5\u3002<\/p>\n<p>5.\u552f\u4e00\u53cd\u5411\u9879 Sub +18\uff08\u878d\u5408\u7b97\u5b50\u5185\u90e8\u591a\u505a\u4e00\u6b21\u51cf\u6cd5\uff09\u3002<\/p>\n<p>6.\u7aef\u5230\u7aef\u5ef6\u8fdf\u4e0b\u964d\u3002<\/p>\n<p>TTFT 169.6 \u2192 101.5 ms\uff08\u221240.2%\uff09\uff0cE2E 810.9 \u2192 647.6 ms\uff08\u221220.1%\uff09\u3002 \u4f46\u672c\u6b21 profiling \u53ea\u80fd\u5f52\u56e0\u7ea6 9.5 ms\uff0c\u4e0d\u5199\u8fdb\u6536\u76ca\u3002<\/p>\n<p>\u6700\u540e\u7b14\u8005\u5c06ModelAgent\u7684\u64cd\u4f5c\u548c\u81ea\u5df1\u624b\u6413\u7684\u64cd\u4f5c\u8bb0\u5f55\u5bfc\u5165AI Agent\uff0c\u8ba9AI\u5c1d\u8bd5\u627e\u51fa\u51fa\u73b0\u4e71\u7801\u7684\u539f\u56e0\uff0c\u4e0d\u5f97\u4e0d\u8bf4\u7b14\u8005\u8fd8\u9700\u8981\u7ee7\u7eed\u5b66\u4e60~<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/ascend-chunk-op-fusion-modelagent\/pic13.png\" alt=\"\u56fe 13\" width=\"640\" height=\"78\" loading=\"lazy\"><\/figure>\n<p>\u672c\u6587\u7531 \u5976\u8389\u5c0f\u8ddf\u73ed \u539f\u521b\uff0c\u9996\u53d1\u4e8e\u534e\u4e3a\u6607\u817e\u793e\u533a\uff0c\u54e6\u5bf9\u4e86\uff0c\u6211\u5c31\u662f\u5976\u8389\u5c0f\u8ddf\u73ed~~~~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chunk \u7b97\u5b50\u878d\u5408\u8fc1\u79fb\u5361\u5728 A3 \u95e8\u63a7\uff0c\u624b\u6413\u5931\u8d25\u540e\u7531 ModelAgent \u63a5\u7ba1\uff1a\u56db\u5c42\u6539\u9020\u3001\u4e09\u7ea7\u5bf9\u62cd\u3001\u6a21\u578b\u7ea7 A\/B\uff0c\u4e0b\u53d1\u6b21\u6570\u964d 71.4%\uff0cTTFT \u221240.2%\u3001E2E \u221220.1%\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,65,26],"tags":[],"class_list":["post-707","post","type-post","status-publish","format-standard","hentry","category-ai","category-huawei-ascend","category-tech-share"],"_links":{"self":[{"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/posts\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/comments?post=707"}],"version-history":[{"count":3,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"predecessor-version":[{"id":710,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/posts\/707\/revisions\/710"}],"wp:attachment":[{"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}