Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
Dev.to AI · 2026/8/5 08:29:51

Testing 3 Local LLMs on a CPU-Only Laptop — Here's What Actually Happened
AI 中文解读
一位开发者用一台没有独立显卡的普通笔记本,实测了三个开源大模型,结果发现本地AI跑代码生成任务并非不可能,但体验相当“酸爽”。最吸引人的地方在于,这打破了“没有昂贵GPU就玩不转AI”的固有印象,证明了40GB内存的CPU设备也能运行14B到26B参数的大模型。
简单来说,这项测试就像让三个不同体量的“实习生”在无网环境下独立完成一个贪吃蛇小游戏。其中Qwen 3 14B表现中规中矩,但生成一次要等9分钟,修改一个小问题还得再来一轮;GPT-OSS 20B和Gemma 4 26B则各有千秋,但都存在生成速度慢、代码需手动调整的通病。整个过程完全离线,不花一分钱API费用。
对普通人而言,这意味着未来在没网的飞机上或偏僻地区,也能用笔记本本地跑AI助手处理简单编程任务,隐私性也更好。不过目前来看,它更像是技术爱好者的玩具,距离替代云端AI还有很长的路要走。普通用户想流畅使用,依然得依赖联网服务。
<p>As developers, we keep hearing that powerful LLMs require expensive GPUs. I wanted to find out how far local AI could actually go on a modest machine — no cloud, no cost, no GPU.</p>
<p>So I ran a practical experiment using <strong>LM Studio</strong> on a <strong>40 GB RAM laptop without a dedicated GPU</strong>, pitting three open-weight models against each other on a real coding task.</p>
<h2>
Test Environment
</h2>
<p><strong>Hardware</strong></p>
<ul>
<li>Standard laptop</li>
<li>40 GB RAM</li>
<li>No dedicated GPU (CPU inference only)</li>
</ul>
<p><strong>Software</strong></p>
<ul>
<li>LM Studio (context length: 8192 tokens)</li>
<li>VS Code</li>
<li>100% local inference — no API calls, no internet required</li>
</ul>
<p><strong>Models tested</strong></p>
<ul>
<li>Qwen 3 14B</li>
<li>GPT-OSS 20B</li>
<li>Gemma 4 26B A4B QAT</li>
</ul>
<h2>
The Experiment
</h2>
<p>Each model received the <strong>exact same prompt</strong>: generate a complete Snake Game using only HTML, CSS, and JavaScript — no frameworks, no external libraries.</p>
<p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmuqq2at61higzaiiqc48.png" class="article-body-image-wrapper"><img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmuqq2at61higzaiiqc48.png" alt=" " width="719" height="419"></a></p>
<p>I evaluated each result on:</p>
<ul>
<li>⏱ Generation time</li>
<li>🪙 Token usage</li>
<li>🎨 Quality of the generated UI</li>
<li>🔧 Whether manual corrections were needed</li>
<li>🧑💻 Overall developer experience</li>
</ul>
<h2>
Results
</h2>
<h3>
🟡 Qwen 3 14B
</h3>
<p>Generation took approximately <strong>9 minutes</strong> and produced <strong>3 separate files</strong> (HTML, CSS, JS).</p>
<p>After testing, the snake moved too fast. I had to send a follow-up prompt, which triggered another full 9-minute generation cycle — and only around five lines of code actually changed.</p>
<p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ptagum0it56snlqwxaz.png" class="article-body-image-wrapper"><img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ptagum0it56snlqwxaz.png" alt=" " width="800" height="426"></a></p>
<p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc0s1oq5klkoyl6ct5ak4.png" class="article-body-image-wrapper"><img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc0s1oq5klkoyl6ct5ak4.png" alt=" " width="164" height="168"></a></p>
<p><strong>Pros</strong></p>
<ul>
<li>Functional game on the second attempt</li>
<li>Game instructions included</li>
<li>Low token usage (~651)</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>Slow generation</li>
<li>Required a second iteration to fix gameplay speed</li>
<li>Basic UI</li>
</ul>
<h3>
🟢 GPT-OSS 20B
</h3>
<p>This was the <strong>biggest surprise</strong> of the experiment.</p>
<p>Generation completed in approximately <strong>3 minutes</strong>, producing a <strong>single self-contained HTML file</strong> with all HTML, CSS, and JS included. Token usage clocked in at ~51 — significantly lower than the other models (worth noting: token counting may differ across models, so treat this as directional rather t
分享
阅读原文 ↗