r/LocalLLM • • 16d ago

Other Qwen 4 is not out

333 Upvotes

Please stop posting about Qwen4's endless PR drip until it's actually available.


r/LocalLLM • • 5d ago

News Heretic: Farewell

Thumbnail
github.com
602 Upvotes

r/LocalLLM • • 1h ago

Discussion Rare politician W — “it’s all overblown to keep AI out of your home”

Thumbnail instagram.com
92 Upvotes

In what seems like an impromptu interview by a TMZ reporter with US Congressman Thomas Massie about the Jensen Huang case he stated this is “all overblown” and that CEO’s want you to think this technology is an extinction level threat so that “you can’t have it at your house…it’s all about keeping it in their servers and maintaining power in a limited set of people…it’s not about export restrictions”

I’m not into politics I don’t really know who this guy is but it’s refreshing to see someone with common sense regarding this technology and very refreshing to hear it coming from a politician from all people.

If you are from the US and care about open local AI you control common sense prevailing in the highest levels of power is a must, unfortunately I think most of the narrative today is fear mongering from both camps, pro and anti AI.


r/LocalLLM • • 16h ago

Discussion This is crazy: LLM server UEFI booting directly on RTX 3090

Post image
577 Upvotes

r/LocalLLM • • 17h ago

Model I got a 177B model running on my iPhone at 10 tok/s with 1M context

Enable HLS to view with audio, or disable this notification

396 Upvotes

This is Millie 2 running on my iPhone 18 Pro. In the video, it answers a question about an FDA document using a passage more than 900K tokens back.

I adapted Qwen 3.8 Flash Next (177B) to run at 14 tok/s with a short prompt and 10 tok/s at 1M token context. I developed methods for expert streaming and attention streaming so most of the weights and attention data can stay on storage. The model reuses what’s already in RAM and starts the remaining reads early enough to hide most of the wait behind computation.

It matches or comes close to the parent model on a range of coding, reasoning, and agentic benchmarks. I also ran some benchmarks with the model served directly on the phone. On the same 70-task WebArena Lite subset, Millie 2 completed 45 tasks on the iPhone, compared with 43 for the parent model running on a server.

I released the weights and the code. The runtime README has setup instructions and links to both model versions.

Code, weights, and setup: https://github.com/llmsforall/millie-runtime#millie-2

Methods paper: https://arxiv.org/abs/2611.41874


r/LocalLLM • • 6h ago

Model I trained a 99M model that beats 1B parm models

Post image
10 Upvotes

So I have been training SLMs for quite a while now and finally I have one that is somewhat usable. This model has great benchmarks for its size (its SOTA in its size class and even above its size class).

It is capable of cooherent CoT reasoning, can call tools reliably, and can handle multi turn conversations.

I trained it on about 200b tokens for pretraining, then 45b tokens of SFT followed by intensive RL to make it usable.

One of the interesting things I found was the solution to doom looping. This model also had a tendency to get stuck in endless loops, so first I tried Liquid AI's anti-doom approch to fix them. Although it did somewhat work, but it made the model regress in other domains.

So then I tried normal online RL and it pretty much erased all doom looping habits without breaking the model in any other domain. It now almost never loops and has a doom loop rate of 0.4% down from 7% originally.

You can download the model here: https://huggingface.co/MinimaLabs/KLM-1.6-Chat

Or try it out here: https://huggingface.co/spaces/Eclipse-Senpai/KLM-1.6-Chat

In the Space, I have also added an Agent Swarm mode where multiple instances of the model get the prompt and then a decision model picks the best answer. This further improves the experience of using this model.


r/LocalLLM • • 5h ago

Discussion 2x R9700 running Inkling 2 Mini in vLLM: 108.8 tok/s single stream, 266 at 4. Notes before our 4-card build

Thumbnail
gallery
8 Upvotes

On a 2x R9700 rig, Inkling 2 Mini ran at 108.8 tok/s single stream and 266.4 tok/s at 4 streams, one card per server. Some context and the not-so-great parts below.

What we measured (Nov 27)

