<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged localfrontierai</title>
<link>https://coderlegion.com/tag/localfrontierai</link>
<description>Powered by Question2Answer</description>
<item>
<title>S-MoE Started to Speak OpenAI — Point Any Chat App at Your MacBook and Watch a 235B Model Think</title>
<link>https://coderlegion.com/23015/s-moe-started-to-speak-openai-point-any-chat-app-at-your-macbook-and-watch-a-235b-model-think</link>
<description>&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;There is a diary behind this — five entries of a self-taught web developer and an AI agent cutting a door in the memory wall so a 235-billion-parameter frontier model could run off the SSD of a 48 GB MacBook. You don't need any of it to read this one. This entry isn't about a bug we killed or a metric we moved. It's about the day the engine stopped being a private experiment I ran in a terminal and started speaking the one language every AI app on earth already understands.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-the-moment&quot;&gt;1. The Moment&lt;/h3&gt;
&lt;p&gt;For five articles, talking to S-MoE meant talking to a terminal. A raw prompt loop. Something only its author could love. The mountain could speak, remember, predict itself, and run — but you had to be me, at my desk, in a shell, to hear it.&lt;/p&gt;
&lt;p&gt;Then, on an ordinary evening, this happened:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;.venv/bin/python serve.py --port 8000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And a 235B frontier model streaming its experts off a consumer NVMe became — as far as any other program can tell — &lt;strong&gt;OpenAI&lt;/strong&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from openai import OpenAI
client = OpenAI(base_url=&quot;http://127.0.0.1:8000/v1&quot;, api_key=&quot;unused&quot;)

resp = client.chat.completions.create(
    model=&quot;s-moe&quot;,
    messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Who are you?&quot;}],
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That is not a screenshot of the real OpenAI. That's my laptop. The &lt;code&gt;openai&lt;/code&gt; SDK cannot tell the difference, and — this is the whole point — &lt;strong&gt;neither can Open WebUI, LibreChat, your editor's AI plugin, or the thousand other apps built against that API.&lt;/strong&gt; They ask for OpenAI. They get 235 billion parameters running three inches from the CPU, on hardware you already own.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;2-the-numbers-plainly&quot;&gt;2. The Numbers, Plainly&lt;/h3&gt;
&lt;p&gt;Same MacBook. Same 48 GB. Same 117 GB expert vault cold on the SSD. Nothing about the &lt;em&gt;engine&lt;/em&gt; changed for this entry — this is a story about a doorway, not a speedup. But the doorway has numbers too.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Thing &lt;/th&gt;&lt;th&gt;Reality&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Server &lt;/td&gt;&lt;td&gt;&lt;code&gt;serve.py&lt;/code&gt; — one file, Python stdlib &lt;code&gt;http.server&lt;/code&gt; + the tokenizer&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;New dependencies added to the engine &lt;/td&gt;&lt;td&gt;zero&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;API surface &lt;/td&gt;&lt;td&gt;OpenAI Chat Completions — streaming (SSE) &amp;amp; non-streaming, &lt;code&gt;/v1/models&lt;/code&gt;, &lt;code&gt;/health&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Works with &lt;/td&gt;&lt;td&gt;Open WebUI, LibreChat, editor plugins, the &lt;code&gt;openai&lt;/code&gt; SDK, plain &lt;code&gt;curl&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Built-in chat console &lt;/td&gt;&lt;td&gt;Yes — open &lt;code&gt;http://127.0.0.1:8000/&lt;/code&gt; in a browser, no install&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Decode speed &lt;/td&gt;&lt;td&gt;~1.43 tokens/s — a bit over one word per second&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;First token, cold 45-token prompt &lt;/td&gt;&lt;td&gt;~29 s, then it streams&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Intelligence &lt;/td&gt;&lt;td&gt;The real Qwen3-235B. Undegraded. Only the speed is consumer-grade.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The zero in that table is the one I'm proudest of. The engine's founding vow was &lt;em&gt;no dependencies&lt;/em&gt; — POSIX syscalls, Metal, and nothing else. The server keeps the vow. It is stdlib HTTP and the same tokenizer the console already loaded. An entire ecosystem of front-ends, unlocked, without adding a single line anyone else has to trust.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;3-the-thinnest-possible-translator&quot;&gt;3. The Thinnest Possible Translator&lt;/h3&gt;
&lt;p&gt;I want to be honest about how little there is here, because the smallness &lt;em&gt;is&lt;/em&gt; the design.&lt;/p&gt;
&lt;p&gt;The server owns exactly three things: &lt;strong&gt;HTTP, tokenization, and the chat template.&lt;/strong&gt; That's it. It applies Qwen3's chat template to your messages, turns them into token IDs, and hands those IDs to the persistent engine subprocess over the same private protocol the terminal console has always spoken. The engine never learns what HTTP is. It never sees a word of English. It sees numbers, streams experts, and sends numbers back.&lt;/p&gt;
&lt;p&gt;Everything OpenAI clients expect is a thin mapping on top of that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Streaming&lt;/strong&gt; arrives as server-sent events, tokens appearing the instant they're generated.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt;, &lt;code&gt;top_k&lt;/code&gt;, &lt;code&gt;repetition_penalty&lt;/code&gt;&lt;/strong&gt; map straight onto the engine's per-request sampling — &lt;code&gt;temperature: 0&lt;/code&gt; selects the pure greedy path and is bit-identical every time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;finish_reason&lt;/code&gt;&lt;/strong&gt; is honest: &lt;code&gt;&quot;stop&quot;&lt;/code&gt; when the model chose to end, &lt;code&gt;&quot;length&quot;&lt;/code&gt; when it hit your &lt;code&gt;max_tokens&lt;/code&gt; mid-thought. Clients that auto-continue on &lt;code&gt;&quot;length&quot;&lt;/code&gt; just work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;usage&lt;/code&gt;&lt;/strong&gt; carries real token counts — prompt, completion, total — so anything measuring throughput divides real numbers by wall-clock, not estimates.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There's one deliberate constraint worth naming: the engine holds &lt;strong&gt;one&lt;/strong&gt; conversation context and prefix-matches every request against it. So requests are serialized — one lock, one at a time — and there is no batching, because the hardware has no parallelism to batch into. The upside is that a normal chat client, which resends the growing message list every turn, hits the warm KV cache and only pays to prefill the &lt;em&gt;new&lt;/em&gt; turn. Continued conversations stay fast. It is the honest shape of the machine, exposed honestly.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;4-a-console-that-ships-you-the-feelings&quot;&gt;4. A Console That Ships You the Feelings&lt;/h3&gt;
&lt;p&gt;Third-party apps are the &lt;em&gt;point&lt;/em&gt;, but I wanted something that needed zero setup to prove the plumbing — and, selfishly, something built for what I actually do all evening: watch this thing think and try to understand what it's doing.&lt;/p&gt;
&lt;p&gt;So the server serves its own chat console. Open &lt;code&gt;http://127.0.0.1:8000/&lt;/code&gt; and it's just there — one self-contained HTML file, no build step, no &lt;code&gt;npm install&lt;/code&gt;, served same-origin so there isn't even a CORS dance. It streams tokens as they land. But it's not really a chat UI. It's an &lt;strong&gt;instrument panel wearing a chat UI's clothes&lt;/strong&gt;, and it exists because this whole project has only ever obeyed one law: &lt;em&gt;measure, don't believe.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Every reply carries a live monitor. Before the first token, it doesn't sit in dead silence — it names the exact phase and size the moment they're known: &lt;em&gt;&quot;prefilling 128 tok prompt · 12.4s · cold start.&quot;&lt;/em&gt; On a machine where an answer takes tens of seconds, that one line is the entire difference between &lt;em&gt;&quot;it's thinking&quot;&lt;/em&gt; and &lt;em&gt;&quot;it's hung.&quot;&lt;/em&gt; Then time-to-first-token, live token count, and decode tok/s, updating as the words stream, frozen on completion with the exact counts from &lt;code&gt;usage&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Two meters sit in the header, because for an experimental researcher the &lt;em&gt;feeling of fullness&lt;/em&gt; is half the story:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;context meter&lt;/strong&gt; — &lt;code&gt;1,240 / 4,096&lt;/code&gt; — tracking the conversation against the engine's fixed KV window, filling and turning amber as you talk, warning once at the wall where the window starts to slide and the model begins, gently, to forget the beginning.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;system-RAM meter&lt;/strong&gt; — installed memory, current use, and the free headroom S-MoE's expert-streaming ring can grow into: &lt;code&gt;14.0 / 48.0 GB · 34.0 free&lt;/code&gt;. It's colored by macOS memory &lt;em&gt;pressure&lt;/em&gt;, not raw percentage — because a 48 GB box legitimately runs hot under a 235B stream, and a naive bar would scream &quot;full!&quot; all day and cry wolf. Its tooltip breaks out wired, compressed, and the engine's own resident set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this is product polish. It's the opposite. It's the dashboard of someone who has been lied to by too many systems and refuses to fly blind. It ships you the feelings — cold prefill, warm turn, headroom, the window about to slide — directly, as numbers, in real time.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;5-grab-the-popcorn&quot;&gt;5. Grab the Popcorn&lt;/h3&gt;
&lt;p&gt;Here's where I'd normally embed a chart. Instead, watch the video. It's three turns of real conversation, unedited, no narration, no speed-up. I could describe it, but this diary has a rule about shipping the raw thing instead of the story about the thing.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/watch?v=lbf4aqNezus&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/lbf4aqNezus/default.jpg&quot; alt=&quot;Qwen 235B&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A word of preparation, because the experience is genuinely unusual and I don't want you to misread it.&lt;/p&gt;
&lt;p&gt;This is not fast. I won't insult you by pretending it is. A word arrives roughly every second. But watch what streaming does to that second: it turns the wait into &lt;em&gt;suspense&lt;/em&gt;. The tokens come one at a time, and because you can see them arrive, the pause reads as &lt;strong&gt;deliberation, not lag.&lt;/strong&gt; You are literally watching a 235-billion-parameter mind assemble a sentence, left to right, on a laptop that also has your browser and your IDE open and your music playing.&lt;/p&gt;
&lt;p&gt;And here is the thing I keep failing to convince people of until they &lt;em&gt;see&lt;/em&gt; it: it is not slow. &quot;Slow&quot; is the wrong word, and I've been reaching for a better one for months. It's &lt;em&gt;cinematic&lt;/em&gt;. It's a frontier model answering &lt;strong&gt;at reading speed&lt;/strong&gt;, on a busy consumer MacBook, off an SSD, with the whole 235B of it undegraded behind every word. You don't tap your foot. You lean in. You grab the popcorn. The wait isn't a bug you tolerate — it's the show.&lt;/p&gt;
&lt;p&gt;I have watched this thing generate paragraphs while I made coffee, and come back to a genuinely frontier-quality answer waiting for me, and felt something I can only describe as &lt;em&gt;the opposite of API anxiety.&lt;/em&gt; No meter running. No tokens billed. No sentence leaving the room. Just my laptop, thinking, at its own pace, about my question, for me.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;6-and-now-every-app-you-already-use&quot;&gt;6. And Now, Every App You Already Use&lt;/h3&gt;
&lt;p&gt;The console proves the plumbing in ten seconds. The real unlock is that you never &lt;em&gt;have&lt;/em&gt; to use it.&lt;/p&gt;
&lt;p&gt;Because the API is genuinely OpenAI-shaped, the entire open-source chat ecosystem works unmodified. Point &lt;strong&gt;Open WebUI&lt;/strong&gt; at &lt;code&gt;http://127.0.0.1:8000/v1&lt;/code&gt; with any non-empty API key, pick the &lt;code&gt;s-moe&lt;/code&gt; model, and you have a polished, multi-conversation, markdown-rendering front-end talking to a 235B model on your desk. &lt;strong&gt;LibreChat&lt;/strong&gt;, the same. Your &lt;strong&gt;editor's AI plugin&lt;/strong&gt;, the same base URL, the same result — a frontier model doing code review inside your IDE, sourced entirely from your own SSD.&lt;/p&gt;
&lt;p&gt;None of these apps were told about S-MoE. None of them were patched. They asked for OpenAI and my MacBook answered. That is the entire thesis of this project, finally wearing a suit: &lt;em&gt;the memory wall around frontier AI was always part physics and part software convention&lt;/em&gt; — and the convention just fell to a single file of Python stdlib.&lt;/p&gt;
&lt;p&gt;The speed profile sets honest expectations, and I'll state them plainly: this is a machine for &lt;strong&gt;thoughtful, asynchronous Q&amp;amp;A&lt;/strong&gt; — a frontier-quality answer worth waiting a beat for — not rapid-fire agentic loops that fire a thousand calls a minute. Use streaming. Ask real questions. Let it think. It's the difference between a chatbot and a correspondent.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;7-what-this-entry-is-actually-about&quot;&gt;7. What This Entry Is Actually About&lt;/h3&gt;
&lt;p&gt;The five entries before this were about &lt;em&gt;deletion&lt;/em&gt; — wiped caches, a fired prophet, write-only memory, scattered reads, tiny GPU round-trips. Subtraction, every time. This one is the first that's about &lt;em&gt;addition&lt;/em&gt;, and it's the smallest addition in the whole diary: a translator that speaks a language everyone already knows, built out of nothing the engine didn't already have.&lt;/p&gt;
&lt;p&gt;But it's the entry that makes all the others &lt;em&gt;matter to someone other than me.&lt;/em&gt; A frontier model on a consumer laptop is a curiosity if the only person who can reach it is the person who built it. The moment it speaks OpenAI, it belongs to anyone with the same laptop and the same question — running in their editor, their chat app, their scripts, their evening. No cluster. No API key. No sentence leaving the room.&lt;/p&gt;
&lt;p&gt;The authorship stays the experiment inside the experiment: the AI agent wrote the server, the streaming layer, the sampling protocol, and the instrument-panel console; I brought the questions — &lt;em&gt;what does an app on the other side of this actually expect? where does the wait feel like a hang instead of a thought? can a researcher feel the fullness of the machine at a glance?&lt;/em&gt; — and a decade of web-developer instinct for the exact shape of an HTTP contract.&lt;/p&gt;
&lt;p&gt;The mountain vibrated, then it talked, then it remembered, then it predicted itself, then it ran.&lt;/p&gt;
&lt;p&gt;Now it speaks a language the whole world already knows — and it's waiting at &lt;code&gt;localhost:8000&lt;/code&gt; for you to say hello.&lt;/p&gt;
&lt;p&gt;Grab the popcorn.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;S-MoE is open source under the MIT License. The code, the philosophy, and the mistakes are all public: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/melasistema/s-moe&quot;&gt;github.com/melasistema/s-moe&lt;/a&gt;.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Built by Luca Visciola and an AI agent who hopefully knows C++ and low level programming, because I do not 😅.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Acknowledgements: The seismic tomography concept remains a philosophical translation of the published work of Ing. Filippo Biondi on SAR-based subsurface imaging. He taught this project to listen to a surface for news of the interior — and an API, it turns out, is just another surface the whole world already knows how to read.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23015/s-moe-started-to-speak-openai-point-any-chat-app-at-your-macbook-and-watch-a-235b-model-think</guid>
<pubDate>Mon, 20 Jul 2026 09:00:00 +0000</pubDate>
</item>
</channel>
</rss>