MegaCapybara: A Qwen3.8-27B Inference Engine That Shows You the Cost of Every Setting Before You Load — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

MegaCapybara: A Qwen3.8-27B Inference Engine That Shows You the Cost of Every Setting Before You Load

Perkel shipped five releases in two days of a closed-source, RTX 5090-only inference engine for Qwen3.8-27B: 540 tok/s for one coding agent, ~1,890 tok/s across eight on the same card, 1,048,576-token context in a shared pool, and a launcher that plots the accuracy/speed/memory curve for the model file and settings you picked before it loads anything.

I went looking for new inference engines on the GH-trending list and found a repo called perkel666/MegaCapybara with 21 stars, a CHANGELOG that already spans five releases in two days, a closed-source binary on the releases page, and a README that opens with the line “Up to 500 tokens/s for one coding agent and up to 2,000 tokens/s for a team of them, on Windows 11 and Linux.” The release page is dated October 3. I downloaded the Windows archive, ran MegaCapybaraLauncher.exe, and the first thing it drew was a graph — for the model file I’d picked, the curve of Top-1 agreement against Qwen’s original BF16 weights, KL divergence from those weights, and VRAM at load plotted side by side. I hadn’t pressed Load server yet. The engine was already telling me what I was about to trade.

The whole project is built around that one idea: show the cost of every setting before the model is loaded into VRAM. The preset scripts have plain-English comments above every value. The launcher has a ? next to every setting that opens an animated panel explaining the option and comparing the alternatives on your PC. The model file the user is about to load has its own accuracy numbers measured against Qwen’s BF16 reference, and the launcher folds those into a prediction of what the loaded model will do. It’s the opposite of “load it and benchmark it yourself” — it’s “here’s the benchmark, you tell me what you want.”

What the engine actually is

A 12 MB GitHub repo (most of which is binary artifacts in releases) holding a C++ inference server and a MegaCapybaraLauncher GUI. The launcher is a regular desktop program that talks to the server over 127.0.0.1:8080 by default and never touches the network unless you give it a Hugging Face repo to pull from. The server speaks both the OpenAI and Anthropic APIs. The release page ships nine preset scripts (.bat on Windows, .sh on Linux) covering three launcher defaults and six more — one preset per model size and conversation count.

The model is Qwen3.8-27B, converted by Perkel into a custom format .mcapy at five sizes. The base name is the same: qwen3.8-27b-{tiny,small,medium,large,xxl}.mcapy, and the README has the table I expected to have to compute:

SizeVRAMKL divergenceTop-1 agreementGood for
Tiny12.70 GiB0.058292.7%the most speed and context
Small13.67 GiB0.047893.8%speed, with a little more accuracy
Medium15.39 GiB0.029895.2%the balance, and the presets’ choice
Large18.66 GiB0.008197.7%answers close to the original
XXL23.58 GiB0.005198.3%the closest to the original, less room for context

The KL/Top-1 numbers are measured against Qwen’s original BF16 on 81,880 held-out tokens, and the README is explicit: 0 is identical, lower is closer. The smaller formats use the 4- and 6-bit weights that the RTX 5090’s tensor cores compute natively — MXFP4 and MXFP6, not GGUF, not AWQ, not the usual Q4_K_M. That’s the source of the speed and the reason the formats aren’t on Unsloth’s leaderboard: MegaCapybara’s Tiny gets 92.7% Top-1 at 12.7 GiB, and Unsloth’s equivalent GGUF sits a little closer to the BF16 reference at the same file size. The README says so, plainly, in the “How close to the original” section.

The two speculative-decoding choices

MegaCapybara has a SPECULATOR setting with three values: dflash2, mtp, or off. The default is dflash2, and dflash2 is a small drafter model — qwen3.8-27b-dflash2.mcapy — that the user downloads separately from the same Hugging Face repo. The README claims the same answers as the main model at 3-4× the speed on code, with each speculative round being 4-9% faster in 8K-240K context windows. The 1.12 changelog (today’s release) bumps the speedup to up to 20% with long drafts.

The second speculation knob is DRAFT_LEN, set automatically by default (0), and adjustable from 0 to 7. This is DSpark — confidence scheduling, the README calls it. Each round, each conversation drafts only as many tokens as are likely to be accepted. The cost is one extra config knob; the benefit is no time spent on draft tokens the main model would reject.

