{"id":124264,"date":"2026-11-18T18:48:46","date_gmt":"2026-11-18T10:48:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/124264.html"},"modified":"2026-11-18T18:48:46","modified_gmt":"2026-11-18T10:48:46","slug":"%e9%a6%96-token-%e4%b8%ba%e4%bb%80%e4%b9%88%e6%85%a2%ef%bc%9an_batch-%e5%85%ad%e6%a1%a3%e5%ae%9e%e6%b5%8b%ef%bc%8cbatch-%e5%a4%aa%e5%b0%8f%e6%89%8d%e6%98%af%e5%85%83%e5%87%b6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/124264.html","title":{"rendered":"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u9996 token \u4e3a\u4ec0\u4e48\u6162&#xff1a;n_batch \u516d\u6863\u5b9e\u6d4b&#xff0c;batch \u592a\u5c0f\u624d\u662f\u5143\u51f6<\/p>\n<p>\u5148\u8bf4\u7ed3\u8bba\u3002\u540c\u4e00\u4e2a\u6a21\u578b\u3001\u540c\u4e00\u53f0\u673a\u5668\u3001\u540c\u4e00\u4e2a 512 token \u7684 prompt&#xff1a;n_batch&#061;128 \u7684\u9996 token \u5ef6\u8fdf&#xff08;TTFT&#xff09;\u662f 8,138 ms&#xff0c;n_batch&#061;16 \u662f 9,464 ms\u2014\u2014\u6bd4 128 \u6863\u6162 16.3%&#xff0c;\u800c\u5b83\u7684 prefill \u541e\u5410\u53ea\u6709 54.1 tok\/s&#xff0c;\u6bd4 128 \u6863\u7684 62.9 \u4f4e 14.0%\u3002\u4e2d\u95f4\u56db\u6863&#xff08;32\/64\/128\/256&#xff09;\u6781\u5dee\u53ea\u6709 3.1%&#xff0c;n_batch&#061;512 \u56de\u5347\u5230 8,603.9 ms\u3002<\/p>\n<p>\u4e00\u53e5\u8bdd&#xff1a;\u6279\u6b21\u522b\u8d34\u7740\u6700\u5c0f\u6863\u8bbe\u3002prefill \u662f\u6309\u6279\u5207\u5757\u7b97\u7684&#xff0c;\u5757\u592a\u5c0f&#xff0c;\u6bcf\u8f6e\u7684\u56fa\u5b9a\u5f00\u9500\u5c31\u88ab\u91cd\u590d\u4ed8\u592a\u591a\u6b21&#xff1b;\u4f46&#034;\u5757\u8d8a\u5927\u8d8a\u597d&#034;\u4e5f\u4e0d\u6210\u7acb&#xff0c;512 \u6863\u5b9e\u6d4b\u5fae\u6da8 5.7%\u3002 \u8fd9\u7bc7\u53ea\u56de\u7b54\u4e00\u4e2a\u95ee\u9898&#xff1a;n_batch \u5bf9\u9996 token \u5ef6\u8fdf\u5230\u5e95\u610f\u5473\u7740\u4ec0\u4e48&#xff0c;\u4ee5\u53ca\u8be5\u628a\u5b83\u8bbe\u5230\u54ea\u4e00\u6863\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4e09\u4e2a\u5224\u636e<\/h3>\n<table>\n<tr>\u5224\u636e\u73b0\u8c61\u672c\u7bc7\u8bfb\u6570<\/tr>\n<tbody>\n<tr>\n<td>\u66f2\u7ebf\u5f62\u72b6<\/td>\n<td>TTFT \u968f n_batch \u5148\u964d\u540e\u5347&#xff0c;\u5448 U \u578b<\/td>\n<td>16 \u6863 9,464.5 ms \u2192 128 \u6863 8,138.0 ms \u2192 512 \u6863\u56de\u5347 8,603.9 ms<\/td>\n<\/tr>\n<tr>\n<td>\u5e73\u53f0\u533a<\/td>\n<td>\u4e2d\u6bb5\u56db\u6863\u6781\u5dee\u4ec5 3.1%&#xff0c;\u6536\u76ca\u96c6\u4e2d\u5728&#034;\u522b\u8bbe\u592a\u5c0f&#034;<\/td>\n<td>32~256 \u56db\u6863\u843d\u5728 8,138.0~8,390.5 ms<\/td>\n<\/tr>\n<tr>\n<td>\u8bb0\u8d26\u79d1\u76ee<\/td>\n<td>16 \u6863\u6162\u7684\u8d26\u8bb0\u5728 prefill \u541e\u5410\u4e0a&#xff0c;\u4e0d\u8bb0\u5728\u5185\u5b58<\/td>\n<td>54.1 vs 62.9 tok\/s&#xff08;\u221214.0%&#xff09;&#xff1b;HWM \u7a33\u5b9a ~7.0 GiB\u3001oom_kill&#061;0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u6761\u4e3b\u8bc1\u90fd\u80fd\u5728\u4f60\u81ea\u5df1\u7684\u673a\u5668\u4e0a\u590d\u73b0&#xff0c;\u547d\u4ee4\u5728\u7b2c\u4e03\u8282\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u5b9e\u9a8c\u8bbe\u7f6e<\/h3>\n<p>\u56fa\u5b9a\u9879&#xff08;\u516d\u6863\u4e4b\u95f4\u53ea\u6709 n_batch \u4e00\u4e2a\u53d8\u91cf&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u9879\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u6a21\u578b<\/td>\n<td>SmolLM2-1.7B-Instruct f16 GGUF&#xff08;3.19 GiB&#xff09;<\/td>\n<td>\u4e0e F2\/F3 \u540c\u4e00\u6743\u91cd\u3001\u540c\u673a\u540c\u5bb9\u5668&#xff0c;\u6570\u636e\u53ef\u6a2a\u5411\u5bf9\u7167<\/td>\n<\/tr>\n<tr>\n<td>prompt<\/td>\n<td>512 token&#xff0c;\u5148 tokenize \u518d\u7cbe\u786e\u622a\u65ad<\/td>\n<td>\u76f4\u63a5\u4f20 token \u5e8f\u5217&#xff0c;\u5404\u6863 prompt \u9010 token \u4e00\u81f4&#xff0c;\u907f\u514d\u6587\u672c\u5dee\u5f02\u6df7\u5165<\/td>\n<\/tr>\n<tr>\n<td>\u91c7\u6837<\/td>\n<td>temperature&#061;0&#xff08;top_k&#061;1&#xff09;\u3001\u6d41\u5f0f<\/td>\n<td>\u8d2a\u5a6a\u89e3\u7801&#xff0c;\u6392\u9664\u91c7\u6837\u968f\u673a\u6027<\/td>\n<\/tr>\n<tr>\n<td>\u7ebf\u7a0b<\/td>\n<td>n_threads&#061;4\u3001n_threads_batch&#061;4<\/td>\n<td>\u8d34\u7740\u53ef\u7528\u6838\u6570\u8bbe&#xff08;F2 \u7ed3\u8bba&#xff09;&#xff0c;\u4e0d\u6df7\u5165\u7ebf\u7a0b\u53d8\u91cf<\/td>\n<\/tr>\n<tr>\n<td>\u4e0a\u4e0b\u6587<\/td>\n<td>n_ctx&#061;2048<\/td>\n<td>KV \u2248 384 MB&#xff08;192 KB\/token&#xff0c;\u89c1 F3&#xff09;&#xff0c;\u8fdc\u79bb\u5185\u5b58\u5899&#xff0c;\u4e3b\u8bc1\u4e0d\u542b n_ctx \u5e72\u6270<\/td>\n<\/tr>\n<tr>\n<td>\u7edf\u8ba1\u53e3\u5f84<\/td>\n<td>\u6bcf\u914d\u7f6e\u72ec\u7acb\u5b50\u8fdb\u7a0b \u00d7 3 \u904d\u53d6\u4e2d\u4f4d\u6570<\/td>\n<td>RSS \u4e0d\u7d2f\u79ef&#xff1b;\u4e2d\u4f4d\u6570\u53e3\u5f84\u6cbf\u7528 F2 \u7684\u6559\u8bad<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u73af\u5883\u6838\u5bf9\u4e24\u6761&#xff08;\u8dd1\u5b9e\u9a8c\u524d\u5148\u786e\u8ba4\u5bb9\u5668\u914d\u989d&#xff0c;\u522b\u8ba9&#034;nproc \u62a5 32 \u6838&#034;\u8fd9\u79cd\u5047\u8c61\u6df7\u8fdb\u6765&#xff09;&#xff1a;<\/p>\n<p><span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/cpu.max        <span class=\"token comment\"># \u672c\u673a&#xff1a;400000 100000&#xff0c;\u5373 4 \u6838\u914d\u989d<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/memory.max     <span class=\"token comment\"># \u672c\u673a&#xff1a;8589934592&#xff0c;\u5373 8 GiB<\/span><\/p>\n<p>TTFT \u5b9a\u4e49&#xff1a;\u4ece\u8c03\u7528\u63a8\u7406\u5230\u7b2c\u4e00\u4e2a\u6d41\u5f0f chunk \u5230\u8fbe\u7684\u5899\u949f\u65f6\u95f4\u3002\u6a21\u578b\u52a0\u8f7d\u3001tokenizer \u9884\u70ed\u5728\u8ba1\u65f6\u524d\u5b8c\u6210\u5e76 reset()&#xff0c;\u4e0d\u8ba1\u5165 TTFT\u3002\u6bcf\u6b21\u8fd0\u884c\u5b9e\u9645\u4ea7\u51fa 9 \u4e2a\u6d41\u5f0f chunk&#xff08;8 \u4e2a\u751f\u6210 token \u4e4b\u5916\u7684\u8ba1\u6570\u5dee\u5f02\u5c5e\u7ed1\u5b9a\u5c42\u6d41\u5f0f\u5b9e\u73b0&#xff0c;\u516d\u6863\u5b8c\u5168\u4e00\u81f4&#xff0c;\u4e0d\u5f71\u54cd TTFT \u53e3\u5f84&#xff09;\u3002<\/p>\n<p>\u52a0\u8f7d\u4ee3\u7801\u53ea\u5dee\u4e00\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> llama_cpp <span class=\"token keyword\">import<\/span> Llama<br \/>\nllm <span class=\"token operator\">&#061;<\/span> Llama<span class=\"token punctuation\">(<\/span>model_path<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;smollm2-f16.gguf&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            n_ctx<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2048<\/span><span class=\"token punctuation\">,<\/span>          <span class=\"token comment\"># \u56fa\u5b9a<\/span><br \/>\n            n_threads<span class=\"token operator\">&#061;<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span>         <span class=\"token comment\"># \u56fa\u5b9a<\/span><br \/>\n            n_threads_batch<span class=\"token operator\">&#061;<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span>   <span class=\"token comment\"># \u56fa\u5b9a<\/span><br \/>\n            n_batch<span class=\"token operator\">&#061;<\/span><span class=\"token operator\">&lt;<\/span>\u6863\u4f4d<span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">)<\/span>      <span class=\"token comment\"># \u552f\u4e00\u53d8\u91cf&#xff1a;16\/32\/64\/128\/256\/512<\/span><\/p>\n<hr \/>\n<h3>\u4e09\u3001\u673a\u5236\u4e00\u6bb5&#xff1a;prefill \u662f\u6309\u6279\u5207\u5757\u7b97\u7684<\/h3>\n<p>llama.cpp \u7684\u9884\u586b\u5145&#xff08;prefill&#xff09;\u4e0d\u662f\u628a 512 \u4e2a token \u4e00\u6b21\u585e\u8fdb\u77e9\u9635\u4e58\u6cd5&#xff0c;\u800c\u662f\u6309 n_batch \u5207\u5757\u3001\u9010\u8f6e\u524d\u5411&#xff1a;<\/p>\n<table>\n<tr>n_batch512 \u4e2a token \u8981\u8dd1\u7684\u8f6e\u6570<\/tr>\n<tbody>\n<tr>\n<td>16<\/td>\n<td>32 \u8f6e<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>16 \u8f6e<\/td>\n<\/tr>\n<tr>\n<td>64<\/td>\n<td>8 \u8f6e<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>4 \u8f6e<\/td>\n<\/tr>\n<tr>\n<td>256<\/td>\n<td>2 \u8f6e<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>1 \u8f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bcf\u4e00\u8f6e\u9664\u4e86\u771f\u5b9e\u7684\u77e9\u9635\u8ba1\u7b97&#xff0c;\u8fd8\u6709\u4e00\u6279\u56fa\u5b9a\u5f00\u9500\u2014\u2014kernel \u542f\u52a8\u3001\u6279\u95f4\u540c\u6b65\u3001\u91c7\u6837\u524d\u7684\u72b6\u6001\u6574\u7406\u3002\u5757\u8d8a\u5c0f&#xff0c;\u8f6e\u6b21\u8d8a\u591a&#xff0c;\u56fa\u5b9a\u5f00\u9500\u88ab\u91cd\u590d\u4ed8\u7684\u6b21\u6570\u5c31\u8d8a\u591a\u3002<\/p>\n<p>\u8fd9\u7b14\u8d26\u53ef\u4ee5\u7c97\u7565\u6298\u7b97&#xff1a;16 \u6863\u6bd4 128 \u6863\u591a\u8dd1 28 \u8f6e&#xff0c;TTFT \u591a 1,326.5 ms&#xff0c;\u644a\u4e0b\u6765\u7ea6 47 ms\/\u8f6e\u2014\u2014\u8fd9\u5c31\u662f&#034;\u8f6e\u6b21\u7a0e&#034;\u7684\u91cf\u7ea7\u3002\u6ce8\u610f\u8fd9\u53ea\u662f\u4e00\u4e2a\u793a\u610f\u6027\u6298\u7b97&#xff08;TTFT \u91cc\u8fd8\u6709\u4e0e\u8f6e\u6570\u65e0\u5173\u7684\u56fa\u5b9a\u90e8\u5206&#xff09;&#xff0c;\u4e0d\u662f\u7cbe\u786e\u5206\u89e3&#xff0c;\u4f46\u6570\u91cf\u7ea7\u4e0e&#034;\u5c0f\u6279\u6b21\u4f24\u9996\u5ef6\u8fdf&#034;\u7684\u65b9\u5411\u4e00\u81f4\u3002<\/p>\n<p>16 \u6863\u6162\u7684\u76f4\u63a5\u8bc1\u636e\u5728\u541e\u5410\u4e0a&#xff1a;\u5b83\u7684 prefill \u53ea\u6709 54.1 tok\/s&#xff0c;\u6bd4 128 \u6863\u7684 62.9 \u4f4e 14.0%\u2014\u2014\u5c11\u7684\u4e0d\u662f\u7b97\u529b&#xff0c;\u662f\u88ab\u8f6e\u6b21\u5f00\u9500\u5403\u6389\u7684\u65f6\u95f4\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u516d\u6863\u8bfb\u6570\u5168\u8868<\/h3>\n<p>\u4e3b\u8868&#xff08;\u4e2d\u4f4d\u6570&#xff0c;3 \u904d\u53d6\u4e2d\u4f4d&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u6307\u6807163264128256512<\/tr>\n<tbody>\n<tr>\n<td>TTFT (ms)<\/td>\n<td>9,464.5<\/td>\n<td>8,390.5<\/td>\n<td>8,352.5<\/td>\n<td>8,138.0<\/td>\n<td>8,286.0<\/td>\n<td>8,603.9<\/td>\n<\/tr>\n<tr>\n<td>prefill (tok\/s)<\/td>\n<td>54.1<\/td>\n<td>61.0<\/td>\n<td>61.3<\/td>\n<td>62.9<\/td>\n<td>61.8<\/td>\n<td>59.5<\/td>\n<\/tr>\n<tr>\n<td>HWM max (MB)<\/td>\n<td>7,008.4<\/td>\n<td>7,008.6<\/td>\n<td>7,008.4<\/td>\n<td>7,010.1<\/td>\n<td>7,009.9<\/td>\n<td>7,011.1<\/td>\n<\/tr>\n<tr>\n<td>oom_kill max<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>TTFT \u539f\u59cb\u8bfb\u6570\u5168\u8868&#xff08;\u4e09\u904d\u5168\u5217&#xff0c;\u4e0d\u6311\u6570&#xff09;&#xff1a;<\/p>\n<table>\n<tr>n_batch\u7b2c 1 \u904d\u7b2c 2 \u904d\u7b2c 3 \u904d\u904d\u95f4\u6781\u5dee<\/tr>\n<tbody>\n<tr>\n<td>16<\/td>\n<td>9,464.5<\/td>\n<td>9,663.1<\/td>\n<td>9,383.8<\/td>\n<td>3.0%<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>8,457.6<\/td>\n<td>8,390.5<\/td>\n<td>8,338.5<\/td>\n<td>1.4%<\/td>\n<\/tr>\n<tr>\n<td>64<\/td>\n<td>8,149.2<\/td>\n<td>8,996.0<\/td>\n<td>8,352.5<\/td>\n<td>10.4%<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>8,106.8<\/td>\n<td>8,138.0<\/td>\n<td>8,157.5<\/td>\n<td>0.6%<\/td>\n<\/tr>\n<tr>\n<td>256<\/td>\n<td>8,273.2<\/td>\n<td>8,286.0<\/td>\n<td>8,345.2<\/td>\n<td>0.9%<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>8,743.1<\/td>\n<td>8,579.3<\/td>\n<td>8,603.9<\/td>\n<td>1.9%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>prefill \u539f\u59cb\u8bfb\u6570\u5168\u8868&#xff1a;<\/p>\n<table>\n<tr>n_batch\u7b2c 1 \u904d\u7b2c 2 \u904d\u7b2c 3 \u904d<\/tr>\n<tbody>\n<tr>\n<td>16<\/td>\n<td>54.10<\/td>\n<td>52.99<\/td>\n<td>54.56<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>60.54<\/td>\n<td>61.02<\/td>\n<td>61.40<\/td>\n<\/tr>\n<tr>\n<td>64<\/td>\n<td>62.83<\/td>\n<td>56.91<\/td>\n<td>61.30<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>63.16<\/td>\n<td>62.91<\/td>\n<td>62.76<\/td>\n<\/tr>\n<tr>\n<td>256<\/td>\n<td>61.89<\/td>\n<td>61.79<\/td>\n<td>61.35<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>58.56<\/td>\n<td>59.68<\/td>\n<td>59.51<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8bfb\u6cd5\u6709\u4e24\u6761\u7eaa\u5f8b&#xff1a;<\/p>\n<li>64 \u6863\u7b2c 2 \u904d\u662f\u4e00\u6b21\u6574\u8f6e\u6bdb\u523a&#xff1a;TTFT 8,996.0\u3001prefill 56.91\u3001\u5168\u7a0b 9.422 s \u4e09\u6761\u7ebf\u540c\u6b65\u53d8\u6162\u2014\u2014\u662f\u90bb\u4f4d\u5e72\u6270\u4e4b\u7c7b\u7684\u77ac\u6001\u4e89\u62a2\u62d6\u6162\u4e86\u6574\u6761\u6d41\u6c34\u7ebf&#xff0c;\u4e0d\u662f TTFT \u8bb0\u5f55\u53e3\u5f84\u51fa\u4e86\u95ee\u9898\u3002\u540c\u914d\u7f6e\u904d\u95f4\u6781\u5dee\u6700\u9ad8 10.4%&#xff0c;\u6240\u4ee5\u672c\u6587\u53ea\u5bf9\u4e24\u6863\u4e09\u904d\u533a\u95f4\u4e0d\u91cd\u53e0\u7684\u6863\u4f4d\u5dee\u4e0b\u7ed3\u8bba&#xff1b;<\/li>\n<li>16 \u6863\u4e09\u904d\u6700\u4f4e 9,383.8&#xff0c;128 \u6863\u4e09\u904d\u6700\u9ad8 8,157.5&#xff0c;\u533a\u95f4\u5b8c\u5168\u4e0d\u91cd\u53e0\u2014\u201416.3% \u7684\u5dee\u8ddd\u5728\u8fd9\u4e2a\u566a\u58f0\u6c34\u5e73\u4e0b\u7ad9\u5f97\u4f4f&#xff1b;32~256 \u4e4b\u95f4\u7684\u6392\u5e8f\u4e0d\u4e0b\u7ed3\u8bba&#xff08;\u90fd\u5728\u6bdb\u523a\u5e26\u5bbd\u5185&#xff09;&#xff0c;512 \u6863\u7684\u56de\u5347 5.7% \u540c\u6837\u4ee5&#034;\u4e09\u904d\u6700\u4f4e 8,579.3 \u4ecd\u9ad8\u4e8e 128 \u6863\u6700\u9ad8 8,157.5&#034;\u4e3a\u754c&#xff0c;\u53ef\u4e0b\u7ed3\u8bba\u4f46\u5e45\u5ea6\u6309\u4e2d\u4f4d\u6570\u8ba1\u3002<\/li>\n<p>\u4e00\u4e2a\u81ea\u6d3d\u9a8c\u7b97&#xff08;\u8bc1\u660e\u4e24\u5f20\u8868\u662f\u540c\u4e00\u6b21\u6d4b\u91cf&#xff0c;\u4e0d\u662f\u4e24\u5957\u8bfb\u6570&#xff09;&#xff1a;\u672c\u5b9e\u9a8c\u91cc prefill_tok_s &#061; 512 \/ TTFT&#xff0c;\u4e8c\u8005\u4e92\u4e3a\u5012\u6570\u2014\u2014512 \u00f7 62.91 tok\/s &#061; 8.138 s&#xff0c;\u6b63\u662f 128 \u6863\u7684 TTFT&#xff1b;512 \u00f7 54.1 &#061; 9.464 s&#xff0c;\u6b63\u662f 16 \u6863\u7684 TTFT\u3002\u9996 chunk \u5230\u8fbe\u524d\u51e0\u4e4e\u5168\u662f prefill \u65f6\u95f4&#xff0c;\u4e24\u5f20\u8868\u4e92\u76f8\u5370\u8bc1&#xff0c;\u8bfb\u6570\u53e3\u5f84\u6ca1\u6709\u6697\u5751\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u300116 \u6863\u4e3a\u4ec0\u4e48\u6162&#xff0c;512 \u6863\u4e3a\u4ec0\u4e48\u5fae\u6da8<\/h3>\n<p>16 \u6863\u6162&#xff1a;\u7b2c\u4e09\u8282\u7684\u8f6e\u6b21\u673a\u5236 &#043; prefill \u541e\u5410 \u221214.0%&#xff0c;\u4e24\u6761\u8bc1\u636e\u4e92\u6d3d&#xff0c;\u53ef\u4ee5\u4e0b\u7ed3\u8bba\u3002512 token \u5728 16 \u6863\u4e0b\u5207 32 \u8f6e&#xff0c;\u6bcf\u8f6e\u591a\u4ed8\u4e00\u4efd\u56fa\u5b9a\u5f00\u9500&#xff0c;\u541e\u5410\u88ab\u644a\u8584&#xff1b;\u5207\u5230 128 \u6863\u53ea\u5269 4 \u8f6e&#xff0c;\u8f6e\u6b21\u7a0e\u57fa\u672c\u5f52\u96f6\u3002<\/p>\n<p>512 \u6863\u5fae\u6da8&#xff08;8,603.9 ms&#xff0c;\u6bd4 128 \u6863\u6162 5.7%&#xff09;&#xff1a;\u65b9\u5411\u4e0e&#034;\u5757\u8d8a\u5927\u8d8a\u597d&#034;\u76f8\u53cd\u3002\u53ef\u80fd\u7684\u89e3\u91ca\u662f\u5355\u8f6e\u8ba1\u7b97\u91cf\u8fc7\u5927\u540e\u4e0e\u8c03\u5ea6\u3001\u7f13\u5b58\u5c42\u6b21\u7684\u4ea4\u4e92\u53d8\u5dee&#xff0c;\u4f46\u672c\u8f6e\u5b9e\u9a8c\u6ca1\u6709\u9488\u5bf9\u8be5\u73b0\u8c61\u7684\u6d4b\u91cf&#xff0c;\u6b63\u6587\u53ea\u767b\u8bb0\u73b0\u8c61\u3001\u4e0d\u5f3a\u884c\u5f52\u56e0\u3002\u7b49 n_ubatch \u53ef\u63a7\u540e&#xff08;\u89c1\u7b2c\u516d\u8282&#xff09;\u505a\u5207\u5206\u5b9e\u9a8c\u624d\u6709\u5224\u636e\u2014\u2014\u4e0a\u6e38\u628a\u4e00\u4e2a n_batch \u6279\u518d\u5207\u6210 n_ubatch \u5b50\u5757\u8ba1\u7b97&#xff0c;512\/1 \u8f6e\u7684&#034;\u5de8\u8f6e&#034;\u5185\u90e8\u5b9e\u9645\u600e\u4e48\u8d70&#xff0c;\u672c\u73af\u5883\u770b\u4e0d\u89c1\u3002<\/p>\n<p>\u4e09\u6761\u5e38\u89c1\u8bef\u8bfb&#xff0c;\u63d0\u524d\u62c6\u6389&#xff1a;<\/p>\n<li>\u201cTTFT \u8d8a\u5c0f\u8d8a\u597d&#xff0c;\u90a3 n_batch \u62c9\u6ee1\u201d\u2014\u2014512 \u6863\u5b9e\u6d4b\u5df2\u7ecf\u56de\u5347 5.7%&#xff0c;\u66f2\u7ebf\u662f U \u578b\u4e0d\u662f\u5355\u8c03\u4e0b\u964d&#xff0c;\u62c9\u6ee1\u4e0d\u5728\u6700\u4f18\u4fa7&#xff1b;<\/li>\n<li>\u201cn_batch \u5f00\u5927\u4f1a\u591a\u5360\u5185\u5b58\u201d\u2014\u2014\u516d\u6863 HWM \u5b9e\u6d4b 7,008.4~7,011.1 MB&#xff0c;\u6863\u95f4\u5dee\u4e0d\u8db3 3 MB&#xff0c;oom_kill \u5168 0&#xff1a;\u5207\u6279\u65b9\u5f0f\u4e0d\u6539 KV \u5c3a\u5bf8&#xff08;\u90a3\u7531 n_ctx \u51b3\u5b9a&#xff09;&#xff0c;\u5185\u5b58\u7126\u8651\u4e0d\u8be5\u5b89\u5728 n_batch \u5934\u4e0a&#xff1b;<\/li>\n<li>\u201c\u7ebf\u7a0b\u8d85\u8ba2\u4f24\u541e\u5410&#xff08;F2&#xff09;&#xff0c;\u6240\u4ee5\u6279\u6b21\u8d85\u8ba2\u4e5f\u4f24\u201d\u2014\u2014\u4e24\u4e2a\u7ef4\u5ea6\u673a\u7406\u4e0d\u540c&#xff1a;\u7ebf\u7a0b\u8d85\u8ba2\u7684\u8d26\u8bb0\u5728\u8c03\u5ea6\u4e0e\u9501\u7ade\u4e89\u4e0a&#xff0c;\u6279\u6b21\u7684\u8d26\u8bb0\u5728\u8f6e\u6b21\u5f00\u9500\u4e0a&#xff1b;\u672c\u7bc7 512 \u6863\u53ea\u662f\u5fae\u6da8 5.7%&#xff0c;\u4e0d\u662f F2 \u90a3\u79cd 71 \u500d\u7684\u5d29\u584c\u3002\u7c7b\u6bd4\u8981\u5c0f\u5fc3&#xff0c;\u5404\u67e5\u5404\u7684\u8d26\u3002<\/li>\n<hr \/>\n<h3>\u516d\u3001\u8fb9\u754c\u4e0e\u4e0d\u627f\u8bfa<\/h3>\n<li>\u672c\u7bc7\u53ea\u5b9e\u6d4b n_batch \u4e00\u4e2a\u7ef4\u5ea6&#xff1a;\u6240\u7528 binding&#xff08;llama-cpp-python 0.2.90&#xff09;\u672a\u66b4\u9732 n_ubatch&#xff08;llama.cpp \u4e0a\u6e38\u7684\u6279\u5185\u5b50\u5757\u53c2\u6570&#xff09;&#xff0c;&#034;\u5757\u5185\u518d\u5207\u5206&#034;\u7684\u5f71\u54cd\u65e0\u6cd5\u5728\u672c\u73af\u5883\u6d4b\u91cf&#xff0c;\u6b63\u6587\u4e0d\u865a\u6784\u8be5\u7ef4\u5ea6\u7684\u4efb\u4f55\u7ed3\u8bba&#xff1b;<\/li>\n<li>n_threads_batch \u56fa\u5b9a 4&#xff0c;\u4e0d\u4e0e F2 \u7684\u7ebf\u7a0b\u7ed3\u8bba\u6df7\u7528&#xff1b;F2 \u6d4b\u7684\u662f\u9010 token \u89e3\u7801\u541e\u5410&#xff0c;\u672c\u7bc7\u6d4b\u7684\u662f\u9996 token \u5ef6\u8fdf&#xff0c;\u4e24\u5957\u53e3\u5f84\u4e0d\u4e92\u76f8\u6362\u7b97&#xff1b;<\/li>\n<li>\u5168\u90e8\u6570\u5b57\u6765\u81ea\u5355\u673a\u5bb9\u5668\u5b9e\u6d4b&#xff0c;\u7edd\u5bf9\u503c\u4e0d\u53ef\u8fc1\u79fb&#xff0c;\u53ea\u7528\u4e8e\u540c\u673a\u76f8\u5bf9\u6bd4\u8f83&#xff1b;\u6362\u6a21\u578b\u3001\u6362\u91cf\u5316\u3001\u6362 prompt \u957f\u5ea6\u3001\u6362\u6838\u6570&#xff0c;\u90fd\u8981\u91cd\u6d4b&#xff1b;<\/li>\n<li>\u4e0d\u6784\u6210\u4efb\u4f55\u5ef6\u8fdf\u627f\u8bfa&#xff1b;<\/li>\n<li>prompt \u56fa\u5b9a 512 token\u2014\u2014TTFT \u4e0e prompt \u957f\u5ea6\u5f3a\u76f8\u5173&#xff0c;\u66f4\u77ed prompt \u4e0b\u5404\u6863\u5dee\u8ddd\u4f1a\u6309\u6bd4\u4f8b\u7f29\u5c0f&#xff08;\u8f6e\u6b21\u603b\u6570\u53d8\u5c11&#xff09;&#xff0c;\u672c\u6587\u4e0d\u5916\u63a8&#xff1b;<\/li>\n<li>n_batch \u53ea\u5f71\u54cd prefill \u7684\u5207\u6279\u65b9\u5f0f&#xff0c;\u4e0d\u6539\u53d8 KV cache \u5927\u5c0f\u2014\u2014\u5185\u5b58\u8d26\u4ecd\u7531 n_ctx \u51b3\u5b9a&#xff08;F3 \u7684 192 KB\/token&#xff09;&#xff0c;\u4e24\u4e2a\u65cb\u94ae\u4e92\u4e0d\u6324\u5360\u3002<\/li>\n<hr \/>\n<h3>\u4e03\u3001\u590d\u73b0&#xff1a;\u56db\u6761\u547d\u4ee4<\/h3>\n<p><span class=\"token comment\"># \u2460 \u73af\u5883&#xff1a;llama-cpp-python 0.2.90 &#043; SmolLM2-1.7B-Instruct f16 GGUF<\/span><br \/>\npip <span class=\"token function\">install<\/span> llama-cpp-python<span class=\"token operator\">&#061;&#061;<\/span><span class=\"token number\">0.2<\/span>.90<br \/>\n<span class=\"token comment\"># \u6a21\u578b\u4e0b\u8f7d\u540e\u7f6e\u4e8e\u811a\u672c\u5185 F16 \u8def\u5f84<\/span><\/p>\n<p><span class=\"token comment\"># \u2461 \u5355\u70b9\u8bd5\u8dd1&#xff08;\u9a8c\u8bc1\u811a\u672c\u4e0e\u6a21\u578b\u5c31\u4f4d&#xff0c;n_batch&#061;64 \u8dd1 1 \u904d&#xff09;<\/span><br \/>\npython3.11 g1_ttft_bench.py <span class=\"token number\">64<\/span> <span class=\"token number\">1<\/span><\/p>\n<p><span class=\"token comment\"># \u2462 \u5168\u91cf\u626b\u63cf&#xff08;6 \u6863 \u00d7 3 \u904d&#xff0c;\u6bcf\u914d\u7f6e\u72ec\u7acb\u5b50\u8fdb\u7a0b&#xff0c;\u9010\u6761\u5199 JSONL&#xff09;<\/span><br \/>\npython3.11 g1_ttft_bench.py <span class=\"token number\">16,32<\/span>,64,128,256,512 <span class=\"token number\">3<\/span><\/p>\n<p><span class=\"token comment\"># \u2463 \u4e2d\u4f4d\u6570\u6c47\u603b&#xff08;\u8bfb evidence.jsonl \u8f93\u51fa\u4e3b\u8868\u53e3\u5f84&#xff09;<\/span><br \/>\npython3.11 g1_ttft_bench.py driver g1_ttft_evidence.jsonl<\/p>\n<p>\u6bcf\u6761\u539f\u59cb\u8bb0\u5f55\u957f\u8fd9\u6837&#xff08;JSONL \u9010\u884c&#xff09;&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><span class=\"token string-property property\">&#034;n_batch&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">128<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;rep&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;prompt_tokens&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">512<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;ttft_ms&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">8138.0<\/span><span class=\"token punctuation\">,<\/span><br \/>\n <span class=\"token string-property property\">&#034;prefill_tok_s&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">62.91<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;total_gen_s&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">8.627<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;gen_chunks&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">9<\/span><span class=\"token punctuation\">,<\/span><br \/>\n <span class=\"token string-property property\">&#034;hwm_mb&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">7010.0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;oom_kill&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p>\u811a\u672c\u505a\u4e86\u4e09\u4ef6\u4fdd\u8bc1\u53e3\u5f84\u4e00\u81f4\u7684\u4e8b&#xff1a;prompt \u5148 tokenize \u518d\u7cbe\u786e\u622a\u65ad\u5230 512 token&#xff08;\u76f4\u63a5\u4f20 token \u5e8f\u5217&#xff0c;\u5404\u914d\u7f6e\u9010 token \u4e00\u81f4&#xff09;&#xff1b;\u9884\u70ed\u4e0d\u8ba1\u5165 TTFT&#xff1b;\u6bcf\u914d\u7f6e\u72ec\u7acb\u5b50\u8fdb\u7a0b&#xff0c;RSS \u4e0e cgroup \u8ba1\u6570\u4e92\u4e0d\u6c61\u67d3\u3002<\/p>\n<p>\u6362\u4e00\u53f0\u673a\u5668\u600e\u4e48\u843d\u5730&#xff1a;\u4e0d\u8981\u7167\u6284 128 \u8fd9\u4e2a\u6570&#xff0c;\u7167\u6284\u65b9\u6cd5\u2014\u2014\u8dd1\u2461\u2462\u2463\u62ff\u5230\u4f60\u81ea\u5df1\u673a\u5668\u7684 U \u578b\u66f2\u7ebf&#xff0c;\u7136\u540e\u53ea\u4fe1&#034;\u4e09\u904d\u533a\u95f4\u4e0d\u91cd\u53e0&#034;\u7684\u6863\u4f4d\u5dee\u3002\u672c\u673a\u5b9e\u6d4b\u4e0b\u7684\u8d77\u624b\u53c2\u8003&#xff1a;\u4ea4\u4e92\u5f0f\u670d\u52a1\u4ece 128 \u6863\u8d77\u6b65\u3001\u4e24\u7aef\u5404\u8bd5\u4e00\u6863\u9a8c\u8bc1\u5f62\u72b6&#xff1b;\u4e00\u6b21\u6027 CLI \u95ee\u7b54\u5bf9 TTFT \u4e0d\u654f\u611f&#xff0c;\u53ef\u4ece 64 \u8d77\u6b65\u987a\u624b\u9a8c\u8bc1&#xff1b;\u6279\u5904\u7406\u79bb\u7ebf\u4efb\u52a1\u9996\u5ef6\u8fdf\u65e0\u5173\u7d27\u8981&#xff0c;\u4e0d\u5fc5\u8c03\u3002<\/p>\n<hr \/>\n<h3>\u516b\u3001\u7cfb\u5217\u62fc\u56fe&#xff1a;\u4e09\u4e2a\u65cb\u94ae\u5404\u7ba1\u4e00\u6bb5<\/h3>\n<table>\n<tr>\u65cb\u94ae\u7ba1\u4ec0\u4e48\u7ed3\u8bba\u51fa\u5904<\/tr>\n<tbody>\n<tr>\n<td>n_threads<\/td>\n<td>\u9010 token \u89e3\u7801\u541e\u5410<\/td>\n<td>\u8d34\u7740\u53ef\u7528\u6838\u6570\u8bbe&#xff0c;\u4e0d\u662f nproc&#xff08;\u8d85\u8ba2\u540e p95 \u5148\u5d29 37.7 \u500d&#xff09;<\/td>\n<td>F2<\/td>\n<\/tr>\n<tr>\n<td>n_ctx<\/td>\n<td>KV cache \u5185\u5b58\u8d26<\/td>\n<td>\u6309\u5185\u5b58\u9884\u7b97\u5f00&#xff0c;192 KB\/token&#xff08;f16&#xff09;&#xff0c;q8_0 \u53ef\u7701 47%<\/td>\n<td>F3<\/td>\n<\/tr>\n<tr>\n<td>n_batch<\/td>\n<td>\u9996 token \u5ef6\u8fdf<\/td>\n<td>\u522b\u8bbe\u592a\u5c0f&#xff08;U \u578b&#xff0c;128 \u6863\u6700\u4f18&#xff09;&#xff0c;\u592a\u5927\u5fae\u6da8&#xff1b;\u4e0d\u5f71\u54cd\u5185\u5b58<\/td>\n<td>\u672c\u7bc7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u7bc7\u5408\u6210&#034;\u672c\u5730\u63a8\u7406\u4e09\u4e2a\u65cb\u94ae&#034;&#xff1a;\u7ebf\u7a0b\u7ba1\u7a33\u6001\u3001\u4e0a\u4e0b\u6587\u7ba1\u5185\u5b58\u3001\u6279\u6b21\u7ba1\u9996\u54cd\u5e94\u3002\u4e09\u4e2a\u53c2\u6570\u4e92\u76f8\u72ec\u7acb\u3001\u53ef\u5206\u522b\u8c03\u2014\u2014\u524d\u63d0\u662f\u4f60\u7684\u7ed1\u5b9a\u5c42\u628a\u5b83\u4eec\u90fd\u66b4\u9732\u51fa\u6765\u4e86&#xff08;\u672c binding \u6070\u597d\u5dee\u4e00\u4e2a&#xff0c;\u89c1\u7b2c\u516d\u8282&#xff09;\u3002\u8c03\u53c2\u987a\u5e8f\u5efa\u8bae&#xff1a;\u5148\u6309 F2 \u5b9a\u7ebf\u7a0b\u3001\u518d\u6309 F3 \u5b9a\u4e0a\u4e0b\u6587\u3001\u6700\u540e\u7528\u672c\u7bc7\u7684\u65b9\u6cd5\u626b\u4e00\u904d n_batch \u6536\u5c3e\u2014\u2014\u524d\u4e24\u4e2a\u5b9a\u4e86\u4e4b\u540e&#xff0c;n_batch \u7684\u66f2\u7ebf\u5f62\u72b6\u624d\u4e0d\u4f1a\u88ab\u522b\u7684\u53d8\u91cf\u6c61\u67d3\u3002<\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u9057\u7559\u4e0e\u4e0b\u4e00\u6b65<\/h3>\n<li>n_ubatch \u8865\u6d4b&#xff1a;\u7b49 binding \u5347\u7ea7\u66b4\u9732\u8be5\u53c2\u6570\u540e&#xff0c;\u505a n_batch \u00d7 n_ubatch \u4e8c\u7ef4\u626b\u63cf&#xff0c;512 \u6863\u5fae\u6da8\u73b0\u8c61\u5c4a\u65f6\u624d\u6709\u5224\u636e&#xff1b;<\/li>\n<li>prompt \u957f\u5ea6\u626b\u63cf&#xff1a;512 token \u56fa\u5b9a&#xff0c;\u66f4\u957f prompt&#xff08;\u5982 4K&#xff09;\u4e0b 16 \u6863\u7684\u8f6e\u6b21\u52a3\u52bf\u9884\u8ba1\u653e\u5927&#xff08;32 \u8f6e \u00d7 \u66f4\u957f\u7684\u6bcf\u8f6e\u8ba1\u7b97&#xff09;&#xff0c;\u5217\u4e3a\u50a8\u5907\u9009\u9898&#xff1b;<\/li>\n<li>\u89e3\u7801\u9636\u6bb5\u5f71\u54cd&#xff1a;n_batch \u662f\u5426\u5f71\u54cd\u9010 token \u541e\u5410&#xff08;prefill \u4e4b\u540e\u7684\u90e8\u5206&#xff09;\u672c\u7bc7\u672a\u6d4b\u2014\u2014\u672c\u6b21\u6bcf\u6b21\u8fd0\u884c\u7684\u89e3\u7801\u6bb5\u8bfb\u6570\u516d\u6863\u57fa\u672c\u4e00\u81f4&#xff08;8.56~9.42 s \u533a\u95f4\u5185\u6ce2\u52a8\u4e0e TTFT \u6bdb\u523a\u540c\u6b65&#xff09;&#xff0c;\u521d\u6b65\u770b\u5f71\u54cd\u6709\u9650&#xff0c;\u4f46\u53e3\u5f84\u672a\u5355\u72ec\u8bbe\u8ba1&#xff0c;\u4e0d\u4e0b\u7ed3\u8bba&#xff1b;<\/li>\n<li>\u670d\u52a1\u5668\u7aef&#xff08;llama.cpp server&#xff09;\u7684\u8fde\u7eed\u6279\u5904\u7406\u662f\u53e6\u4e00\u4e2a\u4e16\u754c&#xff0c;\u672c\u6587\u53ea\u8986\u76d6\u5355\u8fdb\u7a0b\u79bb\u7ebf\u63a8\u7406\u3002<\/li>\n<hr \/>\n<p>\u7248\u672c\u4fe1\u606f&#xff1a;Linux 6.6.117-45.14.1.tl4.x86_64 \/ cgroup v2&#xff08;CPU 4 \u6838\u914d\u989d&#xff0c;memory.max &#061; 8 GiB&#xff09;\/ \u9875\u5927\u5c0f 4 KB \/ AMD EPYC 9K65 \/ llama-cpp-python 0.2.90 \/ Python 3.11 \/ \u6a21\u578b smollm2 1.7B f16\u3002\u5168\u90e8\u8bfb\u6570\u53d6\u81ea\u672c\u673a\u5b9e\u6d4b&#xff08;18 \u6761\u539f\u59cb\u8bb0\u5f55 &#043; \u4e2d\u4f4d\u6570\u6c47\u603b\u5df2\u5f52\u6863&#xff09;&#xff0c;\u6d4b\u91cf\u65b9\u6cd5\u89c1\u7b2c\u4e03\u8282\u56db\u6761\u547d\u4ee4\u3002<\/p>\n<p>      <span id=\"quality-guide-article-end\" aria-hidden=\"true\" style=\"display:block;height:1px;margin-bottom:-1px\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/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":[50,384],"topic":[],"class_list":["post-124264","post","type-post","status-publish","format-standard","hentry","category-server","tag-50","tag-384"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \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\/124264.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/124264.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T10:48:46+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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124264.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/124264.html\",\"name\":\"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-18T10:48:46+00:00\",\"dateModified\":\"2026-11-18T10:48:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/124264.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/124264.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124264.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6\"}]},{\"@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":"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \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\/124264.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/124264.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-18T10:48:46+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/124264.html","url":"https:\/\/www.wsisp.com\/helps\/124264.html","name":"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-18T10:48:46+00:00","dateModified":"2026-11-18T10:48:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/124264.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/124264.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/124264.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9996 token \u4e3a\u4ec0\u4e48\u6162\uff1an_batch \u516d\u6863\u5b9e\u6d4b\uff0cbatch \u592a\u5c0f\u624d\u662f\u5143\u51f6"}]},{"@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\/124264","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=124264"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124264\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=124264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=124264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=124264"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=124264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}