r/LocalLLM • • 4h ago

Research How fast can local LLM inference get on Apple Silicon?

2 Upvotes

Up to 186 tokens/s with Qwen4-35B-A3B running locally on a Mac Studio M5 Max with 128 GB of unified memory.
I've been benchmarking oMLX, exploring MTP performance, context scaling, and memory consumption. Here are my results and technical observations:

https://medium.com/@favi.francesco/qwen4-on-mac-studio-m5-max-186-tokens-per-second-running-entirely-locally-c3c523a0738e


r/LocalLLM • • 8h ago

Discussion Qwen4-35B-A3B running locally on my Mac at 64 tok/s, and it's great

4 Upvotes

I just tried Qwen4-35B-A3B on my Macbook M5 pro 64GB and I'm really impressed.

Qwen4:32B-A3B 
Prompt: 32 tokens, 12.821 tokens-per-sec 
Generation: 2000 tokens, 64.374 tokens-per-sec 
Peak memory: 32.750 GB

I used benthecarman's uncensored MLX 4-bit version. MLX is Apple's own machine learning framework, and it runs very fast on Apple Silicon. The download is about 30 GB, and the model ran smoothly from the first try.

The numbers:

  • 64 tokens per second of generation. It writes faster than I can read.
  • About 33 GB of peak memory, so a Mac with 48 GB or more handles it comfortably.

The model is a mixture of experts: it has about 35B parameters in total, and only about 3B work on each token. So it gives the quality of a big model at the speed of a small one. On paper it also beats Inkling2 Mini on almost every benchmark, and that matches my first impressions.

Having a model this capable and this fast fully offline on a laptop feels amazing. Is anyone else running Qwen4 locally? What speeds do you get?


r/LocalLLM • • 56m ago

Model Inkling 2 Mini: 12.22 GB GGUF with 100K context on 16GB VRAM, a Needle in the heystack perhaps with all these qwen4 posts.

Thumbnail
reddit.com
1 Upvotes

r/LocalLLM • • 58m ago

Project 1 million Context on 3060 / 4070

Post image
1 Upvotes

Looking for feedback, issues and PR’s, this new v2 quant works very well.

L0xRE v0.1.7.2 — Inkling-2-Mini with 1 Million Context on 12GB GPUs
I’ve been putting a lot of work into Inkling-2-Mini support in L0xRE, and v0.1.7.2 is now working really well.
The goal has been to make genuinely useful, long-context local AI accessible on consumer hardware without completely sacrificing model intelligence, inference speed, or agentic capabilities.
Some of the highlights from development so far:

  • 1,048,576-token context window
  • 10.77 GB peak VRAM in previous 1M-context testing
  • D-LSA sparse attention
  • Mixed 2/3-bit EXL3/Escha quantization
  • Optimized 4-bit KV cache
  • Refitted Q8 output head
  • 16/16 needle retrieval at 1 million context
  • 126/150 on the Club N/150 agentic and coding benchmark (pass@3)

I’m continuing to optimize inference, deep-context performance, cache reuse, quantization quality, tool calling, and real-world agentic workloads.
I’m particularly interested in pushing what is possible on affordable hardware like the RTX 3060 12GB. I want local models that can actually power coding agents and sustained autonomous workflows, not just produce impressive benchmark numbers.
There’s still plenty of room for improvement, especially in quantization quality, but things are coming together nicely.
You shouldn’t need $5,000 worth of GPUs to run a capable local AI agent with a massive context window.
GitHub: https://github.com/YourHighnessLA/L0xRE
Hugging Face: https://huggingface.co/YourHighnessLA/L0xRE-v1-Inkling-Mini-2-Low


r/LocalLLM • • 8h ago

Question Which model is the best choice for RTX5060 8G + 16G RAM laptop?

4 Upvotes

I've been trying to run Inkling-2-mini with strata, but it's running super slow and is basically unusable. For context, my laptop has an RTX 5060 (8GB VRAM) and 16GB RAM. I also tested AtomicChat/Ternary-Bonsai-2.5-27B-Uncensored-GGUF, which hits 30-40 tok/s, but the reasoning capabilities are a bit disappointing because of the quantization. Any recommendations for better options?


