<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[AI, Agentic Workflows & Enterprise Automation | Devarsh Patel]]></title><description><![CDATA[Practical insights on AI systems, digital transformation, LLMs, agentic workflows, enterprise automation, and modernization.]]></description><link>https://devarshpatel.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6a1502be7d85e6a1af287d95/d360ef5b-310e-44d4-9089-1e824371db1e.png</url><title>AI, Agentic Workflows &amp; Enterprise Automation | Devarsh Patel</title><link>https://devarshpatel.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 19:28:39 GMT</lastBuildDate><atom:link href="https://devarshpatel.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I Ran a monster GPT-OSS-120B MoE AI Model on my MacBook — Local LLM(No Cloud GPU) with llama.cpp]]></title><description><![CDATA[💡
Running a large language model (LLM) locally gives you absolute privacy, zero ongoing subscription costs, and the ability to work entirely offline. It is ideal if you have strict data security need]]></description><link>https://devarshpatel.hashnode.dev/i-ran-a-monster-gpt-oss-120b-moe-ai-model-on-my-macbook-local-llm-no-cloud-gpu-with-llama-cpp</link><guid isPermaLink="true">https://devarshpatel.hashnode.dev/i-ran-a-monster-gpt-oss-120b-moe-ai-model-on-my-macbook-local-llm-no-cloud-gpu-with-llama-cpp</guid><category><![CDATA[AI]]></category><category><![CDATA[Local LLM]]></category><category><![CDATA[vscode extensions]]></category><category><![CDATA[MoE]]></category><category><![CDATA[gpt]]></category><category><![CDATA[#qwen]]></category><category><![CDATA[llm]]></category><category><![CDATA[guide]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[alibaba cloud]]></category><dc:creator><![CDATA[Devarsh Patel]]></dc:creator><pubDate>Fri, 29 May 2026 22:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/ef98f42d-68b8-4295-8cf5-7b2eb2d583e6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<div>
<div>💡</div>
<div>Running a large language model (LLM) locally gives you absolute privacy, zero ongoing subscription costs, and the ability to work entirely offline. It is ideal if you have strict data security needs, want unlimited usage without rate limits, or require deep system integration</div>
</div></blockquote>
<p><strong>1. How This Experiment Started</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/9da3eb77-78f9-4134-858a-00d1c85202b4.png" alt="" style="display:block;margin:0 auto" />

<p>After burning through my 5-hour Claude Code session limit in barely an hour, I had four unexpected hours on my hands.</p>
<p>Instead of doomscrolling, waiting for the timer to reset, I decided to push Apple Silicon:</p>
<p><strong>How far can Apple Silicon really go with large language models?</strong></p>
<p>No cloud GPUs. No rented infrastructure. No Kubernetes cluster hiding in the background.</p>
<p>Just a MacBook M3 Max with 36 GB of unified memory, llama.cpp, a collection of heavily quantized models and willingness to push the hardware well beyond what most people would consider reasonable, with a lot of patience...</p>
<p>What started as a quick experiment turned into a surprisingly deep exploration of memory management, quantization strategies, MoE architectures, and the limits of local inference.</p>
<p>The result was something I didn't expect: with the right combination of CPU-only execution, --cpu-moe, --no-mmap, aggressive quantization, and carefully managed context sizes, even massive Mixture-of-Experts models that seem completely impractical on paper can become genuinely usable on a consumer laptop.</p>
<p><strong>I got a 117B-parameter model generating tokens on a 36GB MacBook!</strong></p>
<blockquote>
<div>
<div>💡</div>
<div>It hardly takes 15-30 mins to Download and Run LLM locally</div>
</div></blockquote>
<p><strong>You can also run LLM locally (your own CHATGPT!),</strong> how big a model can run depends almost entirely on your available RAM (or VRAM on your GPU).</p>
<p>The biggest bottleneck on Macs is usually <strong>memory capacity first, memory bandwidth second</strong>, not raw compute. Unified memory is fantastic, but once you run out, swap destroys performance.</p>
<p><strong>Recommended Models to run locally on MacBook:</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/af629328-6ffe-4f86-b968-2a35948859a0.png" alt="" style="display:block;margin:0 auto" />

