{"id":30,"date":"2026-06-12T11:08:52","date_gmt":"2026-06-12T03:08:52","guid":{"rendered":"http:\/\/tantan.ink\/?p=30"},"modified":"2026-06-12T11:08:52","modified_gmt":"2026-06-12T03:08:52","slug":"ollama-mlx-performance-2026","status":"publish","type":"post","link":"https:\/\/www.tantan.ink\/index.php\/2026\/06\/12\/ollama-mlx-performance-2026\/","title":{"rendered":"Ollama MLX \u5f15\u64ce\u5077\u5077\u5347\u7ea7\u4e86\uff1aApple Silicon \u8dd1\u6a21\u578b\u66f4\u5feb\u3001\u66f4\u51c6\uff0c\u8fd8\u591a\u4e86\u4e2a Agent\u300c\u5feb\u7167\u300d\u9ed1\u79d1\u6280"},"content":{"rendered":"<h2>\u4e09\u4ef6\u4e8b\u4e00\u8d77\u53d1\u751f\u4e86<\/h2>\n<p>6 \u6708 11 \u53f7\uff0cOllama \u7ed9\u81ea\u5bb6 MLX \u5f15\u64ce\u505a\u4e86\u4e00\u6b21\u4e0d\u52a8\u58f0\u8272\u7684\u91cd\u5927\u5347\u7ea7\u3002\u6ca1\u6709\u5927\u7248\u672c\u53f7\uff0c\u6ca1\u6709\u53d1\u5e03\u4f1a\uff0c\u5c31\u662f\u4e00\u7bc7\u535a\u5ba2\u6587\u7ae0\u3002\u4f46\u5982\u679c\u4f60\u662f Mac \u7528\u6237\uff0c\u8fd9\u6b21\u66f4\u65b0\u6bd4\u4f60\u60f3\u8c61\u7684\u66f4\u6709\u6599\u3002<\/p>\n<p>\u7b80\u5355\u8bf4\uff0c\u8fd9\u6b21\u66f4\u65b0\u505a\u4e86\u4e09\u4ef6\u4e8b\uff1a<\/p>\n<ol>\n<li><strong>\u8d28\u91cf\u66f4\u597d\u4e86<\/strong> \u2014 \u5f15\u5165\u4e86 NVFP4 \u91cf\u5316\u683c\u5f0f<\/li>\n<li><strong>\u901f\u5ea6\u66f4\u5feb\u4e86<\/strong> \u2014 Metal kernel \u878d\u5408 + GPU \u91c7\u6837\u91cd\u5199\uff0c\u63d0\u901f\u7ea6 20%<\/li>\n<li><strong>Agent \u66f4\u806a\u660e\u4e86<\/strong> \u2014 \u5168\u65b0\u7684\u5feb\u7167\u7cfb\u7edf\uff0c\u8ba9 AI Agent \u4e0d\u4f1a\u53cd\u590d\u300c\u91cd\u8bfb\u300d\u540c\u6837\u7684\u4e0a\u4e0b\u6587<\/li>\n<\/ol>\n<h2>NVFP4\uff1a4-bit \u91cf\u5316\u7684\u300c\u8d28\u91cf\u51cf\u534a\u300d\u65b9\u6848<\/h2>\n<p>\u7528 Mac \u8dd1\u672c\u5730\u6a21\u578b\u7684\u4eba\u90fd\u77e5\u9053\uff0c\u91cf\u5316\u662f\u7ed5\u4e0d\u5f00\u7684\u8bdd\u9898\u3002\u6a21\u578b\u592a\u5927\uff0c\u4e0d\u91cf\u5316\u8dd1\u4e0d\u52a8\uff1b\u4f46\u91cf\u5316\u4e4b\u540e\u8d28\u91cf\u5f80\u4e0b\u6389\uff0c\u5c24\u5176\u662f 4-bit\u3002<\/p>\n<p>Ollama \u8fd9\u6b21\u652f\u6301\u4e86 NVIDIA \u7684 NVFP4 \u683c\u5f0f\u3002\u5b83\u548c\u5e38\u89c1\u7684 q4_K_M \u6709\u4ec0\u4e48\u533a\u522b\uff1fNVFP4 \u66f4\u7cbe\u7ec6\u5730\u8ffd\u8e2a\u6a21\u578b\u6743\u91cd\u7684\u5c40\u90e8\u52a8\u6001\u8303\u56f4\uff0c\u91cf\u5316\u635f\u5931\u66f4\u5c0f\u3002Ollama \u7528 Gemma 4 12B \u505a\u4e86 perplexity \u5bf9\u6bd4\uff1a<\/p>\n<ul>\n<li>\u4ee5\u672a\u91cf\u5316 bf16 \u4e3a\u57fa\u51c6<\/li>\n<li>NVFP4 \u7684\u8d28\u91cf\u635f\u5931\u5927\u7ea6\u662f q4_K_M \u7684<strong>\u4e00\u534a<\/strong><\/li>\n<\/ul>\n<p style=\"text-align:center;\"><img decoding=\"async\" class=\"alignnone size-full\" src=\"http:\/\/tantan.ink\/wp-content\/uploads\/2026\/06\/ollama-mlx-perplexity.svg\" alt=\"NVFP4 vs q4_K_M vs bf16 perplexity\u5bf9\u6bd4\" width=\"700\" \/><br \/><em>\u56fe\uff1aNVFP4 vs q4_K_M vs bf16 \u7684 perplexity \u5bf9\u6bd4 \u2014 NVFP4 \u628a 4-bit \u8d28\u91cf\u635f\u5931\u51cf\u534a\uff08\u6765\u6e90\uff1aOllama Blog\uff09<\/em><\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4\uff0c\u540c\u6837\u662f 4-bit \u91cf\u5316\uff0cNVFP4 \u8dd1\u51fa\u6765\u7684\u7ed3\u679c\u66f4\u63a5\u8fd1\u539f\u7248\u6a21\u578b\u3002\u8fd8\u6709\u4e00\u4e2a\u9644\u5e26\u597d\u5904\uff1aNVFP4 \u662f NVIDIA \u4e3a\u6570\u636e\u4e2d\u5fc3\u4f18\u5316\u7684\u683c\u5f0f\uff0c\u6570\u636e\u4e2d\u5fc3\u8dd1\u7684\u4f18\u5316\u6a21\u578b\u73b0\u5728\u53ef\u4ee5\u76f4\u63a5\u62c9\u5230 Mac \u4e0a\u8dd1\uff0c\u4e0d\u7528\u91cd\u65b0\u8f6c\u6362\u3002<\/p>\n<h2>\u901f\u5ea6\uff1aMetal kernel \u878d\u5408 + GPU \u91c7\u6837\u91cd\u5199<\/h2>\n<p>\u6027\u80fd\u5c42\u9762\uff0cMLX \u5f15\u64ce\u8fd9\u6b21\u628a\u51e0\u4e2a\u64cd\u4f5c\u5408\u5e76\u6210\u4e86\u5355\u4e2a Metal kernel\u2014\u2014\u9760\u7684\u662f MLX \u6846\u67b6\u7684 JIT\uff08\u5373\u65f6\u7f16\u8bd1\uff09\u80fd\u529b\u3002\u53e6\u5916 GPU \u7aef\u7684\u91c7\u6837\u903b\u8f91\u4e5f\u91cd\u5199\u4e86\u3002<\/p>\n<p>\u7ed3\u679c\uff1f\u5728 8300 token \u7684\u8f93\u5165\u63d0\u793a\u4e0b\uff0cNVFP4 \u7684\u8f93\u51fa\u901f\u5ea6\u6bd4 q4_K_M \u5feb\u7ea6 20%\u300220% \u5728\u6570\u5b57\u4e0a\u4e0d\u7b97\u5938\u5f20\uff0c\u4f46\u5728 Agent \u573a\u666f\u4f53\u611f\u5f88\u660e\u663e\u2014\u2014Agent \u6bcf\u8c03\u4e00\u6b21\u5de5\u5177\u5c31\u662f\u4e00\u6b21\u65b0\u8bf7\u6c42\uff0c\u6bcf\u6b21\u90fd\u91cd\u65b0\u53d1\u6574\u4e2a\u5bf9\u8bdd\u5386\u53f2\uff0c\u4e0a\u4e0b\u6587\u8d8a\u957f\u5dee\u8ddd\u8d8a\u5927\u3002<\/p>\n<h2>Agent \u5feb\u7167\uff1a\u6700\u88ab\u4f4e\u4f30\u7684\u529f\u80fd<\/h2>\n<p>\u7528\u8fc7 AI Coding Agent \u7684\u4eba\u90fd\u6709\u4f53\u4f1a\uff1aAgent \u8dd1\u7740\u8dd1\u7740\u8d8a\u6765\u8d8a\u6162\u3002\u4e3a\u4ec0\u4e48\uff1f\u56e0\u4e3a\u6bcf\u6b21\u5de5\u5177\u8c03\u7528\u90fd\u662f\u4e00\u6b21\u65b0\u8bf7\u6c42\uff0c\u6bcf\u6b21\u90fd\u628a\u6574\u4e2a\u5bf9\u8bdd\u5386\u53f2\u2014\u2014system prompt\u3001\u5de5\u5177\u5b9a\u4e49\u3001\u8bfb\u8fc7\u7684\u6587\u4ef6\u2014\u2014\u91cd\u65b0\u585e\u7ed9\u6a21\u578b\u5904\u7406\u4e00\u904d\u3002\u4e00\u4e2a\u4efb\u52a1\u4e0b\u6765\uff0c\u540c\u6837\u7684\u4e0a\u4e0b\u6587\u53ef\u80fd\u88ab\u5904\u7406\u51e0\u5341\u6b21\u3002<\/p>\n<p>Prefix caching \u53ef\u4ee5\u7f13\u89e3\uff0c\u4f46\u6709\u4e2a\u524d\u63d0\uff1a\u6bcf\u6b21\u8bf7\u6c42\u5fc5\u987b\u662f\u4e0a\u4e00\u6b21\u7684\u7cbe\u786e\u7eed\u63a5\u3002\u73b0\u5b9e\u4e2d\u7684 Agent \u5bf9\u8bdd\u6839\u672c\u505a\u4e0d\u5230\uff1a<\/p>\n<ul>\n<li><strong>\u5b50 Agent \u5207\u6362<\/strong>\uff1aAgent A \u628a\u4efb\u52a1\u4ea4\u7ed9\u5b50 Agent B\uff0cB \u5904\u7406\u5b8c\u56de\u6765\uff0cA \u8fd8\u5f97\u7ee7\u7eed\u3002\u4f20\u7edf\u7f13\u5b58\u5728\u8fd9\u4e2d\u95f4\u65ad\u6389\u4e86\u3002<\/li>\n<li><strong>Thinking \u6a21\u578b<\/strong>\uff1a\u63a8\u7406 token \u751f\u6210\u5b8c\u5c31\u88ab\u4e22\u5f03\uff0c\u4e0b\u4e00\u8f6e\u7684\u4e0a\u4e0b\u6587\u548c\u4e0a\u4e00\u8f6e\u7684\u300c\u601d\u8003\u8fc7\u7a0b\u300d\u5bf9\u4e0d\u4e0a\uff0c\u7f13\u5b58\u5931\u6548\u3002<\/li>\n<li><strong>\u5206\u652f\u548c\u91cd\u8bd5<\/strong>\uff1a\u4f60\u8bf4\u300c\u6362\u4e2a\u65b9\u6848\u300d\uff0c\u6216\u8005 Agent \u81ea\u5df1\u91cd\u8bd5\u2014\u2014\u5bf9\u8bdd\u5206\u53c9\u4e86\uff0c\u7f13\u5b58\u4e5f\u5e9f\u4e86\u3002<\/li>\n<\/ul>\n<p>Ollama \u7684\u5feb\u7167\u7cfb\u7edf\u5c31\u662f\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u3002\u5b83\u5728\u5173\u952e\u8282\u70b9\u4fdd\u5b58\u6a21\u578b\u72b6\u6001\uff1a\u5bf9\u8bdd\u5206\u53c9\u7684\u5730\u65b9\u3001\u957f prompt \u7684\u95f4\u9694\u4f4d\u7f6e\u3001\u6bcf\u6b21\u56de\u590d\u751f\u6210\u4e4b\u524d\u3002\u5f53\u5b50 Agent \u56de\u6765\u3001thinking \u7ed3\u675f\u3001\u6216\u8005\u4f60\u6362\u4e86\u4e00\u4e2a\u8ffd\u95ee\u65b9\u5411\u65f6\uff0c\u5f15\u64ce\u76f4\u63a5\u4ece\u6700\u8fd1\u7684\u5feb\u7167\u6062\u590d\uff0c\u4e0d\u9700\u8981\u4ece\u5934\u5904\u7406\u6574\u4e2a\u4e0a\u4e0b\u6587\u3002<\/p>\n<p style=\"text-align:center;\"><img decoding=\"async\" class=\"alignnone size-full\" src=\"http:\/\/tantan.ink\/wp-content\/uploads\/2026\/06\/ollama-agent-snapshot.svg\" alt=\"Ollama Agent Snapshot\u5feb\u7167\u7cfb\u7edf\u5de5\u4f5c\u6d41\u7a0b\" width=\"700\" \/><br \/><em>\u56fe\uff1aOllama Agent \u5feb\u7167\u7cfb\u7edf \u2014 \u5728\u5206\u53c9\u70b9\u3001\u957f prompt \u95f4\u9694\u3001\u56de\u590d\u524d\u4fdd\u5b58\u72b6\u6001\uff0c\u9700\u8981\u65f6\u6062\u590d\uff08\u6765\u6e90\uff1aOllama Blog\uff09<\/em><\/p>\n<p>\u6709\u4e2a\u6280\u672f\u7ec6\u8282\u503c\u5f97\u63d0\u4e00\u5634\uff1a\u5f88\u591a\u65b0\u6a21\u578b\u7684\u6ce8\u610f\u529b\u673a\u5236\u662f\u6ed1\u52a8\u7a97\u53e3\u7684\uff0c\u8fd8\u6709\u5faa\u73af\u5c42\u643a\u5e26\u4e0d\u53ef\u56de\u9000\u7684\u72b6\u6001\u3002\u4e00\u65e6\u6a21\u578b\u300c\u8d70\u8fc7\u300d\u4e86\u67d0\u4e2a\u4f4d\u7f6e\uff0c\u90a3\u4e2a\u4f4d\u7f6e\u7684\u72b6\u6001\u5c31\u4e22\u4e86\uff0c\u9664\u975e\u5f53\u65f6\u5b58\u4e86\u5feb\u7167\u3002Ollama \u7684\u505a\u6cd5\u662f<strong>\u9009\u62e9\u6027\u548c\u589e\u91cf\u5f0f<\/strong>\u4fdd\u5b58\u2014\u2014\u53ea\u4fdd\u5b58\u53ef\u80fd\u56de\u5230\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e14\u589e\u91cf\u5b58\u50a8\uff0c\u628a\u5185\u5b58\u7559\u7ed9\u6a21\u578b\u672c\u8eab\u3002<\/p>\n<h2>\u600e\u4e48\u7528<\/h2>\n<p>\u5347\u7ea7\u5230\u6700\u65b0\u7248 Ollama\uff0c\u7136\u540e\uff1a<\/p>\n<pre><code>ollama run gemma4:12b-mlx<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u7528 AI Coding Agent\uff08\u6bd4\u5982 Claude Code\u3001Codex\uff09\uff0c\u7528 <code>ollama launch<\/code>\uff1a<\/p>\n<pre><code>ollama launch pi --model gemma4:12b-mlx<\/code><\/pre>\n<p>\u6ce8\u610f\uff1aMLX \u5f15\u64ce\u662f Apple Silicon only\u3002Intel Mac \u7528\u6237\u4eab\u53d7\u4e0d\u5230\u3002<\/p>\n<h2>\u503c\u4e0d\u503c\u5f97\u5347\uff1f<\/h2>\n<p>\u5982\u679c\u4f60\u5728 Mac \u4e0a\u8dd1 Ollama\uff0c<strong>\u5347<\/strong>\u3002\u4e09\u4e2a\u7406\u7531\uff1a<\/p>\n<ol>\n<li>NVFP4 \u5bf9\u8f93\u51fa\u8d28\u91cf\u6709\u660e\u663e\u63d0\u5347\uff0c\u5c24\u5176\u662f 4-bit \u91cf\u5316\u7684\u6a21\u578b<\/li>\n<li>20% \u7684\u901f\u5ea6\u63d0\u5347\u5728 Agent \u573a\u666f\u4e0b\u4f53\u611f\u660e\u663e<\/li>\n<li>\u5feb\u7167\u7cfb\u7edf\u5728\u957f\u5bf9\u8bdd\u548c\u591a Agent \u573a\u666f\u4e0b\u662f\u8d28\u7684\u533a\u522b\uff0c\u4e0d\u662f\u91cf\u7684\u533a\u522b<\/li>\n<\/ol>\n<p>\u4e0d\u8fc7 MLX \u76ee\u524d\u8fd8\u662f Ollama \u7684\u4e00\u4e2a\u5f15\u64ce\u9009\u9879\uff0c\u4e0d\u662f\u6240\u6709\u6a21\u578b\u90fd\u6709 <code>-mlx<\/code> \u540e\u7f00\u3002\u5982\u679c\u4f60\u7528\u7684\u6a21\u578b\u6682\u65f6\u6ca1\u6709 MLX \u7248\u672c\uff0c\u8fd9\u6b21\u5347\u7ea7\u5bf9\u4f60\u5f71\u54cd\u4e0d\u5927\u3002\u4f46\u65b9\u5411\u662f\u660e\u786e\u7684\uff1aOllama \u5728\u628a MLX \u4ece\u300c\u9884\u89c8\u300d\u63a8\u5411\u300c\u4e3b\u529b\u300d\u3002Apple Silicon \u7528\u6237\u7684\u597d\u65e5\u5b50\u8fd8\u5728\u540e\u5934\u3002<\/p>\n<hr>\n<p style=\"font-size:14px;color:#888;\">\u6765\u6e90\uff1aOllama Blog \u2014 <a href=\"https:\/\/ollama.com\/blog\/mlx-performance\">Ollama&#8217;s highest performance on Apple Silicon yet with MLX<\/a>\uff0c2026-06-11<\/p>\n","protected":false},"excerpt":{"rendered":"<p>6 \u6708 11 \u53f7\uff0cOllama MLX \u5f15\u64ce\u505a\u4e86\u4e00\u6b21\u91cd\u5927\u5347\u7ea7\uff1aNVFP4 \u91cf\u5316\u683c\u5f0f\u8ba9 4-bit \u6a21\u578b\u8d28\u91cf\u635f\u5931\u51cf\u534a\uff0cMetal kernel \u878d\u5408\u63d0\u901f 20%\uff0c\u8fd8\u6709\u4e13\u95e8\u4e3a Agent \u5de5\u4f5c\u6d41\u8bbe\u8ba1\u7684\u72b6\u6001\u5feb\u7167\u7cfb\u7edf\u3002Mac \u7528\u6237\u503c\u5f97\u5347\u7ea7\u3002<\/p>\n","protected":false},"author":1,"featured_media":93,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/30","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}