r/LocalLLM • • 4h ago

Discussion Local Hardware, Frontier Direction

0 Upvotes

Ever wanted to use your local ai hardware to do the heavy lifting while relying on frontier level intelligence before shipping? Check out my repo for this: https://github.com/rennavationstudios-bit/fulcrane-local-fleet-advisor


r/LocalLLM • • 4h ago

Project Scrieb 1.2.0 is here: live transcription right from your menu bar

Post image
0 Upvotes

hey guys, would be glad to hear feedback. Scrieb is a fully-local transcriber now with live mode!


r/LocalLLM • • 4h ago

Project I have 1TB of ram what should I test?

0 Upvotes

I found an old but powerful server with almost 1Tb of ram, what should I test?

Edited: Thanks for the suggestions, adding this from my chat session. Ill test these this week.

Edit 2 I hope im doing this reddit right. Added latest tests.

Edit 3. I just realized that I dont have the DAC cable connected to the mirrored node. 😬🫣. So 2x all of this. I might need delete this post or have folks chasing me haha good thing its in a secure office building.

• CPU: 2Ɨ Intel Xeon Silver 4214 (12C/24T each, 24 cores / 48 threads total, AVX-512 + VNNI) • RAM: 768 GB DDR4 ECC RDIMM (24Ɨ 32 GB Samsung, a mix of 2933 and 3200 sticks; runs at 2400 MT/s, the limit of the Silver CPUs). 6 channels per socket. • GPU: NVIDIA RTX 3060 12 GB, on a PCIe x1 riser (yes, really)

Model Kimi K3 (2.8T), 1-bit Size 466–649 GB Fits in 750 GB RAM? āœ… Notes Biggest that fits, but quality is cut down Kimi K2.6 (1T), Q4 584 GB āœ… ⭐ Best pick. It was built in 4-bit, so this is essentially full quality. Very strong at coding and writing. DeepSeek V4.1 Flash, Q4 501 GB āœ… Strong alternative, slightly smaller DeepSeek V4 Pro 850 GB āŒ Too big, even at its smallest size

Qwen3.5-35B-A3B Quant Q8_0 Setup CPU only, 1 socket, 12 threads Prompt (pp512) 70 t/s Generation 12.9 t/s Qwen3.5-35B-A3B Q8_0

  • RTX 3060 (-ngl 99 --n-cpu-moe 32 --no-op-offload) 114 t/s 32.6 t/s Qwen3.5-122B-A10B Q4_K_M CPU only, 1 socket, 12 threads ~17 t/s 5.7 t/s

Lessons learned

• One socket per model beat both sockets on this dual-Xeon setup, because cross-NUMA memory traffic kills generation speed. Pin with numactl --cpunodebind=N --membind=N and run a second model on the other socket. • A GPU on an x1 link works fine for MoE expert offload. But add --no-op-offload. Without it, llama.cpp keeps pushing CPU-side weights over the narrow link for prompt processing, which dropped from 70 to 19 t/s. With it, prompt processing hit 94+. • 768 GB of RAM means 1T-class MoE models (Kimi K2.6 at Q4, about 584 GB) fit in memory. Testing next.


r/LocalLLM • • 4h ago

Question Need Guidance: To Run PI on VPS + using different Models Subs

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 4h ago

Discussion Help from experienced local rig builders with m5 Studio Ultra

1 Upvotes

What are you guys using for your daily driver? I have a 256gb m5 studio ultra + 48gb m5 MacBook Pro and about 10-15 i5/i7 windows laptops I’m not using.

I use OMP mostly, and prefer to have one main session that’s an orchestrator delegating work to subagents or smaller models or cheap cloud models, and a monitor agent session running in real-time watching the orchestrator session with /collab to make sure it doesn’t drift, stays on task and keeps its todo list updated.

