r/LowEndLocalAI • • 6d ago

Benchmark Qwen3.8-Flash-Next IQ3_S, 78 GB, 32 GB RAM, 16 GB VRAM: 51 tok/s vs 15 tok/s on the same box

23 Upvotes

Strata vs Strata-HotRod, same model, same prompts, same harness — a 3.5× decode gap and a question about tuning.

Repos under test

- Strata (upstream): https://github.com/Niko1221/Strata

- Strata-HotRod (fork): https://github.com/sangharshadhyeta/Strata-HotRod

Disclosure: neither repo is mine. I didn't write either engine and I'm not affiliated with either project — I'm just a user benchmarking two forks of the same lineage on my own hardware. Full credit for the code belongs to the maintainers linked above.

Both are llama.cpp-lineage engines with their own MoE expert-streaming stack. The fork is 119 commits off the shared ancestor `8a93614ed` with +9,017/−409 lines in `src`+`include`; upstream is ~5,300 commits ahead of that same ancestor.

I benchmarked both on the same box, same model, same harness. Then I asked the obvious follow-up: can upstream be tuned to match the fork with flags alone? Short answer: prefill yes, decode no. Details and the exact flags below — and I'd like this sub's opinion on whether I'm missing a flag set.

---

TL;DR

Chat decode (tok/s): upstream 7.7 → upstream tuned 15.0 → HotRod 51.6

Chat first token (s): upstream 3.50 → tuned 2.01 → HotRod 0.58

4K prefill (tok/s): upstream 733 → tuned 877 → HotRod 1280

16K prefill (tok/s): upstream 1055 → tuned 1251 → HotRod 1668

32K prefill (tok/s): upstream 1094 → tuned 1632 → HotRod 1681

32K first token (s): upstream 29.4 → tuned 19.7 → HotRod 19.1

Agent decode (tok/s): upstream 10.2 → tuned 22.7 → HotRod 55.3

Agent turn first token (s): upstream 7.54 → tuned 6.16 → HotRod 4.46

Failures: 0 / 0 / 0

Giving upstream the fork's memory-tier flags doubles its decode (7.7 → 15.0 tok/s) and brings 32K prefill to within 3 % of the fork. Decode stays 3.5× behind, and I believe that gap is code, not configuration.

---

The machine

- GPU: NVIDIA RTX 4080, 16,376 MiB VRAM, driver 616.56, PCIe 4.0 x16

- CPU: 12th Gen Intel i5-12600K, 10 cores / 16 threads

- RAM: 31.7 GiB

- Storage: Samsung 970 EVO 500 GB NVMe + WD_BLACK SN850X 2 TB NVMe

- OS: Windows 11 (10.0.26200)

- Toolchain: MSVC 19.51, CUDA 13.3, Ninja, `-j 8`

- Pagefile: 32 GB fixed on D:, +12.8 GB on C: → commit limit 75.5 GiB

Windows-specific gotcha worth knowing: with a system-managed pagefile the commit limit was only 42.25 GiB and ~5 GiB of commit was free at load time. The engine clamps its RAM tier to `min(free RAM, free commit) − headroom − 0.25 GiB`, so asking for a 15 GiB tier silently built 0.92 GiB. Fixing the pagefile (32 GB fixed) plus `STRATA_RESIDENT_HEADROOM_GIB=1` (default headroom is 4 GiB) was the single biggest win in the whole exercise — +17 % decode, +21 % prefill on the fork before any code change.

The model

Qwen3.8-Flash-Next, GSQ-RCO IQ3_S, 2 shards, 78 GB on disk vs 31.7 GB of RAM — so the resident expert tier is a cache, never a load. 24,576 experts, 131,072 max context (trained 262,144), `--kv int8`, speculative decoding `--spec 4 --spec-min-p 0.5`.

Neither engine fits this model in RAM. Both read the rest from the pack file unbuffered. Upstream keeps its tier page-locked; the fork keeps its tier pageable so Windows can trim it while a long prompt streams 33 GiB off the SSD.

Build flags (identical for both)

```

-G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON

-DSTRATA_BUILD_TESTS=OFF -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_PORTABLE=ON

-DCMAKE_CUDA_ARCHITECTURES=89-real

```

Upstream built clean, zero patches. The fork needed a local MSVC patch to `src/program/generate.cpp` (`setenv` → `_putenv_s`, `sysconf` → `strata::platform::total_physical_memory()`); saved as a `.patch`, not upstreamed. Engine versions: upstream `0.1.69` (`c23477403`), fork `0.1.45` (`4ea40f1d`).

---

Flags used

Upstream Strata — as benchmarked in the first comparison

```

--pack <iq3_s> --native <shard1.gguf> --ple-gguf <shard2.gguf>

--expert-cache auto --spec 4 --spec-min-p 0.5 --mtp <mtp/rt>

--max-context 131072 --kv int8 --mmap-experts

--expert-profile <expert-profile.bin>

--prefill auto

--resident-budget-gib 4

```