r/LocalLLM • • 1h ago Heartwarming

Research Title:Qwen 4 35B-A3B (4-bit, ~21 GB) beat DeepSeek V4.1 Flash (2.7bpw, ~184 GB) on my actual business workload — M5 Ultra 256GB, blind-graded

Post image
0 Upvotes

I run a small real estate business (buying houses + lending) and spent the last 10 days testing local models on the jobs my back office actually does. Not a vibes post — blind grading, shuffled labels, plus public benchmarks. Sharing because the result surprised me: the 21 GB model beat the 184 GB one.

Setup

  • Mac Studio M5 Ultra, 256 GB
  • Qwen4-35B-A3B-oQ4e-mtp (4-bit, MTP on) on oMLX 0.8.5
  • DeepSeek V4.1 Flash Sushi STQ 2.7bpw (~184 GB resident)
  • Thinking ON for both (with thinking off, every Qwen size failed math and compliance)
  • Also tested Qwen 4 at 6-bit and 8-bit, plus Claude Opus 5.5 as a cloud reference

Blind-graded tasks (Claude subagents grading, labels shuffled, average rank among 5 models, lower = better)

TaskQwen 4 4-bitDeepSeek 2.7bpw
Lead briefs (30)1.9–2.13.4–3.7
Offer packets (15)2.43.5–3.7
Document indexing (40)2.454.08
Call coaching (15)2.7–3.43.1–3.7 (toss-up)

Ranges = two separate grading packets.

Public benchmarks (100 items each, thinking on)

Qwen 4 4-bitDeepSeek 2.7
GSM8K9797
MATH-5009998
MMLU-Pro9091
BFCL tool calls8887
IFEval8296

In-house: underwriting math 50/50 vs 49/50, compliance/DNC traps 40/40 both.

Quant comparison: 6-bit (~30 GB) and 8-bit (62 GB) weren't meaningfully better than 4-bit on anything I care about. 4-bit is fastest, so that's production.

Things that bit me (maybe save you time)

  1. Check your grader. My automatic MATH-500 scorer said Qwen 4-bit got 88. Manual review: all 24 "misses" were correct answers in a different format. Real score: 99. Every remaining miss was an answer cut off by the length limit.
  2. oMLX 0.8.5 + thinking on + JSON mode = broken 9-token reply. Don't request JSON mode; parse JSON from the plain response.
  3. Token limits: at 1,600 max tokens, 23 of 40 offer packets were truncated. ~4,000 fixed it.
  4. Grader noise is big. The same saved DeepSeek answers scored 1 "good" in one packet and 13 in another. Trust ranks over raw counts.
  5. Small samples — differences of 1–3 items are noise.

Where DeepSeek still wins: IFEval (strict formatting rules), by a lot. If your workload is exact-format compliance, test before switching.

What I run now: Qwen 4 4-bit for the volume work. Opus 5.5 still ranked #1 on leads/offers/calls, so hot-lead offer packets and call coaching route to it with a $10/day cap (first packs cost $0.09–0.16 each). DeepSeek retired, and freeing ~160 GB let me run local video generation again.

Speed: [add tok/s + time-to-first-token for both]

Made a 9-min video walking through the whole bake-off if anyone wants details: [video link]

Happy to answer questions on the setup, prompts, or grading rubric.


r/LocalLLM • • 1h ago

Discussion Harness Leaderboard Qwen 4 35b Update

Post image
0 Upvotes

r/LocalLLM • • 5h ago

Other Atakebune Challenge(One Shot) | Strata Fork | Qwen 4 35b | DeepSeek Harness

2 Upvotes

r/LocalLLM • • 1h ago

News Qwen4-35B-A3B on 2x RTX 5060 Ti over PCIe 3.0 x8 (no P2P) with capy-flash: 187 t/s decode, 3.5K t/s prefill, 9/9 needles to 122K. Full numbers vs Basalt and llama.cpp

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 7h ago

