r/llamacpp • • 8h ago

Ternary Bonsai 2.5 27B on 8GB VRAM - Local AI With Vision (llama.cpp Windows Setup)

Thumbnail
youtu.be
5 Upvotes

Ternary Bonsai 2.5 27B is a new open model from PrismML: a full 27-billion-parameter model where every weight is just minus one, zero or plus one. That shrinks the file from 53.8 GB to about 6 GB, so it fits on an 8 GB gaming card, and it can read pictures too. On my RTX 5060 Laptop GPU (8 GB) it answered at about 26 tokens a second.

Model (GGUF files, PrismML): https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/tree/main


r/llamacpp • • 38m ago

Qwen4-35B-A3B on a 12GB/30GB laptop: 128K ctx @ ~51 tok/s decode, 256K works, 512K with q4 KV, 1M OOMs

Thumbnail gallery
1 Upvotes

r/llamacpp • • 52m ago

Qwen4 35B A3B (37 GB) on a 16 GB laptop GPU: 27.8 → 77.5 tok/s with an expert cache and MTP drafts off

Thumbnail
reddit.com
1 Upvotes

r/llamacpp • • 4h ago

Qwen 4 35B-A3B - Dual RTX 3060 (24GB) - 70 t/s at 200K+ Context (Procedure & Parameters)

Post image
2 Upvotes

I hope my setup note will help others configure their Qwen 4 35B-A3B on older consumer grade systems (Ryzen 5 + DDR4 + RTX3060).


r/llamacpp • • 1h ago

Qwen4-35B-A3B on an 8 GB laptop 5070: the 12 GB expert-cache recipe backfires, plain defaults win (48 tok/s)

1 Upvotes

Saw the post getting about 90 tok/s on a 12 GB 5070 with -cmoe --moe-cache-mib 7168 and MTP, so I tried the same idea on my laptop. Short version: on 8 GB it doesn't carry over. Plain llama.cpp with no placement flags was the fastest thing I tried.

Setup

Lenovo laptop, Core Ultra 9 275HX, RTX 5070 Laptop 8 GB, 32 GB RAM, Windows 11
llama.cpp b12973 (CUDA), Unsloth UD-IQ4_XS and UD-Q4_K_M, plus Unsloth's Q8_0 MTP file for the draft runs
-c 40960 -fa on -ctk q8_0 -ctv q8_0 on everything, plus whatever's listed in the table
Each setup gets a fresh server, then 3 runs of a 1,500-token coding answer (temp 1.0, top-p 0.95, top-k 20, thinking on). Median shown. Prompt speed is one 12.7K-token prompt.

Results (tg = generation tok/s, pp = prompt tok/s)

Setup IQ4_XS tg IQ4_XS pp Q4_K_M tg Q4_K_M pp
No placement flags 47.8 384 42.2 309
No placement flags + MTP draft 2 46.2 344 44.0 303
-cmoe, 2 GB cache 35.4 387 28.5 308
-cmoe, 4 GB cache 47.3 347 7.9 41
-cmoe, 5 GB cache 7.7 45 7.1 40
-cmoe, 3 GB cache + MTP draft 1 29.7 210 19.9 181
-cmoe, 4 GB cache + MTP draft 1 14.6 210 6.3 37
-cmoe, 4 GB cache + MTP draft 2 10.3 241 5.5 38

What I take from it

There's a cliff at about 7.8 GB used on the card. Anything that goes past it drops to 5 to 8 tok/s, and prompt speed falls off too. IQ4_XS with a 4 GB cache sat just under the line (47 tok/s), Q4_K_M with the same cache went just over (8 tok/s). My guess is the Windows driver spilling into shared system memory instead of throwing an out-of-memory error. I haven't tried turning sysmem fallback off in the NVIDIA control panel yet, so treat that as a guess.
The cache only pays off when it's big enough to hold the hot experts, and on 8 GB there isn't room for that once the KV cache and the rest of the model are loaded. 2 GB was clearly slower than just leaving it alone.

MTP did nothing for me with no placement flags. Draft 2 accepted about half the drafted tokens, draft 1 about 70 to 90%, and the speed didn't move. Add MTP to the cache setups and it gets much worse, I think because the 2 GB draft model pushes the card over the edge. Earlier the same day I got 54 tok/s with MTP draft 2 on a different prompt and couldn't reproduce it here, so I wouldn't count on MTP on this card either way.
Q4_K_M is about 12% slower than IQ4_XS on generation. I'm running it anyway because on a set of harder coding tasks it held up better over long agent loops (4/5 vs 1/5). That's one run each though, so I'm redoing that properly, with 8-bit and full precision for comparison, before I post anything about quality.

