{"id":879,"date":"2026-08-17T20:04:50","date_gmt":"2026-08-17T12:04:50","guid":{"rendered":"http:\/\/www.tantan.ink\/index.php\/2026\/08\/17\/45m-%e5%8f%82%e6%95%b0%e5%a1%9e%e8%bf%9b-14mb%ef%bc%8c%e6%89%8b%e6%9c%ba%e7%9c%9f%e8%83%bd%e8%b7%91%e5%b7%a5%e5%85%b7%e8%b0%83%e7%94%a8%e5%90%97\/"},"modified":"2026-08-17T20:04:50","modified_gmt":"2026-08-17T12:04:50","slug":"45m-%e5%8f%82%e6%95%b0%e5%a1%9e%e8%bf%9b-14mb%ef%bc%8c%e6%89%8b%e6%9c%ba%e7%9c%9f%e8%83%bd%e8%b7%91%e5%b7%a5%e5%85%b7%e8%b0%83%e7%94%a8%e5%90%97","status":"publish","type":"post","link":"https:\/\/www.tantan.ink\/index.php\/2026\/08\/17\/45m-%e5%8f%82%e6%95%b0%e5%a1%9e%e8%bf%9b-14mb%ef%bc%8c%e6%89%8b%e6%9c%ba%e7%9c%9f%e8%83%bd%e8%b7%91%e5%b7%a5%e5%85%b7%e8%b0%83%e7%94%a8%e5%90%97\/","title":{"rendered":"45M \u53c2\u6570\u585e\u8fdb 14MB\uff0c\u624b\u673a\u771f\u80fd\u8dd1\u5de5\u5177\u8c03\u7528\u5417"},"content":{"rendered":"<p>\u6211\u5728\u5bb6\u91cc\u6709\u51e0\u53f0\u4f4e\u529f\u8017\u5c0f\u8bbe\u5907\uff0c\u5e38\u5e74\u53ea\u5e72\u4e00\u4ef6\u4e8b\uff1a\u8bfb\u4e2a\u6e29\u5ea6\u3001\u5f00\u4e2a\u706f\u3001\u8bb0\u6761\u65e5\u5fd7\u3002\u4ee5\u524d\u60f3\u8ba9\u5b83\u4eec\u542c\u61c2\u70b9\u81ea\u7136\u8bed\u8a00\uff0c\u57fa\u672c\u5f97\u4e0a\u4e91\u7aef\u8d70\u4e00\u8f6e LLM API\uff0c latency \u9ad8\u4e0d\u8bf4\uff0c\u8fd8\u5f97\u62c5\u5fc3\u65ad\u7f51\u3002\u6700\u8fd1\u770b\u5230 Cactus Needle 2 \u7684 README \u5199\u5f97\u633a\u72c2\uff1a45M \u53c2\u6570\u3001\u5355\u4e2a 14MB \u4e8c\u8fdb\u5236\u3001\u5b8c\u6574\u4f1a\u8bdd\u53ea\u8981 28MB \u5185\u5b58\uff0c\u5c31\u80fd\u8dd1\u5de5\u5177\u8c03\u7528\u3002\u6211\u5fc3\u60f3\uff0c\u8fd9\u8981\u662f\u771f\u7684\uff0c\u6811\u8393\u6d3e\u7ea7\u522b\u7684\u786c\u4ef6\u4e5f\u80fd\u672c\u5730\u5f53\u4e2a\u5c0f agent \u4e86\u3002<\/p>\n<p>\u5148\u4e0a GitHub \u770b\u4e86\u773c\uff1aApache-2.0\uff0c6,987 stars\uff0c\u4eca\u5929\u8fd8\u5728\u63d0\u4ea4\u3002\u7248\u672c\u5df2\u7ecf\u53d1\u5230 v2.0.5\u3002\u8bd5\u73a9\u6210\u672c\u4e0d\u9ad8\uff0c<code>pip install cactus-needle<\/code> \u5c31\u884c\u3002\u4e8e\u662f\u6211\u5728\u4e00\u53f0\u8001\u8bbe\u5907\u4e0a\u8dd1\u4e86\u8d77\u6765\u3002<\/p>\n<p>&lt;img class=&quot;alignnone size-full wp-image-NEEDLE_ARCH&quot; src=&quot;<img loading=\"lazy\" decoding=\"async\" width=\"1800\" height=\"1300\" class=\"wp-image-877\" src=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture.png\" alt=\"\" srcset=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture.png 1800w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture-300x217.png 300w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture-1024x740.png 1024w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture-768x555.png 768w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-architecture-1536x1109.png 1536w\" sizes=\"auto, (max-width: 1800px) 100vw, 1800px\" \/>&#8221; alt=&#8221;Needle 2 \u7684 Simple Attention Network \u67b6\u6784\u56fe&#8221; width=&#8221;1800&#8243; height=&#8221;1300&#8243; \/&gt;<\/p>\n<p>\u5b89\u88c5\u672c\u8eab\u6ca1\u5751\uff0c\u7b2c\u4e00\u6b21\u8fd0\u884c\u4f1a\u4ece Hugging Face \u62c9\u4e00\u4e2a engine \u4e0b\u6765\u7f13\u5b58\u3002\u9879\u76ee README \u8bf4\u79bb\u7ebf\u90e8\u7f72\u4e5f\u6709\u6587\u6863\uff0c\u8fd9\u5bf9\u60f3\u5f7b\u5e95\u65ad\u7f51\u8dd1\u7684\u4eba\u6bd4\u8f83\u53cb\u597d\u3002\u771f\u6b63\u6709\u610f\u601d\u7684\u662f\u5b83\u7684\u8bbe\u8ba1\uff1a\u6ca1\u6709\u4f20\u7edf FFN\uff0c\u7528 Hadamard MLP \u66ff\u4ee3\uff1bKV \u7f13\u5b58\u505a\u4e86 256 token \u7684\u6ed1\u52a8\u7a97\u53e3\uff0c\u4f46\u5de5\u5177\u63cf\u8ff0\u4f1a\u88ab pin \u4f4f\u4e0d\u4e22\uff1b\u6743\u91cd\u7528 CQ2 2-bit \u91cf\u5316\uff0c\u76f4\u63a5 baked \u8fdb\u5f15\u64ce\uff0c\u63a8\u7406\u65f6\u4e0d\u89e3\u538b\u3002\u5b98\u65b9\u7ed9\u7684\u6570\u5b57\u662f 500 tok\/s \u5de6\u53f3\u80fd\u51fa\u73b0\u5728\u6811\u8393\u6d3e 5 \u4e0a\uff0c\u666e\u901a\u624b\u673a 300\u2013700 tok\/s\u3002<\/p>\n<p>\u6211\u7167\u7740 README \u5199\u4e86\u4e2a\u6700\u7b80\u5355\u7684\u5929\u6c14\u5de5\u5177\uff1a<\/p>\n<pre><code>import needle\n\n@needle.tool\ndef get_weather(city: str):\n    \"Get the current weather for a city.\"\n    return {\"city\": city, \"temp_c\": 27, \"sky\": \"clear\"}\n\nagent = needle.Needle(tools=[get_weather])\nprint(agent.run(\"what's it like in Lagos right now?\")[\"results\"])\n<\/code><\/pre>\n<p>\u8dd1\u51fa\u6765\u7684\u7ed3\u679c\u662f\u7ed3\u6784\u5316\u7684 JSON tool call\uff0c\u4e0d\u662f\u804a\u5929\u6587\u672c\u3002\u8fd9\u8ddf\u6211\u9884\u671f\u4e00\u81f4\uff1aNeedle \u4e0d\u505a\u901a\u7528\u5bf9\u8bdd\uff0c\u5b83\u53ea\u8d1f\u8d23\u628a\u8f93\u5165\u6620\u5c04\u6210\u5de5\u5177\u8c03\u7528\u3002\u5982\u679c\u4f60\u7684\u9700\u6c42\u662f\u8ba9\u5c0f\u8bbe\u5907\u6267\u884c\u56fa\u5b9a\u52a8\u4f5c\uff0c\u8fd9\u79cd\u51cf\u6cd5\u53cd\u800c\u7701\u5fc3\u3002<\/p>\n<p>&lt;img class=&quot;alignnone size-full wp-image-NEEDLE_TERMINAL&quot; src=&quot;<img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"560\" class=\"wp-image-878\" src=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-terminal.png\" alt=\"\" srcset=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-terminal.png 900w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-terminal-300x187.png 300w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-terminal-768x478.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/>&#8221; alt=&#8221;Needle 2 \u672c\u5730\u5b89\u88c5\u4e0e\u5de5\u5177\u8c03\u7528\u7ec8\u7aef\u793a\u4f8b&#8221; width=&#8221;900&#8243; height=&#8221;560&#8243; \/&gt;<\/p>\n<p>\u8ba9\u6211\u6709\u70b9\u610f\u5916\u7684\u662f\u5b83\u7684\u8f93\u51fa\u7ea6\u675f\u3002\u6a21\u578b\u901a\u8fc7\u4f60\u58f0\u660e\u7684 schema \u7f16\u8bd1\u51fa\u4e00\u4e2a byte-level grammar\uff0c\u6bcf\u4e2a token \u90fd\u88ab\u9650\u5236\uff0c\u6240\u4ee5\u57fa\u672c\u4e0d\u4f1a\u4ea7\u51fa malformed \u7684\u8c03\u7528\u3002\u5b83\u8fd8\u5e26\u4e00\u4e2a calibrated confidence score\uff0c\u4f4e\u4e8e\u9608\u503c\u4f1a\u8d70\u201cescalate\u201d\u800c\u4e0d\u662f\u786c\u731c\u3002\u8fd9\u5957\u8bbe\u8ba1\u653e\u5728\u7aef\u4fa7\u5f88\u5408\u7406\uff1a\u5b81\u53ef\u4e0d\u6267\u884c\uff0c\u4e5f\u522b\u4e71\u6267\u884c\u3002<\/p>\n<p>\u5b98\u65b9 benchmark \u6211\u4e5f\u53bb\u770b\u4e86\u3002Mobile-Actions \u4e0a Needle 2 \u62ff 63.7%\uff0c\u540c\u671f FunctionGemma 270M 64.0%\u3001LFM2.5 230M 69.1%\u3001Apple FM 57.6%\u3002\u8003\u8651\u5230 Needle \u53ea\u6709 45M \u53c2\u6570\u300114MB \u4f53\u79ef\u30012-bit \u91cf\u5316\uff0c\u8ddf\u4eba\u5bb6 f16 \u6253\u5e73\u5230\u8fd9\u79cd\u7a0b\u5ea6\u5df2\u7ecf\u591f\u610f\u601d\u3002BFCL v4 \u6574\u4f53 42.6%\uff0cwell-formed \u7387 93.4%\uff0c\u8bf4\u660e\u5b83\u8c03\u7528\u683c\u5f0f\u786e\u5b9e\u7a33\u3002<\/p>\n<p>&lt;img class=&quot;alignnone size-full wp-image-NEEDLE_FRONTIER&quot; src=&quot;<img loading=\"lazy\" decoding=\"async\" width=\"1800\" height=\"1040\" class=\"wp-image-876\" src=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier.png\" alt=\"\" srcset=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier.png 1800w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier-300x173.png 300w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier-1024x592.png 1024w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier-768x444.png 768w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/needle-frontier-1536x887.png 1536w\" sizes=\"auto, (max-width: 1800px) 100vw, 1800px\" \/>&#8221; alt=&#8221;Needle 2 \u4e0e\u540c\u7c7b\u5c0f\u6a21\u578b\u7684\u89c4\u6a21\u4e0e\u6027\u80fd\u5bf9\u6bd4&#8221; width=&#8221;1800&#8243; height=&#8221;1040&#8243; \/&gt;<\/p>\n<p>\u4f46\u9650\u5236\u4e5f\u5f88\u786c\u3002256 token \u7684\u4e0a\u4e0b\u6587\u7a97\u53e3\u57fa\u672c\u544a\u522b\u4e86\u590d\u6742\u591a\u8f6e\u5bf9\u8bdd\uff1b\u6ca1\u6709\u81ea\u7531\u6587\u672c fallback\uff0c\u95ee\u5b83\u8d85\u51fa\u5de5\u5177\u8303\u56f4\u7684\u95ee\u9898\u53ea\u4f1a\u8fd4\u56de\u7a7a\u8c03\u7528\uff1b\u8bad\u7ec3\u6570\u636e\u662f\u95ed\u6e90\u7684\uff0c\u60f3\u6df1\u7a76\u4e3a\u4ec0\u4e48\u67d0\u4e9b\u8bcd\u8bc6\u522b\u4e0d\u597d\uff0c\u53ea\u80fd\u81ea\u5df1\u5fae\u8c03\u3002README \u5f88\u8bda\u5b9e\u5730\u8bf4\uff1a\u8fd9\u4e0d\u662f\u804a\u5929\u6a21\u578b\uff0c\u662f\u7aef\u4fa7\u5de5\u5177\u8c03\u7528\u6a21\u578b\u3002<\/p>\n<p>\u6211\u76ee\u524d\u7684\u611f\u89c9\u662f\uff0cNeedle 2 \u9002\u5408\u4e24\u7c7b\u573a\u666f\uff1a\u4e00\u662f\u5728\u667a\u80fd\u5bb6\u5c45\u3001\u53ef\u7a7f\u6234\u8bbe\u5907\u8fd9\u7c7b\u7b97\u529b\u7d27\u5f20\u7684\u786c\u4ef6\u4e0a\u8dd1\u672c\u5730 intent parser\uff1b\u4e8c\u662f\u5f53\u505a\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u201c\u5de5\u5177\u8def\u7531\u5c42\u201d\uff0c\u628a\u7b80\u5355\u8bf7\u6c42\u672c\u5730\u89e3\u51b3\uff0c\u590d\u6742\u8bf7\u6c42\u518d\u4ea4\u7ed9\u5927\u6a21\u578b\u3002\u5b83\u7684 LoRA \u5fae\u8c03\u6d41\u7a0b\u4e5f\u505a\u5f97\u6bd4\u8f83\u5b8c\u6574\uff0c\u5bfc\u51fa\u540e\u8fd8\u662f\u4e00\u4e2a .cact \u5355\u6587\u4ef6\uff0c\u90e8\u7f72\u6210\u672c\u6ca1\u589e\u52a0\u3002<\/p>\n<p>\u6700\u540e\u5217\u4e00\u4e0b\u6211\u8e29\u5230\u7684\u5c0f\u5751\uff1a\u7b2c\u4e00\u6b21\u542f\u52a8\u7b49 engine \u4e0b\u8f7d\u8981\u6709\u8010\u5fc3\uff1bApple Silicon \u8bad\u7ec3\u8981\u7528 <code>pip install \"cactus-needle[metal]\"<\/code>\uff1b\u5982\u679c\u8981\u8dd1\u5728\u5b8c\u5168\u6ca1\u7f51\u7684\u673a\u5668\u4e0a\uff0c\u5f97\u63d0\u524d\u628a engine \u548c .cact \u6587\u4ef6\u4e00\u8d77\u62f7\u8fc7\u53bb\u3002\u6574\u4f53\u6765\u8bf4\uff0c\u8fd9\u662f\u4e00\u4e2a\u65b9\u5411\u611f\u5f88\u6e05\u6670\u7684\u5b9e\u9a8c\uff1a\u4e0d\u8ffd\u5927\u53c2\u6570\uff0c\u53ea\u628a\u201c\u5de5\u5177\u8c03\u7528\u201d\u8fd9\u4e00\u4ef6\u4e8b\u538b\u5230\u8db3\u591f\u5c0f\u3002\u6211\u5728\u672c\u5730\u8dd1\u901a\u4e4b\u540e\uff0c\u5df2\u7ecf\u60f3\u628a\u5b83\u63a5\u5230\u5bb6\u91cc\u7684\u51e0\u4e2a\u4f20\u611f\u5668\u811a\u672c\u540e\u9762\u8bd5\u8bd5\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5728\u5bb6\u91cc\u6709\u51e0\u53f0\u4f4e\u529f\u8017\u5c0f\u8bbe\u5907\uff0c\u5e38\u5e74\u53ea\u5e72\u4e00\u4ef6\u4e8b\uff1a\u8bfb\u4e2a\u6e29\u5ea6\u3001\u5f00\u4e2a\u706f\u3001\u8bb0\u6761\u65e5\u5fd7\u3002\u4ee5\u524d\u60f3\u8ba9\u5b83\u4eec\u542c\u61c2\u70b9\u81ea\u7136\u8bed\u8a00\uff0c\u57fa\u672c\u5f97\u4e0a\u4e91 &#8230; <a title=\"45M \u53c2\u6570\u585e\u8fdb 14MB\uff0c\u624b\u673a\u771f\u80fd\u8dd1\u5de5\u5177\u8c03\u7528\u5417\" class=\"read-more\" href=\"https:\/\/www.tantan.ink\/index.php\/2026\/08\/17\/45m-%e5%8f%82%e6%95%b0%e5%a1%9e%e8%bf%9b-14mb%ef%bc%8c%e6%89%8b%e6%9c%ba%e7%9c%9f%e8%83%bd%e8%b7%91%e5%b7%a5%e5%85%b7%e8%b0%83%e7%94%a8%e5%90%97\/\" aria-label=\"\u9605\u8bfb 45M \u53c2\u6570\u585e\u8fdb 14MB\uff0c\u624b\u673a\u771f\u80fd\u8dd1\u5de5\u5177\u8c03\u7528\u5417\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":2,"featured_media":876,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,176],"tags":[],"class_list":["post-879","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-hands-on"],"_links":{"self":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=879"}],"version-history":[{"count":0,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/879\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media\/876"}],"wp:attachment":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}