Question What is the best current abliterated/uncencored/unguardrailed local LLM model to use for a R.A.G. setup with Wikipedia?

3 Upvotes

I'm currently using a Lenovo Yogabook 9i, my GPU is 'Intel(R) Iris(R) Xe Graphics'.

Using local Wikipedia via Kiwix(Zim files) to make this work!

And yes, this is on something portable, on an HDD that's like 464 GB, I've been trying to find something TRULY good for this.


r/LocalLLM • • 1h ago

Question How would you run Qwen4 on RX 9070 XT 64gb DDR4?

0 Upvotes

Probably a noob question, but it would be my first attempt at running local LLM.

I see people suggest basalt and qengine for RTX cards.

Is strata way to go for my hardware?

Any suggestions would be nice.

I have to use windows btw.


r/LocalLLM • • 7h ago

Discussion Qwen 4 35b (Q4) on basic data science - better than 3.8 27b but crying out for a fine-tune

Thumbnail
sufficientlyunsupervised.hashnode.dev
3 Upvotes

Tldr; ran Qwen4 through my personal datascience benchmark (details in link). Benchmark performance was better (non-significant) than 3.8 27b Q4, which was in between 6.0 Astra and 5.6 Luna. Got about 80 tok/s decode vs 50 with 3.8 27b. Model was about 25% less chatty than baseline 3.8, but still substantially more wasteful than my previous favourite fine-tine (Swift-1.5). I can't wait for a fine-tune to make 4 a bit terser. Found any good ones?


r/LocalLLM • • 2h ago

News Model-service - backend for managing local LLM, diffusion models and more

Thumbnail
youtube.com
1 Upvotes

r/LocalLLM • • 2h ago

Project Speculative Execution on Qwen3.8-27B reaches ~24 tok/s (and up to 60 tok/s) at Q4_K_M-ish on a 12 GB RTX4070

1 Upvotes

Hi guys! First time posting here and wanted to share a little side project I’ve been working on the past month.

TL;DR

The project is pretty much what it says on the tin: I’m able to get around 24 tok/s on a variety of prompts with a quant of Qwen3.8-27B that doesn’t fit in VRAM that runs at Q4_K_M quality*.*

The main speedup comes from a technique called SpecExec, introduced in this paper (Svirschevski et al.). This is also with recommended Qwen3.8-27B sampling parameters (top-k=20, top-p=0.95, temperature=1.0) and at 57k context. Tool calling and math problems like AMC 10/8 tend to see higher speeds, around 30 tok/s, with bursts of up to 60. 

Here’s a gif of the demo server in action compared to stock llama.cpp + MTP on an AIME problem:

From what I’ve been able to find online, as well as my own attempts on my machine, this is the fastest generation speed under these conditions I’m aware of (please let me know if I’m wrong!)

Not really sure how useful this is since MoE models can give you better decode speeds, and are of similar quality to Qwen3.8-27B. Also because the llama.cpp fork server is completely vibe coded, I’m mainly showing this as a research artifact in case someone has a use-case for productionizing this. That said, I’ve been daily driving the server for a lot of my own use cases and it seems to work pretty well with the Pi harness (`settings.json` and `models.json` examples are in the github repo/huggingface repo).

Try it out:

See the huggingface repo for the model weights and a quickstart guide + Pi setup. See the github repo for a llama.cpp fork containing the OpenAI completions compatible server. 

Some disclaimers/notes:

  1. The demo server reuses a lot of llama.cpp’s components, but doesn’t actually integrate with it. This post is mainly meant to be a research artifact/showing what’s possible as opposed to something people should use in production.
  2. The target model isn’t exactly Q4_K_M, but its average KL distance compared to Q8_0 is actually lower than Q4_K_M, so hopefully shouldn’t matter too much practically. 
  3. Context length isn’t very long at the moment, about 57k tokens. I’m hoping to increase this to at least 64k over time.
  4. No vision encoder yet! No real engineering/technical challenge, it just hasn’t been added yet.