If you're on 8 GB: load it with no placement flags and let llama.cpp sort it out. 48 tok/s from a 35B MoE on a laptop is pretty good for a coding model.

Caveats: one machine, 3 runs per setup, one kind of prompt. Happy to try other flag combos if anyone's got one that works on 8 GB cards.


r/llamacpp • • 8h ago

Built my own (pretty strict) benchmark for local models and ran everything I had on a 3090. Qwen3.8 Flash Next IQ3_S kinda smoked everything

Thumbnail reddit.com
0 Upvotes

r/llamacpp • • 11h ago

Hey r/StrixHalo — Qwen4-35B-A3B PaoAI STRIX (Q4..Q8 + shared PLE + vision) + Engine 2.1.0 is live with 1M context unlocked

Post image
1 Upvotes

r/llamacpp • • 21h ago

Qwen4 35b is out. Has anyone run it with LlamAmpere?

Thumbnail reddit.com
1 Upvotes

r/llamacpp • • 15h ago

Qwen3-4B-Thinking fried my 8GB RAM Laptop

Post image
0 Upvotes

I am new to local AI. I wanted a small model to reason with maths logic. I mostly need to reason with puzzles, combinatorics and light algorithms. So Gemini recommend me Qwen3-4B-Thinking-Q4_K_M.gguf

I ran this with llama.cpp with these settings:

--load-mode mmap -ngl 99 -t 4 -c 16384 -np 1 -fa on -ctk q8_0 -ctv q8_0 --temp 0.6 --top-k 20 --min-p 0 --presence-penalty 1.5 --port 8080

My system is: Ryzen 5500u, Amd Radeon integrated GPU, 8GB RAM, Linux Mint

I run Qwen2.5-Coder-3B-Instruct-Q4_K_M smoothly for some latex code on my system.

Idk why the Thinking model bottled on my system. Can I run the thinking model safely somehow? Or should I try other models. I preferred thinking because I need accurate solutions, approach or hints to solve complex problems.

N.B. I configured llama.cpp to run the models on both my cpu and igpu and I verified it works fine.


r/llamacpp • • 1d ago

16 GB RDNA 2 (gfx1030) HIP fork: bounded attention workspace and automatic SSD prefix restore for the static persona/system prompt/skills/123-tool block, leading to 4–8 s completions on RX 6800 XT

1 Upvotes

Disclosure: I maintain this MIT native-runtime fork, based on BeeLlama v0.5.1/llama.cpp. The Windows HIP Runtime ships the runtime, six presets and a small launcher/client.

Across six model presets, this implementation restored 28,445–35,459 prefix tokens, evaluated 39–503 new prompt tokens, completed accepted requests in 4.04–7.78 seconds on an RX 6800 XT, and enables a 8.5x-23x speedup for agentic setups.

The attached graphic contains the per-model token rates, KV formats and resource measurements.

This is custom server-side work in a BeeLlama/llama.cpp fork. It adds automatic prefix persistence and restoration around ordinary OpenAI Chat Completions requests:

  • Cache boundaries come from the server’s actual chat formatting and tokenization.
  • Model, projector, runtime and configuration identities bind saved state.
  • Restoration validates the actual matching prefix.
  • Dense-cache edits can retain a supported aligned common prefix; hybrid caches require safe checkpoints.
  • State publication uses integrity checks, owned-file locking and atomic replacement.

The launcher generates the local policy automatically. Clients need no private cache annotations or manual slot-save commands. Installation and model paths can be on any accessible Windows drive.

Results first. The prefix is the persona system prompt, the skills index and all 123 tool definitions. It is a static block of roughly 28k–35k tokens that gets built once and restored from SSD. After a restore, only your actual prompt is processed (39–503 tokens here), and then the reply is generated. Across six accepted cases, 28,445–35,459 cached tokens were restored and 98.28–99.89% of the input was reused. Requests took 4.04–7.78 seconds, against 66.41–123.37 seconds for the one-time initial capture. One example: Huihui Qwythos Q4_K with q4_0/q3_1 caches restored 28,704 tokens, processed 500 new ones and generated 159 in 5.97 s.

With SSD Cache:

ModelNew tokens prefilledPrefillGenerated tokensDecode
Huihui Qwythos500298.6115969.85
PINQWEN466301.2313972.79
Qwen2.5 Instruct46287.841430.04
Qwythos standard464301.438369.58
Qwythos Heretic503318.2030873.67
GLM Q4_K_S39214.851021.55

Initial build (one-time prefix creation):