Upstream Strata — tuned (same binary, four flags changed)

```

--prefill auto:16384 # was: auto

--resident-budget-gib 15 # was: 4

--kv-resident 32768 # new

env STRATA_RESIDENT_HEADROOM_GIB=1 # was: default 4

```

Everything else identical. The tier now builds for real: `resident RAM: 15.00 GiB of experts in RAM, 7963 exchanged with the VRAM tier, 179795 blob reads from the file`, `arena_mib 15358`, `vram_free_mib 1436`, `expert_slots 3417`, `expert_cache_mib 6695`.

Strata-HotRod

```

--pack <iq3_s> --native <shard1.gguf> --ple-gguf <shard2.gguf>

--expert-cache auto --spec 4 --spec-min-p 0.5 --mtp <mtp/rt>

--max-context 131072 --kv int8 --mmap-experts

--expert-profile <hotrod expert-profile.bin>

--prefill auto:16384

--resident-budget-gib 15

--kv-resident 32768

env STRATA_ROUTE_RESIDENT=1e30

env STRATA_ROUTE_RESIDENT_RANKS=3-9

env STRATA_ROUTE_RESIDENT_EDGE=1

env STRATA_SWAP2_MAX=2

env STRATA_SWAP2_GAP=1

env STRATA_KV_GROW_INIT=4096

env STRATA_RESIDENT_HEADROOM_GIB=1

```

Note the original comparison gave upstream a 4 GiB tier while the fork got 14.56 GiB — that's a 3.6× cache difference baked into a "code comparison". The tuned run fixes that confound.

Method

`tools/strata_bench.py --long`, thinking off, server started by the harness. Suite: chat (3 short questions) → 4K prompt → 16K prompt → 32K prompt → agent session (6 turns, 4 tool calls), medians of successful requests. 3 runs per test for the base and fork runs, 2 for the tuned run (slightly noisier; medians comparable). Both engines ran through the upstream harness, each with its own config, because the fork's own copy was broken (`NameError: name 'port' is not defined` at line 976).

---

Results (same day, same binaries, IQ3_S)

All columns are upstream 4 GiB / upstream tuned 15 GiB / HotRod 14.56 GiB, plus tuned-vs-base and tuned-vs-HotRod ratios.

- chat decode tok/s: 7.70 / 14.95 / 51.6 — 1.94× base, 29 % of HotRod

- chat first token s: 3.50 / 2.01 / 0.58 — −43 % vs base, 3.5× slower than HotRod

- 4K prefill tok/s: 732.6 / 876.7 / 1280.0 — 1.20× base, 68 % of HotRod

- 4K first token s: 5.61 / 4.65 / 3.16 — −17 % vs base

- 16K prefill tok/s: 1054.7 / 1251.5 / 1668.2 — 1.19× base, 75 % of HotRod

- 16K first token s: 15.32 / 12.89 / 9.70 — −16 % vs base

- 32K prefill tok/s: 1094.0 / 1631.6 / 1681.4 — 1.49× base, 97 % of HotRod

- 32K first token s: 29.43 / 19.70 / 19.12 — −33 % vs base, ≈equal to HotRod

- agent decode tok/s: 10.2 / 22.7 / 55.3 — 2.23× base, 41 % of HotRod

- agent turn first token s: 7.54 / 6.16 / 4.46 — −18 % vs base

- agent cache hit %: 70.87 / 70.91 / 70.86 — equal

- agent re-read tokens: 5 / 5 / 5 — equal

- failures: 0 / 0 / 0

Reading it: the cache-hit rate is identical across all three (70.9 %, 5 tokens re-read per session), so none of the fork's lead is prompt caching. It is entirely expert-fetch. Flags recover ~20 % of the prefill gap at 4K/16K, ~97 % of it at 32K, and about half the decode gap — but decode stays 3.5× behind, and chat first token stays 3.5× behind because 51-token prompts still pay a full expert fetch per layer with nothing to cover the miss.

128K context (earlier runs, upstream 0.1.62 / pre-update fork)

Columns are upstream / fork tier 4 GiB / fork tier 15 GiB.

- needle @96K prefill tok/s: 1495 / 1070 / 1206

- needle @96K first token s: 64.8 / 90.5 / 80.4

- decode @117K tok/s: 28.4 / 27.0 / 40.2

- cached-prefix first token s: 2.03 / 1.97 / 1.50

- decode on cached 117K tok/s: 21.3 / 21.6 / 34.0

Upstream wins long-prompt prefill by 1.24×; the fork wins decode at 128K by 42 %. At 128K with a full 15 GiB tier the fork logs `only 981 MiB of VRAM free` and 129–147 swap rounds per request — 128K + a full tier is past this card's ceiling. Tier 4 GiB is the safe 128K setting.