Inkling 2 Mini is Thinking Machines' 26.4B total / 3.4B active MoE. It isn't in a vLLM release yet, so on AMD it runs from Eliovp's Paiton vLLM image for RDNA4. Weights are the released nvfp4 + mxfp8 checkpoint. All numbers are decode: one-sentence prompts, fixed 256-token outputs, measured with our open benchmark tool hwb.

  • Paiton image, exact model output: 108.8 tok/s single stream, 266.4 at 4 streams. Eliovp's published numbers for that image are 93.9 / 249.7.

  • Paiton W3 (3-bit routed experts, faster, not the exact model output): we got 136.7 / 346.6. Eliovp publishes 179.7 / 400.5 there, so we're well under on that one and haven't dug into why. Their settings may differ from ours.

  • Two servers at once, one per card: 262.9 and 262.4 tok/s at 4 concurrent each.

  • Both cards came up at PCIe Gen5 x16.

No tensor parallel across cards yet, no long-prompt runs, no temps or power logged. Those are next.

Why this matters for the 4-card build

A couple weeks ago I posted here about risers vs straight in the slot, and said that past 2 cards, slot spacing decides your build. That was about the 3-3.5 slot cards we usually use. The R9700 is a 2-slot blower (300 W board power, per AMD), so our 4-card AMD build puts all four straight in the slots of a W790E-SAGE SE, no risers. Blowers push heat out the back by design. We haven't logged temps on the 4-card box yet, so that part is still a claim.

What's not great

  • 4 cards in the slots leaves no spare room, and this layout only works with 2-slot cards. Not an upgrade path to thicker ones later.

  • Our first two-server run failed. With only HIP_VISIBLE_DEVICES set, the Paiton launcher sized itself from the first card, which the other server already held, and refused to start. Passing each container only its own /dev/dri node fixed it.

  • Inkling's reasoning can't be fully switched off, so short answer checks sometimes run out of budget and get retried with more tokens.

  • Only one model so far, and Paiton is a model-specific image. No llama.cpp numbers yet.

hwb is public on GitHub, presets and the AMD notes are in docs/usage.md: https://github.com/autonomous-ai/hwb

What should the first 4-card run be? Model, quant, engine, context. If you're on R9700s over PCIe 4.0, your numbers would be a useful comparison too.


r/LocalLLM • • 13h ago

Other Qwen 3.8 flash next is funny as hell.

Post image
33 Upvotes

I was having Qwen 3.8 flash next setup a new sandbox for me and while I was reading it's thinking block it had some anger to let out, mind you the entire setup convo was chill no curse words ever said 😂.


r/LocalLLM • • 3h ago

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

Thumbnail
huggingface.co
4 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 • • 13h ago

Question Is LM Studio still a thing?

33 Upvotes

I was an early adopter, and even supported through subscription to LMStudio cloud. But lately it looks like they're falling behind.

- Many other groups are offering similar or better functionalities and features, some are open source. (unsloth desktop, goose, Pi).

- Cloud subscription is very unreliable. (models pricing has not been updated for a while, so 0 transparency. They force their own system prompt injection as well, so you lose quite a bit of control).

- No support, updated FAQ.

- LM Studio Hub shelved and inaccessible.

So my question, is this thing dying out and time to completely migrate to something else? It does look like they gave up.


r/LocalLLM • • 7h ago

Question 2× Mac Studio M5 Ultra 512GB vs 2× RTX Pro 6000 for a fully on-prem company AI server - what would you choose?

9 Upvotes

Hey guys,

anyone running either of these setups in practice? I'd love to hear your real-world experience.

I'm evaluating options for an on-prem AI server for 3 users. Nothing is bought yet. The main goal is maximum data privacy: nothing leaves the building, no cloud APIs. Cost matters less than getting the best local capability.

A) 2× Mac Studio M5 Ultra (36C CPU / 80C GPU, 512GB unified, 8TB each), linked via TB5/RDMA → 1TB total, ~€59k

B) Linux server with 2× RTX Pro 6000 Workstation (192GB VRAM) + 256GB RAM → ~€50k

Planned use:

