<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>openclaw Archives - 原立方</title>
	<atom:link href="https://www.atomic-cube.cn/tag/openclaw/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.atomic-cube.cn/tag/openclaw/</link>
	<description>技术栈的流动-从零到∞</description>
	<lastBuildDate>Tue, 23 Jun 2026 07:25:00 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>Mac 本地跑 AI 大模型神器OMLX：专为 Apple Silicon深度优化的开源本地大语言模型（LLM）推理引擎</title>
		<link>https://www.atomic-cube.cn/mac-%e6%9c%ac%e5%9c%b0%e8%b7%91-ai-%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%a5%9e%e5%99%a8%ef%bc%9aomlx%ef%bc%9a%e4%b8%93%e4%b8%ba-apple-silicon-mac-%e6%b7%b1%e5%ba%a6%e4%bc%98%e5%8c%96%e7%9a%84%e5%bc%80/</link>
					<comments>https://www.atomic-cube.cn/mac-%e6%9c%ac%e5%9c%b0%e8%b7%91-ai-%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%a5%9e%e5%99%a8%ef%bc%9aomlx%ef%bc%9a%e4%b8%93%e4%b8%ba-apple-silicon-mac-%e6%b7%b1%e5%ba%a6%e4%bc%98%e5%8c%96%e7%9a%84%e5%bc%80/#respond</comments>
		
		<dc:creator><![CDATA[evans]]></dc:creator>
		<pubDate>Mon, 25 May 2026 21:20:19 +0000</pubDate>
				<category><![CDATA[agent skills]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[claude code]]></category>
		<category><![CDATA[Codex]]></category>
		<category><![CDATA[LLM]]></category>
		<category><![CDATA[Vibe Coding]]></category>
		<category><![CDATA[技术文章]]></category>
		<category><![CDATA[codex]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[llm]]></category>
		<category><![CDATA[omlx]]></category>
		<category><![CDATA[openclaw]]></category>
		<category><![CDATA[opencode]]></category>
		<category><![CDATA[token]]></category>
		<guid isPermaLink="false">https://www.atomic-cube.cn/?p=1723</guid>

					<description><![CDATA[<p>oMLX.AI 是专为 macOS 设计的原生 MLX 服务器，旨在充分利用 Apple Silicon 的计算能力，提供极速的本地大型语言模型（LLM）推理体验</p>
<p>The post <a href="https://www.atomic-cube.cn/mac-%e6%9c%ac%e5%9c%b0%e8%b7%91-ai-%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%a5%9e%e5%99%a8%ef%bc%9aomlx%ef%bc%9a%e4%b8%93%e4%b8%ba-apple-silicon-mac-%e6%b7%b1%e5%ba%a6%e4%bc%98%e5%8c%96%e7%9a%84%e5%bc%80/">Mac 本地跑 AI 大模型神器OMLX：专为 Apple Silicon深度优化的开源本地大语言模型（LLM）推理引擎</a> appeared first on <a href="https://www.atomic-cube.cn">原立方</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">oMLX.AI 是专为 macOS 设计的原生 MLX 服务器，旨在充分利用 Apple Silicon 的计算能力，提供极速的本地大型语言模型（LLM）推理体验。该平台通过融合智能 SSD 缓存与连续批处理技术，解决了传统内存缓存的局限性，实现了低延迟多模型推理。开发者无需依赖云端，即可在本地环境中高效测试、部署和优化 AI 模型，适用于编码辅助、内容生成及多模态任务等场景。</p>



<p class="wp-block-paragraph">对于 macOS 用户而言，一款能够充分发挥 Apple Silicon 芯片潜力的本地大模型推理引擎显得尤为重要。</p>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16.png"><img fetchpriority="high" decoding="async" width="1024" height="560" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-1024x560.png" alt="" class="wp-image-1812" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-1024x560.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-300x164.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-768x420.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-1536x840.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-16-2048x1120.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-scaled.png"><img decoding="async" width="1024" height="803" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-1024x803.png" alt="" class="wp-image-1735" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-1024x803.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-300x235.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-768x602.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-1536x1205.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/Screenshot-2026-02-10-at-00.45.34-2048x1606.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph"><strong>oMLX&nbsp;</strong>正是为解决这一痛点而生的开源项目。它是一个专为 macOS 原生设计的 MLX 服务器，提供 LLM 大语言模型推理服务，具有智能缓存功能，针对编码代理的实际工作方式进行了深度优化。</p>



<p class="wp-block-paragraph"><strong>🎯 oMLX 的核心价值：</strong>让 Claude Code、OpenClaw 和 Cursor 等工具能在&nbsp;<strong>5 秒内响应</strong>，而非传统的 90 秒。这意味着开发效率的质的飞跃！</p>



<p class="wp-block-paragraph">核心功能特性</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/11.png"><img decoding="async" width="793" height="579" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/11.png" alt="" class="wp-image-1732" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/11.png 793w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/11-300x219.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/11-768x561.png 768w" sizes="(max-width: 793px) 100vw, 793px" /></a></figure>
</div>


<p class="wp-block-paragraph">技术架构详解</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/22.png"><img decoding="async" width="594" height="416" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/22.png" alt="" class="wp-image-1733" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/22.png 594w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/22-300x210.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a></figure>
</div>


<p class="wp-block-paragraph">oMLX 的技术架构采用分层设计，核心组件包括：</p>



<ul class="wp-block-list">
<li><strong>FastAPI Server</strong>：提供 OpenAI 和 Anthropic API 兼容接口</li>



<li><strong>EnginePool</strong>：多模型管理，支持 LRU 驱逐、TTL、手动加载/卸载</li>



<li><strong>ProcessMemoryEnforcer</strong>：总内存限制，防止 OOM</li>



<li><strong>Scheduler</strong>：FCFS 调度，可配置批处理大小</li>



<li><strong>Cache Stack</strong>：分层 KV 缓存（内存热缓存 + SSD 冷缓存）</li>
</ul>



<h2 class="wp-block-heading">实测性能数据</h2>



<p class="wp-block-paragraph">oMLX 官方基准测试收集了大量社区用户的测试数据。以下是不同 Apple Silicon 芯片的实测表现：</p>



<h3 class="wp-block-heading">M4 Pro (48GB) 测试结果</h3>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4.png"><img decoding="async" width="1024" height="418" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4-1024x418.png" alt="" class="wp-image-1726" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4-1024x418.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4-300x122.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4-768x313.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-4.png 1338w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5.png"><img decoding="async" width="1024" height="501" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5-1024x501.png" alt="" class="wp-image-1727" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5-1024x501.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5-300x147.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5-768x376.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-5.png 1336w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h2 class="wp-block-heading">安装与配置</h2>



<h3 class="wp-block-heading">系统要求</h3>



<ul class="wp-block-list">
<li><strong>芯片</strong>：Apple Silicon (M1/M2/M3/M4/M5)</li>



<li><strong>系统</strong>：macOS 15.0+ (Sequoia)</li>



<li><strong>内存</strong>：最低 16GB（推荐 64GB+）</li>



<li><strong>Python</strong>：3.10+</li>
</ul>



<h3 class="wp-block-heading">安装方式一：macOS 应用（推荐）</h3>



<h4 class="wp-block-heading">方式 A：macOS 应用（推荐）</h4>



<ol class="wp-block-list">
<li>从 <a href="https://github.com/jundot/omlx/releases" target="_blank" rel="noopener" title="">GitHub Releases</a> 下载 DMG 文件</li>



<li>拖动到 Applications 文件夹</li>



<li>首次启动时显示欢迎屏幕，引导完成以下步骤</li>
</ol>



<ul class="wp-block-list">
<li>设置模型目录</li>



<li>启动服务器</li>



<li>下载第一个模型</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10.png"><img decoding="async" width="1024" height="698" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-1024x698.png" alt="" class="wp-image-1739" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-1024x698.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-300x205.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-768x524.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-1536x1047.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-10-2048x1397.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32.png"><img decoding="async" width="1024" height="458" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-1024x458.png" alt="" class="wp-image-1892" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-1024x458.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-300x134.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-768x343.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-1536x687.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-32-2048x916.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading">安装方式二：Homebrew</h3>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># 添加 Tap 并安装
brew tap jundot/omlx https://github.com/jundot/omlx
brew install omlx

# 升级到最新版本
brew update &amp;&amp; brew upgrade omlx

# 作为后台服务运行（崩溃自动重启）
brew services start omlx

# 可选：安装 MCP 支持
/opt/homebrew/opt/omlx/libexec/bin/pip install mcp</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">添加</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Tap</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">并安装</span></span>
<span class="line"><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">tap</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">jundot</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">omlx</span><span style="color: #D8DEE9FF"> https</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//github.com/jundot/omlx</span></span>
<span class="line"><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">install</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">omlx</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">升级到最新版本</span></span>
<span class="line"><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">update</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">upgrade</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">omlx</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">作为后台服务运行</span><span style="color: #D8DEE9FF">（</span><span style="color: #D8DEE9">崩溃自动重启</span><span style="color: #D8DEE9FF">）</span></span>
<span class="line"><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">services</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">start</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">omlx</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">可选</span><span style="color: #D8DEE9FF">：</span><span style="color: #D8DEE9">安装</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">MCP</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">支持</span></span>
<span class="line"><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">homebrew</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">omlx</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">libexec</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">bin</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">pip</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">install</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">mcp</span></span></code></pre></div>



<p class="wp-block-paragraph">安装方式三：从源码安装</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># 克隆并安装
git clone https://github.com/jundot/omlx.git
cd omlx
pip install -e .              # 仅核心功能
pip install -e ".&#91;mcp&#93;"       # 带 MCP 支持

# 启动服务
omlx serve --model-dir ~/models</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">克隆并安装</span></span>
<span class="line"><span style="color: #D8DEE9">git</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">clone</span><span style="color: #D8DEE9FF"> https</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//github.com/jundot/omlx.git</span></span>
<span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">omlx</span></span>
<span class="line"><span style="color: #D8DEE9">pip</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">install</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">e</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9FF">              # </span><span style="color: #D8DEE9">仅核心功能</span></span>
<span class="line"><span style="color: #D8DEE9">pip</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">install</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">e</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">.&#91;mcp&#93;</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">       # </span><span style="color: #D8DEE9">带</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">MCP</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">支持</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">启动服务</span></span>
<span class="line"><span style="color: #D8DEE9">omlx</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">serve</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">model</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">dir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">~/</span><span style="color: #D8DEE9">models</span></span></code></pre></div>



<h2 class="wp-block-heading">使用教程</h2>



<h3 class="wp-block-heading">启动服务器</h3>



<p class="wp-block-paragraph">通过命令行启动 oMLX 服务器：</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># 基本启动
omlx serve --model-dir ~/models

# 启用 SSD 缓存
omlx serve --model-dir ~/models --paged-ssd-cache-dir ~/.omlx/cache

# 设置内存限制
omlx serve --model-dir ~/models --max-process-memory 80%</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">基本启动</span></span>
<span class="line"><span style="color: #D8DEE9">omlx</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">serve</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">model</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">dir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">~/</span><span style="color: #D8DEE9">models</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">启用</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">SSD</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">缓存</span></span>
<span class="line"><span style="color: #D8DEE9">omlx</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">serve</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">model</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">dir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">~</span><span style="color: #ECEFF4">/</span><span style="color: #EBCB8B">models --paged-ssd-cache-dir ~</span><span style="color: #ECEFF4">/</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">omlx</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">cache</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">设置内存限制</span></span>
<span class="line"><span style="color: #D8DEE9">omlx</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">serve</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">model</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">dir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">~/</span><span style="color: #D8DEE9">models</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">max</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">process</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">memory</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">80</span><span style="color: #81A1C1">%</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>💡 提示：</strong>可以复用现有的&nbsp;LM Studio&nbsp;模型目录，无需重新下载所有模型。</p>



<h3 class="wp-block-heading">API 调用示例</h3>



<h3 class="wp-block-heading">Chat Completions</h3>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "model-name",
    "messages": &#91;{"role": "user", "content": "你好！"}&#93;
  }'</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">curl</span><span style="color: #D8DEE9FF"> http</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//localhost:8000/v1/chat/completions \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">H</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">Content-Type: application/json</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9">{</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">model</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">model-name</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">messages</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: &#91;</span><span style="color: #ECEFF4">{</span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">role</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">user</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">content</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">你好！</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">}</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9FF">  }</span><span style="color: #ECEFF4">&#39;</span></span></code></pre></div>



<p class="wp-block-paragraph">流式输出</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "model-name",
    "messages": &#91;{"role": "user", "content": "写一首诗"}&#93;,
    "stream": true
  }'</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">curl</span><span style="color: #D8DEE9FF"> http</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//localhost:8000/v1/chat/completions \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">H</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">Content-Type: application/json</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9">{</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">model</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">model-name</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">messages</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: &#91;</span><span style="color: #ECEFF4">{</span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">role</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">user</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">content</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">写一首诗</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">}</span><span style="color: #D8DEE9FF">&#93;</span><span style="color: #ECEFF4">,</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">stream</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: </span><span style="color: #81A1C1">true</span></span>