<p><strong>2. The Breakthrough</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/73a5153f-52d1-4745-b530-d8f5456d3a66.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/0ae717ea-3d65-43d8-9400-117817120f94.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p><strong>The best local model isn’t the biggest one you can load — it’s the largest one that stays responsive.</strong> For a 36 GB M3 Max that’s the Qwen3-30B-A3B MoE, with the 80B, and 120B as proof of how far the machine goes once you stop offloading to Metal and start managing memory pressure by hand.</p>
</blockquote>
<p><strong>3. Why It Works</strong></p>
<p><strong>3.1 Why Apple Silicon Changes the Game for Local AI</strong></p>
<p>Apple Silicon's Unified Memory Architecture (UMA) is the key reason large AI models can run locally on consumer hardware. Unlike traditional PCs, where CPU and GPU have separate memory pools, Apple combines the CPU, GPU, and Neural Engine into a single chip that shares one high-bandwidth memory pool.</p>
<p>This delivers three major advantages:</p>
<ul>
<li><p><strong>Larger Models Fit in Memory</strong> – Up to ~75% of system memory can be used by the GPU, allowing significantly larger models to load than on typical consumer GPUs with 8–16 GB of VRAM.</p>
</li>
<li><p><strong>Zero-Copy Access</strong> – The CPU, GPU, and Neural Engine access the same memory directly, eliminating the costly RAM-to-VRAM transfers common on traditional systems.</p>
</li>
<li><p><strong>Massive Memory Bandwidth</strong> – M3 Max and larger Apple Silicon chips provide 400-800 GB/s of memory bandwidth, keeping AI workloads fed with data during inference.</p>
</li>
</ul>
<p><strong>Apple Metal: Unlocking the GPU:</strong></p>
<p><strong>Apple Metal</strong> is Apple's proprietary, low-level hardware acceleration API. It is the software layer that allows developers to speak directly to the Mac's GPU.</p>
<ul>
<li><p><strong>Direct Hardware Control</strong>: Metal bypasses standard operating system layers, giving software near-instant access to the Mac's graphics cores and Matrix Coprocessors.</p>
</li>
<li><p><strong>Unified Memory Integration</strong>: Because of Metal, the GPU doesn't have to wait for instructions to copy data. Metal tells the GPU exactly where the model weights are sitting in the Unified Memory pool, executing calculations instantly in place.</p>
</li>
<li><p><strong>The Metal Shading Language (MSL)</strong>: llama.cpp includes custom MSL code written specifically for Apple chips. When you load a model, llama.cpp uses Metal to compile these specialized kernels on the fly, turning your Mac's graphics cores into high-performance AI processors, allowing the GPU to accelerate matrix operations and dramatically improve model loading and token generation performance.</p>
</li>
</ul>
<p>The result is simple: models that would normally require expensive workstation-class GPUs can often run directly on a MacBook.</p>
<p><strong>3.2 What is LLAMA.CPP?</strong></p>
<p>Created by Georgi Gerganov, <strong>llama.cpp</strong> made it possible to run large language models on everyday hardware without complex server infrastructure.</p>
<p>Its key advantages are:</p>
<ul>
<li><p><strong>Lightweight and Fast</strong> – Written in C/C++ with minimal dependencies, avoiding the overhead of large AI frameworks.</p>
</li>
<li><p><strong>GGUF Quantization</strong> – Compresses models from FP16 to lower-precision formats such as INT4 and INT8, dramatically reducing memory requirements with minimal impact on quality.</p>
</li>
<li><p><strong>Flexible Execution</strong> – Supports both CPU-only inference and GPU acceleration, including optimized support for Apple Silicon GPUs through Metal.</p>
</li>
</ul>
<p>These features have made llama.cpp the go-to runtime for running large open-source models locally.</p>
<img alt="" style="display:block;margin:0 auto" />