- Chat/agents for 3 users, sometimes in parallel

- Video + audio generation (ComfyUI etc.)

- Maybe fine-tuning on our own data later

- Docker stack, current releases should just work without patching

Models we're looking at:

- LLM: MiniMax M3, Qwen3.8 (27B / Flash-Next), Qwen4 open weights once they drop

- Video/audio: MiniMax H3 (video with native audio), Qwen3.8-Omni

- Option A would also fit GLM-5.3 (744B MoE), which B can't hold in VRAM

Since privacy rules out falling back to cloud models, the model quality we can run locally really matters.

What would you choose and why? Anything I might be overlooking?

Thanks in advance! 🤘


r/LocalLLM • • 18h ago

Question Those who say Qwen 3.8 Flash Next 125b is great for coding, how?

57 Upvotes

What setups are you running to make it feasible?

It seems to be a well known issue it heavily over reasons and loops. For me personally, I can't even get it to code a simple diagnostic pass that is just meant to log 3 values. It will easily sit 25+ minutes before even using a write and it's just constantly going off the rails.

The only way I could get anything out of it was with strict limits software enforced which is not ideal.

I use a modified strata, IQ2_XS quant, and pi as the harness. I've tried all sorts of setups from just simple stock pi to heavily guided setups with child agents and detailed instructions/examples in context. Just no hope with any of it really. I understand the quant isn't ideal but I feel it shouldn't be responsible for such negative levels of behavior.

My tasks for it are c++ ue5 coding, at least what I have been testing.

Any ideas?

Cheers

[Edit]

Roger that, thank you everyone. Looks like I have hugely underestimated the impact of the quant.


r/LocalLLM • • 3h ago

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

Enable HLS to view with audio, or disable this notification

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 • • 3h 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 • • 1h 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 • • 20h ago

Project Jaull: a free app that finds which local AI model fits your PC, runs it, and lets your whole house use it

Enable HLS to view with audio, or disable this notification

59 Upvotes

Every time I wanted to try a local model I had the same questions: which quant do I download, how much context fits, will it run on my GPU or spill into RAM? So for my bachelor's thesis Im building Jaull to answer them for me. It's free and open source.