<span class="line"><span style="color: #D8DEE9FF">  }</span><span style="color: #ECEFF4">&#39;</span></span></code></pre></div>



<p class="wp-block-paragraph">Anthropic API</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl http://localhost:8000/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-key" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": &#91;{"role": "user", "content": "解释量子计算"}&#93;
  }'</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">curl</span><span style="color: #D8DEE9FF"> http</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//localhost:8000/v1/messages \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">H</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">Content-Type: application/json</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">H</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">x-api-key: your-key</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">H</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">anthropic-version: 2023-06-01</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> \</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9">{</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">model</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">claude-sonnet-4-20250514</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">max_tokens</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: </span><span style="color: #B48EAD">1024</span><span style="color: #ECEFF4">,</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">messages</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF">: &#91;</span><span style="color: #ECEFF4">{</span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">role</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">user</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">content</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">解释量子计算</span><span style="color: #ECEFF4">&quot;</span><span style="color: #ECEFF4">}</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9FF">  }</span><span style="color: #ECEFF4">&#39;</span></span></code></pre></div>



<h3 class="wp-block-heading">集成 Claude Code / Codex/<strong>OpenCode</strong>/<strong>OpenClaw</strong></h3>



<p class="wp-block-paragraph">oMLX 提供一键配置生成器，简化了与主流开发工具的集成：</p>