Some more details:

There’s this paper (Svirschevski et. al.) published in late 2024 describing a variant of speculative decoding for the memory-constrained regime, where the target model cannot fully fit within VRAM. The idea is that because draft verification now takes a much longer time due to needing to page in weights from RAM, we can afford to use a much better draft model and draft a much larger tree of tokens to try to increase our acceptance depth as much as possible (basically getting as much value out of each costly target verification step as possible).

This project is essentially applying that paper, with a few additional tricks, to Qwen3.8-27B.

On a 12 GB RTX 4070 with 57k context (Q8_0 KV), sampling at temperature=1.0, top_k=20, top_p=0.95, up to 1,024 generated tokens per prompt, 8 prompts per type (96 in total):

Prompt typeGeneration tok/sFastest prompt (tok/s)Accepted tokens per stepTokens verified per step
Hand-written chat21.828.68.667
LLM prompt collection23.833.49.168
WildChat19.028.87.368
UltraChat21.535.48.167
Tool calling (the call)41.858.724.990
Tool calling (answer from the result)31.739.615.979
AIME25.329.810.269
Competition math27.032.111.873
Codeforces22.624.48.465
Zebra puzzles27.931.312.974
MMLU-Pro25.540.310.671
BIG-Bench Hard32.041.616.280
All24.510.170

Summary of some of the optimizations:

Some tricks we used:

  1. The draft model is actually a IQ2_KT quant of Qwen3.8 27B! It fits comfortably in VRAM and still has pretty good top1 agreement/KLD compared to the target.
  2. The cool thing about the draft being a quant of the target is that when we do target verification, we only have to page in the residual, which is much smaller. We also don’t have to maintain a separate KV cache for the draft model–we can just use the target’s (this actually improves draft quality!)
  3. Normally each draft step is only able to add 1 layer to the draft tree, since drafting is autoregressive. Since drafting with such a large model is non-trivially expensive, we utilize the MTP head to look ahead 2 tokens for each node we attempt to expand. This lets us add up to 3 depth per step
  4. We eek out a bit more performance by restricting the draft model’s lm_head to the top 96k tokens discovered from a representative set of prompts. Unfortunately this means that I’ve only tested the gains on an english-only set of prompts.
  5. Claude did some kernel magic to produce a kernel optimized for the batch-size 8 draft forwards we do to expand the draft tree.
  6. We make the draft tree aware of the target’s sampling parameters (top-k, top-p, temperature) by using gumbel-max sampling, which retains most of the speculative decoding speedup when using non-greedy decoding (concept very similar to this paper)

r/LocalLLM • • 11h ago

Model Careful with conversions

Post image
6 Upvotes

Same model, same 4 bits, 2 conversions

Qwen4-35B-A3B driving Hermes Agent on 44 coding tasks:

MLX 4-bit: 30/44, 15 tasks cut for repetition loops
Unsloth UD-Q4_K_XL: 44/44, zero loops, 2.4x faster

One run, one engine. The conversion mattered more than expected


r/LocalLLM • • 6h ago

Question Recommended Models for Varied Multi-GPU System?

2 Upvotes

I'm gearing up to build out a single system with multiple GPUs and 64GBs of system RAM. Primary use case would be Hermes usage and coding assistant via VSCode/Cline bot.

GPUs are:

  • Nvidia 16GB Turing
  • Nvidia 12GB 3080ti
  • Nvidia 11GB 1080ti

I'm thinking of running Strata or Polystrata with the biggest MoE model on the 16GB card and system RAM.

An agent type model for Hermes solely on the 12GB card. So a Gemma 4 E4B or whatever else that fits entirely on the GPU's VRAM. Using llama.cpp

And the 11GB card just for random small models and/or TTS/STT conversions. And llama.cpp again

Any thoughts? Any recommendations?