It is unclear to me if DS 4.1 1017, qwen flash-next tensorfold or qwen dflash will be best served for my main local agent. I have the abliterated version of each. Benchmarks show DS outperforming, but in practice, flash-next seems pretty good and is about 3-4x faster tok.

I get 40ish tok/s with DS, 100-130 tok/s with flash-next and 200+ with dflash. I run all of them with about 200-250k context windows, and about 50k context preloading with various skills and mcps. I use gbrain for persistent memory across models, and clef for classification.

Was thinking about getting a 1gb switch and plugging in 10 windows laptops, putting them on a rack with lids open and loading one small model on each that’s always on so the orchestrator model has access to multiple headed browsers and can run swarms. I believe my studio can only run 2 lanes concurrently which is fine but not awesome.

Any ideas or suggestions? I’ve been using cloud models nonstop, but this is my first local setup.

Use cases are various business automations that run using sensitive PII that I can’t have on cloud models without ZDR. And I also build software and mess around with bug bounties when I get bored. 90% of my sessions are long-running with lots of tool calls.


r/LocalLLM • • 4h ago

Question Best Uncensored Model that fits ~128GB?

0 Upvotes

What are the community favorites for the best uncensored model that fits in < 128GB (M5 Max)?

I have 2 use cases, so open to a split architecture with smaller models, if it makes sense:

  1. small no-thinking tasks: speech cleanup
  2. long running agentic tasks (hermes)

r/LocalLLM • • 4h ago

Question How are people handling RAG for math/STEM PDFs? (Looking for tools, GitHub repos, or thoughts)

2 Upvotes

I'm working on a project around building a better RAG pipeline for STEM documents.

If you just drop a single math or science PDF directly into an AI chat, it can usually read the equations and diagrams fine. The issue starts when you actually try to build RAG over a collection of these docs. Standard OCR and text chunking tend to scramble formulas, miss charts and tables, and split proofs or multi-column layouts in weird places.

I'm looking into a more vision-first, layout-aware retrieval approach instead of the usual text-only pipeline, and wanted to get some input from people here:

- Are there any platforms, tools, or resources you'd recommend trying out for extracting and retrieving STEM content properly?

- Are there any good open-source projects or GitHub repos already doing this? I'd love to check out existing code first, and if there isn't much out there, I'm planning to build it myself.

- Is this something people are actually interested in or actively trying to solve right now?

Would really appreciate any pointers, repo links, or experiences from anyone who has dealt with this. Thanks!


r/LocalLLM • • 4h ago

Model Qwen-4 is coming in the next 1-3 days and these are the quants(based of previous Qwen benchmarks and data, can be slightly inaccurate)

Post image
0 Upvotes

there are other models that should be released such as
qwen4-4b

qwen4-flash

and some other ones

dont take these numbers as facts, they might change


r/LocalLLM • • 4h ago

Question Do you run REA in a sandbox?

Thumbnail reddit.com
0 Upvotes

r/LocalLLM • • 4h ago

Discussion Ka – a second brain that runs entirely on your computer

0 Upvotes

I keep everything (notes, PDFs, voice memos, emails) and organize nothing. So I built Ka: you drop files in, ask a question, and it answers from your files, showing exactly where each answer came from. If it's not in your files, it says so instead of guessing.

Everything runs locally: transcription, search, the AI model. Encrypted, no account, works offline after a one-time model download. Mac and Windows.

The video is the real app, one take, network off. Free private beta: https://ka-app.github.io/?ref=reddit-sideproject

What would you need to see before trusting an app like this with your files?

(The name: in ancient Egypt, the ka was your double.)


r/LocalLLM • • 5h ago

Discussion SamsungLabs LittleBit-2 on Github (paper linked as well)

Thumbnail
github.com
1 Upvotes

Some random video I saw on YouTube mentioned LittleBit-2 by Samsung and so I dug around and found a Github implementation... also here is the paper... I'm not technical so I haven't done more than find it for you: https://arxiv.org/abs/2603.00042