<p><strong>3.3. Understanding Mixture-of-Experts (MoE) models</strong></p>
<p>Mixture-of-Experts (MoE) models increase an AI model's total knowledge without requiring all of that knowledge to be used for every token generated.</p>
<p>Traditional LLMs are <strong>dense</strong> models: if a model has 70 billion parameters, all 70 billion participate in every prediction. MoE models are <strong>sparse</strong>. They divide the network into specialized "experts" and activate only the most relevant experts for a given task.</p>
<p>Think of it like a manager routing a problem to the right specialists rather than asking the entire company to work on every request.</p>
<p>GPT-OSS-120B is a 120-billion-parameter Mixture-of-Experts (MoE) model, it is ‘sparse’, only about 5.1 billion parameters are active for each token generated.</p>
<p>In practice, GPT-OSS-120B is commonly deployed on GPUs with roughly 80GB of VRAM (NVIDIA H100, A100), depending on quantization and runtime configuration.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/3cd8d2e5-2ef1-4d9a-b2cb-0531e44c3b70.png" alt="" style="display:block;margin:0 auto" />

<p><strong>4. Apple MacBook (M3 Max)</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/7a805275-d57f-4d3d-9e0b-397c5b16bc9f.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<div>
<div>💡</div>
<div><strong>MoE cuts both ways. </strong>The full weight footprint is what blocks loading on 36 GB; the tiny active set is what makes these models fast on the CPU once loaded. The whole game is getting past the loading wall — then letting the small active set carry the speed. </div>
</div></blockquote>
<p><strong>5. Setup Guide-Install Prerequisites</strong></p>
<ol>
<li>Install Homebrew packages:</li>
</ol>
<pre><code class="language-shell">brew update 

brew install git cmake ninja python huggingface-cli 
</code></pre>
<ol>
<li>Install llama.cpp</li>
</ol>
<pre><code class="language-shell">brew install llama.cpp 

git clone https://github.com/ggml-org/llama.cpp.git 

cd llama.cpp 

cmake -B build -G Ninja -DGGML_METAL=ON 

cmake --build build –j 
</code></pre>
<p>Then your binaries are here:</p>
<pre><code class="language-plaintext">./build/bin/llama-server 

./build/bin/llama-cli 

./build/bin/llama-bench 
</code></pre>
<ol>
<li>Download model and Run Server</li>
</ol>
<p>Download GPT-OSS-120B(Experiement)</p>
<pre><code class="language-shell">mkdir -p ~/models/gpt-oss-120b 

cd ~/models/gpt-oss-120b 

hf download ggml-org/gpt-oss-120b-GGUF \ 

  --local-dir ~/models/gpt-oss-120b
</code></pre>
<p>Download Qwen3-Next-80B-A3B-Instruct-GGUF</p>
<pre><code class="language-shell">hf download unsloth/Qwen3-Next-80B-A3B-Instruct-GGUF \
  --include "*Q4_K_M*" \
  --local-dir ~/models/qwen3-next-80b-a3b-q4
</code></pre>
<p><strong>*Execute llma-server command to Load Model and Run Server</strong></p>
<ol>
<li>Memory Recommendation</li>
</ol>
<p>Under this default, macOS automatically reserves roughly 25% to 30% of total unified memory for the CPU, operating system, and background apps, capping the GPU at about 70–75% of total RAM.</p>
<p>The command overrides the default VRAM cap on Apple Silicon Macs, allocating ~30 GB of your Mac's unified memory exclusively to the GPU.</p>
<pre><code class="language-shell">sudo sysctl iogpu.wired_limit_mb=30000 
</code></pre>
<p>Verify that the command applied correctly by running:</p>
<pre><code class="language-shell">sysctl iogpu.wired_limit_mb 
</code></pre>
<p>Command to Reset it back to default:</p>
<pre><code class="language-shell">sudo sysctl iogpu.wired_limit_mb=0
</code></pre>
<ol>
<li>Host Endpoints</li>
</ol>
<p>Once server is running, Open:</p>
<pre><code class="language-plaintext">http://127.0.0.1:8080 
</code></pre>
<p>Open AI Compatible Endpoints:</p>
<pre><code class="language-plaintext">http://127.0.0.1:8080/v1/chat/completions
</code></pre>
<p><strong>6. Experiments: Loading LLM Model and Running a Server</strong></p>
<p><em><strong>1) GPT-OSS-120B</strong></em></p>
<p><em>For each model, the parameters that failed and the parameters that succeeded are shown side by side — on a memory-constrained Mac, the parameters are the experiment.</em></p>
<p><strong>Failed</strong>  — conservative CPU-only attempt (Q3_K_M):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/gpt-oss-120b/Q3_K_M/gpt-oss-120b-Q3_K_M-00001-of-00002.gguf \ 
  -ngl 0 -c 512 -np 1 -b 8 -ub 4 --cache-ram 0 \ 
  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><em>Result: zsh: killed during load under memory pressure.</em></p>