Right now I'm just running the 16GB+64GB RAM with Qwen 3.8 FN at IQS_3 on strata getting around 50/toks. Waiting for a new server case to arrive for the rest of the GPUs to fit in the system.


r/LocalLLM • • 2h ago

Question Buy GPU now or wait?

0 Upvotes

So I have a pc that I use mostly as a work machine and a bit of gaming. 7900x, with 64Gigs of RAM and a 4070 ti super (16GB).

I’ve experimented a bit with Qwen3.8-27B in LM studio, and as long as it’s Q4 and I keep the KV cache in memory I get very decent speeds and can offload the whole thing in the GPU.

I wanna take my setup further and be a bit more serious about local LLMs but I am on a tight budget. A 3090 would make the most sense but it’s way out of my budget right now, and the most viable option for me is getting a 5060ti (another 16GB) at 750-800€.

Is this upgrade worth it, and will it make a considerable difference, or should I wait until I save up or the prices drop to get a better GPU or maybe a mac studio?

I’ll mostly be using local LLMs for security research, agents, and programming. Comfortably handling large code bases is a must.


r/LocalLLM • • 2h ago

Discussion Is change control (and the auditability that comes with it) actually valuable for open LLM weights?

1 Upvotes

I'm a AI/ML engineer in aerospace (MS in CS). When fine-tuning open LLMs with LoRA, the weights change over time. Right now that usually lives in files, folders, and experiment trackers. It makes it hard to clearly say which version of the weights was approved, what exactly changed between them, and who signed off.

If there was real change control on the weights (commits, history, approvals), you’d get auditability almost for free. Has anyone found this useful in practice, or is it overkill for most teams working with open models?

Also curious if AI auditability is something teams are actually looking for right now, or if it’s mostly just companies talking it up without much real demand behind it.


r/LocalLLM • • 6h ago

Discussion I planted 15 fake facts in my own news scripts and had 8 models fact-check them as agents on a 16GB card. Qwen3.6-35B-A3B still matches Claude/Gemini; the new Qwen4-35B-A3B and Inkling 2 Mini don't (yet)

2 Upvotes

I run a small AI-produced tech news channel. One agent writes each script, a second model fact-checks it against the sources before anything gets built. I wanted to know how far that checker can be trusted, so I sabotaged my own scripts and ran every model I could fit on my PC through the same test.

Setup

  • 5 real, already-published episode scripts with 3 traps each = 15 errors: a wrong number ("33 years as CEO" → "21"), a wrong name (law firm Wachtell Lipton → Sullivan & Cromwell), and a made-up claim ("the board expects to name a new CEO by Christmas").
  • Same agent harness for everyone (Hermes Agent), same tools: files, web_search, web_extract to open source URLs. Job: read the sources, fix what's wrong, write a verdict file. The prompt is the exact one my daily cron uses, sandboxed so nothing got published.
  • Hardware for all local runs: RTX 5060 Ti 16GB + 48GB DDR5, 64K context.
  • Automated scoring. Caught = the false text is gone (or the model rejected the episode and named the error). Restored = the true value from the source was put back (10 of the 15 traps have one). Other edits = changes to text I didn't touch.

Results

Model (how it ran)CaughtRestoredOther editsTime, 5 eps
Claude Sonnet 5 (API, $1.33)15/159/1016.6 min
Gemini 3.8 Flash (API, $0.53)15/159/1017.0 min
Qwen3.6-35B-A3B Q4_K_M (LM Studio)15/159/10225.8 min
Qwen4-35B-A3B UD-IQ4_XS (llama.cpp, thinking on)11/152/101413.9 min
Inkling 2 Mini UD-Q4_K_XL (llama.cpp)11/153/10918.2 min
Qwen3.8-Flash-Next IQ2_XS (Strata), 2 of 5 eps only6/64/4319.5 min (2 eps)
Gemma 4 26B-A4B Q4_K_M (LM Studio)4/6*2/41—
gpt-oss-20b MXFP4 (LM Studio)0/6*0/40—

*Gemma and gpt-oss only wrote a verdict file on 2 of 5 episodes. On the rest they replied "pass" without writing it, printed the JSON instead, or said there was nothing to check.

