> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PolyStrata local MoE inference engine

> Learn how PolyStrata runs 35B–125B MoE models on 8–12 GB NVIDIA GPUs, how it compares with llama.cpp and KTransformers, and how to reproduce benchmarks.

**PolyStrata** is an open-source mixture-of-experts (MoE) local inference engine maintained by SimplexAI under the MIT license. It fits large MoE models into consumer GPUs (graphics processing units) by keeping the most active experts in VRAM and computing cold experts in parallel from system RAM.

Inside Linger's automatic desktop setup, PolyStrata is the default engine for 8 GiB and 12 GiB NVIDIA GPU plans on Windows and Linux (running Qwen3.6-35B-A3B). Apple silicon Mac plans in Linger use `llama.cpp` with Metal, and 16 GiB or larger NVIDIA default plans also use `llama.cpp` with CUDA. PolyStrata is developed as a separate project built on [Strata](https://github.com/Niko1221/Strata) and parts of `llama.cpp` / `ggml`, with source code at [github.com/simplexai-labs/PolyStrata](https://github.com/simplexai-labs/PolyStrata).

## How does it fit a large model into limited memory?

An MoE model holds many sub-networks called experts, and each token uses only a few of them. Qwen3.8-Flash-Next, for example, uses 10 of its 24,576 experts for each token. PolyStrata keeps the most-used experts next to the compute, and the rest wait one level further away.