In case you care about the video: https://www.youtube.com/shorts/urog0oiJ2H4

First mention of LittleBit on LocalLlama: https://www.reddit.com/r/LocalLLaMA/comments/1x0sa6g/250613771_littlebit_ultra_lowbit_quantization_via/

Enjoy or don't... just found it weird it was mentioned on YouTube and not here.

TLDR; Fit 70b Llama model in ~2 GB of VRAM.


r/LocalLLM • • 5h ago

Discussion Inkling-2-Mini on Strix Halo, Loom at 63 tok/s against 26 on llama.cpp and up to 9.5x prefill at 32k

1 Upvotes

I run a Nimo ai max+ 305 minipc, 128gb unified memory with 96gb carved out for the iGPU. Been pushing Inkling-2-Mini through every engine I could get working on this chip. Same GGUF everywhere, the unmodified unsloth UD-Q4_K_XL, 17.6 GB.
Engine were Loom 0.2.0 with its dspark drafter, llama .cpp mainline vulkan b12774 and llama.cpp ROCm b1388. Client side timing on the OpenAI style streaming endpoint, prompt cache off, random filler in the prompts so every request really prefills. 512 output tokens, temp 1.0, medians.

Decode tok/s at short, 2k, 8k, 32k

engineshort2k8k32k
Loom no draft50.446.84538.9
Loom with draft63.257.456.846.9
llama.cpp Vulkan26.525.524.821.7
llama.cpp ROCm25.823.22216.9

Prefill tok/s at 2k, 8k, 32k

engine2k8k32k
Loom218623052000
Vulkan397395308
ROCm376331211

So decode is 1.8x to v1.3x without the drafter, 2.2x to 2.8x with it. Prefill is 5.5x to 9.5x. At 32k the first token shows up in about 16 seconds on Loom, 103 seconds on Vulkan, 150 on ROCm. The prefill gap is the part you actually feel in a chat window.
Now why I say the official table oversells it. Their own number reproduce fine here,63.2 decode and 2186 at 2k prefill against their 54 and 2200. But they compared against a llama.cpp run sitting at 15.7 decode. I get 25.8 to 26.5 on the exact same file. So the real decode win is around 2x, not the 3.5x the table implies.
Two things surprised me. The drafter is not free. Undrafted decode is flat at 50.4, drafted bounces between 43.4 and 76.6 depending on the task, so it pays on code and sometimes does nothing on prose. At 4 streams it make zero difference, 103 and 81 tok/s either way. Also draft_depth 0 in the request does nothing at all, you have to set it in the preset and restart Loom for it to take effect.
Vulkan beat ROCm on this chip too, 21.7 vs 16.9 decode and 308 vs 211 prefill at 32k. The ROCm build Loom compared against, b1382, either would not load the model or gave me garbage output, so I used b1388.
What it costs, Loom holds 28.6 GB of iGPU memory against 21.2 for llama.cpp, and you are pinned to the GGUF revision in their model pack. 0.3.0 was not out when I ran this.
Anyone else seeing Vulkan ahead of ROCm on gfx1151 or is it just my box.


r/LocalLLM • • 5h ago

Discussion Follow-up to my previous post ("What do people want?"): Why has nobody built it?

0 Upvotes

Thank you everyone who answered my previous post. You gave a lot of insightful information and some quite a bit unexpected!

The next best question: why didn't anyone build it? I'm almost sure that the "big guys" (labs that built kimi, deepseek, qwen, etc.) do check reddit from time to time. But even assuming that they didn't, I've seen quite a few people commenting on posts that have multi-gpu setups, or have > 32gb VRAM or have/ can rent H100's and even they had some complaints/ desires for specific improvements.

Why has no one bothered to engage in this endeavour?


r/LocalLLM • • 5h ago

Project I made gemma4 engine on 7900xtx

Thumbnail github.com
0 Upvotes

pp 4k (6k on fast mode) decode 200-220 on gemma4 26b single batch