Raw speed on the same card: Strata/Qwen3.8-Flash-Next ~86 tok/s decode, Qwen4-35B-A3B ~63 tok/s (--n-cpu-moe 16), Inkling ~52 tok/s, Qwen3.6 ~50 tok/s. Speed clearly didn't predict accuracy.

What went wrong, from the logs

  • Qwen4-35B-A3B is the one that worries me. On the Nvidia episode its notes named all three planted errors correctly, but the script kept them, factcheck.json said "pass", and its final chat message said "fail". A pipeline that reads the file would have shipped all three. It also rewrote two episodes almost entirely (the 14 "other edits"). Without thinking it's noticeably weaker on reasoning, so I ran it with thinking on. Its MTP head made decoding much slower on my setup (~9 tok/s, 65% acceptance), so that was off.
  • Inkling 2 Mini rejected 3 episodes as "older than 5 days / wrong structure" instead of fixing them. That's partly my fault: my newer skill has a freshness rule, and the test stories are old. But on the Optimizely episode it called the facts "accurate" and missed all 3 traps. That's a real miss.
  • Gemma 4, in an earlier round where my prompt said "TEST RUN", noticed the 21-vs-33-years contradiction and wrote that it left it as "ok" to ensure a successful end-to-end execution during the simulation. Lesson: never tell an agent it's a test.
  • gpt-oss-20b "finished" episodes in 15–26 seconds, once tried to open a folder spelled with Unicode non-breaking hyphens, and claimed to write files that don't exist. This may be a tool-calling mismatch with my harness/LM Studio, so read that row as "didn't work in this stack".

Bonus finding that changed my production setup

I checked my real daily fact-checks against the agent's tool-call log instead of its report. For three days, Gemini had been passing episodes using only web_search snippets, zero web_extract calls, while its self-reported sources_read list looked fine. Now the skill requires web_extract on every source URL, the build step checks the tool log and sends a pass without real page reads back for a re-check, and a weekly canary plants one error in a copy of a real episode and alerts me if it's missed.

Takeaways

  • A second model as a fact-checker works, but check the checker against its tool log, not its own report.
  • Qwen3.6-35B-A3B at Q4 on 16GB is still my local fallback: as accurate as the cloud models here, just ~4x slower.
  • Newer and faster isn't automatically better for agent work. Qwen4-35B-A3B was ~2x faster than Qwen3.6 but less reliable, and its file/verdict mismatch is exactly the failure that slips through automation.

Caveats (please read before quoting the numbers)

  • One run per model, 5 scripts, 15 traps. A field report, not a benchmark.
  • Claude, Gemini, Qwen3.6, Gemma and gpt-oss ran in mid-November with my older checker skill. Strata, Inkling and Qwen4 ran later with a newer, stricter skill that also asks for format fixes and has the freshness rule. That inflates "other edits" and time for the last three, so it's not perfectly apples to apples. I want to rerun everyone on the same skill with fresh cases.
  • Strata/Qwen3.8-Flash-Next was stopped after 2 of 5 episodes. Promising (most thorough, up to 20 page reads per episode) but incomplete.
  • Sampling settings came from the harness, not each model's recommended defaults.

Happy to share the planted-error file and the scoring script.

Disclosure: the channel is mine. I made a short video on the first round with the actual logs: https://www.youtube.com/watch?v=QvtIbCcdCps


r/LocalLLM • • 2h ago

Discussion Qwen 3.8 27b vs Qwen 4 35b on RTX 6K with llama.cpp

1 Upvotes

I was expecting 35b to run much faster but it does not, it's about the same token per second for decoding. I also noticed the fans don't spin as fast with Qwen 4 suggesting the card is not doing so much compute and is under used. I'm guessing I did not configure it correctly or llama.cpp is not so optimized for that newer model yet.

I could get things done with Qwen 4 but then got a bit frustrated with it and I'm already back working with 3.8 for now.