<ol class="wp-block-list">
<li>打开 Web 管理面板 (http://localhost:8000/admin)</li>



<li>选择要使用的模型</li>



<li>点击 &#8220;Integrations&#8221; 选项卡</li>



<li>一键复制配置命令</li>



<li>粘贴到对应工具的配置文件</li>
</ol>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30.png"><img decoding="async" width="1024" height="367" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-1024x367.png" alt="" class="wp-image-1889" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-1024x367.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-300x107.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-768x275.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-1536x550.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-30-2048x733.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31.png"><img decoding="async" width="1024" height="460" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-1024x460.png" alt="" class="wp-image-1891" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-1024x460.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-300x135.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-768x345.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-1536x689.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-31-2048x919.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34.png"><img decoding="async" width="1024" height="253" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-1024x253.png" alt="" class="wp-image-1909" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-1024x253.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-300x74.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-768x190.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-1536x380.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-34-2048x506.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36.png"><img decoding="async" width="1024" height="605" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-1024x605.png" alt="" class="wp-image-1918" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-1024x605.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-300x177.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-768x454.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-1536x908.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-36-2048x1211.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37.png"><img decoding="async" width="1024" height="609" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-1024x609.png" alt="" class="wp-image-1920" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-1024x609.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-300x178.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-768x457.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-1536x914.png 1536w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-37-2048x1218.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph"><strong>重要说明：</strong>推荐配置为 M 系列 Pro/Max + 64GB+ 内存，以获得最佳的使用体验。16GB 内存虽然可以运行，但可能会遇到内存不足的情况。</p>



<h2 class="wp-block-heading">与传统方案对比</h2>



<h3 class="wp-block-heading">oMLX vs&nbsp;Ollama&nbsp;/ LM Studio</h3>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a723d445091c&quot;}" data-wp-interactive="core/image" data-wp-key="6a723d445091c" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" width="1024" height="700" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-12-1024x700.png" alt="" class="wp-image-1744" srcset="https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-12-1024x700.png 1024w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-12-300x205.png 300w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-12-768x525.png 768w, https://www.atomic-cube.cn/wp-content/uploads/2026/04/image-12.png 1264w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph"><strong>oMLX 的核心竞争力在于：</strong></p>