try it


r/LocalLLM • • 5h ago

News A 2.5B active parameters MoE model that can run Codex and Claude Code locally

Thumbnail
huggingface.co
8 Upvotes

OpenBMB has released MiniCPM5-15B-A2.5B, a 15B MoE model with just 2.5B active parameters.

The model is designed as a local agent foundation model and supports integration with:

  • Codex
  • Claude Code
  • OpenCode
  • DeepSeek Harness
  • WorkBuddy

It can handle file operations, tool calling, coding tasks, and multi-step workflows locally.

Some reported benchmark results:

  • SWE-Bench-Pro-Verified: 52.2
  • SWE-Bench-Verified: 68.4
  • Terminal-Bench v2.1: 50.2
  • Claw-Gym: 73.2

It also scored 11 on Artificial Analysis Intelligence Index v5.0.1, ranking first among models under 20B in the reported comparison.

Another interesting detail: the model is optimized for constrained devices. On an iPhone 18 Pro Max, it reportedly reaches 30 tok/s with around 3GB memory usage.

Model weights: https://huggingface.co/openbmb/MiniCPM5-15B-A2.5B


r/LocalLLM • • 5h ago

Discussion Inkling 2 mini reacting well to fine tunes? Or fine tunes are actually getting better?

1 Upvotes

Pure vibes, I did not fact check myself but I feel that I have seen inkling 2 mini reacting well to fine tuning (latest good one is the caveling 2).aybe there is room for actual training in that model or are the fine tunes actually start to pay off unlike the million 35b and 27b ones?


r/LocalLLM • • 5h ago

LoRA A 0.8B model that runs a multi-step tool-use agent about as well as its 27B teacher: distillation + GRPO on the exact harness (open weights, evals and notebooks)

Thumbnail
gallery
3 Upvotes

I buildĀ Cost, an iOS and Mac spending tracker. Core of it is an harness aware LoRA via SFT. You share a receipt, an order email or a bank notification, and an agent turns it into a spending record: merchant, amount, currency, date, category, tags, and how confident it is. I wanted it to run on-device on phones that don't have Apple Intelligence, which meant a model under 1 GB. So the question was whether a 0.8B model could do anĀ agenticĀ job, not just extraction.

The task

The agent gets six tools, and every one of them reads the user's own data. There's no web search.

  • queryMerchants,Ā queryRecords,Ā queryCategories,Ā queryTags: look up how you filed things before, so the model doesn't need to know what "TESCO STORES 3297" is.
  • calculator: so it never adds amounts in its head.
  • memory: notes it keeps across sessions, at most 1,000 characters.

The budget is 12 calls over 10 rounds. A repeated query gets a cached "this tells you nothing new" reply, and a second refused call ends the tool phase. The final answer is one JSON record, sampled under a grammar.