![PolyStrata keeps hot MoE experts on CUDA or Metal while streaming cold weights from RAM or SSD with cache reuse.](https://mintcdn.com/lev9-doc/ZjacBzP5HuzUAy1j/images/feature-local-engine.jpg?fit=max\&auto=format\&n=ZjacBzP5HuzUAy1j\&q=85\&s=42b8c57b084979a2bce3b4b79443a323)

Each token needs only a few experts, so the most-used ones stay next to the compute.

* **On an NVIDIA PC (Windows or Linux),** GPU VRAM holds attention layers, mixers, routers, shared experts, the KV cache, and an adaptive cache of the most-used routed experts. System RAM holds the rest of the experts, and the CPU computes cache misses in parallel with the GPU.
* **On an Apple silicon Mac,** Linger's automatic local-model plans run `llama.cpp` on Metal in unified memory rather than PolyStrata. Standalone PolyStrata also provides a source-built Metal backend (documented in [PolyStrata's Mac guide](https://github.com/simplexai-labs/PolyStrata/blob/main/docs/MAC.md)) that streams from SSD when unified memory runs short.

Two more methods make replies faster. Multi-token prediction (MTP) drafts up to three tokens that one full pass checks. The conversation cache keeps earlier turns, so a follow-up reads only what is new.

With these methods, Qwen3.8-Flash-Next runs on a 12 GB NVIDIA card paired with 64 GB of system RAM. Its 3-bit model file is about 55 GB, and the model has 125B parameters. Keeping the whole model in GPU memory without expert offloading requires a server GPU such as an 80 GB H100.

## How fast is it?

On an RTX 3060 with 12 GB of VRAM and 64 GB of RAM, Qwen3.8-Flash-Next writes 45.5 tokens per second. On an RTX 5090 with 32 GB, it writes 179 tokens per second. A token is about three quarters of a word, and 60 tokens per second is faster than you can read.

On a Windows laptop with an 8 GB RTX 4070 Laptop GPU, Core i7-14700HX, and 32 GB of RAM, PolyStrata runs 35B-class MoE models (`Qwen3.6-35B-A3B`, `Flint 40B-A2.5B`, `Ornith 1.5`, `Tiel Coder 35B-A3B`) at 60 to 100 tokens per second in short chats.

A token that needs an expert from RAM or the SSD takes longer than a token that stays on the GPU. Speed therefore depends on how many experts fit in VRAM, your system RAM bandwidth, and prompt length.

In PolyStrata's published head-to-head runs against `llama.cpp` on the same GGUF files and prompts (`bench/bench_vs_llama.py`, 36,864 context, three interleaved rounds):

* **8 GB RTX 4070 Laptop + 32 GB RAM** (`Qwen3.6-35B-A3B UD-Q3_K_M`, against `llama.cpp` b11540 tuned with `-ngl 99 --n-cpu-moe 30` and `--fit on`): PolyStrata read prompts at 1,414 to 1,601 tokens per second versus 464 to 517 (2.7x to 3.2x faster; 2.7x to 3.5x across Qwen3.6 and Tiel Coder) and wrote at 68.1 to 80.5 tokens per second versus 37.6 to 46.0 (1.5x to 1.8x faster).
* **12 GB RTX 3060 + 46 GB RAM** (Linux, Core Ultra 7 265, `Qwen3.8-Flash-Next IQ3_XXS`, against `llama.cpp` v0.6.0 tuned with `-ngl 99 -ncmoe 44`): Strata read prompts at 910 to 1,050 tokens per second versus 294 to 338 (2.7x to 3.1x faster) and wrote at 38.8 to 41.9 tokens per second versus 8.7 to 9.8 (4.3x to 4.7x faster).

See [Benchmarks](/docs/hardware/benchmarks.md) for per-model numbers, the [PolyStrata results](https://github.com/simplexai-labs/PolyStrata#how-fast-is-it) for full measurement logs, and the [Linger local AI overview](https://heylinger.com/#local-ai) for supported hardware tiers.

## How does PolyStrata compare with llama.cpp and KTransformers?

All three engines can split a mixture-of-experts model across GPU VRAM and system RAM, but they differ in expert placement, model coverage, and target hardware.

| Attribute | PolyStrata | `llama.cpp` (`--n-cpu-moe` / `-ot exps=CPU`) | KTransformers |
| - | - | - | - |
| Expert placement | Adaptive VRAM cache of hot experts while CPU computes cold experts in parallel from pinned RAM. | Static layer-count offload (`--n-cpu-moe N`, `--fit on`) or regex tensor override (`-ot exps=CPU`). | Hybrid CPU and GPU offload with custom CPU/GPU kernels and asynchronous expert scheduling. |
| Model coverage | 14 supported MoE models (including Qwen3.8-Flash-Next, Qwen3.6-35B-A3B, Inkling 2 Mini, GLM 5.3 Flash, DeepSeek V4 Flash, Gemma 4 26B-A4B). | Broad GGUF catalog covering dense, MoE, and vision models across most architectures. | Selected large MoE families (such as DeepSeek and Qwen MoE) configured through Python and C++ rules. |
| Target hardware | Consumer 8–32 GB NVIDIA GPUs on Windows and Linux with 32–64 GB+ RAM; experimental AMD ROCm/HIP and standalone Mac Metal builds. | Any supported GPU or CPU, including Apple silicon Macs (Metal), NVIDIA CUDA, AMD Vulkan/ROCm, and CPU-only hosts. | High-RAM Linux workstations and servers, especially Intel Xeon CPUs with AMX paired with NVIDIA GPUs. |
| Built-in speedups | Adaptive expert caching, native MTP drafting, prompt-lookup drafting, and multi-turn conversation caching. | Flash Attention, quantized KV caches (`q8_0`), optional MTP (`--spec-type draft-mtp`), and wide backend tuning. | Custom CPU matrix kernels (AMX/AVX), Marlin GPU kernels, and CPU/GPU pipeline overlap. |
| Measured head-to-head data | Published in [PolyStrata benchmark results](https://github.com/simplexai-labs/PolyStrata/tree/main/docs/bench-results): 1.5x–1.8x faster decode on 8 GB RTX 4070 Laptop and 4.3x–4.7x faster decode on 12 GB RTX 3060 vs `llama.cpp`. | Baseline in the PolyStrata benchmark reports; no KTransformers comparison is published in the PolyStrata repository. | No head-to-head benchmark against PolyStrata has been measured in this documentation; measure on your own hardware before deciding. |
| Role in Linger | Automatic default on 8 GiB and 12 GiB NVIDIA PCs when enough system RAM is available. | Automatic default on Apple silicon Macs (Metal), 16 GiB+ NVIDIA PCs (CUDA), and low-RAM Windows fallback. | Not bundled in Linger; can be connected as an OpenAI-compatible upstream API behind the Pi Runtime. |

Choose the engine that matches your hardware and model catalog:

* **Use PolyStrata** when you run a supported MoE model on an 8 to 32 GB NVIDIA PC with 32 to 64 GB of RAM and want faster prefill and decode without hand-tuning `--n-cpu-moe` or `-ot` flags.
* **Use `llama.cpp`** when you run on an Apple silicon Mac (Metal), need a dense model or an architecture outside PolyStrata's 14 models, or want one general-purpose GGUF runtime.
* **Consider KTransformers** when you run very large MoE models on a high-RAM Linux workstation or server with Intel AMX CPU extensions.

If you are comparing full local agent workspaces with standalone model runners and chat UIs, see [Linger vs Ollama and LM Studio](https://heylinger.com/vs/ollama-lm-studio), [Linger vs Open WebUI](https://heylinger.com/vs/open-webui), [Linger vs OpenClaw](https://heylinger.com/vs/openclaw), and all [Linger comparisons](https://heylinger.com/vs).

## How can I reproduce the PolyStrata benchmarks?

Every benchmark script and raw comparison log lives in the [PolyStrata repository](https://github.com/simplexai-labs/PolyStrata) so you can verify speeds on your own PC.

**1. Install PolyStrata and a model**

Clone or download [github.com/simplexai-labs/PolyStrata](https://github.com/simplexai-labs/PolyStrata) and run `./setup.sh` on Linux or `START-HERE.bat` on Windows to install a supported model.

**2. Run the quick hardware suite**

Run `tools/bench.sh` on Linux or `tools/BENCH.bat` on Windows. The suite takes about 5 to 10 minutes and measures short chat, 4K and 16K prompts, and an agent-style session.

**3. Measure a 24K prompt directly**

```bash theme={null}
python polystrata.py benchmark --model qwen36-ud-q3_k_m --prompt-tokens 24000
```

Replace `qwen36-ud-q3_k_m` with any installed model name printed by `python polystrata.py --list-models`.

**4. Compare side by side with llama.cpp**

```bash theme={null}
.venv/bin/python bench/bench_vs_llama.py run --machine machine.json --out runs/compare --rounds 3
.venv/bin/python bench/bench_vs_llama.py summary --out runs/compare
```

Follow [Comparing with llama.cpp](https://github.com/simplexai-labs/PolyStrata/blob/main/docs/COMMUNITY_BENCHMARKS.md#comparing-with-llamacpp) for the `machine.json` template and prompt files, and inspect published logs in [docs/bench-results](https://github.com/simplexai-labs/PolyStrata/tree/main/docs/bench-results).

## Can a 12 GB consumer GPU run a 125B MoE model?

Yes, when paired with enough system RAM and SSD space. In PolyStrata's measurements, Qwen3.8-Flash-Next (125B parameters, about 55 GB at 3-bit) runs at 45.5 tokens per second on an RTX 3060 12 GB with 64 GB of RAM, and `IQ2_XS` reaches 79 tokens per second decode (2,090 tokens per second on a 32K prompt) on an RTX 5070 12 GB with 64 GB of RAM.

Plan for 64 GB of system RAM to run the full 2-bit and 3-bit sizes (`IQ2_XS`, `IQ3_XXS`, `IQ3_S`) and about 80 GB of free SSD space; 32 GB of RAM fits only the pruned `Coder` variant. Inside Linger's automatic desktop setup, a 12 GiB NVIDIA card defaults to `Qwen3.6-35B-A3B` (`UD-Q4_K_M`, 64K context) because it fits comfortably in 32 GiB of RAM. Running Qwen3.8-Flash-Next on a 12 GB card requires 64 GB of RAM and manual or standalone PolyStrata setup.

## What do an 8 GB laptop GPU and an Apple silicon Mac need?

The 60 to 100 tokens per second laptop benchmark requires an 8 GB discrete NVIDIA laptop GPU (tested on an RTX 4070 Laptop 8 GB with Core i7-14700HX) plus 32 GB of system RAM, not a laptop with 8 GB of total RAM. PolyStrata also requires an NVIDIA graphics driver that supports CUDA 13.0 (driver branch 580 or newer) on Windows and Linux; see [Update your NVIDIA driver](/docs/install/nvidia-driver.md).

On Apple silicon Macs, Linger's automatic local-model setup uses `llama.cpp` with Metal and needs at least 16 GiB of unified memory (`Spark-X2.6-4B` at 16 GiB, `Inkling 2 Mini` from 24 GiB, and `Qwen3.8-Flash-Next` from 96 GiB). An 8 GiB Mac has no automatic local-model plan. Check [Hardware compatibility](/docs/hardware/compatibility.md) for exact available-memory checks.

## Does PolyStrata change the quality score?

PolyStrata does not change a model's quality score, but it changes which model your machine can run. The SimplexAI score follows the model and its quantization, not the engine.

The gain is indirect. Without PolyStrata, a 24 GB card holds a 27B model, which scores 54.0. With PolyStrata and 64 GB of RAM, the same card runs Qwen3.8-Flash-Next, which scores 59.3.

Speed and score are separate numbers. The speeds on this page are measurements from the PolyStrata project. The scores come from third-party test results, adjusted for quantization. See [how the score is built](/docs/hardware/benchmarks.md#where-does-the-simplexai-score-come-from).

PolyStrata is developed and maintained by the [SimplexAI](https://heylinger.com/about) Engineering Team at [github.com/simplexai-labs/PolyStrata](https://github.com/simplexai-labs/PolyStrata).

## Keep learning

> [card] [Local models](/docs/models/local-inference.md)
>
> See which local model Linger plans for your hardware.

> [card] [Benchmarks](/docs/hardware/benchmarks.md)
>
> Compare speed and quality on real hardware.

> [card] [Hardware compatibility](/docs/hardware/compatibility.md)
>
> Check VRAM, system RAM, and Apple silicon memory requirements.

> [card] [Compare Linger](https://heylinger.com/vs)
>
> See how Linger compares with Ollama, LM Studio, OpenClaw, and Open WebUI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.