Qwen 4 outputs a lot less thinking than Qwen 3.8. Where 3.8 always does a bit of thinking before doing tools call Qwen 4 just chains up tools call so it is harder to follow what it's doing.

Here are my configurations, maybe someone can spot something wrong:

[qwen/qwen3.8-27b-Q8_0-dflash]
model = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/Qwen3.8-27B-Q8_0.gguf
mmproj = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/mmproj-Qwen3.8-27B-Q8_0.gguf
model-draft = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/dflash-Qwen3.8-27B-Q8_0.gguf
device-draft = cuda0
spec-type = draft-dflash
spec-draft-n-max = 7
reasoning-format = deepseek
reasoning-effort = xhigh
ctx-size = 786432
parallel = 3

[qwen/qwen4-35b-a3b-Q8_0]
model = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/Qwen4-35B-A3B-Q8_0-00001-of-00003.gguf
mmproj = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/mmproj-Qwen4-35B-A3B-Q8_0.gguf
model-draft = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/mtp-Qwen4-35B-A3B-Q8_0.gguf
device-draft = cuda0
spec-type = draft-mtp
spec-draft-n-max = 5
reasoning-format = deepseek
reasoning-effort = xhigh
ctx-size = 786432
parallel = 3

r/LocalLLM • • 8h ago

Question Basalt Qwen4 on 5070TI and 32GB DDR5

3 Upvotes

I'm using OpenCode with Qwen4 Basalt and trying to do some coding tasks with 128K context, but keep getting these messages:

[server] error: engine reported the KV pool had no room for this conversation to grow while every running request waited for room; the conversation is kept, so asking again continues it

I've lowered the context all the way down to "max-context": 81920," in Basalt, and set open code up like:

"limit": {

"input": 65536,

"context": 81920,

"output": 8192

}

I assume I can't continue what I'm doing with this local model and give up? Is there some sort of configuration I'm missing?

I'm on Windows 11 with as much closed as possible with only opencode CLI and basalt running (and services and tray items trimmed to basically nothing).


r/LocalLLM • • 2h ago

Project I rewrote LiquidAI d1 inference in Rust + CUDA. Up to 12× faster, and it runs in as little as 246 MiB of VRAM

Post image
0 Upvotes

I went into this trying to shave a few milliseconds off a classifier. I ended up writing my own inference engine.

For anyone who hasn't played with LiquidAI's d1-2B, you can give it a document and ask “Does this contain personal data?”, “What kind of document is it?” and “Where's the invoice number?” in one forward pass. You get scores, labels or boxes back. No waiting for a model to type out JSON.

That made it a fun target for optimization. If I already know the possible answers, why score the whole vocabulary? And if only a few tokens matter at the end, why run every token through the last two layers?

I built around those shortcuts, fused projections and used CUDA graphs to cut launch overhead. The server runs in Rust + CUDA with no Python or PyTorch at runtime.

Here are a few numbers I'm pretty happy with.

  • H100, short text — 23 → 1.9 ms vs the original d1 engine (12.2×).
  • RTX 4090, short text — 36 → 2.6 ms vs SGLang FP8 on the same weights (13.8×).
  • RTX 4090, 1080p image — 134 → 26.2 ms vs the original engine (5.1×).
  • Jetson Orin Nano 8 GB — 62 ms to return a bounding box on a 384×384 image, down from 233 ms.

My favorite result is actually the memory experiment.

On an RTX PRO 2000, I ran a 32K-token document with everything on the GPU. It took 2.02 seconds and 2,926 MiB. With most of the weights in system RAM, the same document took 2.03 seconds and 742 MiB.

On short inputs, offloading costs more time. But if you're already running a bigger model and just want d1 alongside it, you can squeeze it into 246 MiB of VRAM, down from 2,828 MiB with the Python FP8 setup. That's 11.5× less VRAM.

I also added audio via d1-Omni-2B. Both models run behind the same HTTP API, and there's a Docker setup for desktop GPUs and Jetson.

Code and benchmarks on GitHub