<ul class="wp-block-list">
<li><strong>极速响应</strong>：TTFT 从 30-90 秒缩短到 5 秒以内</li>



<li><strong>智能缓存</strong>：SSD KV 缓存技术实现上下文复用</li>



<li><strong>高并发</strong>：连续批处理支持 8× 并发，吞吐量提升 4.14×</li>



<li><strong>原生体验</strong>：非 Electron 构建的系统原生应用</li>



<li><strong>完全开源</strong>：Apache 2.0 许可证，透明可控</li>
</ul>



<p class="wp-block-paragraph">最大的区别就是<strong>缓存机制</strong>：</p>



<p class="wp-block-paragraph">Ollama和LM Studio的KV缓存都是放在内存里的，而且一旦对话的上下文变化，比如你用Claude Code的时候，它会不断地修改上下文，加工具调用的结果，这时候整个缓存就直接失效了，下次还要重新计算一遍，这就是为什么你会等半天。</p>



<p class="wp-block-paragraph">而oMLX的缓存是块级的，持久化到SSD，不管上下文怎么变，只要有相同的前缀，就能直接复用缓存，不用重新算，这就是它能把首响从90秒降到5秒的核心原因。</p>



<p class="wp-block-paragraph">而且oMLX专门针对Claude Code这类AI编码工具做了优化，比如SSE keep-alive防止长请求超时，上下文缩放让小模型也能配合Claude Code用，这些都是其他工具没有的。</p>