<p><strong>Failed</strong>  — CPU-only Q3_K_S, still no --no-mmap:</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/gpt-oss-120b/Q3_K_S/gpt-oss-120b-Q3_K_S-00001-of-00002.gguf \ 
  -ngl 0 -c 512 -np 1 -b 8 -ub 4 --cache-ram 0 \ 
  --no-warmup --jinja --host 127.0.0.1 --port 8080
</code></pre>
<p><em>Result: zsh: killed again.</em></p>
<p><strong>Failed</strong>  — hybrid --cpu-moe, still no --no-mmap:</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/gpt-oss-120b/Q3_K_S/gpt-oss-120b-Q3_K_S-00001-of-00002.gguf \ 
  -ngl 4 --cpu-moe -np 1 -c 512 -b 8 -ub 4 --cache-ram 0 \ 
  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><em>Result: zsh: killed — but the log suggested --no-mmap for CPU tensor overrides. That was the clue.</em></p>
<p><strong>Success</strong>  — the breakthrough command:</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/gpt-oss-120b/Q3_K_S/gpt-oss-120b-Q3_K_S-00001-of-00002.gguf \ 
  -ngl 4 \ 
  --cpu-moe \ 
  --no-mmap \ 
  -np 1 \ 
  -c 256 \ 
  -b 4 \ 
  -ub 2 \ 
  --cache-ram 0 \ 
  --no-warmup \ 
  --jinja \ 
  --host 127.0.0.1 \ 
  --port 8080 
</code></pre>
<blockquote>
<div>
<div>💡</div>
<div>Loaded with n_slots = 1, n_ctx = 256. Observed speeds: 2.03, 3.12, and 2.45 tok/sec. A 117B model generating tokens on a 36 GB laptop — impressive, even if it is a benchmark rather than a workhorse. </div>
</div></blockquote>
<p>What it costs the machine is the real story. Memory pressure sat in the amber state with ~33.9 GB used, 19.2 GB compressed, and ~29 GB of swap in use:</p>
<p><img alt="GPT-OSS-120B memory pressure: ~33.9 GB used, 19.2 GB compressed, ~29 GB swap, amber warning state.
GPT-OSS-120B memory pressure: ~33.9 GB used, 19.2 GB compressed, ~29 GB swap, amber warning state." style="display:block;margin:0 auto" /></p>
<p>And because --no-mmap forces a full load while the machine pages hard, the SSD took a sustained beating — hundreds of GB read and written at roughly half a gigabyte per second:</p>
<p><img alt="GPT-OSS-120B disk I/O: ~794 GB read, ~545 GB written, ~540–557 MB/sec sustained.
GPT-OSS-120B disk I/O: ~794 GB read, ~545 GB written, ~540–557 MB/sec sustained." style="display:block;margin:0 auto" /></p>
<details>
<summary>What Does -ngl 999 Mean? </summary>
<p>-ngl means GPU layers. Setting it to 999 is a convenient way to tell llama.cpp: </p><p>Put as many layers as possible on Metal/GPU.</p>
</details><details>
<summary>MoE Parameter: --n-cpu-moe</summary>
<p>It tells llama.cpp to keep some MoE expert layers on CPU to reduce GPU memory pressure. </p>
</details> 

<p><strong>2)  <em>Qwen3-Next-80B-A3B-Instruct (80B / 3B active) — the best large model</em></strong></p>
<p>This model draws the line between fighting Metal and working with the CPU. Aggressive GPU offload hits Metal OOM; going CPU-only turns it into the best large-reasoning model in the set.</p>
<p><strong>Failed</strong>  — GPU offload (Metal OOM):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/qwen3-next-80b-a3b-q3/Qwen3-Next-80B-A3B-Instruct-UD-IQ3_XXS.gguf \ 
  -ngl 16 -c 4096 -b 64 -ub 32 -fa auto \ 
  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p>This run is worth studying, because the failure mode is more subtle than “it ran out of memory.”</p>