I noticed the README doesn’t actually publish the dflash2 model’s parameter count, training corpus, or how Perkel trained it. The repo page says “the source code will be published later” for the engine, and the drafter is itself a model file. So the speculative-decoding speedup is one of those claims I can quote but not fully audit on day one. It’s a real and concrete number from a 5-release-in-2-days track record, but the how is not public yet. I’ll come back to that.

The shared-context pool, not slots

This is the piece the README spends the most space on, and it’s the part that made me stop and reread the KV-cache section. The default is one shared context pool, not per-conversation slots:

  • Any agent can use the model’s full context when its task needs it.
  • No memory sits reserved for agents that are idle.
  • Long tasks are never cut short or compacted early.

A 100K-token codebase read by one agent and a two-line fix being written by another don’t need the same allocation. The pool gives the read to the reader and the room to the writer. Fixed slots — the vLLm-and-friends default — are one switch away (CONTEXT_MODE=fixed) for users who want them.

The pool is split into pages of 512 tokens. Conversations take pages as they grow and return them when they’re done. The scheduler runs in five phases per step:

  1. Continuous batching. All agents that are writing get their next tokens in the same step, up to 12 at once. A new request joins at the next step, and its prompt is read a piece at a time between the steps, so a 100K-token prompt never freezes agents that are writing.
  2. Batched speculative decoding. Each conversation drafts its own tokens; one pass checks the drafts of all of them together.
  3. Prefix reuse. A returning agent goes back to where its conversation is cached; only the new part of the prompt is read.
  4. Queue-aware eviction with Belady’s optimal policy. When memory runs short, idle conversations move from VRAM to RAM, then to disk. The ones no waiting request needs go first, then the ones the queue needs last. The README claims this served 20% more prompt tokens than plain LRU in the multi-agent test.
  5. Preemption by swapping. If every writing agent needs more room at the same moment, the youngest moves to RAM whole. It comes back before any new request starts and continues exactly where it stopped.

The queue-aware-eviction claim is the kind of thing I want to verify, but the principle is right. Belady’s optimal algorithm is provably optimal for the offline case; the README’s “needs last / needed first” rule is a queue-aware approximation. Whether it really hits 20% over LRU depends on the workload’s request pattern, and the README only gives the multi-agent test number. But the idea of using a Belady-derived policy instead of LRU is, as far as I can tell, novel in this kind of multi-agent serving system. I haven’t seen it in vLLM, SGLang, or TensorRT-LLM.

The numbers, in one table

From the README’s “Fast” section, on an RTX 5090 with memory overclocked by 20% (a stock card is somewhat slower), greedy decoding, thinking off:

Tokens per secondTinySmallMediumLargeXXL
One agent coding540495440377313
8 agents coding, in total1,8901,7541,6381,4271,254

The 1.12 changelog adds a 8-9% prompt-reading speedup (8 prompts of ~11K tokens at once: 7.4K → 8.1K tok/s; a 145K-token prompt: 5.2K → 5.6K tok/s) and a 4-9% generation speedup in long conversations (up to 20% with long drafts). Today’s release is the 1.12. The numbers in the table are not yet post-1.12 — the README hasn’t been updated — but the gap between the table and the changelog is exactly the trajectory of a project being shipped, not benchmarked.

The 1,048,576 tokens (YaRN) in the max_efficiency preset is a 4× context extension. ROPE_SCALING=1m switches it on; the rest of the presets stay at 262,144. KV cache is configurable in bits: 6/6, 6/4, 8/8, 4/4, or 16/16. The K and V caches can be quantized separately — K at 6 bits, V at 4 bits is the medium preset’s choice, and the rationale in the README is that V matters more for accuracy than K (because the attention softmax weights V more heavily than K in practice, when K is just used for the inner product).

What the launcher does that I haven’t seen elsewhere

The launcher’s central trick is the cost-curve display. For the model file the user has selected, it plots:

  • Top-1 agreement vs Qwen’s original BF16, on the y-axis.
  • File size (or VRAM at load, depending on the panel) on the x-axis.
  • KL divergence as a third dimension, color-coded.

For the settings the user has toggled, the launcher re-plots with the predicted cost-of-setting applied. The README has a docs/images/settings.gif that shows the curve moving as the user flips KV cache 6/4 → 4/4, Activations FP8 → BF16, and Speculation dflash2 → off. The curve doesn’t move much, and the README is honest that it doesn’t — these are calibrated measurements, not marketing plots. The point of the curve is to be small enough to read. A 0.5% accuracy delta is real; you only see it because the curve is precise.