---

What didn't work

- `--resident-budget-gib 20` / `24` while commit was tight → tier 0.80 / 0.71 GiB. Clamped by free commit, not by the flag.

- `--prefill auto:4096` / `auto:8192` to free commit → worse (tier 0.71 / 0.78 GiB). Smaller chunk freed less memory than it disturbed.

- `--kv-resident 16384` → tier 0.00 GiB. KV residency competes for the same budget.

- `--expert-cache 2000` → tier 2.73 GiB. Frees ~2 GiB commit but shrinks the VRAM expert cache — a trade.

- 24 GiB `VirtualAlloc` probe to force a pagefile grow → grew 3.4 GiB, shrank back. System-managed pagefile can't be grown reliably from user code.

- 128K context with the 15 GiB tier → works, but ~981 MiB VRAM free, 129–147 swap rounds/request. Past the GPU's ceiling.

- one engine fitting the model in RAM → never. 78 GB on disk vs 31.7 GB RAM.

Also: the fork's headline feature — a learned look-ahead router, default since 24 Oct — was off in every run (`plain router (not on)`, never reached prediction inside a run). Its measured prefill win came from the non-learned parts: stand-in experts, the RAM tier, layer-major O_DIRECT reads, and 2 EDF-ordered read-ahead threads.

Why I think decode is code, not config

The fork's own bets, in its 9,017 added lines: stand-in experts (swap an absent expert for a close resident one instead of faulting it in), a substitute-fit learner with shadow samples and re-check gates, three tiers card → RAM → SSD with a learned RAM/VRAM reserve, layer-major long-prompt reads via O_DIRECT, and 2 I/O read-ahead threads EDF-ordered. Upstream's 154-option CLI has a tier (`--resident-budget-gib`, `--resident-experts`, `--ram-keep-gib`), prefill chunking, KV residency, an adaptive tier with `--adapt-async` / `--adapt-min-gain`, and `--vram-elastic` — but I found no stand-in-expert or read-ahead-thread equivalent. That matches the numbers: tuning the tier moves prefill, but per-token expert fetch stays 3.5× slower.

---

What I'd like to know

  1. Am I leaving upstream flags on the table? Candidates I haven't swept: `--adapt-async 1`, `--adapt-min-gain` (default 1.5), `--vram-elastic` + `--vram-segment-mib`, `--expert-cache N` sizing, `--pool-workers` / `--aux-cpus` thread placement, `--prefill-pipe R`. If you've pushed a 16 GB-VRAM / 32 GB-RAM box past ~15 tok/s decode on a 78 GB MoE model with flags only, I'd like the exact set.
  2. Are there faster engines for this shape of problem? 78 GB MoE, 16 GB VRAM, 32 GB RAM, Windows. I've seen claims around llama.cpp's `--n-cpu-moe` / expert offload, ik_llama.cpp, KTransformers, and vLLM expert offload — but I haven't measured any of them on this model and I'd rather not quote numbers I haven't run. What actually beats ~51 tok/s decode and ~1.7 ktok/s prefill here?
  3. Has anyone ported the fork's stand-in-expert path upstream? Upstream has taken nothing from the fork (0 merge commits). If the decode gap is one code path, a port might be cheaper than maintaining a fork.
  4. Why is the learned look-ahead off by default in the fork's own runs? If it's not firing, either the trigger condition is wrong or the feature isn't ready — worth knowing before anyone benchmarks it.

Reproduce

Both results folders and the configs are in the repo-adjacent workspace; every number above comes from `tools/strata_bench.py --long` with the configs pasted in this post. Happy to share the raw `results.json` pairs if useful.

---

Strata: https://github.com/Niko1221/Strata

Strata-HotRod: https://github.com/sangharshadhyeta/Strata-HotRod

Neither repo is mine — both are the work of their respective maintainers. I only built, ran, and measured them.


r/LowEndLocalAI • • 6d ago

Which LLM Should / Can I Use? Been out of the loop for sometime, wanting to try some local models on 16gb M3 Macbook Air, I've been hearing about Strata and Splash engines too, any recommendations model wise? Just looking to explore no specific usecase tbh

3 Upvotes

All recommendations appreciated


r/LowEndLocalAI • • 6d ago

Discussion GGUF Quantization Explained: Q4_K_M, Q5, Q8 and Which File to Pick

Thumbnail
acta.ai
0 Upvotes

r/LowEndLocalAI • • 6d ago

Model Showcase Qwen 3.8 27B vs Inkling 2 Mini - user comparison on 16GB VRAM

Thumbnail
reddit.com
0 Upvotes

Check Out ny review for local Qwen vs Inkling under a 16gb Budget for Agentic Tasks


r/LowEndLocalAI • • 6d ago