<p><img alt="llama.cpp loading the 80B with -ngl 16: Metal OOM during slot init — yet the server still prints “model loaded” and “listening.”
llama.cpp loading the 80B with -ngl 16: Metal OOM during slot init — yet the server still prints “model loaded” and “listening.”" style="display:block;margin:0 auto" /></p>
<p><img alt="The web UI with the 80B “loaded” — it looks ready, but the Metal backend is already in an error state.
The web UI with the 80B “loaded” — it looks ready, but the Metal backend is already in an error state." style="display:block;margin:0 auto" /></p>
<div>
<div>💡</div>
<div>A server that reports “listening” is not the same as a server that can compute a token.</div>
</div>

<p><strong>Success</strong>  — CPU-only:</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/qwen3-next-80b-a3b-q3/Qwen3-Next-80B-A3B-Instruct-Q3_K_S.gguf \ 
  -ngl 0 \ 
  -c 1024 \ 
  -b 32 \ 
  -ub 16 \ 
  --no-warmup \ 
  --jinja \ 
  --host 127.0.0.1 \ 
  --port 8080 
</code></pre>
<p><em><strong>~19.83 tok/sec</strong></em></p>
<p><strong>3)  <em>Qwen3-30B-A3B (30.5B / 3.3B active) — the daily driver</em></strong></p>
<p><strong>The family that quietly won the whole exercise. Unlike the giants, it offloads happily to Metal and runs fast.</strong></p>
<p><strong>Success</strong>  — Q5_0, first run (partial offload, small context):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 

  -m ~/models/qwen3-30b-a3b-q5/Qwen3-30B-A3B-Q5_0.gguf \ 

  -ngl 12 -c 2048 -b 32 -ub 16 \ 

  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><em><strong>~37–43 tok/sec.</strong></em></p>
<p><strong>Success</strong>  — Q5_0, optimized (full offload, 16K context):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 

  -m ~/models/qwen3-30b-a3b-q5/Qwen3-30B-A3B-Q5_0.gguf \ 

  -ngl 999 -c 16384 -b 32 -ub 16 \ 

  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><em><strong>~69.25 tok/sec — the fastest model in the entire test set.</strong></em></p>
<p><strong>Success</strong>  — Q6_K, the best balance (daily driver):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 

  -m ~/models/qwen3-30b-a3b-q6/Qwen3-30B-A3B-Q6_K.gguf \ 

  -ngl 999 -c 16384 -b 32 -ub 16 \ 

  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><em><strong>~63.97 tok/sec</strong></em> <em>— only moderately slower than Q5_0, but better quality. My standing daily driver: fast, stable at 16K, high enough fidelity for code review and strategy work.</em></p>
<p><strong>Failed</strong>  — Q8_0, GPU offload (Metal OOM):</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 

  -m ~/models/qwen3-30b-a3b-q8/Qwen3-30B-A3B-Q8_0.gguf \ 

  -ngl 8 -c 16384 -b 32 -ub 16 \ 

  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<p><strong>Result: kIOGPUCommandBufferCallbackErrorOutOfMemory.</strong> The Q8 weights plus a 16K KV cache exceeded the ~27 GB Metal working set. The CPU-only fallback (-ngl 0) loaded but ran at only ~5–10 tok/sec. Bottom line: Q8 is not worth it on 36 GB for this model.</p>
<p><strong>4)  <em>Qwen3.6-27B (Dense, 27B) — the dense baseline</em></strong></p>
<p><strong>A dense 27B is a useful baseline for the dense-vs-MoE comparison.</strong></p>
<p><strong>Loads cleanly</strong> — no OOM, no swap drama — but with thinking mode enabled it landed at ~9.19 tok/sec (live tg decaying from ~12 to ~9). The verdict:</p>
<pre><code class="language-shell">~/llama.cpp/build/bin/llama-server \ 
  -m ~/models/qwen3.6-27b-q5/Qwen_Qwen3.6-27B-Q5_K_M.gguf \ 
  -ngl 999 -c 16384 -b 32 -ub 16 \ 
  --no-warmup --jinja --host 127.0.0.1 --port 8080 