ModelTokens prefilledPrefillGenerated tokensDecode
Huihui Qwythos29,161429.299469.83
PINQWEN29,162439.4510472.64
Qwen2.5 Instruct28,483401.751429.76
Qwythos standard29,187423.729869.96
Qwythos Heretic29,237455.6011773.40
GLM Q4_K_S35,490299.871221.39

What the fork changes.

  • Bounded workspace: Temporary dequantization and attention-result merging for selected RDNA 2 cache routes and KVarN paths. The temporary window bounds workspace, not attention context.
  • Automatic SSD prefix state: The native formatter derives setup and history boundaries from ordinary OpenAI Chat Completions requests. Snapshots carry identity and integrity checks.
  • Prefix matching: Tool or template edits are handled by actual causal token-prefix matching. Recurrent or hybrid models need a safe saved checkpoint.
  • Portability: v0.1.2 rebuilds the server DLL to remove the fixed-drive guard. HIP, common and core are unchanged. The full binary set is therefore not identical to the measured one.

The target is compatible 16 GB RDNA 2 / gfx1030 cards (RX 6800, 6800 XT, 6900 XT, 6950 XT). The only measured card is the RX 6800 XT, on Windows build 26300 with a Ryzen 7 7800X3D and 16 GB DDR5-5200.

Caveats.

  • Different test conditions: Suffix and output lengths differ, so this isn't a controlled speedup or a comparison with stock BeeLlama.
  • Missing control: I haven't measured SSD-disabled mode for the full setup.
  • Prompt size: Allocation was 750,080 tokens, but real prompts were 28,483–35,498 tokens.
  • Measurement setup: The cache cases used a private Msty integration. Its assets are excluded.
  • Unrerun tests: I did not rerun any model tests for the changed server. The earlier tool accuracy used a tools-only prefix.

Source and changes · Methods


r/llamacpp • • 1d ago

Is there a llama.app ROCm 10 version?

2 Upvotes

As the title suggests, I would like to use the llama.app desktop app for Win11. If you want to use ROCm you need to install the AMD HIP SDK for Windows - which is shipped with ROCm 7.2.

It tells you to go to here: https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html

Isn't there a newer AMD HIP SDK for Windows shipped with ROCm 10?


r/llamacpp • • 1d ago

Running Qwen4-35B-A3B-UD-IQ4_XS (30.5 GiB) Fully in 24 GB VRAM on a Single RTX 3090: 158.6 t/s with Inline 1L-MTP (and the Default K=3 Trap)

Thumbnail
reddit.com
1 Upvotes

r/llamacpp • • 1d ago

Qwen 4 35B :: 7900 XTX 24GB :: LamaSrv Users whats your TKS and Config

Thumbnail reddit.com
1 Upvotes

r/llamacpp • • 1d ago

NVIDIA Pascal (sm_61) CUDA Optimizations for llama.cpp

2 Upvotes

I’ve been seeing how much more I can get out of my GTX 1070 FE (8 GB), so I've worked with Gemini Carbon/Hydrogen to put together three llama.cpp CUDA patches for Pascal sm_61. The biggest change keeps the KV cache quantized through the attention kernel, avoiding a separate Q8-to-FP16 dequantization step in the profiled case.

I tested stock vs. patched at the same upstream commit (ee46715) with Qwen3.5-9B-MTP on the 1070 alone:

Two-token verification at 16K: ~39–40% higher throughput across three weight quants.

Regular decode at 8K with a Q4 KV cache: ~15–19% faster. Bulk prefill barely moved.

Best MTP server case: 25.94 → 29.79 tok/s during generation. Counting prefill and the rest of the request, that was 17.75 → 16.66 seconds. Some settings got slower, and greedy outputs diverged despite no measured change on the short perplexity check. I included those results and the failed kernel experiments in the repo. The 64K smoke test checked that the configuration fit in VRAM; it didn’t fill the window.