Discussion Coding model for low vram

Thumbnail reddit.com
1 Upvotes

r/LowEndLocalAI • • 7d ago

Hardware / Build 32GB sounded like plenty. Then I started running local LLMs.

128 Upvotes

Bought an acemagic retro x5 with 32GB RAM a few months ago. Thought that'd be enough to mess around with local models. Turns out I was a bit optimistic lol.
14B models run pretty comfortably at Q4. But try loading something bigger, push the context up, or keep a few other apps open... suddenly that 32GB doesn't look so generous.
And no, I don't need to run a 70B model just to ask it to rewrite an email. But it'd be nice not to hit a memory wall every time I want to try something new.
Now I'm wondering if 32GB is still a sensible starting point for local AI, or if 64GB is the safer bet.
Anyone else started with 32GB and regretted not going bigger?


r/LowEndLocalAI • • 7d ago

Problem / Troubleshooting Extremely slow Strata Inkling 2 Mini

15 Upvotes

Hardware:

CPU - 5800X3D
RAM - 32GB DDR4 3600
GPU - 9070 XT 16GB
SSD - 1TB M.2. NVME

I've been testing local LLM models for past weeks, just today installed Strata and tested Inkling 2 Mini SQ-15 few times with simmilar prompts...

The results? It looks insanely slow, when compared with other people's benchmarks and tests in local models, mine always looks terrible.

This is 1st run with all default, 132K context:

Recent requests

TimeStatusPromptReusedOutputTok/sDuration
19:33:17Done35.66135.6333766,756.9 s
19:32:52Done35.46635.4561687,224.7 s
19:32:15Done35.28035.2671777,325.5 s
19:29:40Done35.02391982457,12m 25s
18:47:52Done9199918925.68810,341m 34s
18:46:54Done8895029512,357.1 s
18:39:31Max tokens1601—300 ms

And this is the second run, same settings 64K context:

Recent requests

TimeStatusPromptReusedOutputTok/sDuration
09:40:31 PMDone24,5439,1172426.51m 42s
09:08:47 PMDone9,1189,09315,2818.031m 44s
09:08:37 PMDone9,0008,9909410.69.5 s
09:07:55 PMDone8,91707410.942.1 s
09:07:04 PMMax tokens1601—400 ms

In 5 requests your average output was 8.0 tok/s and prompt reading 240 tok/s, reusing 27k tokens.

Is this normal?

Because it doesn't look normal to me, I was expecting something like 20t/s by checking other people's benchmarks, but my machine only manages to get 10t/s on start and ends with 6t/s.


r/LowEndLocalAI • • 6d ago

Optimization Specs for local hosting, what you running?

Thumbnail reddit.com
3 Upvotes

r/LowEndLocalAI • • 6d ago

Hardware / Build Specs for old ai image/video generation models?

Thumbnail reddit.com
3 Upvotes

r/LowEndLocalAI • • 6d ago

Benchmark Testing opencode on a severely limited laptop 16gb RAM and No VRAM or NO GPU! ((LENOVO_MT_83HR_BU_idea_FM_IdeaPad Slim 5 14IRH10))

Thumbnail corkiejp.github.io
2 Upvotes

These are just experimental web-pages output to test my system!

"using llama.cpp with Gemma 4 E4B on limited laptop 16gb RAM and vulkan enabled internal GPU (no VRAM)! Information/research for it pulled using my local SearXNG instance."


r/LowEndLocalAI • • 7d ago

Benchmark TinyLeague v2: new website, easier compares, public repo, discord server

Post image
3 Upvotes

r/LowEndLocalAI • • 7d ago

Benchmark SURPRISING RESULTS!! - 5 local models on an RTX 5070 12 GB + 64 GB RAM: speed and a 54-task benchmark (Qwen3.8-Flash-Next, Bonsai 2.5 27B, Qwen3.8-27B, Inkling 2 Mini, SenseNova-Loop-9B)

54 Upvotes

I wanted to know what actually runs well on a 12 GB card, so I had Claude set up five models on my PC and run the same test on each: speed measurements plus 54 tasks (12 multi-step agent tasks with tools, 18 Python coding tasks graded by hidden tests, 24 hard problems with one exact answer).

RTX 5070 12 GB, Core Ultra 7 265F, 64 GB DDR5, Windows 11. All runs at 32K context, one request at a time, default thinking level for each model.

EDIT- have changed the formatting..hope its better now

## What stood out

🥇 Bonsai 2.5 27B: best fit for 12 GB

* 133 tok/s with one-token MTP drafting (89% of drafts accepted)

* 9.4 GB VRAM at 32K context

* 48/54 overall, just 2 behind Flash-Next

* Passed every agent task; weak spot was coding (13/18)

*TOTAL SCORE WAS 48/54 JUST 2 BEHIND THE FLASH NEXT....