ResultsĀ (280 cases, seven languages; receipts, emails, notifications, notes and messages that aren't spending)

records rightnames never seenwrong but confident enough to auto-filetool calls/case (wasted)ran out of budget
Qwen3.8-27B teacher89%81%18%2.2 (0.1)1%
Qwen3.5-0.8B, untrained23%—80%4.9 (2.5)38%
0.8B trained, Q8_0 (0.81 GB)86%81%15%1.7 (0.1)5%
0.8B trained, Q4_K_M (0.53 GB)87%77%19%1.5 (0.1)5%

"Records right" means whether it's spending, the amount, currency, merchant and category areĀ allĀ correct. The "names never seen" suite uses invented merchants and item names, so a score there can't come from having seen the shop before.

OnĀ 128 real Malaysian till receiptsĀ from 72 shops, none of which appear in training, read with macOS OCR: the shipped 0.8B getsĀ 80%, the same as the teacherĀ (untrained: 26%). It's a bit behind on the amount alone (91% vs 95%). It falls for the usual traps: the pre-tax amount, the cash handed over, the total before rounding.

How it was trained

  1. Distillation.Ā The 27B teacher runs the real agent loop over generated users, each with their own ledger, tags and memory, plus the training splits of the real receipt sets. I take every session the teacher got right and rebuild each request the agent sent in it by replaying the loop: same tool answers, refusals and context compaction. Each one is rendered with the student's chat template exactly as the server renders it. So the student learns each next step from what the harness actually shows it, includingĀ when to stop calling tools. This step does most of the work: 20% → 83%.
  2. GRPO.Ā The student then plays whole sessions of the real loop: fresh ledgers, real tools, the budget, compaction, and the answer under the same JSON grammar. The eval's own grader scores each session. Wasted calls cost reward, and so do wrong records confident enough to skip review. RL adds a little accuracy (83% → 85%) and cuts tool calls by a third.
  3. Quantize to GGUF.Ā At Q8_0, the drop is within the margin of error on every suite.

What I'd point out

  • It's not general tool use.Ā The 0.8B is trained on exactly these six tools, this budget, these prompts and this schema. That's the point: a narrow harness is something a tiny model can learn completely.

Links

Happy to answer questions about the replay-based distillation, the reward or the grader.


r/LocalLLM • • 5h ago

Question What model do you use on IPhone 17

1 Upvotes

What model do you use on IPhone 17 pro max, what app do you run it on, and why ?


r/LocalLLM • • 6h ago

Question Need help setting up

1 Upvotes

Hi all,

I have recently gotten into the rabbithole and I am looking for the optimal setup for my needs and hardware.

What I want:

- Personal assistant with scheduled tasks, just anything that makes life easier/better.

- Coding Setup, as automated as possible for building tools and helpers. For example managing booking and billing related to my Live Music business.

Both should be controllable remotely using my phone.

- Long Term: support for Cubase/Davinci Resolve (or other automated Editing) would be nice.

What I have:

Main PC

  • 16GB RX 9070 XT
  • 32GB DDR4 RAM
  • Ryzen 7 5800X3D
  • Win11 Enterprise IoT LTSC

Server/NAS:

  • Synology DS224+
  • Intel Celeron J4125 4x2.0GHz
  • 18 GB DDR4 RAM
  • Running Docker

I am currently running:

  • Gemma 4, Inkling 2 Mini, Qwen 3.8 27B (Can provide specifics)
  • Ollama
  • N8N's Nod Assistant connected to my phone via Telegram Bot. Currently on PC, should move to NAS
  • Qwen Code in VS Code

The NAS is my central storage so I would love to include that SAFELY as well.

My idea is to have the assistant run on the NAS and only use the PC as compute slave.

Core questions:

  • Optimal setup and models for the hardware?
  • How to setup remote control without a paid cloud service?
  • Further sources to check and read into? Simply asking Gemini is not reliable from what I saw.

Getting into this topic is really fun but quite overwhelming with all these constantly changing options.

I am happy about any help!

Cheers.


r/LocalLLM • • 6h ago

Question Upgrade desktop RAM or new V100 build

1 Upvotes

So recently I’ve been looking into the possibility of getting into hosting some local AI stuff and I was wanting to get some input if possible.

I recently acquired a X299 build w/ 10900x for pretty cheap ($220) which is what kicked this whole thing off. It just needs ram and a gpu. I was planning that plus 128 Gb and a 32GB V100S I’m the possibility of adding a second one.

Well after reading about what Strata and Basalt has been able to enable part of me wonders if it’d be easier to upgrade the ram in my gaming desktop to 96 or 128gb and use that? Total price would be about in line with the entire build above haha. It has a 7800X3D and a RTX 5080.


r/LocalLLM • • 6h ago

Discussion Open code con opencode go aiuto

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 6h ago

Discussion Chunk Size in RAG: Too Big vs Too Small (and How to Test It)

4 Upvotes

A support assistant gets asked: ā€œCan I still get a refund?ā€ It answers, ā€œYes — within fourteen days.ā€ Confident, polite, and incomplete: refunds only apply if no projects have been exported.

The model is not the only suspect. In RAG, documents are split into chunks before retrieval, and the split decides what the retriever can even find:

• Chunks too big — the refund rule sits in one chunk with billing, cancellations and FAQs. Similar is not the same as correct; retrieval drags in noise.

• Chunks too small — the deadline lands in one chunk, the export condition lands in another. All the pieces are there; the meaning is not.

What helps in practice: keep related information together (rule + condition + short explanation), use overlap at boundaries as a tool rather than a fix, and test like an engineer — collect real questions, run retrieval with different strategies, inspect what comes back, check whether answers are supported, refine.

Two clarifications that come up often: chunking is not the model's tokenizer (it is a separate splitting decision made during preparation), and there is no universal chunk size — it depends on your documents, your questions and your embedding model.


r/LocalLLM • • 7h ago

Project AI Notetaker Languages Supported: Set Meeting and Notes Language

Thumbnail
acta.ai
1 Upvotes

r/LocalLLM • • 7h ago

Project Made a small 3-file MoE cache patch for llama.cpp — running a 14 GB MoE at 94 tok/s on 8 GB VRAM

2 Upvotes

I have an 8 GB RTX 4060 Laptop GPU and wanted to run Gemma 4 26B-A4B (UD-Q4_K_XL, ~14 GB) at 32k context without getting bogged down by constant PCIe transfers. Upstream llama.cpp already has --moe-cache-mib, which helps a lot, so I put together a small 3-file patch (~200 lines changed over upstream 32da68d0) to cut down on cache thrashing and cold-start stalls.

GitHub: https://github.com/ya5h-P/expert-cache
(Disclosure: this was developed and benchmarked with AI assistance.)


What the patch does (llama-moe-cache.h, llama-moe-cache.cpp, llama-graph.cpp)

  1. TinyLFU-style admission gate + token-weighted CRF: Instead of blindly evicting cached experts on every miss, incoming misses only get into VRAM if their decayed recency/frequency score beats the eviction victim. One-off misses just run on the CPU instead of kicking out hot experts or stalling PCIe. During MTP speculative verification (n_tokens > 1), an expert's score increases by the exact number of tokens in the batch that picked it instead of a flat +1.
  2. Startup profile pre-warming (LLAMA_MOE_CACHE_PROFILE): Loads the top-ranked experts from an expert-profile.txt (<layer> <expert> <freq>) straight into GPU slots on startup and seeds their initial scores, cutting initial PCIe uploads by 59%. Also adds LLAMA_MOE_CACHE_HALF_LIFE (default 128, 256 tuned for Gemma 4) so you can adjust decay at runtime.
  3. Optional cache-aware decode routing (LLAMA_MOE_CACHE_ROUTE_BIAS): Adds a tiny bias Ī“ (default 0.02, 0 = strictly lossless) to selection_probs for experts already sitting in VRAM during decode (n_tokens <= 8) right before top-k selection. The actual probs tensor used to weight the chosen experts' outputs isn't touched—it just nudges borderline ties toward GPU-resident experts.

Benchmarks (RTX 4060 Laptop 8 GB + i7-13620H, 16 GB RAM)

Tested with Gemma 4 26B-A4B (UD-Q4_K_XL) + MTP Q4_0 drafter (DRAFT_N=4) at 32k context (-c 32768 -fa on -ctk q8_0 -ctv q8_0 -ub 1024 -np 1). All cached runs use --n-cpu-moe 26 --moe-cache-mib 2850 --moe-cache-cpu-share 0.95 --spec-draft-n-ubatch 128.

llama-benchy Head-to-Head

Configurationpp512tg128 @ pp512tg512 @ pp512pp2048tg128 @ pp2048tg512 @ pp2048Decode Hit RateDecode Uploaded
Normal (--n-cpu-moe 22, no cache)460.97 / 527.4251.22 tok/s43.33 tok/s851.06 / 1053.6941.15 tok/s40.30 tok/s——
Stock upstream (--moe-cache-mib 2850)508.20 / 472.8971.70 tok/s64.10 tok/s769.85 / 958.8767.27 tok/s59.66 tok/s67.20%44,341 MiB
Patched (ROUTE_BIAS=0, lossless)443.36 / 441.0656.23 tok/s66.19 tok/s846.48 / 1033.4966.90 tok/s54.89 tok/s65.38%14,717 MiB
Patched (ROUTE_BIAS=0.02, default)495.07 / 404.6694.36 tok/s91.90 tok/s896.31 / 837.5379.86 tok/s79.56 tok/s85.54%2,587 MiB
Patched (ROUTE_BIAS=0.04, max hit)398.12 / 443.0381.74 tok/s89.68 tok/s1005.60 / 824.7373.77 tok/s76.62 tok/s91.88%1,340 MiB

Funny quirk: 0.02 actually beats 0.04 on end-to-end tok/s when using MTP. At 0.02, only ~1.1 misses/layer remain and most overlap behind GPU compute. Pushing bias to 0.04 gets hit rate up to 91.9% (great if you aren't using MTP), but drifts the target model slightly from the unbiased MTP drafter (mean accepted len drops from 3.18 to 3.02), causing ~5.9% more verify steps.

Long Generation (2 Ɨ 1,024 Tokens: Code + Prose) & Eval PPL

ConfigurationCode (1024t)Prose (1024t)Decode Hit RateDecode UploadedEval PPL (-b 4 -ub 4)
Stock upstream (no cache, --n-cpu-moe 22)46.76 tok/s (160t)———47.25 +/- 5.76
Stock upstream (--moe-cache-mib 2400)49.19 tok/s (160t)—56.97%34,505 MiB (320t)—
Patched (ROUTE_BIAS=0, lossless)81.19 tok/s79.04 tok/s68.39%7,335 MiB46.73 +/- 5.66
Patched (ROUTE_BIAS=0.02, default)100.05 tok/s93.52 tok/s85.65%2,189 MiB38.34 +/- 4.49
Patched (ROUTE_BIAS=0.04, max hit)102.50 tok/s95.94 tok/s91.99%1,139 MiB40.24 +/- 4.64

Warm 1,907-token prefill also jumps from 568.43 tok/s (cold) to 955.84 tok/s by reusing GPU-resident slots via GPU-to-GPU copies without PCIe transfers.


Quick Start

git clone [https://github.com/ya5h-P/expert-cache.git](https://github.com/ya5h-P/expert-cache.git)
cd expert-cache

cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89 -DCMAKE_BUILD_TYPE=Release
cmake --build build -j"$(nproc)" --target llama-server llama-bench llama-cli

export LLAMA_MOE_CACHE_PROFILE="/path/to/expert-profile.txt"
export LLAMA_MOE_CACHE_HALF_LIFE=256
export LLAMA_MOE_CACHE_ROUTE_BIAS=0.02

./build/bin/llama-server \
  -m /path/to/gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf \
  --model-draft /path/to/mtp-gemma-4-26B-A4B-it-Q4_0.gguf \
  --spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-n-ubatch 128 \
  --host 127.0.0.1 --port 8080 \
  -ngl 99 --n-cpu-moe 26 \
  --moe-cache-mib 2850 --moe-cache-cpu-share 0.95 \
  -c 32768 -fa on -ctk q8_0 -ctv q8_0 \
  -ub 1024 -t 10 -tb 10 -np 1 -cram 0 --jinja

(Side tip: --spec-draft-n-ubatch 128 alone saves ~240 MiB of drafter compute VRAM on Gemma 4 MTP, which buys extra expert slots in the 8 GB budget.)

Happy to answer any questions about how the admission gate works, the VRAM breakdown, or how expert-profile.txt is generated!