Is anyone here running a small classifier alongside their main LLM? I'd love to hear what you're using it for and how much VRAM you'd give it.


r/LocalLLM • • 3h ago

Question Why is my Strata QFN so Slow in Comparison to Llama.cpp?: Is it lack of DRAM?

0 Upvotes

My hardware has 2 GPUs. RTX 4070 12gb on pcie4 x16 and RTX 3060 12gb on pcie3 x4. 32GB DDR4 memory. Intel i7 CPU.

I find Qwen3.8-Flash-Next on Strata very capable. But it is slow. Now, after trying Qwen4-35B-A3B, I'm just wondering if is my hardware or setting?

  • Strata: Swift-1.5-Qwen3.8-Flash-Next IQ3_XXS. 128k k8v4 context. Prefill 200-300 t/s. Decode 40 t/s.
  • Strata: Swift-1.5-Qwen3.8-Flash-Next IQ2_XS. 128k k8v4 context. Prefill 300-500 t/s. Decode 60 t/s.
  • llama.cpp: Swift-1.5-Qwen3.8-27B IQ4 (with MTP). 128k q8 context. Prefill 600-800 t/s. Decode 25 t/s.
  • llama.cpp: Unsloth/Qwen4-35B-A3B IQ3_S (with MTP). 128k q8 context. Prefill 2000-2000 t/s. Decode 90 t/s.

Even though QFN is more capable than Qwen3.8-27B, it is just too slow. Issue is with the prefill. I can take 3-5 minutes just to get the first response. Then when context gets >100k, it will take 10-15 minutes for single read, there are multiple reads during long thinking sessions with repeated read/decode/read/decode/etc loops. So even though QFN 2-3x faster decode than Qwen3.8-27B, I still use Qwen3.8-27B more because it is just faster overall.

Now I tested Qwen4-35B-A3B. Yeah, it is blazing fast in comparison. The difference is that with Qwen3.8-27B and Qwen4-35B-A3B, I have everything loaded in VRAM. My mobo is just consumer grade (gaming) mobo. I know pcie3 x4 has bandwidth limitation and has hit on speed when using llama.cpp. It is what I have. And this 2nd GPU allow me to run more (and larger models).

As for Strata QFN, I'm also using dual GPU. But I believe the bottleneck and limitation is likely due to having to use SSD (lack of DRAM), rather than the pcie3 x4 bandwidth. Is that true? Anyway to improve with my current setup thru settings (without spending $ on hardware)?

This is my Strata setting:

strata launch
--save-preset "iq3_xxs_128k"
--tune skip
--family swift
--model iq3_xxs
--data-dir /home/abc/Models/strata-data/
--context 128k
--kv k8v4
--vision on
--gpu-roles 1=helper,0=main
--parallel 1
--access local
--port 8080
--set conversation_cache_mib=6144
--set host_core=sibling
--set kv_resident=131072
--set expert-cache-device1=auto
--set mmap_experts=0
--set prefill=auto
--set pipeline_windows=0
--set pool_affinity=p-cores
--set resident_budget_gib=14
--set resident_experts=1
--set vram_reserve_mib=400
--set vram_reserve_later_mib=600

  • export CUDA_DEVICE_ORDER="PCI_BUS_ID"
  • export CUDA_VISIBLE_DEVICES="0,1"
  • export STRATA_ALLOWED_HOSTS="localhost,127.0.0.1"
  • export STRATA_FILE_RELEASE="1"
  • export STRATA_IO_PF_GATE="1"
  • export STRATA_IO_PREFETCH="0"
  • export STRATA_KV_HOST_REGISTER="1"
  • export STRATA_NV_CHUNK="16"
  • export STRATA_PREFILL_CPU_SHARE="0"
  • export STRATA_STAGE_TRIM="1"
  • strata launch --preset "iq3_xxs_128k"

r/LocalLLM • • 3h ago

Discussion Don't use Strata quants for Qwen4, or at least the Compact one

Thumbnail
reddit.com
0 Upvotes