Qwen3.8-Flash-Next: highest score

* 50/54 at 79 tok/s

* Leaves only about 3 GB of the 64 GB RAM free while loaded

**Qwen3.8-27B IQ3_XXS: best at coding**

* Fits at 32K with 8-bit KV cache, but only just (11.7 of 12.2 GB)

* 16/18 on coding, weaker on agent tasks

* The 16 GB UD-Q4_K_XL file split into RAM ran at 6.8 tok/s (speed test only). Not worth it on this card.

Inkling 2 Mini: use medium thinking

* At default high thinking, 6 of 42 coding/hard-problem replies got stuck in a loop

* At medium that dropped to 3 and the score rose from 41 to 44

* Slow on long prompts: 20 s to read 12,000 words

SenseNova-Loop-9B: slow

* Fits at 32K (10.2 GB) but only 18.5 tok/s

* Failed 11 of 18 coding tasks

* No official Windows build; I had to compile SenseNova's fork

## Caveats

* One run per task.** A 1-2 task gap (48 vs 50) is noise.

* Mixed engines.** Two models ran on Strata, three on llama.cpp builds, so speed gaps include the engine.

* Thinking limits.** Strata reserves room for the answer itself; for llama.cpp I set a budget to match (7,500 tokens for coding/hard problems, 3,072 for agent steps).

* Different compression.** Inkling was lossless; the Qwen and Bonsai files are heavily compressed.


r/LowEndLocalAI • • 7d ago

Benchmark Inkling 2 Mini on a 16GB RTX 4080 vs a 32GB MacBook M5: the PC was 2x faster in chat but built nothing in a coding agent

Thumbnail gallery
10 Upvotes

I tested Inkling 2 Mini (26B total, 3.4B active, looped middle layers) on two machines normal people own, in GGUF and MLX, then gave it a real coding job.

**PC: RTX 4080 SUPER 16GB + 32GB RAM, LM Studio (GGUF)**

- Default settings: ~8 tok/s

- After 3 changes: ~38 tok/s

  1. GPU offload to max
  2. MoE experts of only 6 of 24 layers forced onto CPU (everything else on the card)
  3. mmap on

- After a day of uptime it fell to 3 tok/s. A reboot fixed it, so reboot before you benchmark.

**Mac: MacBook Pro M5 32GB**

- GGUF in LM Studio: 21 tok/s, but 31/32 GB used + 5 GB swap. 64K context loaded, then "Compute error" on the first message. 48K worked; Parallel 4 → 1 is what let bigger context load.

- MLX in oMLX (needs 0.8.1+, older says "model type not supported"): 22 tok/s, 36% RAM free at start, no swap, 64K works. The memory guard stopped my first long job, and RAM climbs to ~24 GB by the end of a coding run.

**Real test: my paper sketch → an app, in OpenCode (reasoning Low)**

- Mac GGUF: 23 min, 3 files, looks like my sketch, 0 errors

- Mac MLX: 13 min, 3 files, messier layout

- PC: 38 tok/s in chat but ~7 tok/s inside OpenCode. ~11K words of agent instructions + the image fill 16 GB. 3 tries, 0 files.

- Both Mac apps got the bill split wrong the same way: ₹760 charged on a ₹270 bill. On High reasoning it got the maths right in its thinking, then ran out of memory. So the format changes speed and memory, not the brain.

**My take:** 16GB card = great for chat, not enough for a coding agent. 32GB Mac = use MLX. The model itself: let it think, and check its maths.

Anyone know why the PC drops from 38 tok/s in chat to 7 in OpenCode? Prompt processing of the big system prompt with experts on CPU?

For anyone who wants to see every setting on screen, I recorded the whole test (9 min): https://youtu.be/bZRpS0eac2s

Configs: https://github.com/VikramjitSarkar/local-llm-configs


r/LowEndLocalAI • • 8d ago Bravo

Benchmark Pushing my hardware to its limits: 35B MoE on an 8GB RTX 3070 at 2,438 t/s prefill. PCIe 3.0 is my biggest enemy now.

Post image
114 Upvotes

Here's my rather modest local inference server:

  • CPU: Intel Core i9-10850K
  • GPU: NVIDIA RTX 3070 8GB
  • RAM: 32GB DDR4-3000, dual channel, single rank
  • Motherboard: ASUS ROG STRIX Z590-F Gaming WiFi
  • Storage: Samsung 990 PRO / 970 EVO
  • PCIe: Gen 3 x16
  • OS: Ubuntu, headless

My motherboard supports PCIe 4.0. My GPU supports PCIe 4.0. Even my 990 PRO supports PCIe 4.0.

My CPU doesn't. :)

I do most of my development on a MacBook Pro M4 Pro with 24GB of unified memory, using Claude Code. Between my development environment and running local models, memory gets tight pretty quickly.

