{"id":119020,"date":"2026-10-28T17:56:56","date_gmt":"2026-10-28T09:56:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/119020.html"},"modified":"2026-10-28T17:56:56","modified_gmt":"2026-10-28T09:56:56","slug":"32-%c2%b7-%e4%b8%89%e5%a4%84%e4%bf%9d%e5%ba%8f%e7%ad%89%e4%bb%b7%e4%bc%98%e5%8c%96%ef%bc%9a%e7%9b%ae%e5%bd%95%e7%bc%93%e5%ad%98%e3%80%81%e5%85%b1%e4%ba%ab%e9%87%8f%e5%8c%96%e3%80%81rope-%e5%a4%8d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/119020.html","title":{"rendered":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528"},"content":{"rendered":"<h2>32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316&#xff1a;\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528<\/h2>\n<p>\u672c\u7bc7\u5bf9\u5e94\u6e90\u7801&#xff1a;main\/kmcu.c \u00b7 host_verify.c \u00b7 docs\/optimization_plan.zh-CN.md<\/p>\n<p>\u76ee\u6807&#xff1a;\u628a\u300c\u6bcf token \u91cd\u590d\u505a\u4f46\u7ed3\u679c\u5fc5\u7136\u76f8\u540c\u300d\u7684\u4e8b\u780d\u6389&#xff0c;\u540c\u65f6\u4fdd\u8bc1\u5b57\u8282\u7ea7\u4e0d\u53d8\u3002 \u7ed3\u8bba&#xff1a;\u4e09\u9879\u90fd\u901a\u8fc7 216 \u6761 dump \u5bf9\u62cd&#xff1b;\u5b83\u4eec\u4e0d\u52a0\u603b\u8017\u65f6\u627f\u8bfa&#xff0c;\u53ea\u627f\u8bfa\u300c\u4e0d\u6539\u53d8\u4efb\u4f55\u6570\u300d\u3002<\/p>\n<p>\u5173\u952e\u8bcd&#xff1a;\u76ee\u5f55\u7f13\u5b58 \u00b7 \u5171\u4eab\u91cf\u5316 \u00b7 RoPE \u590d\u7528 \u00b7 \u4f4d\u7ea7\u5bf9\u62cd \u5c01\u9762&#xff1a;\u4e09\u5904\u6539\u52a8&#xff0c;216 \u6761 dump \u5168 MATCH<\/p>\n<h3>\u4e00\u3001\u7ed3\u8bba\u5148\u884c<\/h3>\n<table>\n<tr>\u7f16\u53f7\u6539\u7684\u662f\u4ec0\u4e48\u7b49\u4ef7\u6761\u4ef6\u5bf9\u62cd\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>O-3<\/td>\n<td>\u5f20\u91cf\u540d\u67e5\u627e\u52a0 64 \u69fd\u76f4\u63a5\u6620\u5c04\u7f13\u5b58<\/td>\n<td>\u7eaf\u67e5\u8868&#xff0c;\u4e0d\u6539\u53d8\u7b97\u672f<\/td>\n<td>216 \u6761 MATCH<\/td>\n<\/tr>\n<tr>\n<td>O-4<\/td>\n<td>Q\/K\/V \u4e0e gate\/up \u5171\u4eab\u4e00\u6b21\u6fc0\u6d3b\u91cf\u5316<\/td>\n<td>\u540c\u4e00\u516c\u5f0f\u3001\u540c\u4e00 xq \u4f4d\u6a21\u5f0f<\/td>\n<td>216 \u6761 MATCH&#xff0c;prefill 11 \u9879\u901a\u8fc7<\/td>\n<\/tr>\n<tr>\n<td>O-5<\/td>\n<td>RoPE \u7684 cos\/sin \u6309 (pos, i) \u590d\u7528<\/td>\n<td>\u540c\u4e00\u8f93\u5165\u3001\u540c\u4e00 libm \u8fd4\u56de\u503c<\/td>\n<td>216 \u6761 MATCH<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b83\u4eec\u5c5e\u4e8e\u300c\u4fdd\u5e8f\u7b49\u4ef7\u300d&#xff1a;\u53ef\u4ee5\u8bc1\u660e\u4e0d\u9700\u8981\u91cd\u65b0\u62df\u5408\u3001\u4e0d\u9700\u8981\u91cd\u8dd1\u53c2\u8003\u5b9e\u73b0&#xff0c; \u53ea\u9700\u8981\u8bc1\u660e\u8bfb\u5230\u7684\u6570\u548c\u7b97\u51fa\u7684\u6570\u4e00\u4e2a bit \u90fd\u6ca1\u53d8\u3002<\/p>\n<h3>\u4e8c\u3001O-3&#xff1a;\u6bcf token \u4e0a\u767e\u6b21\u5b57\u7b26\u4e32\u67e5\u627e<\/h3>\n<p>km_find(m, &#034;L3.e5.down&#034;) \u662f\u7ebf\u6027\u626b\u63cf\u5f20\u91cf\u76ee\u5f55\u3002\u4e00\u5c42\u91cc\u8981\u67e5\u5341\u51e0\u6b21&#xff0c; \u6bcf token \u5341\u5c42&#xff0c;\u518d\u52a0\u4e0a PLE \u5206\u652f&#xff0c;\u91cf\u7ea7\u662f\u300c\u767e\u6b21 \u00d7 \u4e24\u4e09\u767e\u4e2a\u5f20\u91cf\u540d\u300d\u3002<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">KM_FIND_CACHE<\/span> <span class=\"token expression\"><span class=\"token number\">64<\/span><\/span><\/span><br \/>\n<span class=\"token keyword\">static<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token operator\">*<\/span>base<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">char<\/span> <span class=\"token operator\">*<\/span>name<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">int<\/span> idx<span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">}<\/span> s_find_cache<span class=\"token punctuation\">[<\/span>KM_FIND_CACHE<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">km_find<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> <span class=\"token class-name\">km_model_t<\/span> <span class=\"token operator\">*<\/span>m<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">char<\/span> <span class=\"token operator\">*<\/span>name<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token class-name\">uint32_t<\/span> h <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">hash<\/span><span class=\"token punctuation\">(<\/span>name<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">(<\/span>KM_FIND_CACHE <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>s_find_cache<span class=\"token punctuation\">[<\/span>h<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>base <span class=\"token operator\">&#061;&#061;<\/span> m<span class=\"token operator\">-&gt;<\/span>base <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">strcmp<\/span><span class=\"token punctuation\">(<\/span>s_find_cache<span class=\"token punctuation\">[<\/span>h<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>name<span class=\"token punctuation\">,<\/span> name<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> s_find_cache<span class=\"token punctuation\">[<\/span>h<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>idx<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span>\u7ebf\u6027\u626b\u63cf<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>km_open() \u65f6\u6574\u4f53\u5931\u6548&#xff0c;\u907f\u514d\u6362\u6a21\u578b\u540e\u62ff\u5230\u65e7\u4e0b\u6807\u3002\u7f13\u5b58\u672a\u547d\u4e2d\u5c31\u56de\u9000\u7ebf\u6027\u626b\u63cf&#xff0c; \u6240\u4ee5\u6700\u574f\u60c5\u51b5\u53ea\u662f\u300c\u6ca1\u53d8\u5feb\u300d&#xff0c;\u4e0d\u4f1a\u53d8\u9519\u3002<\/p>\n<h3>\u4e09\u3001O-4&#xff1a;\u540c\u4e00\u4efd\u6fc0\u6d3b\u53ea\u91cf\u5316\u4e00\u6b21<\/h3>\n<p>Q\u3001K\u3001V \u4e09\u4e2a GEMV \u7528\u7684\u662f\u540c\u4e00\u4e2a x\u3002\u539f\u5b9e\u73b0\u5404\u8c03\u7528\u4e00\u6b21 quantize_act(x, dim, xq)\u2014\u2014\u540c\u6837\u7684 312 \u6b21\u7f29\u653e\u3001\u540c\u6837\u7684 312 \u6b21\u820d\u5165&#xff0c;\u505a\u4e09\u904d\u3002<\/p>\n<p>\u62c6\u6210\u4e24\u4e2a\u51fd\u6570\u540e&#xff1a;<\/p>\n<p><span class=\"token keyword\">const<\/span> <span class=\"token keyword\">float<\/span> invS_qkv <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1.0f<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token function\">quantize_act<\/span><span class=\"token punctuation\">(<\/span>h<span class=\"token punctuation\">,<\/span> dim<span class=\"token punctuation\">,<\/span> xq<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">gemv_q8_pre<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>f<span class=\"token operator\">-&gt;<\/span>t<span class=\"token punctuation\">[<\/span>idx_q<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> dim<span class=\"token punctuation\">,<\/span> dim<span class=\"token punctuation\">,<\/span> xq<span class=\"token punctuation\">,<\/span> invS_qkv<span class=\"token punctuation\">,<\/span> q<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">gemv_q8_pre<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>f<span class=\"token operator\">-&gt;<\/span>t<span class=\"token punctuation\">[<\/span>idx_k<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> kvw<span class=\"token punctuation\">,<\/span> dim<span class=\"token punctuation\">,<\/span> xq<span class=\"token punctuation\">,<\/span> invS_qkv<span class=\"token punctuation\">,<\/span> kk<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">gemv_q8_pre<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>f<span class=\"token operator\">-&gt;<\/span>t<span class=\"token punctuation\">[<\/span>idx_v<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> kvw<span class=\"token punctuation\">,<\/span> dim<span class=\"token punctuation\">,<\/span> xq<span class=\"token punctuation\">,<\/span> invS_qkv<span class=\"token punctuation\">,<\/span> vv<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u7b49\u4ef7\u6027\u6765\u81ea\u300c\u540c\u4e00\u4e2a xq \u4f4d\u6a21\u5f0f\u300d&#xff1a;\u91cf\u5316\u662f\u786e\u5b9a\u6027\u51fd\u6570&#xff0c;\u4e09\u6b21\u8c03\u7528\u5f97\u5230\u7684 xq \u548c S \u5b8c\u5168\u76f8\u540c&#xff0c;\u6240\u4ee5\u5171\u4eab\u4e0d\u6539\u53d8\u4efb\u4f55\u7ed3\u679c\u3002MoE \u91cc\u6bcf\u4e2a\u4e13\u5bb6\u7684 gate\/up \u540c\u6837\u5171\u4eab\u4e00\u4efd&#xff0c; \u4f46 down \u4e4b\u540e xq \u4f1a\u88ab\u4e0b\u4e00\u6b21\u91cf\u5316\u8986\u76d6&#xff0c;\u6240\u4ee5\u8de8\u4e13\u5bb6\u4e0d\u80fd\u5171\u7528\u3002<\/p>\n<h3>\u56db\u3001O-5&#xff1a;RoPE \u7684\u4e09\u89d2\u51fd\u6570<\/h3>\n<p>RoPE \u8981\u7b97 cos(pos\u00b7\u03b8^(-2i\/d))&#xff0c;\u5bf9\u6bcf\u4e2a head \u90fd\u4e00\u6837\u3002\u539f\u5b9e\u73b0\u6bcf\u4e2a head \u7b97\u4e00\u6b21&#xff0c; 12 \u4e2a\u5934\u5c31\u662f 12 \u500d\u8d85\u8d8a\u51fd\u6570\u8c03\u7528\u3002<\/p>\n<p><span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> 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> half<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">&#043;&#043;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> inv <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1.0f<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token function\">powf<\/span><span class=\"token punctuation\">(<\/span>theta<span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span> <span class=\"token operator\">*<\/span> i<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span><span class=\"token punctuation\">)<\/span>hd<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> ang <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span><span class=\"token punctuation\">)<\/span>pos <span class=\"token operator\">*<\/span> inv<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> cv <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">cosf<\/span><span class=\"token punctuation\">(<\/span>ang<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> sv <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">sinf<\/span><span class=\"token punctuation\">(<\/span>ang<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>       <span class=\"token comment\">\/* \u6bcf\u4e2a i \u53ea\u7b97\u4e00\u6b21 *\/<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> h <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> h <span class=\"token operator\">&lt;<\/span> n_heads<span class=\"token punctuation\">;<\/span> h<span class=\"token operator\">&#043;&#043;<\/span><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> <span class=\"token punctuation\">}<\/span>   <span class=\"token comment\">\/* \u6240\u6709 head \u590d\u7528 *\/<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7b49\u4ef7\u6761\u4ef6\u5f88\u786c&#xff1a;\u540c\u4e00\u4e2a pos\u3001\u540c\u4e00\u4e2a i\u3001\u540c\u4e00\u4e2a libm \u5b9e\u73b0&#xff0c;\u8fd4\u56de\u503c\u5fc5\u987b\u9010\u4f4d\u76f8\u540c\u3002 \u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u5b83\u88ab\u5141\u8bb8\u653e\u5728\u300c\u4fdd\u5e8f\u300d\u800c\u4e0d\u662f\u300c\u9700\u91cd\u65b0\u5bf9\u62cd\u300d\u91cc\u3002<\/p>\n<h3>\u4e94\u3001\u95e8\u7981&#xff1a;216 \u6761 dump<\/h3>\n<p>host_verify &#8211;dump \u4f1a\u8f93\u51fa\u9010\u5c42 hidden\u3001K\/V\u3001\u5b8c\u6574 logits\u3001cls\u3001agent \u7684\u539f\u59cb float \u5b57\u8282&#xff0c; \u518d\u7531 tools\/dump_diff.py \u9010\u6761\u6bd4\u8f83\u3002\u4e09\u9879\u6539\u52a8\u540e\u5168\u90e8 MATCH&#xff08;tied \u6a21\u578b 225 \u6761&#xff09;\u3002<\/p>\n<p>\u8fd9\u4e0d\u662f\u300c\u6587\u672c\u770b\u8d77\u6765\u4e00\u6837\u300d&#xff0c;\u800c\u662f\u5b57\u8282\u4e00\u6837\u3002<\/p>\n<h3>\u516d\u3001\u8bda\u5b9e\u8fb9\u754c<\/h3>\n<ul>\n<li>\u8fd9\u4e09\u9879\u662f\u6346\u7ed1\u4e00\u8d77\u9a8c\u8bc1\u7684&#xff0c;\u6ca1\u6709\u5355\u72ec\u505a\u300c\u53ea\u5f00 O-3\u300d\u7684\u8017\u65f6 A\/B\u3002 \u5b83\u4eec\u7684\u8bbe\u8ba1\u76ee\u6807\u662f\u300c\u7701\u6389\u91cd\u590d\u5de5\u4f5c\u4e14\u4e0d\u6539\u53d8\u7ed3\u679c\u300d&#xff0c;\u4e0d\u662f\u67d0\u4e2a\u5177\u4f53\u6beb\u79d2\u6570\u3002<\/li>\n<li>\u76ee\u5f55\u7f13\u5b58\u5728\u300c\u5f20\u91cf\u540d\u5f88\u76f8\u4f3c\u300d\u65f6\u6709\u54c8\u5e0c\u51b2\u7a81&#xff0c;\u4f46\u51b2\u7a81\u53ea\u4f1a\u9000\u5316\u4e3a\u7ebf\u6027\u626b\u63cf&#xff0c;\u4e0d\u5f71\u54cd\u6b63\u786e\u6027\u3002<\/li>\n<\/ul>\n<h3>\u4e03\u3001\u4e00\u53e5\u8bdd<\/h3>\n<p>\u4fdd\u5e8f\u7b49\u4ef7\u7684\u4f18\u5316\u6700\u8212\u670d\u7684\u5730\u65b9\u5728\u4e8e&#xff1a;\u5b83\u4e0d\u9700\u8981\u91cd\u65b0\u9a8c\u8bc1\u7cbe\u5ea6&#xff0c;\u53ea\u9700\u8981\u8bc1\u660e \u300c\u540c\u4e00\u8f93\u5165 \u2192 \u540c\u4e00\u5b57\u8282\u300d&#xff1b;\u4e09\u9879\u6539\u52a8\u5168\u90e8\u4e00\u6b21\u901a\u8fc7 216 \u6761 dump \u5bf9\u62cd\u3002<\/p>\n<hr \/>\n<h3>\u5bf9\u5e94\u6e90\u7801<\/h3>\n<table>\n<tr>\u6587\u4ef6\u5173\u952e\u7b26\u53f7 \/ \u4f4d\u7f6e\u652f\u6491\u672c\u6587\u54ea\u90e8\u5206<\/tr>\n<tbody>\n<tr>\n<td>main\/kmcu.c<\/td>\n<td>km_find() \/ s_find_cache<\/td>\n<td>O-3 \u76ee\u5f55\u7f13\u5b58<\/td>\n<\/tr>\n<tr>\n<td>main\/kmcu.c<\/td>\n<td>quantize_act() \/ gemv_q8_pre()<\/td>\n<td>O-4 \u5171\u4eab\u91cf\u5316<\/td>\n<\/tr>\n<tr>\n<td>main\/kmcu.c<\/td>\n<td>rope_apply()<\/td>\n<td>O-5 \u4e09\u89d2\u51fd\u6570\u590d\u7528<\/td>\n<\/tr>\n<tr>\n<td>host_verify.c \u00b7 tools\/dump_diff.py<\/td>\n<td>&#8211;dump &#043; \u9010\u6761\u6bd4\u8f83<\/td>\n<td>216\/225 \u6761\u95e8\u7981<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p>\u300aKestrel-MCU \u624b\u8bb0\u300b \u00b7 \u5168\u7cfb\u5217 37 \u7bc7&#xff1a;\u5728 ESP32-P4 \u4e0a\u4ece\u96f6\u8bad\u7ec3\u5e76\u90e8\u7f72 64M \u53c2\u6570 MoE \u5927\u6a21\u578b&#xff08;5.8 tok\/s&#xff09;&#xff0c;\u6e90\u7801\u3001\u6743\u91cd\u3001\u8bad\u7ec3\u811a\u672c\u4e0e\u5168\u90e8\u6587\u7ae0\u5f00\u6e90\u53ef\u590d\u73b0\u3002<\/p>\n<p>\u4ed3\u5e93&#xff1a;https:\/\/gitee.com\/pei-xiaoguang\/kestrel-llm-mcu \u00b7 \u89c9\u5f97\u6709\u7528\u6b22\u8fce Star<\/p>\n","protected":false},"excerpt":{"rendered":"<p>32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316&#xff1a;\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 \u672c\u7bc7\u5bf9\u5e94\u6e90\u7801&#xff1a;main\/kmcu.c \u00b7 host_verify.c \u00b7 docs\/optimization_plan.zh-CN.md \u76ee\u6807&#xff1a;\u628a\u300c\u6bcf token \u91cd\u590d\u505a\u4f46\u7ed3\u679c\u5fc5\u7136\u76f8\u540c\u300d\u7684\u4e8b\u780d\u6389&#xff0c;\u540c\u65f6\u4fdd\u8bc1\u5b57\u8282\u7ea7\u4e0d\u53d8\u3002 \u7ed3\u8bba&#xff1a;\u4e09\u9879\u90fd\u901a\u8fc7 216 \u6761 dump \u5bf9\u62cd&#xff1b;\u5b83\u4eec\u4e0d\u52a0\u603b\u8017\u65f6\u627f\u8bfa&#xff0c;\u53ea\u627f\u8bfa\u300c\u4e0d\u6539\u53d8\u4efb\u4f55\u6570\u300d\u3002 \u5173\u952e\u8bcd&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":[12392,13536,2681,50,398],"topic":[],"class_list":["post-119020","post","type-post","status-publish","format-standard","hentry","category-server","tag-12392","tag-esp-32","tag-vllm","tag-50","tag-398"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \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\/119020.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316&#xff1a;\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 \u672c\u7bc7\u5bf9\u5e94\u6e90\u7801&#xff1a;main\/kmcu.c \u00b7 host_verify.c \u00b7 docs\/optimization_plan.zh-CN.md \u76ee\u6807&#xff1a;\u628a\u300c\u6bcf token \u91cd\u590d\u505a\u4f46\u7ed3\u679c\u5fc5\u7136\u76f8\u540c\u300d\u7684\u4e8b\u780d\u6389&#xff0c;\u540c\u65f6\u4fdd\u8bc1\u5b57\u8282\u7ea7\u4e0d\u53d8\u3002 \u7ed3\u8bba&#xff1a;\u4e09\u9879\u90fd\u901a\u8fc7 216 \u6761 dump \u5bf9\u62cd&#xff1b;\u5b83\u4eec\u4e0d\u52a0\u603b\u8017\u65f6\u627f\u8bfa&#xff0c;\u53ea\u627f\u8bfa\u300c\u4e0d\u6539\u53d8\u4efb\u4f55\u6570\u300d\u3002 \u5173\u952e\u8bcd&amp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/119020.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-28T09:56:56+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119020.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/119020.html\",\"name\":\"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-28T09:56:56+00:00\",\"dateModified\":\"2026-10-28T09:56:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/119020.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/119020.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119020.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528\"}]},{\"@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":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \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\/119020.html","og_locale":"zh_CN","og_type":"article","og_title":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316&#xff1a;\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 \u672c\u7bc7\u5bf9\u5e94\u6e90\u7801&#xff1a;main\/kmcu.c \u00b7 host_verify.c \u00b7 docs\/optimization_plan.zh-CN.md \u76ee\u6807&#xff1a;\u628a\u300c\u6bcf token \u91cd\u590d\u505a\u4f46\u7ed3\u679c\u5fc5\u7136\u76f8\u540c\u300d\u7684\u4e8b\u780d\u6389&#xff0c;\u540c\u65f6\u4fdd\u8bc1\u5b57\u8282\u7ea7\u4e0d\u53d8\u3002 \u7ed3\u8bba&#xff1a;\u4e09\u9879\u90fd\u901a\u8fc7 216 \u6761 dump \u5bf9\u62cd&#xff1b;\u5b83\u4eec\u4e0d\u52a0\u603b\u8017\u65f6\u627f\u8bfa&#xff0c;\u53ea\u627f\u8bfa\u300c\u4e0d\u6539\u53d8\u4efb\u4f55\u6570\u300d\u3002 \u5173\u952e\u8bcd&amp;","og_url":"https:\/\/www.wsisp.com\/helps\/119020.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-28T09:56:56+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/119020.html","url":"https:\/\/www.wsisp.com\/helps\/119020.html","name":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-28T09:56:56+00:00","dateModified":"2026-10-28T09:56:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/119020.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/119020.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/119020.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"32 \u00b7 \u4e09\u5904\u4fdd\u5e8f\u7b49\u4ef7\u4f18\u5316\uff1a\u76ee\u5f55\u7f13\u5b58\u3001\u5171\u4eab\u91cf\u5316\u3001RoPE \u590d\u7528"}]},{"@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\/119020","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=119020"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/119020\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=119020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=119020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=119020"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=119020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}