{"id":722,"date":"2026-12-01T22:08:58","date_gmt":"2026-12-01T14:08:58","guid":{"rendered":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/2026\/12\/01\/codex-optimize-qwen38-27b-followup\/"},"modified":"2026-12-01T22:08:58","modified_gmt":"2026-12-01T14:08:58","slug":"codex-optimize-qwen38-27b-followup","status":"publish","type":"post","link":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/2026\/12\/01\/codex-optimize-qwen38-27b-followup\/","title":{"rendered":"Codex\u5c1d\u8bd5\u4e00\u952e\u4f18\u5316Qwen3.8-27B-W8A8\u540e\u7eed"},"content":{"rendered":"<p>\u5728\u5b8c\u6210\u4e86\u6607\u817e\u5c1d\u9c9c\u4f53\u9a8c\u8425\u7684Codex\u4e00\u952e\u4f18\u5316\u4e4b\u540e\uff0cCodex\u544a\u8bc9\u6211Qwen3.8-27B-W8A8\u5728A3\u8fd0\u884c\u7684\u6700\u4f18\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n<p>\u6d4b\u8bd5\u57fa\u7ebf\u662f2K\u8f93\u51652K\u8f93\u51fa<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">  &#8211;tensor-parallel-size 2 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">  &#8211;max-model-len 8192 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">  &#8211;max-num-batched-tokens 8192 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">  &#8211;max-num-seqs 16 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">  &#8211;block-size 128 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">  &#8211;enable-chunked-prefill \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">  &#8211;no-enable-prefix-caching \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">  &#8211;compilation-config &#8216;{&#8220;cudagraph_mode&#8221;: &#8220;FULL_DECODE_ONLY&#8221;}&#8217; \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">  &#8211;additional-config &#8216;{&#8220;enable_cpu_binding&#8221;:true}&#8217;<\/span><\/p>\n<p>\u6211\u5728\u8fd9\u4e2a\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u53c2\u6570\u66f4\u65b0\uff1a<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">&#8211;max-num-seqs 32 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">&#8211;gpu-memory-utilization 0.90 \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">&#8211;enable-chunked-prefill \\<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">&#8211;speculative-config &#8216;{&#8220;method&#8221;:&#8221;mtp&#8221;,&#8221;num_speculative_tokens&#8221;:4}&#8217;<\/span><\/p>\n<p>\u4e00\u65b9\u9762\u53d6\u6d88FDO\u5165\u56fe\u6a21\u5f0f\uff0c\u66f4\u6539\u4e3a\u9ed8\u8ba4\u7684FAP\uff0c\u53e6\u4e00\u65b9\u9762\u5f15\u5165MTP\u6295\u673a\u89e3\u7801\u3002<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/codex-optimize-qwen38-27b-followup\/pic1.png\" alt=\"\u666e\u901a decode \u4e0e MTP=4 \u6295\u673a\u89e3\u7801\u5bf9\u6bd4\uff1a\u6bcf\u6b65 token \u4ea7\u51fa\u4e0e\u8017\u65f6\" width=\"760\" height=\"465\" loading=\"lazy\"><\/figure>\n<p>\u7b14\u8005\u5bf9Codex\u8bf4\uff1a<\/p>\n<p class=\"cp-code-line\">codex exec &#8211;skip-git-repo-check &#8220;<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">1\u3001\u68c0\u67e5\u672c\u5730Atlas A3\u73af\u5883\u662f\u5426\u53ef\u7528\uff0c\u73af\u5883\u4fe1\u606f\u4e3aIP\uff1a127.0.0.1\uff0c\u7aef\u53e3\u53f7\uff1a8000\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">2\u3001\u4f7f\u7528\u7edf\u4e00\u8f93\u5165\u3001\u8f93\u51fa\u5404 2048 Token \u7684\u8d1f\u8f7d\uff0c\u8bb0\u5f55\u6709\u6548 QPS\u3001\u541e\u5410\u3001\u5ef6\u8fdf\u548c\u9519\u8bef\u7387\uff0c\u4f7f\u7528\u6607\u817e\u6027\u80fd\u5de5\u5177\u5b9a\u4f4d\u74f6\u9888\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">3\u3001\u5728\u6743\u91cd\u3001\u8bbe\u5907\u6570\u3001\u7cbe\u5ea6\u3001\u8d1f\u8f7d\u4ee5\u53ca\u5ef6\u8fdf\u4e0e\u8d28\u91cf\u8981\u6c42\u4e0d\u53d8\u7684\u6761\u4ef6\u4e0b\uff0c\u5c3d\u91cf\u964d\u4f4e\u5ef6\u8fdf\u63d0\u5347\u6027\u80fd<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">4\u3001\u542f\u52a8\u65e5\u5fd7\u53ef\u4ee5\u770b\u5230\u3010Qwen3 \u7684 conv1d \u8d70\u4e86 PyTorch \u56de\u9000\u3011\uff0c\u770b\u80fd\u4e0d\u80fd\u8fdb\u884c\u4f18\u5316\u3002<\/span><\/p>\n<p class=\"cp-code-line\">&#8220;<\/p>\n<p>Codex\u7ed9\u6211\u7684\u53cd\u9988\u662f\uff1a<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">**\u7ed3\u679c**<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; Atlas A3 \u53ef\u7528\uff1a\u4e24\u9897 Ascend910 \u5065\u5eb7\uff0cTP=2 \u670d\u52a1\u8fd0\u884c\u5728 <\/span><span class=\"cp-hl\">127.0.0.1:8000<\/span><span class=\"cp-hl\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; 2048\/2048 \u7edf\u4e00\u8d1f\u8f7d\u4e0b\uff0c\u6700\u7ec8 MTP=4 \u914d\u7f6e\u6709\u6548 QPS <\/span><span class=\"cp-hl\">0.220478<\/span><span class=\"cp-hl\">\u3001\u8f93\u51fa\u541e\u5410 <\/span><span class=\"cp-hl\">451.538 tok\/s<\/span><span class=\"cp-hl\">\u3001\u603b\u541e\u5410 <\/span><span class=\"cp-hl\">903.077 tok\/s<\/span><span class=\"cp-hl\">\uff0c24\/24 \u6210\u529f\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u5e73\u5747 TTFT <\/span><span class=\"cp-hl\">929.567 ms<\/span><span class=\"cp-hl\">\u3001\u5e73\u5747 TPOT <\/span><span class=\"cp-hl\">17.124 ms<\/span><span class=\"cp-hl\">\uff1b\u56e0 MTP \u591a token \u6279\u91cf\u8fd4\u56de\uff0cP99 ITL \u4e3a <\/span><span class=\"cp-hl\">88.239 ms<\/span><span class=\"cp-hl\">\u3002\u4e25\u683c\u9010 token ITL \u8981\u6c42\u8bf7\u4f7f\u7528 <\/span><span class=\"cp-hl\">current-mtp\/start_vllm_nomtp.sh<\/span><span class=\"cp-hl\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; MTP=4 \u524d\u540e\u8d28\u91cf\u63a2\u9488 4\/4 \u9010\u5b57\u4e00\u81f4\uff1b\u82e5\u5fc5\u987b\u4e0e\u65e0 MTP \u8f93\u51fa\u9010\u5b57\u517c\u5bb9\uff0c\u5219\u9009\u62e9\u65e0 MTP \u914d\u7f6e\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; conv1d \u56de\u9000\u5df2\u4fee\u590d\uff1a\u5bfc\u51fa <\/span><span class=\"cp-hl\">fla_npu<\/span><span class=\"cp-hl\"> AscendC kernel\uff0c\u542f\u52a8\u65e5\u5fd7\u4e0d\u518d\u51fa\u73b0 PyTorch fallback <\/span><span class=\"cp-hl\">\/vllm-workspace\/vllm-ascend\/vllm_ascend\/ops\/triton\/mamba\/causal_conv1d.py:4<\/span><span class=\"cp-hl\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl-red\">&#8211; msprof \u5b9a\u4f4d\u6b8b\u4f59\u74f6\u9888\u4e3a TP \u901a\u4fe1\uff1a<\/span><span class=\"cp-hl-red\">allreduceAicpuKernel<\/span><span class=\"cp-hl-red\"> \u5360\u7b97\u5b50\u65f6\u95f4 <\/span><span class=\"cp-hl-red\">82.5%<\/span><span class=\"cp-hl-red\">\uff0c<\/span><span class=\"cp-hl-red\">allgather<\/span><span class=\"cp-hl-red\"> \u5360 <\/span><span class=\"cp-hl-red\">2.872%<\/span><span class=\"cp-hl-red\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u5b8c\u6574\u62a5\u544a\uff1a<\/span><span class=\"cp-hl\">current-mtp\/report.md:1<\/span><span class=\"cp-hl\">\uff1b\u6700\u7ec8\u542f\u52a8\u914d\u7f6e\uff1a<\/span><span class=\"cp-hl\">start_vllm.sh:10<\/span><span class=\"cp-hl\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">2026-11-30T13:45:17.396695Z ERROR codex_core::session: failed to record rollout items: thread 01a22c78-aa58-7c43-bd98-bec085dbd303 not found<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">tokens used<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">217,310<\/span><\/p>\n<p>\u867d\u7136Codex\u89e3\u51b3\u4e86conv1d\u7684\u95ee\u9898\uff0c\u4f46\u662f\u6027\u80fd\u4f18\u5316\u5e76\u4e0d\u660e\u663e\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7ec4<\/th>\n<th>\u72b6\u6001<\/th>\n<th>fallback \u8b66\u544a<\/th>\n<th>QPS \u4e2d\u4f4d<\/th>\n<th>\u8f93\u51fa\u541e\u5410<\/th>\n<th>TTFT<\/th>\n<th>TPOT<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A<\/td>\n<td>\u4fee\u590d\u6001\uff08fla_npu AscendC\uff09<\/td>\n<td>0<\/td>\n<td>0.073841<\/td>\n<td>151.23<\/td>\n<td>3944.6<\/td>\n<td>50.991<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>\u8fd8\u539f\u6001\uff08git HEAD\uff0cPyTorch\uff09<\/td>\n<td>2<\/td>\n<td>0.073774<\/td>\n<td>151.09<\/td>\n<td>3923.9<\/td>\n<td>50.977<\/td>\n<\/tr>\n<tr>\n<td>\u5dee<\/td>\n<td>\u2014<\/td>\n<td>\u2014<\/td>\n<td>+0.09%<\/td>\n<td>+0.09%<\/td>\n<td>+0.53%<\/td>\n<td>+0.03%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u540c\u65f6\u65e2\u7136 <span class=\"cp-hl-red\">msprof \u5b9a\u4f4d\u6b8b\u4f59\u74f6\u9888\u4e3a TP \u901a\u4fe1\uff1aallreduceAicpuKernel \u5360\u7b97\u5b50\u65f6\u95f4 82.5%\uff0callgather \u5360 2.872%<\/span>\u3002<\/p>\n<p>\u4e8e\u662f\u7b14\u8005\u82b1\u4e86\u4e00\u70b9tokens\u8ba9Codex\u518d\u6b21\u8fdb\u884c\u4f18\u5316\uff1a<\/p>\n<p class=\"cp-code-line\">codex exec &#8211;skip-git-repo-check &#8220;<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">\u771f\u6b63\u7684\u74f6\u9888\u770b\u6765\u662f 82.5% \u7684 allreduceAicpuKernel\uff0c\u4f60\u80fd\u4e0d\u80fd\u5e2e\u6211\u4f18\u5316\u4e00\u4e0b\uff0c\u6027\u80fd\u63d0\u5347\u8d8a\u9ad8\u8d8a\u9ad8<\/span><\/p>\n<p class=\"cp-code-line\">&#8220;<\/p>\n<p>codex\u6267\u884c\u4e86\u4e00\u6bb5\u65f6\u95f4\u540e\uff0c\u5f00\u542f\u4e86\u4e00\u7cfb\u5217\u64cd\u4f5c\uff0c\u5148\u8bf4\u7ed3\u8bba\uff1a<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">**\u7ed3\u8bba**<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; <\/span><span class=\"cp-hl-red\">\u672a\u627e\u5230\u7a33\u5b9a\u8d85\u8fc7\u57fa\u7ebf\u7684\u914d\u7f6e\uff0c\u5df2\u6062\u590d MTP=5 + FULL_DECODE_ONLY + enable_npugraph_ex=true \u6700\u4f73\u57fa\u7ebf<\/span><span class=\"cp-hl\">\uff0c\u670d\u52a1\u5065\u5eb7\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u74f6\u9888\u88ab\u4fee\u6b63\uff1a<\/span><span class=\"cp-hl-red\">allreduceAicpuKernel \u62a5\u8868\u662f 38.686s\uff0c\u4f46\u8bbe\u5907\u4fa7 HCCL hcom_allReduce_ \u5b9e\u9645\u53ea\u6709 5.908s\uff0c\u5747\u503c 56.98\u00b5s\uff1b\u4e3b\u8981\u6210\u672c\u662f\u5927\u91cf\u5c0f allreduce \u7684\u8c03\u5ea6\/\u7b49\u5f85\uff0c\u4e0d\u662f\u7eaf\u901a\u4fe1\u5e26\u5bbd<\/span><span class=\"cp-hl\">\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u5b9e\u6d4b\u5019\u9009\u5747\u65e0\u7a33\u5b9a\u6536\u76ca\uff1astatic+super kernel\u3001weight_nz_mode=2\/0\u3001HCCL_ALGO=level0:fullmesh\u3001max_num_seqs=8\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u6ce2\u52a8\u4e3b\u8981\u6765\u81ea speculative acceptance length\uff08\u7ea6 5.61\u20135.87\uff09\uff1b\u4f4e\u9a8c\u6536\u8f6e\u4f1a\u663e\u8457\u964d\u4f4e\u541e\u5410\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">**\u4ea7\u7269**<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u5b8c\u6574\u6570\u636e\u548c\u7ed3\u8bba\u5df2\u5199\u5165 current-mtp\/report.md:57\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">&#8211; \u6700\u7ec8\u542f\u52a8\u914d\u7f6e\u4e3a \/workspace\/start_mtp5_tp2_fulldec.sh:1\uff0c\u5f53\u524d\u670d\u52a1 PID 620643\uff0cprofile \u5df2\u5173\u95ed\u3002<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">tokens used<\/span><\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">1,369,191<\/span><\/p>\n<p>\u7531\u4e8e\u7b14\u8005\u7684AgentPlan\u89e6\u53d1\u9650\u5236\u4e863\u6b21\uff0c\u6240\u4ee5\u6d4b\u8bd5\u4e00\u5171\u88ab\u5207\u5206\u62104\u4e2a\u9636\u6bb5\uff1a<\/p>\n<p>\u5b8c\u6574\u65f6\u95f4\u7ebf\uff0819.5 \u5c0f\u65f6\uff0c3 \u6b21\u4f1a\u8bdd\uff0c25 \u4e2a\u5b9e\u9a8c\u5206\u652f\uff09<\/p>\n<p>\u9636\u6bb5 1 \u00b7 11-30 22:35 \u2192 12-01 01:59\uff083h24m\uff0c137 \u6b21\u8c03\u7528\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>\u65f6\u523b<\/th>\n<th>\u5b9e\u9a8c<\/th>\n<th>\u7ed3\u679c tok\/s<\/th>\n<th>\u5224\u5b9a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>22:35<\/td>\n<td>\u4e0b\u8fbe\u4efb\u52a1\uff0c\u63a2\u7d22 ascend_config.py \/ parallel_state.py<\/td>\n<td>\u2014<\/td>\n<td>\u2014<\/td>\n<\/tr>\n<tr>\n<td>22:50<\/td>\n<td>clean1~3 MTP4 \u57fa\u7ebf<\/td>\n<td>446.7<\/td>\n<td>\u57fa\u51c6<\/td>\n<\/tr>\n<tr>\n<td>23:05<\/td>\n<td>FlashComm1 + fuse_gemm_comms<\/td>\n<td>450.9<\/td>\n<td>+1% \u566a\u58f0\u5185<\/td>\n<\/tr>\n<tr>\n<td>23:25<\/td>\n<td>HCCL AIV<\/td>\n<td>442.8<\/td>\n<td>\u22120.9%<\/td>\n<\/tr>\n<tr>\n<td>23:45<\/td>\n<td>HCCL HOST<\/td>\n<td>450.8<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td>00:05<\/td>\n<td>HCCL HOST_TS<\/td>\n<td>450.9<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td>00:25<\/td>\n<td>HCCL_BUFFSIZE=512<\/td>\n<td>448.6<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td>00:45<\/td>\n<td>FULL_DECODE_ONLY<\/td>\n<td>451.1<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td>01:05<\/td>\n<td>qwen3_5_mtp \u4e13\u7528 decoder<\/td>\n<td>451.1<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td><span class=\"cp-hl-red\">01:25<\/span><\/td>\n<td><span class=\"cp-hl-red\">MTP=5<\/span><\/td>\n<td><span class=\"cp-hl-red\">483.7<\/span><\/td>\n<td><span class=\"cp-hl-red\">+8.3% \u2713<\/span><\/td>\n<\/tr>\n<tr>\n<td>01:45<\/td>\n<td>MTP=6<\/td>\n<td>369.1<\/td>\n<td>\u221217.4%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9636\u6bb5 2 \u00b7 12-01 09:59 \u2192 12:40\uff082h41m\uff0c197 \u6b21\u8c03\u7528\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>\u65f6\u523b<\/th>\n<th>\u5b9e\u9a8c<\/th>\n<th>\u7ed3\u679c tok\/s<\/th>\n<th>\u5224\u5b9a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>10:00<\/td>\n<td>MTP5 + FlashComm<\/td>\n<td>422.4<\/td>\n<td>\u221212.6%<\/td>\n<\/tr>\n<tr>\n<td>10:20<\/td>\n<td>MTP5 + FFTS<\/td>\n<td>470.5<\/td>\n<td>\u22122.7%<\/td>\n<\/tr>\n<tr>\n<td>10:40<\/td>\n<td>MTP5 + hybrid SP\uff08SP_MIN_TOKENS=512\uff09<\/td>\n<td>468.5<\/td>\n<td>\u6296\u52a8 293~468<\/td>\n<\/tr>\n<tr>\n<td>11:00<\/td>\n<td>MTP5 + fused SP\uff08999999\uff09<\/td>\n<td>476.1<\/td>\n<td>\u6296\u52a8 313~476<\/td>\n<\/tr>\n<tr>\n<td>11:20<\/td>\n<td>MTP5 + \u8c03\u5ea6\u8c03\u53c2<\/td>\n<td>295.2<\/td>\n<td>\u221239%<\/td>\n<\/tr>\n<tr>\n<td>11:35<\/td>\n<td>MTP5 + PP2<\/td>\n<td>257.0<\/td>\n<td>\u221247%<\/td>\n<\/tr>\n<tr>\n<td>11:50<\/td>\n<td>5 \u4e2a\u901a\u4fe1\u5fae\u57fa\u51c6\uff1aALGO 5 \u79cd \u00d7 BUFFSIZE 6 \u6863 \u00d7 MODE 3 \u79cd<\/td>\n<td>\u2014<\/td>\n<td>\u5168\u90e8\u566a\u58f0\u5185<\/td>\n<\/tr>\n<tr>\n<td>12:20<\/td>\n<td>\u6539 patch_qwen3_5.py \u81ea\u5b9a\u4e49 HCCL comm<\/td>\n<td>\u2014<\/td>\n<td>\u7f16\u8bd1\u901a\u8fc7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9636\u6bb5 3 \u00b7 12:40 \u2192 14:11\uff08173 \u6b21\u8c03\u7528\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>\u65f6\u523b<\/th>\n<th>\u5b9e\u9a8c<\/th>\n<th>\u7ed3\u679c<\/th>\n<th>\u5224\u5b9a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>12:45<\/td>\n<td>MTP5 + AIV + BUFFSIZE=32<\/td>\n<td>416.7 \u2192 \u540e\u4e24\u8f6e 0\/8<\/td>\n<td>\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>13:05<\/td>\n<td>MTP5 + pyhccl<\/td>\n<td>\u542f\u52a8\u5373\u9000<\/td>\n<td>\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>13:20<\/td>\n<td>MTP5 + RING<\/td>\n<td>476.8<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td>13:35<\/td>\n<td>MTP5 + RING + AIV<\/td>\n<td>438.5<\/td>\n<td>\u22129%<\/td>\n<\/tr>\n<tr>\n<td>13:50<\/td>\n<td>MTP5 + NPX \u5168 decode<\/td>\n<td>480.2<\/td>\n<td>\u6301\u5e73<\/td>\n<\/tr>\n<tr>\n<td><span class=\"cp-hl-red\">14:05<\/span><\/td>\n<td><span class=\"cp-hl-red\">MTP5 restored<\/span><\/td>\n<td><span class=\"cp-hl-red\">465.0<\/span><\/td>\n<td><span class=\"cp-hl-red\">\u57fa\u7ebf\u786e\u8ba4<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9636\u6bb5 4 \u00b7 14:13 \u2192 16:42\uff08\u5173\u952e\u8f6c\u6298\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>\u65f6\u523b<\/th>\n<th>\u5b9e\u9a8c<\/th>\n<th>R1 \/ R2 \/ R3 (tok\/s)<\/th>\n<th>\u5224\u5b9a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>14:13<\/td>\n<td>pyhccl inplace<\/td>\n<td>\u672a\u4ea7\u51fa\u7ed3\u679c<\/td>\n<td>\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>14:39<\/td>\n<td>early warmup<\/td>\n<td>\u672a\u4ea7\u51fa\u7ed3\u679c<\/td>\n<td>\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>14:48<\/td>\n<td>DP2<\/td>\n<td>323.9 \/ 203.2 \/ 199.5\uff087\/1 \u5931\u8d25\uff09<\/td>\n<td>\u221258%<\/td>\n<\/tr>\n<tr>\n<td>15:03<\/td>\n<td>TP2 + AIV + \u5168 decode<\/td>\n<td>\u672a\u4ea7\u51fa\u7ed3\u679c<\/td>\n<td>\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>15:11<\/td>\n<td>TP2 + BUFFSIZE=512 + \u5168 decode<\/td>\n<td>370.2 \/ 329.8 \/ 403.7<\/td>\n<td>\u221216%<\/td>\n<\/tr>\n<tr>\n<td><span class=\"cp-hl-red\">15:19<\/span><\/td>\n<td><span class=\"cp-hl-red\">TP2 + \u5168 decode \u57fa\u7ebf<\/span><\/td>\n<td><span class=\"cp-hl-red\">412.9 \/ 480.1 \/ 398.6<\/span><\/td>\n<td><span class=\"cp-hl-red\">\u57fa\u51c6<\/span><\/td>\n<\/tr>\n<tr>\n<td>15:40<\/td>\n<td>steady profiling<\/td>\n<td>416.2 \/ 422.2<\/td>\n<td>\u5e72\u6270<\/td>\n<\/tr>\n<tr>\n<td><span class=\"cp-hl-red\">16:00<\/span><\/td>\n<td><span class=\"cp-hl-red\">\u7a33\u6001 profile \u4fee\u6b63\u89e3\u8bfb<\/span><\/td>\n<td><span class=\"cp-hl-red\">allreduce \u5b9e\u9645 5.9s\u226038.7s<\/span><\/td>\n<td><span class=\"cp-hl-red\">\u8ba4\u77e5\u7ffb\u8f6c<\/span><\/td>\n<\/tr>\n<tr>\n<td>16:14<\/td>\n<td>Static + super kernel<\/td>\n<td>416.5 \/ 403.6 \/ 474.6<\/td>\n<td>\u65e0\u7a33\u5b9a\u6536\u76ca\uff0c\u542f\u52a8\u66f4\u6162<\/td>\n<\/tr>\n<tr>\n<td>16:22<\/td>\n<td>weight_nz_mode=2<\/td>\n<td>404.8 \/ 424.7 \/ 424.9<\/td>\n<td>\u5dee\uff0c\u964d\u63a5\u53d7\u957f\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>16:29<\/td>\n<td>HCCL_ALGO=level0:fullmesh<\/td>\n<td>409.2 \/ 479.6 \/ 422.6<\/td>\n<td>\u65e0\u7a33\u5b9a\u6536\u76ca<\/td>\n<\/tr>\n<tr>\n<td>16:35<\/td>\n<td>max_num_seqs=8<\/td>\n<td>405.8 \/ 471.5 \/ 467.1<\/td>\n<td>\u65e0\u6536\u76ca<\/td>\n<\/tr>\n<tr>\n<td>16:41<\/td>\n<td>weight_nz_mode=0<\/td>\n<td>377.2 \/ 361.1 \/ 424.1<\/td>\n<td>\u660e\u663e\u66f4\u5dee<\/td>\n<\/tr>\n<tr>\n<td>16:42<\/td>\n<td>\u66f4\u65b0 report.md<\/td>\n<td>\u2014<\/td>\n<td>\u6536\u5c3e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6700\u7ec8\u7ed3\u679c<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9879<\/th>\n<th>\u6570\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span class=\"cp-hl-red\">\u6700\u4f73\u7a33\u5b9a\u914d\u7f6e<\/span><\/td>\n<td><span class=\"cp-hl-red\">MTP=5 + TP=2 + FULL_DECODE_ONLY + enable_npugraph_ex=true<\/span><\/td>\n<\/tr>\n<tr>\n<td>\u8f93\u51fa\u541e\u5410<\/td>\n<td>480 tok\/s\uff08R2 \u7a33\u5b9a\u503c\uff09<\/td>\n<\/tr>\n<tr>\n<td>valid QPS<\/td>\n<td>0.2344 ~ 0.2362<\/td>\n<\/tr>\n<tr>\n<td>TPOT<\/td>\n<td>15.83 ~ 15.86 ms<\/td>\n<\/tr>\n<tr>\n<td>\u76f8\u5bf9\u6700\u521d\u65e0 MTP<\/td>\n<td>151 \u2192 480 tok\/s\uff0c3.17 \u500d<\/td>\n<\/tr>\n<tr>\n<td>\u76f8\u5bf9 MTP4<\/td>\n<td>447 \u2192 480\uff0c+7.4%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u552f\u4e00\u6709\u6548\u7684\u52a8\u4f5c\u5c31\u662f <span class=\"cp-hl-red\">MTP \u4ece 4 \u63d0\u5230 5<\/span>\u3002\u200b \u5176\u4f59 11 \u7c7b\u901a\u4fe1\u8c03\u4f18\u3001\u9759\u6001 kernel\u3001SP \u91cd\u6784\u3001DP2\u3001PP2\u3001MTP6 \u5168\u90e8\u65e0\u6548\u6216\u8d1f\u6536\u76ca\u3002<\/p>\n<p>codex\u6d4b\u8bd5\u8f93\u5165\u548c\u8f93\u51fa\u5206\u522b\u662f\uff1a\u8f93\u5165 2048 token\uff0c\u8f93\u51fa 2048 token\uff0c8 \u4e2a\u8bf7\u6c42\uff0c\u5e76\u53d1 8\u3002<\/p>\n<p>\u968f\u540e\u7b14\u8005\u6709\u70b9\u4e0d\u6b7b\u5fc3\uff0c\u624b\u52a8\u5207\u6362FAP\u7684\u540c\u65f6\uff0c\u8fdb\u884c\u4e8619 \u6863 capture sizes\u5207\u5206\uff0c\u6d4b\u8bd5\u7684\u7ed3\u679c\u4e5f\u5e94\u8bc1\u4e86Codex\u662f\u6b63\u786e\u7684\uff1a<\/p>\n<p>\u6d4b\u8bd5\u660e\u7ec6\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7ec4<\/th>\n<th>cudagraph \u6a21\u5f0f<\/th>\n<th>\u7f13\u5b58<\/th>\n<th>R1 tok\/s<\/th>\n<th>R2 tok\/s<\/th>\n<th>R3 tok\/s<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span class=\"cp-hl-red\">A1<\/span><\/td>\n<td><span class=\"cp-hl-red\">FULL_DECODE_ONLY<\/span><\/td>\n<td><span class=\"cp-hl-red\">\u5f00<\/span><\/td>\n<td><span class=\"cp-hl-red\">409.97<\/span><\/td>\n<td><span class=\"cp-hl-red\">478.81<\/span><\/td>\n<td><span class=\"cp-hl-red\">423.21<\/span><\/td>\n<\/tr>\n<tr>\n<td>A2<\/td>\n<td>FULL_DECODE_ONLY<\/td>\n<td>\u5173<\/td>\n<td>342.37<\/td>\n<td>287.68<\/td>\n<td>294.05<\/td>\n<\/tr>\n<tr>\n<td>B1<\/td>\n<td>FULL_AND_PIECEWISE + 19\u6863<\/td>\n<td>\u5f00<\/td>\n<td>293.18<\/td>\n<td>433.00<\/td>\n<td>434.81<\/td>\n<\/tr>\n<tr>\n<td>B2<\/td>\n<td>FULL_AND_PIECEWISE + 19\u6863<\/td>\n<td>\u5173<\/td>\n<td>283.64<\/td>\n<td>278.19<\/td>\n<td>279.44<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6c47\u603b\uff08\u5254\u9664 R1 \u51b7\u542f\u52a8\uff0c\u53d6 R2\/R3 \u5747\u503c\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7ec4<\/th>\n<th>\u8f93\u51fa tok\/s<\/th>\n<th>QPS<\/th>\n<th>TTFT<\/th>\n<th>TPOT<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span class=\"cp-hl-red\">A1<\/span><\/td>\n<td><span class=\"cp-hl-red\">451.01<\/span><\/td>\n<td><span class=\"cp-hl-red\">0.2202<\/span><\/td>\n<td><span class=\"cp-hl-red\">949 ms<\/span><\/td>\n<td><span class=\"cp-hl-red\">16.04 ms<\/span><\/td>\n<\/tr>\n<tr>\n<td>A2<\/td>\n<td>290.87<\/td>\n<td>0.1420<\/td>\n<td>4,460 ms<\/td>\n<td>18.58 ms<\/td>\n<\/tr>\n<tr>\n<td>B1<\/td>\n<td>433.91<\/td>\n<td>0.2119<\/td>\n<td>1,082 ms<\/td>\n<td>17.57 ms<\/td>\n<\/tr>\n<tr>\n<td>B2<\/td>\n<td>278.82<\/td>\n<td>0.1361<\/td>\n<td>4,494 ms<\/td>\n<td>20.10 ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5bf9\u6bd4\u5206\u6790\u7ed3\u679c\u5f88\u660e\u786e\uff0cCodex\u63d0\u4f9b\u7ed9\u6211\u7684\u7684\u786e\u5c31\u662f\u5f53\u524d\u73af\u5883\u7684\u6700\u4f18\u89e3\uff1a<\/p>\n<p class=\"cp-code-line\">OS \uff1aubuntu22.04<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">vllm\uff1a0.30.0<\/span><\/p>\n<p class=\"cp-code-line\">torch\uff1a2.10.0<\/p>\n<p class=\"cp-code-line\">Python\uff1a3.12<\/p>\n<p class=\"cp-code-line\">torch_npu\uff1a2.10.0.post4<\/p>\n<p class=\"cp-code-line\"><span class=\"cp-hl\">vllm-ascend\uff1a0.30.0<\/span><\/p>\n<p class=\"cp-code-line\">triton_ascend\uff1a3.2.2<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5bf9\u6bd4<\/th>\n<th>\u5dee\u5f02<\/th>\n<th>\u5224\u5b9a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A1 \u4e0e A2\uff08\u7f13\u5b58\u6536\u76ca\uff09<\/td>\n<td>451.01 \u4e0e 290.87\uff0c+55.1%<\/td>\n<td>\u7f13\u5b58\u662f\u51b3\u5b9a\u6027\u56e0\u7d20<\/td>\n<\/tr>\n<tr>\n<td>B1 \u4e0e B2\uff08\u7f13\u5b58\u6536\u76ca\uff09<\/td>\n<td>433.91 \u4e0e 278.82\uff0c+55.6%<\/td>\n<td>\u540c\u4e0a\uff0c\u4e14\u5e45\u5ea6\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td>A1 \u4e0e B1\uff08\u914d\u7f6e\u5bf9\u6bd4\uff09<\/td>\n<td>451.01 \u4e0e 433.91\uff0c\u914d\u7f6e1 \u9886\u5148 3.9%<\/td>\n<td>FULL_DECODE_ONLY \u66f4\u4f18<\/td>\n<\/tr>\n<tr>\n<td>A2 \u4e0e B2<\/td>\n<td>290.87 \u4e0e 278.82\uff0c\u914d\u7f6e1 \u9886\u5148 4.3%<\/td>\n<td>\u4e00\u81f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f00\u542fMTP\u6295\u673a\u89e3\u7801\u7684\u672c\u8d28\u65e0\u975e\u662f\u644a\u8584\u6bcf\u6b65\u7684\u56fa\u5b9a\u6210\u672c\uff0c\u5728Codex\u4f18\u5316\u8fc7\u7a0b\u4e2d\uff0c\u65e2\u7136Codex\u63d0\u793a\u4e86\u201cHBM \u5360\u7528 90.91%\u3001AI Core \u53ea\u6709 5%\u201d\uff0c\u90a3\u5b8c\u5168\u53ef\u4ee5\u8ba4\u4e3a\u5f53\u524d\u7684\u6d4b\u8bd5\u7528\u4f8b\u8ba9<span class=\"cp-hl\">A3\u7b97\u529b\u95f2\u5f97\u53d1\u614c\uff0c\u65f6\u95f4\u90fd\u82b1\u5728\u642c\u8fd0\u6570\u636e\u548c\u7b49\u5f85\u540c\u6b65\u4e0a\uff0c<\/span>MTP \u7528\u4e00\u4e2a\u8f7b\u91cf\u7684 draft head \u4e00\u6b21\u731c k \u4e2a token\uff0c\u4e3b\u6a21\u578b\u4e00\u6b21\u524d\u5411\u5c31\u628a\u8fd9 k \u4e2a\u4e00\u8d77\u9a8c\u8bc1\uff0c\u6743\u91cd\u642c\u8fd0\u3001TP allreduce \u8fd9\u7c7b\u201c\u6bcf\u6b65\u56fa\u5b9a\u5f00\u9500\u201d\u4e00\u5206\u6ca1\u7701\uff0c\u4f46\u88ab\u644a\u5230\u4e86 5.7 \u4e2a token \u4e0a\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u914d\u7f6e<\/th>\n<th>\u6bcf\u6b65\u8017\u65f6<\/th>\n<th>\u6bcf\u6b65\u4ea7\u51fa<\/th>\n<th>\u6bcf token \u65f6\u95f4<\/th>\n<th>\u541e\u5410<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u65e0 MTP<\/td>\n<td>50.9 ms<\/td>\n<td>1.0<\/td>\n<td>50.9 ms<\/td>\n<td>151 tok\/s<\/td>\n<\/tr>\n<tr>\n<td>MTP=4<\/td>\n<td>~68 ms<\/td>\n<td>~4.0<\/td>\n<td>17.12 ms<\/td>\n<td>452 tok\/s<\/td>\n<\/tr>\n<tr>\n<td>MTP=5<\/td>\n<td>~90 ms<\/td>\n<td>~5.7<\/td>\n<td>15.83 ms<\/td>\n<td>480 tok\/s<\/td>\n<\/tr>\n<tr>\n<td>MTP=6<\/td>\n<td>~110 ms<\/td>\n<td>~5.5<\/td>\n<td>~18 ms<\/td>\n<td>369 tok\/s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u867d\u7136\u5355\u6b65\u65f6\u95f4\u4ece 50.9 ms \u6da8\u5230 90 ms\uff08+77%\uff09\uff0c\u4f46\u4ea7\u51fa\u4ece 1 \u4e2a\u6da8\u5230 5.7 \u4e2a\uff08+470%\uff09\uff0c\u51c0\u6536\u76ca\u7ea6 2.9 \u500d\uff0c\u8fd9\u5c31\u662f \u5b9e\u6d4b\u6570\u636e\u4e2d151 \u63d0\u5347\u5230480 \u7684\u5168\u90e8\u6765\u6e90\u3002<\/p>\n<figure class=\"cp-figure\"><img decoding=\"async\" src=\"https:\/\/nelliemylove.cn\/nelliemylove\/wp-content\/themes\/cyberpunk-blog\/assets\/images\/posts\/codex-optimize-qwen38-27b-followup\/pic2.png\" alt=\"MTP=5 \u6295\u673a\u89e3\u7801\uff1a1 \u6b21\u524d\u5411\u6700\u591a\u9a8c\u8bc1 6 \u4e2a token\" width=\"760\" height=\"481\" 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>Codex \u4e8c\u8f6e\u8c03\u4f18 Qwen3.8-27B-W8A8\uff1a19.5 \u5c0f\u65f6 25 \u4e2a\u5b9e\u9a8c\u5206\u652f\uff0c\u552f\u4e00\u6709\u6548\u7684\u662f MTP \u4ece 4 \u63d0\u5230 5\uff0c\u541e\u5410 151 \u63d0\u5347\u5230 480 tok\/s\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,65,26],"tags":[],"class_list":["post-722","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\/722","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=722"}],"version-history":[{"count":0,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/posts\/722\/revisions"}],"wp:attachment":[{"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/media?parent=722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/categories?post=722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nelliemylove.cn\/nelliemylove\/index.php\/wp-json\/wp\/v2\/tags?post=722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}