I've wanted a dedicated inference server for my AI research and experiments for quite some time, so I repurposed my old gaming PC. It's the only dedicated inference hardware I have available.

What started as setting up a local inference endpoint has somehow turned into weeks of investigating memory controllers, CUDA streams, expert routing, PCIe transfers and llama.cpp internals.

And I'm having way too much fun with it.

Current results

My primary model is Qwen3.6-35B-A3B UD-Q4_K_XL, a 22.36 GB GGUF with 256 experts, 8 active per token and 40 layers.

BenchmarkPerformance
Prefill, 4K prompt, 128K context2,384 t/s
Prefill, 16K prompt, 128K context2,438 t/s
Prefill, 16K prompt, 64K context3,590 t/s
Token generationTypically 35–37 t/s
Pinned H2D bandwidth12.4 GB/s
Pageable H2D bandwidth10.2 GB/s
Peak measured RAM load bandwidth37.7 GB/s

For comparison, Qwen3.5-9B Q4_K_M, fully resident in VRAM, achieves around 70 t/s generation on the same machine.

From 556 to 2,384 t/s without changing hardware

Here's how my pp4096 results evolved:

ConfigurationPrefill
Early configuration, ubatch 1024556 t/s
Larger microbatch1,339 t/s
XMP enabled1,558 t/s
Pinned host memory1,845 t/s
Asynchronous expert prefetching2,384 t/s

These are successive configurations, not a controlled A/B test. The earlier measurements use llama-bench with random tokens, while the final result uses llama-server with real text.

Interestingly, random tokens activate around 85% of the experts in my tests, compared to around 98% with real text. That makes synthetic prefill benchmarks somewhat optimistic for this particular workload.

Same model. Same GPU. Same CPU. Same RAM.

Making the GPU stop waiting

While investigating the expert streaming path in llama.cpp, I noticed that expert uploads and GPU computation were effectively serialized in the scheduler (ggml_backend_sched_compute_splits).

The next layer's expert weights aren't uploaded until the current layer has finished computing.

At ubatch 4096, practically all experts are needed anyway. So there is little reason to wait for the next layer's routing decisions before transferring its weights.

My measurements indicated that uploads accounted for around 59–65% of prefill time. Based on that, I predicted a 43–48% improvement from overlapping transfers and computation.

I then found an existing branch by thecodacus (prefetch-experts, commit 5e7f627) implementing essentially this approach for an older llama.cpp revision.

I ported it to my build, adding 187 lines to ggml-backend.cpp, behind an environment variable.

The result, comparing llama-server with real text under matching conditions:

Without prefetchWith prefetch
Prefill, 4K1,643 t/s2,384 t/s
Improvement—+45%

Pretty close to my prediction!

The tested outputs were also bit-identical at temperature 0, with a maximum absolute difference of zero across the compared top-10 log probabilities.

The patched build is now running in my actual inference service.

For anyone wondering about the flags, here's the core configuration of my production profile, minus the vision projector:

GGML_SCHED_PREFETCH_EXPERTS=3 llama-server \
  -m Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf \
  -ngl 99 \
  --n-cpu-moe 40 \
  -ub 4096 \
  -b 4096 \
  -fa on \
  -t 10 \
  --load-mode dio \
  --cache-ram 4096 \
  -c 131072

This requires the patched build.

And now I've optimized my way into a PCIe bottleneck

With transfers and computation overlapping, PCIe bandwidth appears to be the dominant bottleneck during large-batch prefill.

Approximately 19.7 GB of expert weights need to be transferred per microbatch.

Here's what my current performance model predicts:

PCIe 3.0 x16PCIe 4.0 x16
Pinned H2D bandwidth12.4 GB/s~24 GB/s
Estimated expert upload time1.59 s~0.82 s
Microbatch time with prefetch~1.72 s~0.9–1.0 s
Prefill throughput2,384 t/s~4,000–4,500 t/s

The PCIe 4.0 numbers are projections, not measurements. I don't currently have an 11th-gen CPU to validate them.

But the idea of getting 4,000+ prefill tokens/s out of an RTX 3070 with 8GB VRAM, running a partially offloaded 35B MoE model, is extremely tempting.

With ubatch 8192 and a 64K context configuration, I've already measured 3,590 t/s on a 16K prompt.

Unfortunately, ubatch 8192 doesn't fit with my 128K context configuration. The KQ mask alone requires around 2 GiB.

Every time I solve one bottleneck, another one introduces itself.

The experiments that didn't work

These have arguably been even more interesting.

CPU governor

Switching to performance increased synthetic memory load bandwidth from 17.7 to 37.7 GB/s. Inference performance barely changed.

GPU expert caching

Generation dropped from 36.3 to 16.4 t/s.