<p class="wp-block-paragraph">oMLX 不仅是一个性能强大的 LLM 推理引擎，更通过其创新的缓存机制和友好的交互设计，解决了本地部署大模型的实际痛点。如果你拥有一台 Apple Silicon Mac，并希望在本地高效、便捷地运行大模型，oMLX 无疑是一个非常值得尝试的选择。</p>



<p class="wp-block-paragraph">如果你有一台Apple Silicon Mac，并且正在寻找一个高效、易用的本地LLM推理方案，oMLX值得你立即上手体验。它很可能就是那块让Mac变身私人AI数据中心的最后拼图。</p>



<p class="wp-block-paragraph"><strong>快速入口</strong>：</p>



<ul class="wp-block-list">
<li>GitHub仓库：<a href="https://github.com/jundot/omlx" target="_blank" rel="noreferrer noopener">https://github.com/jundot/omlx</a></li>



<li>官方网站：<a href="https://omlx.ai/" target="_blank" rel="noreferrer noopener">https://omlx.ai/</a></li>



<li>直接下载DMG：<a href="https://github.com/jundot/omlx/releases" target="_blank" rel="noreferrer noopener">https://github.com/jundot/omlx/releases</a></li>
</ul>



<p class="wp-block-paragraph">快去试试吧，然后把你的Mac菜单栏交给oMLX——相信你也会成为它的忠实用户。</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.atomic-cube.cn/mac-%e6%9c%ac%e5%9c%b0%e8%b7%91-ai-%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%a5%9e%e5%99%a8%ef%bc%9aomlx%ef%bc%9a%e4%b8%93%e4%b8%ba-apple-silicon-mac-%e6%b7%b1%e5%ba%a6%e4%bc%98%e5%8c%96%e7%9a%84%e5%bc%80/">Mac 本地跑 AI 大模型神器OMLX：专为 Apple Silicon深度优化的开源本地大语言模型（LLM）推理引擎</a> appeared first on <a href="https://www.atomic-cube.cn">原立方</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.atomic-cube.cn/mac-%e6%9c%ac%e5%9c%b0%e8%b7%91-ai-%e5%a4%a7%e6%a8%a1%e5%9e%8b%e7%a5%9e%e5%99%a8%ef%bc%9aomlx%ef%bc%9a%e4%b8%93%e4%b8%ba-apple-silicon-mac-%e6%b7%b1%e5%ba%a6%e4%bc%98%e5%8c%96%e7%9a%84%e5%bc%80/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