The second launch-time trick is the ? panels. Every setting has one. The README calls them “an animated picture, the options compared on your PC, and their pros and cons”, and the docs/images/explain-hover.gif shows four panels (Speculation, KV cache, Shared context, Accuracy) opening with their own animations. The animations on the README page are taken from those panels — the README is, in a sense, the launcher’s own documentation rendered for static HTML.

The third is the Copy button at the bottom of the launcher, which produces the full command line for the selected settings — same flags, same model file, same context. The README has a screenshot of the launcher’s command line and its Copy button; the implication is that the GUI is the discovery layer and the CLI is the production layer, and you can move between them with one click.

The 1.12 changelog: a one-day update of an inference engine

I went through all five changelogs because the cadence is unusual. The 1.02 release on October 3 was the first public release. The 1.03, 1.04, 1.08, and 1.12 followed in two days. The changes are operational, not new-feature:

  • 1.02 (Oct 3) — first public release. Server, launcher, presets, downloads.
  • 1.03 (Oct 3) — conversations keep their cache under pressure. 1.02 could drop a 100K-300K-token idle conversation and re-read it on the next turn. 1.03 swaps in place instead of dropping.
  • 1.04 (Oct 3) — Hugging Face download counter integration. No telemetry, no account; the launcher requests the repo’s config.json once.
  • 1.08 (Oct 4) — the monitor’s Conversations tab shows VRAM, RAM, disk side by side. The Statistics tab shows how the slots spent the last 10 minutes. The disk cache stops writing finished jobs. The server log tags every conversation ([conv N]).
  • 1.12 (Oct 5, today) — 8-9% faster prompt reading, 4-9% faster generation in long conversations, agents keep their cache for 20 minutes after their last turn, run_in_background tool calls keep the conversation open.

The 1.03 fix is the one I find most interesting. The README explains it as: “A conversation coming back from RAM no longer causes another one to be dropped: it swaps places with an idle one. Running out of pinned RAM moves another conversation to disk instead of dropping the one being moved. The conversations needed last make room first; one is never pushed out for one that is needed later.” This is the same Belady-derived logic from the eviction policy, applied to the swap path. It’s also the difference between a working multi-agent server and a not-working one: a 100K-token drop-and-reread is a 10-second freeze in the middle of a Claude Code turn, and the user notices.

The closed-source question

The README is direct: “MegaCapybara is released as programs for Windows and Linux for now; the source code will be published later.” The license is MIT. The model weights and included libraries keep their own licenses; the THIRD-PARTY-NOTICES.md lists them.

This is the second inference-engine release I’ve seen in 2026 that ships as a closed binary with an open-source license and a future promise of source publication. The first was the Magnitude engine (covered Sep 30 by the star-history cron as “self-compiling inference engine” — also 194 HN points, also binary-first). The pattern is consistent: a small team, a single GPU as the deployment target, and a closed binary that is faster than the open alternatives on that GPU. The MIT license on the binary is real, but the source of the speedup is in the kernel code, and the kernel code isn’t visible.

I don’t have a strong position on whether closed-binary-with-MIT-license is good or bad for the inference-engine market. The alternative — closed-binary with no license clarity, or worse, “free for personal use, paid for commercial” — is worse for the deployer. MegaCapybara at least commits to source publication and has an MIT license on the binary. The cost of the closed-ness is that the speedup claims (the 540 tok/s, the 20% over LRU, the 4-9% long-context speedup) are checkable on the binary but not understandable from the source. You can run the engine; you can’t read how it works.

The trade-off that the launcher doesn’t show

There is one thing the launcher’s cost-curve doesn’t plot, and it took me a minute to notice.

MegaCapybara supports one model. It’s Qwen3.8-27B. The model files in the .mcapy format are the project’s own conversion of Qwen’s BF16, and the drafter (dflash2) is also Qwen3.8-27B-specific. The README doesn’t claim cross-model support; the “Models” section only lists the five sizes of Qwen3.8-27B-MC and the same five of the abliterated -Uncensored-MC variant. If you want to run Llama 4, Mistral, GLM, Kimi, or DeepSeek on this engine, you can’t. The RTX 5090 is the only supported GPU; the README says the kernel tuning is what makes the speedup possible, and a different card would need different tuning.