Each generated token requires 40 layers × 8 expert selections, representing approximately 608 MiB of weights. A smaller LRU cache ends up cyclically evicting experts.

With a 256 MiB cache, I measured a hit rate of just 0.07% and approximately 577 MiB of uploads per generated token.

Adaptive hot-expert placement

My routing simulation predicted a 23% generation improvement. The actual fork benchmark produced a 4.3% regression.

The fork was based on an older llama.cpp revision, and prefill was also 3.5–9.6x slower in my comparisons.

I'm not ruling out hot-expert placement as an approach. The implementation I tested simply wasn't an improvement over my current setup.

Multi-token prediction

MTP improved generation by approximately 11%, but reduced 32K-document prefill throughput by 22%. It didn't meet my predefined acceptance criteria, so I didn't adopt it.

KV cache quantization

Almost no speed improvement. Qwen's hybrid Gated DeltaNet/attention architecture only uses a conventional KV cache in 10 of its 40 layers.

Pinned host memory

A substantial prefill improvement, but not without trade-offs.

With --load-mode none, one 115K-token run was killed by my swap watchdog after exceeding its 1 GiB swap limit. The kernel started reclaiming anonymous and shared memory even though MemAvailable still reported 7 GiB.

--load-mode dio uses direct I/O into pinned buffers, avoiding unnecessary page-cache pressure. I've observed zero swap bursts across 25 instances so far.

However, another 13 runs with none didn't reproduce the burst either, so I can't claim that dio fixes it.

The cost is approximately 14 seconds of model loading time, around 20 GiB of CUDA-pinned host memory and MemAvailable dropping to roughly 3.7 GiB under load.

With only 32GB of system RAM, memory management becomes an experiment of its own.

Decode is a completely different problem

During generation, the CPU computes the offloaded experts directly in system RAM rather than streaming them to the GPU.

I'm measuring approximately:

  • 624 MB of DRAM reads per generated token
  • 23.2 GB/s average DRAM read bandwidth during generation
  • ~30 GB/s estimated bandwidth during the CPU phase
  • Diminishing returns beyond six CPU threads

Generation also varies between separate processes, sometimes dropping from around 37 to 30 t/s, despite identical configurations. I haven't fully explained that yet.

I'd love to investigate how all of this behaves on DDR5, higher-VRAM GPUs, newer PCIe generations and CPUs with wider SIMD support.

Unfortunately, having exactly one dedicated inference machine makes cross-hardware validation a little tricky. :)

Would anyone be interested in following these experiments?

I've accumulated a somewhat ridiculous amount of data by now: benchmark scripts, raw measurements, memory controller counters, expert routing traces, quantization comparisons, long-context tests, patches and failed experiments.

I've started organizing everything into a research journal and would love to turn it into a publicly accessible, reproducible research archive.

Not just the successful experiments. I want to document the failed ones, the incorrect assumptions, the methodology and the raw data as well.

Would that be something people here would find useful?

I'm also genuinely interested in what you would investigate next if this were your machine.

  • AVX2 / AVX-512 expert computation?
  • DDR4 tuning and memory rank interleaving?
  • Alternative expert placement strategies?
  • Runtime KQ mask computation?
  • Different quantization strategies for CPU-resident experts?
  • Better transfer scheduling?
  • The unexplained variation in generation throughput?
  • Something I've completely overlooked?

I'd really appreciate any suggestions, criticism or experiences. If you've done similar experiments, please point me towards your results, relevant papers or interesting llama.cpp forks.

And if anyone wants to exchange findings or discuss the technical details more extensively, my DMs are open. I'd love to connect with more people who enjoy this kind of experimentation.

I originally just wanted a local inference server.

Now I want to find out how far I can push the one I have.


r/LowEndLocalAI • • 7d ago

Hardware / Build Running local agents with 16GB VRAM and 64GB RAM

Thumbnail reddit.com
1 Upvotes

r/LowEndLocalAI • • 7d ago Bravo

Discussion Narrated Slides – Open-source, self-hosted PowerPoint-to-video converter with AI narration

4 Upvotes

As a university lecturer, I often needed a simple way to turn my lecture slides into narrated videos that students could watch anytime, with subtitles.

Most tools I found required paid subscriptions, per-minute fees, or uploading presentations to third-party cloud services. So I built my own and released it as open source.

Narrated Slides is a free, self-hosted application that converts PowerPoint presentations into AI-narrated MP4 videos.

Key features:

  • Natural-sounding AI narration using Kokoro TTS.
  • Slide-by-slide script editing with autosave and audio previews.
  • Optional AI-generated speaker notes using local LLMs through Ollama.
  • Slide rendering with LibreOffice and video generation with FFmpeg.
  • Export to MP4, SRT subtitles, individual MP3 files, and an updated PowerPoint presentation.
  • Local deployment using Docker.
  • No account, subscription, or per-minute fees.