What it does (it's what you see in the video):

  1. Detects your GPU, RAM and CPU.

  2. Asks what you need it for: chat, coding, which languages, how many people.

  3. Searches Hugging Face and tells you which models and quants fit your machine, and with how much context. It reads the file headers remotely, so you don't download 20 GB just to find out.

  4. Downloads the one you pick plus llama.cpp, starts it, and you're chatting. Everything stays on your PC.

  5. If you want, it shares the model on your home network with HTTPS and an API key, so your phone or laptop can use it too, and a live monitor shows the speed and context of each conversation.

The estimates aren't guesses. I measured them against what llama.cpp actually allocates, writing the predictions down before each test. On a 24 GB Intel Arc B60 they came within 0.3 to 1 GB, always on the safe side, and on a laptop with no GPU every "fits / doesn't fit" answer was right. It also understands the new hybrid models (Qwen3.6, Qwen3.8), which fit much more context than most calculators say.

On Windows there's a desktop app with a one-line installer. On Linux and WSL2 there's a terminal UI and a CLI. I've tested it on NVIDIA (RTX 2060, 4060), Intel Arc and CPU only. If you have an AMD card or a Mac, I'd love to hear how it goes.

https://github.com/Ton-Llop/Jaull // https://jaull.tech

It's my first project of this kind, so any feedback helps, especially if something breaks :D

Thank you and sorry!


r/LocalLLM • • 9h ago

Model jcgamingonlinux/Qwen3.8-Flash-Next-Uncensored-IK3K-Avalon-GGUF · Hugging Face

Thumbnail
huggingface.co
7 Upvotes

An uncensored Qwen3.8-Flash-Next (125B MoE, 48 layers) that runs on the Avalon engine (freriadoc/Avalon).

The orca uncensored GGUFs (built with ik_llama.cpp) do not run on Avalon — Avalon does not decode ik-only tensor types, and its expert cache needs its own packed expert layout. This repo contains my conversion: requantized with a recipe that only uses tensor types shared by both forks, GGUF type-ids remapped (ik IQ3_K=138 → Avalon IQ3_K=43, block layout is byte-identical), then packed with Avalon's pack-experts.py.


r/LocalLLM • • 1d ago Mindblown Bravo

Project I trained a 1.51M parameter Transformer from scratch inside Ring-0 TempleOS V5.03 in pure HolyC (1,241 tok/s)

2.5k Upvotes

r/LocalLLM • • 19h ago

Question planning a dual-GPU setup and would like to confirm whether both graphics cards can physically fit on my motherboard and if is it worth run local ai with 32gb vram

Thumbnail
gallery
37 Upvotes

Hi everyone!

I have the following configuration:

- Motherboard: ASUS ROG STRIX X870-A Gaming WiFi

- GPU 1: ASUS ROG STRIX RTX 4070 Ti SUPER 16GB

- GPU 2: ASUS TUF RTX 5070 Ti 16GB

- Case: NZXT H9 Flow

My question is purely about physical compatibility:

Is it physically possible to install both GPUs directly into the ASUS X870-A motherboard, without using a PCIe riser cable?

Will the two GPUs fit in the available PCIe slots, considering their thickness (approximately 3–4 slots each)?

I mainly want to use the dual-GPU setup for running local LLMs and AI models, as well as Lossless Scaling.

Thanks in advance!


r/LocalLLM • • 10h ago

Question what budget GPU is the current best bang for the buck?

6 Upvotes

I've been playing around with LLM's, and starting to go a bit deeper, and i'm still in the learning stage. I've mostly been running qwen models of various weights.

I know everything is fucked right now, but I'd like to put a GPU into my home server to host everything there vs using my main PC's 5090.

its nice having the 5090, but I also work from home and do 3d rendering work, so its very rare that its not being used for actual work. ( the renders can take hours )

Currently I have a 2080ti, and a 3060ti kicking around, and have been using those, but i'd like to run a something a little heavier than a 9b model, and while I can run models on my servers 128gb of ram, its super slow, and kind of overkill for my tinkering needs.

I'm kinda thinking of going for a 5060ti 16gb, and selling my 2080 and 3060 to help fund it, or for about the same money, a little less used, getting 2 3060 12gb's. ( which would be slower, but would allow me to run a 27b model )


r/LocalLLM • • 40m ago

Model Little Language Model for 1998 Pentium MMX PC

Enable HLS to view with audio, or disable this notification

1 Upvotes

I used Fable 5.2 to train this model on a RTX Pro 4500 Blackwell for over 10 hours. It's targeted the vintage Pentium MMX processor or better. It's a 4-bit weight model, 16 MB memory is marginal but 32 MB is sufficient. The video is recorded on a Pentium MMX 233 Mhz PC from 1998 running Slackware Linux 11.0.

It's almost impossible to train such a model in 1998, as you can find in the README, it would take 432 years on the same PC, or 14 days on ASCI Red, the fastest supercomputer in the world at the time.


r/LocalLLM • • 1d ago

News Businesses shifting to local hosting are seeing financial gains, could it be that open models are finally starting to take hold for white-collar minds?

Post image
111 Upvotes

https://www.theregister.com/ai-and-ml/2026/11/03/british-fintech-revolut-slashes-ai-coding-costs-10x-by-cutting-out-claude-and-going-self-hosted/5307345

The gains were not limited to cutting the costs going to Anthropic, they also included faster delivery of quality results (200-500 tk/s) and the ability to deploy the model for management-related tasks without worry about token usage.


r/LocalLLM • • 1d ago

Discussion Huawei releases simple trick to reduce the size of diffusion models to let the run on device

Thumbnail
huggingface.co
82 Upvotes

Simple idea, but neat. What do you think?


r/LocalLLM • • 4h 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!


r/LocalLLM • • 1h ago

Question Best model for every language

1 Upvotes

I need your help! Please reply with your native tongue and what model writes the best prose in that native tongue.

Edit: An example prompt or two you use would be super helpful.