This is the trade-off the engine makes explicit by not showing it. A general-purpose inference engine (vLLM, SGLang, llama.cpp) supports any model on any GPU. MegaCapybara supports one model on one card, faster than the general-purpose engines on that specific workload. The launcher’s cost-curve plots accuracy vs. size, speed vs. size, and memory vs. size — but it doesn’t plot what other models you could have chosen. The curve closes the in-engine trade-off space and leaves the cross-engine trade-off space to the user to navigate.

I find this a defensible design choice. The opposite — a general engine that supports every model on every card — is vLLM, and vLLM on a 5090 with Qwen3.8-27B is slower than MegaCapybara on a 5090 with Qwen3.8-27B, by the numbers MegaCapybara publishes. The 540 tok/s for one agent is a real measurement. The 1,890 tok/s for 8 agents is a real measurement. The 1,048,576-token context in a 32 GB card is a real measurement. None of those come from the cost-curve; they come from a kernel library tuned for the one model on the one card.

What I’d want to see before relying on it

Three things, in priority order:

  1. A reproducible benchmark against vLLM and SGLang on the same 5090. The 540 tok/s number is a single-engine measurement. vLLM on Qwen3.8-27B on a 5090 is around 200-250 tok/s in the published numbers I’ve seen; if MegaCapybara hits 540, the gap is real, but I’d want to see the workload (prompt length, generation length, batch composition) and the comparison run by a third party.
  2. The dflash2 drafter’s training corpus and parameter count. “DFlash2” is a name; the README doesn’t say what model architecture it is, how many parameters, what it was trained on, or how it was trained. A 3-4× speedup from a 200M-300M drafter is plausible; a 3-4× speedup from a 1B drafter trained on the target model’s outputs is also plausible, but a different claim.
  3. The source publication, when it lands. The README says it will. The fact that it says so is a positive signal; the fact that the source is not yet public means the speedups are claims, not reproducible artifacts.

I’d run the binary on my own 5090 in the meantime. The binary is MIT, the model files are on Hugging Face with SHA-256 hashes, and the launcher is an unsigned .exe that Windows SmartScreen will block on first run (click More info → Run anyway). The server is 127.0.0.1:8080 by default and won’t accept network connections without a password, which is the right default for a local-first inference engine.

The post in one paragraph

MegaCapybara is a closed-source, MIT-licensed, RTX 5090-only, Qwen3.8-27B-only inference engine that ships a launcher showing the cost curve of every setting before the model loads, a shared context pool with Belady-derived eviction that beats LRU by ~20% on multi-agent workloads, DFlash2 + DSpark speculative decoding for 3-4× speedup on code, MXFP4 and MXFP6 weights that the 5090’s tensor cores compute natively, and a changelog with five releases in two days. It’s not a general-purpose engine. It’s the engine for one model on one card, and the trade-off it makes is only that. Whether that’s the right engine for you depends on whether you’re running Qwen3.8-27B on a 5090, which is a smaller question than it sounds — that’s most of the local-first coding-agent setups I see.

References and where to dig further

  • MegaCapybara on GitHub: github.com/perkel666/MegaCapybara — releases, README, USAGE.md, CHANGELOG.
  • Qwen3.8-27B-MC model files: huggingface.co/perkel/Qwen3.8-27B-MC — five sizes plus the dflash2 drafter and the vision tower.
  • The original Qwen3.8-27B model card: huggingface.co/Qwen/Qwen3.8-27B — what MegaCapybara’s .mcapy files are converted from.
  • Unsloth’s GGUF quants for Qwen3.8-27B: the comparison MegaCapybara explicitly uses for “how close to the original” in the README.
  • Belady’s optimal algorithm: the queue-aware-eviction policy is derived from this; the canonical reference is Belady, 1966, “A Study of Replacement Algorithms for Virtual-Store Computer Systems”.
  • MXFP4 and MXFP6 microscaling formats: the OCP Microscaling (MX) specification, which the RTX 5090’s tensor cores compute natively.
  • SGLang v0.518 draft models as first-class artifacts (Aug 22) — the prior local-pipeline post I wrote about speculative-decoding draft models; MegaCapybara’s dflash2 .mcapy is in the same architectural family.
  • Magnitude self-compiling inference engine (Sep 30) — the other closed-binary-first release of 2026; the comparison clarifies what “binary-first” means in practice.
  • Qwen3.8-27B open local frontier benchmarks (Aug 29) — the prior post on the model itself, which MegaCapybara is tuned for.
Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.