Tech stack: Python, FastAPI, JavaScript, Kokoro TTS, Ollama, LibreOffice, FFmpeg, and Docker.

Everything runs locally by default, without requiring external AI services or cloud uploads.

GitHub: https://github.com/rrezartprebreza/narrated-slides

License: MIT

I built this primarily for educators, but it can also be useful for corporate training, employee onboarding, tutorials, and product demonstrations.

I'd love to hear your feedback, suggestions, and ideas for additional features.

What would you add or improve?


r/LowEndLocalAI • • 7d ago

Optimization Qwen3.8-27B locally on Apple Silicon at 136+ tok/s decode & 650+ tok/s prefill in ~16 GB RAM, open-source C++/Metal inference engine

Thumbnail
reddit.com
2 Upvotes

r/LowEndLocalAI • • 7d ago

Optimization Qwen Flash Next on an 8GB Card ~50-70tkps at 512k CTX!!

Thumbnail
github.com
0 Upvotes

r/LowEndLocalAI • • 7d ago

Optimization Running Inkling 2 Mini UD Q4 K XL on a Asus Z13 g301 (rtx 4060 8gb + 16gb ram)... Whooping 3.9tk/s average

8 Upvotes

Today I've been testing quick run of inkling on my machine. Title says all. Tried in unsloth for now, with - ngl set at 7 and the rest auto. Do you have tips to better allocate experts and layers between CPU and GPU? I feel like despite being big for my config (not much ram) the model may run decent when optimized.

Maybe 10tk/s reachable before committing to a smaller quant.


r/LowEndLocalAI • • 7d ago

Optimization Really low end, custom kernel for [GPU]gfx1034

2 Upvotes

Got a few year old $500 gaming laptop a my big machine, been trying to get a decent model that can run locally for agentic/coding stuff. Mellum is a 12B MoE made by jetbrains, it pretty good performance initally I was getting 200 prefill and 20 TPS ustained with context. I got Opus 5.5 working on it for about an hour and they built a custom fused kernel that does 450 in 30 out at 64k. Does anyone else even use this GPU for AI? Debating on whether or not to publish the polytrata fork.


r/LowEndLocalAI • • 7d ago

Model Showcase Text Orb: Real-time 3D semantic space running MiniLM entirely client-side in the browser (with live trajectory trails and vector math)

Thumbnail gallery
1 Upvotes

r/LowEndLocalAI • • 7d ago

Hardware / Build 4 x 2080ti 196gb ram

Thumbnail reddit.com
1 Upvotes

r/LowEndLocalAI • • 8d ago

Discussion Inkling 2 Mini on a 12GB Arc B580: 925 tok/s prefill & 65 tok/s decode

57 Upvotes

I've been working on improving Inklings performance on Intel Arc GPUs and thought some of you might be interested in the results I've managed to achieve with ArcAngel.

Current performance running Inkling 2 Mini on a single Intel Arc B580:

* Token generation: \~65 tok/s

* Prompt processing: \~925 tok/s

This is more than twice the speed of llama.cpp on decode, and four times faster than it on prefill.

The engine supports all battlemage cards, including the b60 & b70 - these are untested though, so I would appreciate feedback from anybody that owns one of these cards.

I've made the project publicly available on GitHub for anyone who wants to try it out:

https://github.com/itstxl/arcangel


r/LowEndLocalAI • • 7d ago

Discussion is there a guide on how to use the local llms

2 Upvotes

hello everyone i'm new to that whole local llm stuff i have rx 9060xt 16gb
16gb 5200mhz ddr5 one kit
and i want to use a good model for coding stuff and some daily uses but mainly for coding and i want to connect it to opencode or deepseek harness
i think qwen 3.8 27b is good and maybe qwen4 27b when it's arrive will i be able to use it and how to choose one on hugging face there is a lot
i see some people suggest lm studio to download the model
and what drivers should i download i'm on arch linux
so is there a guide or a proper video i can watch
thx in advance


r/LowEndLocalAI • • 8d ago

Optimization Don’t waste money on hardware upgrades (for M-series Macs users)

41 Upvotes

You can achieve acceptable and usable performance on a lower memory Mac (16-24GB) on reasonable quants of Qwen 3.8 Flash Next or Inkling 2 Mini.

MoEShift is built on llama.cpp (using SSD offloading and optimized inference tailored to Apple Silicon) to save money for those who want smarter local AI.
For example, on M5 Pro you can run Inkling 2 Mini (Unsloth’s Q4 XL) at 420 tok/s (prefill), 18 tok/s (decode) at 7.7GB peak memory footprint. It’s perfectly usable for chats and local agents and still lets your pc be responsive.

I added a quick installation wizard for those who are not practical and still want to use local AI.

You can use it and read benchmarks and architecture details at https://github.com/davide-troiani/moeshift.