</code></pre>
<blockquote>
<div>
<div>💡</div>
<div><strong>A dense 27B is now clearly beaten by the 30B-A3B MoE, </strong>which runs roughly 7× faster for comparable-or-better output because only ~3.3B parameters are active per token. This is the dense-vs-MoE thesis made concrete. </div>
</div></blockquote>
<p><strong>The two opposite playbooks:</strong></p>
<ul>
<li><p>Small-enough MoE (30B): push -ngl 999, give it 16K context, let Metal do the work. Fast.</p>
</li>
<li><p>Too-big MoE (80B/120B): pull work off Metal (-ngl 0 or --cpu-moe), shrink context to 256–1024, set -np 1, and for the 120B add --no-mmap --cache-ram 0. Slow but alive.</p>
</li>
</ul>
<p><strong>7. The llama.cpp Parameters That Mattered</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1502be7d85e6a1af287d95/05ac5b03-6d48-47e5-ba3f-1f2ef99db56e.png" alt="" style="display:block;margin:0 auto" />

<p><strong>8. VS Code Integration</strong></p>
<p>The llama.cpp server exposes an OpenAI-compatible endpoint at <a href="http://127.0.0.1:8080/v1">http://127.0.0.1:8080/v1</a>, which works with <a href="http://Continue.dev">Continue.dev</a>, Cline, Roo Code, Aider, and Open WebUI.</p>
<p>The default model is now the Qwen3-30B-A3B Q6 MoE; maxTokens is raised to 16384 so longer strategy scripts don’t truncate mid-generation.</p>
<p>Install <strong>Continue</strong> in VS Code.</p>
<pre><code class="language-yaml">name: Local Config 
version: 1.0.0 
schema: v1 
models: 
  - name: Qwen3-30B-A3B Q6 Local 
    provider: Qwen 
    model: qwen3-30b-a3b-q6 
    apiBase: http://127.0.0.1:8080/v1 
    apiKey: dummy 
    roles: [chat, edit, apply] 
    defaultCompletionOptions: 
      temperature: 0.2 
      topP: 0.9 
      maxTokens: 16384 
</code></pre>
<p>Temperature 0.2 / topP 0.9 keeps code generation conservative — low enough to avoid invented syntax, not so low that regenerations get stuck repeating a wrong answer.</p>
<p><strong>9. Key Lessons Learned</strong></p>
<ul>
<li><p>MoE beats dense on this machine, decisively. Qwen3-30B-A3B-Q6 runs ~7× faster than a dense 27B because only ~3.3B parameters fire per token.</p>
</li>
<li><p>The big models are runnable — the trick is to stop fighting Metal. The 80B runs CPU-only at ~20 tok/sec; the 117B GPT-OSS loads and generates with the right memory flags.</p>
</li>
<li><p>Active parameters ≠ required memory. The full weight footprint must fit; the tiny active set is what keeps CPU inference fast once it does.</p>
</li>
<li><p>Q8 is not worth it on 36 GB for this model family — Metal OOM with GPU, too slow CPU-only. Use Q6_K.</p>
</li>
</ul>
<p><strong>10. The Final Verdict</strong></p>
<p>The largest model you can technically memory-map is not the best local model. But with --cpu-moe, --no-mmap, and CPU-only execution, the practical ceiling on a 36 GB Apple MacBook is far higher than the dense models alone would suggest.</p>
<p><strong>My Standing setup:</strong></p>
<ul>
<li><p>Default: Qwen3-30B-A3B-Q6_K (-ngl 999, 16K) for daily coding and review.</p>
</li>
<li><p>Bigger brain: Qwen3-Next-80B-A3B-Q3_K_S (CPU-only, small context) for deeper reasoning.</p>
</li>
<li><p>For fun / benchmarking**:** GPT-OSS-120B-Q3_K_S with the breakthrough command — a ~2–3 tok/sec novelty that proves how far the machine can be pushed.</p>
</li>
<li><p>Anything larger or denser**:** cloud / API.</p>
</li>
</ul>
<p>#Local LLM #ChatGPT #GPT-OSS-120B #Qwen3 #MoE #llama.cpp #VSCode</p>
]]></content:encoded></item></channel></rss>