Built with CUDA Toolkit 12.9. Use a 12.x toolkit for this build; CUDA 13 dropped offline compilation for Pascal (https://docs.nvidia.com/cuda/archive/13.0.0/cuda-toolkit-release-notes/index.html#deprecated-architectures).

GitHub repo, patches, and A/B scripts (https://github.com/s1mply-parad0x1cal/llama-cpp-sm61-optimizations)

So far I’ve only measured this on my 1070. If anyone still runs a 1080 Ti, P4, or P40, I’d be curious whether the two-token gain holds on your card, and whether it makes a difference to full request times.

Proper attribution/credits in the github readme with explicit roles denoted.

pascallama.cpp vs llama-cpp-sm61-optimizations:

The cleanest summary is that the two patch sets touch almost completely orthogonal subsystems—pascallama.cpp is a minimal 2-file MMQ tile-config + loop-unroll tweak aimed at large-batch/prefill and dual-P40 MoE setups, whereas my repo introduces dedicated sm_61 kernels for quantized-KV FlashAttention and the B = 2..8 small-batch dead zone.


r/llamacpp • • 1d ago

Unsloth Qwen 4 35B A3B Q4 quick demo run on 4 x RTX A3000 12GB

Thumbnail
youtu.be
2 Upvotes

r/llamacpp • • 1d ago

Running GLM-4.5V (106B MoE) Locally on M4 Pro 24GB

Post image
1 Upvotes

I’ve managed to get GLM-4.5V (106B MoE, roughly 12B active; IQ4_XS GGUF + Vision Projector) running locally on my MacBook Pro (24GB, 12-core CPU, 16-core GPU, 273 GB/s bandwidth, 4.3 GB/s SSD) using llama.cpp (Metal, CMake)! I set it up with 13 layers offloaded, a 2048-token context, SSD streaming (mmap), and the AnythingLLM frontend, with speeds of less than 1 tokens/sec.

I’m hoping to achieve great image analysis and long-context RAG quality through SSD streaming and expert caching, even with just 24GB of RAM.

Could anyone kindly suggest if there are some RAG optimisation tips for llama.cpp, confirm whether the built-in dynamic expert caching for MoE is available, and share any benchmarks or tips you might have? Cheers!


r/llamacpp • • 1d ago

Anyone run DeepSeek-V4.1-Flash-1017-GSQ-RCO? How can i stop deepseek overthinking/looping on long tasks?

Thumbnail reddit.com
1 Upvotes

r/llamacpp • • 1d ago

Qwen4-35B-A3B: DFlash2 support PR for llama.cpp, 2x speed on code tests up to 400 tps on 5090

Thumbnail
github.com
1 Upvotes

r/llamacpp • • 1d ago

qwen 4 3b5 a3b ud_q4_k_m on rtx 4080 super and 64gb ram

Post image
1 Upvotes

r/llamacpp • • 1d ago

unsloth and llama.cpp qwen4 35b doesnt use my gpu 100%, making it run at 13tps, how to fix?

Post image
1 Upvotes

r/llamacpp • • 1d ago

Qwen4 35b on Strata

Thumbnail reddit.com
1 Upvotes

r/llamacpp • • 1d ago

How big a model can llama.cpp RPC run using many machines? I need you to find out

Post image
3 Upvotes

I don't like that a handful of companies decide how much I pay to use the big models, or whether I get them at all. Complaining wasn't going to change that, so I built MeshKore LLM on top of llama.cpp's RPC backend.

We connect our computers, each one lends some of the memory it isn't using, and together we run one model that none of them could load alone. Underneath it's stock llama.cpp: one machine runs `llama-server` with the first layers and the rest run `ggml-rpc-server` with their own range. What I wrote is the part around it. A hub measures each machine and each link, picks the biggest model the group can hold, uses as few machines as it can because every extra worker means more round trips per token, and plans again when someone leaves. Machines connect directly over QUIC when their networks allow it and through a relay when they don't.

The biggest we've run so far is a 125B Qwen MoE with 6B active at IQ3_XXS. It's slower than one big GPU, obviously. What I don't know yet is where this stops: how big a model you can run this way before the round trips kill it, and what speeds are realistic when the machines are in different cities and not on one LAN. Next on the list is the 321B GLM Flash, which should take somewhere between 7 and 10 machines, depending on how much each one lends.

I'd like to try it with more machines over the internet, to see how big we can go and when adding another one stops helping. There's a node for Apple silicon Macs with 16 GB or more, and on Linux and Windows you build it from source for now. You pick how much memory to lend and it stops lending when you're on battery. There's no account to make.

Neither `llama-server` nor `ggml-rpc-server` is exposed to the internet. Both bind to 127.0.0.1, and the only machine that can reach a worker's RPC is the head of the cluster the hub put it in. It isn't private yet: the machines running a request can read it, so nothing sensitive for now.

The code is public, under the Sustainable Use License, which isn't an open source license.

Has anyone here pushed RPC over the internet? I'd like to know how far you got and what broke first.


r/llamacpp • • 1d ago

Tune Qwen 4 35BA3B on vulkan/fedora/16gb vram and llamacpp

Thumbnail reddit.com
1 Upvotes

r/llamacpp • • 2d ago

Benchmarked Qwen3.8-27B (UD-IQ4_XS) on RX 6900 XT + GTX 1070 FE: Stock vs. Built-In MTP vs. DFlash2 Q8_0 (llama.cpp)

2 Upvotes

I run Unsloth's Qwen3.8-27B-UD-IQ4_XS.gguf (13.27 GiB) split 88:12 across an RX 6900 XT (Vulkan0, 16 GiB) and a GTX 1070 FE (CUDA0, 8 GiB) on llama.cpp (b12927-ee46715). Stock decode sits around ~17–18 tok/s.

After updating llama.cpp, I tried pairing it with the external Qwen3.8-27B-DFlash2-Q8_0.gguf (1.92 GiB) drafter on the GTX 1070 FE at --spec-draft-n-max 7. On my first sweep, decode felt slower than what I remembered from the built-in MTP head (--spec-type draft-mtp, which defaults to n-max 3).

So I pulled it out of llama-swap onto an isolated port and ran a controlled five-way sweep (temp=0, seed=20261202, cache_prompt=false, 4-token warmup, 32K ctx, q8_0 KV cache, Flash Attention on, 1024/512 batch/ubatch, --reasoning off, --parallel 1) across three workloads:

  • Short prose: ~515–520 prompt tokens → 256 output tokens
  • Python code: 90 prompt tokens → 320 output tokens (Cisco CUBE SIP log parser)
  • 13.7K long synthesis: ~13,680 prompt tokens → 256 output tokens

Results

ConditionProse Decode (Accept)Code Decode (Accept)13.7K Decode (Accept)13.7K PrefillNV VRAMCold Load
no_spec (stock)17.96 tok/s (—)18.38 tok/s (—)17.19 tok/s (—)440.09 tok/s2.35 GiB10.02s
dflash2 n=7 (CUDA0)17.82 tok/s (22.7%)28.01 tok/s (45.8%)23.86 tok/s (39.4%)376.97 tok/s4.94 GiB13.23s
dflash2 n=3 (CUDA0)23.91 tok/s (47.6%)30.81 tok/s (71.4%)24.77 tok/s (57.1%)377.32 tok/s4.94 GiB13.23s
dflash2 n=2 (CUDA0)24.31 tok/s (59.5%)28.46 tok/s (78.6%)24.25 tok/s (69.5%)377.79 tok/s4.94 GiB13.23s
draft-mtp (built-in, n=3)24.32 tok/s (52.2%)29.80 tok/s (71.6%)25.41 tok/s (65.1%)371.75 tok/s2.96 GiB10.82s

(AMD process VRAM stayed at 12.31–12.34 GiB across all five runs; thermals stayed 57–61 °C AMD junction / 45–58 °C on the 1070 FE.)

Takeaways

  1. Over-drafting on Pascal quietly regresses prose. At n=7, DFlash2 proposed 686 tokens to produce 256 (22.7% acceptance) and finished slower than stock (15.58s vs 15.41s). Clamping to n=2 or n=3 immediately recovered ~24 tok/s (~11.8s wall time).
  2. Code is the biggest win. Both draft-mtp (71.6% accept, 11.05s wall, −37.5%) and dflash2 n=3 (71.4% accept, 10.70s wall, −39.5%) crushed stock (17.69s).
  3. Cold 13.7K prefill takes a real hit. Stock prefilled at 440 tok/s (~31.1s) vs 372–378 tok/s (~36.2–36.8s) with speculative decoding enabled. On a single-shot cold prompt with a 256-token answer, that ~5.5s prefill tax canceled out the ~4.8s decode gain (45.92s stock vs 46.56–46.84s spec). It really pays off once KV prefix caching kicks in across multi-turn chats or longer 500–2,000+ token replies.
  4. Built-in draft-mtp won for my setup. DFlash2 n=3 edged it out by 1.0 tok/s on pure code, but built-in draft-mtp tied or won on prose (+35.4%) and long synthesis (+47.8%), saved ~2.0 GiB on the 8 GiB GTX 1070 FE, loaded 2.4s faster, and avoided keeping a separate 1.92 GiB GGUF around.

Curious if anyone running DFlash2 on an Ampere/Ada card (with Tensor Cores) is seeing n=7 actually pull ahead of built-in MTP on prose, or if n=3 is still the sweet spot there too.

Full write-up with exact llama-server flags, wall-time table, and fixture details (ad-free): https://nocthoughts.com/2026/12/02/speculative-decoding-qwen38-27b-mtp-vs-dflash2.html


r/llamacpp • • 2d ago

Strata tuned for accuracy and datacenter workloads

Thumbnail gallery
1 Upvotes