r/llamacpp • u/kmodi • 17h ago
r/llamacpp • u/returnity • 21h ago
AMD-specific llama.cpp patch nearly doubles prefill/decode
devnull.landr/llamacpp • u/kroggens • 1d ago
54% faster generation by removing the Linux OS and llama.cpp
reddit.comr/llamacpp • u/lemoussel • 1d ago
Inkling 2 Mini (unsloth GGUF) still broken on mainline llama.cpp
r/llamacpp • u/SyntheticMindsLab • 1d ago
A community RTX 4090 port of Astral Inference Server: 143.1 vs 74.7 tok/s decode against llama.cpp on one 4090
r/llamacpp • u/Expert_Sort7434 • 1d ago
CVE-2026-137567: unauthenticated out-of-bounds write in llama.cpp GGML RPC
Based on the CVE record published by VulnCheck on November 26 and the upstream ggml-org/llama.cpp patch references, CVE-2026-137567 affects the GGML RPC server in llama.cpp.
The reported issue is an out-of-bounds write through RPC_CMD_COPY_TENSOR. The described sequence uses BUFFER_GET_BASE to obtain a buffer base, then submits a zero-element destination tensor with a pointer below that base. The impact described in the CVE record is a server crash or possible code execution.
The affected range is b11450 to before b12658. The CVE record lists b12658 as the fixed build and gives the issue a CVSS 4.0 score of 9.3.
The upstream change in PR #32651 centralizes validation of RPC client data. It includes tensor-size overflow checks and request-region validation.
For operators, I would check:
- Whether
ggml-rpc-serveris running at all. - Whether it is bound to loopback or exposed on a routable interface.
- Which clients can reach the RPC port.
- Whether the deployment is running a build containing the upstream fix.
- Whether the server runs under an account with access to more files or devices than it needs.
The upstream RPC server warns against exposing the service to an open network. The default listener is loopback on port 50052, although deployments can change both.
This is related at a broad architectural level to our earlier MCP STDIO RCE discussion, but the mechanics differ. MCP STDIO launches local subprocesses; this CVE targets tensor metadata and memory handling in GGML RPC.
Technical references:
- CVE record: https://www.cverecord.com/CVE-2026-137567
- Upstream PR: https://github.com/ggml-org/llama.cpp/pull/32651
- Patch commit: https://github.com/ggml-org/llama.cpp/commit/03813c56e47f6cd7a9b9bc2ad8edcebed88ce342
- Upstream RPC warning: https://github.com/ggml-org/llama.cpp/blob/master/tools/rpc/rpc-server.cpp
TechGines background analysis: https://www.techgines.com/post/mcp-stdio-rce-vulnerability-anthropic-200000-servers
For teams running distributed inference, how are you isolating GGML RPC workers today: dedicated inference VLANs, host-level ACLs, VPN/mesh access, or a separate authenticated proxy layer?
r/llamacpp • u/LeoAtLoom • 1d ago
Ternary Bonsai 2.5 27B on a Mac mini M2 Pro: 13.4 → 20 tok/s with Metal kernel changes
I have a Mac mini M2 Pro with 32 GB of RAM and I've been trying to push Ternary Bonsai 2.5 27B (Prism ML, PQ2_0) as fast as it can go on it.
Got token generation from 13.4 to 20 tok/s (+49%). Same GGUF, output identical at temp 0, perplexity unchanged, prefill untouched. The weights stayed exactly as they were; it's all in the Metal backend of Prism's llama.cpp fork.
The fun part: the 2-bit matmul wasn't memory bound, it was compute bound. Fixing that was most of the win.
github.com/Loomstar-app/llama.cpp/tree/perf/pq2-decode-m2
r/llamacpp • u/Icy_Accident_3847 • 1d ago
[Resources] FLYX: 1M context on a 16GB GPU + 32GB RAM, in a 57MB zero-dependency exe
galleryr/llamacpp • u/0xdippo • 2d ago
Ran PrismML's Ternary Bonsai 2.5 27B on a single 3090 against Qwen3.8 Q4_K_M to see if the speed is worth it.
r/llamacpp • u/BhatSahab • 3d ago
Inkling 2 Mini on one RX 9070 XT: SaloQT's rdna4-amd-infer vs llama.cpp (same model, same context, same benchmark)
If you have an RDNA4 card and want to run Thinking Machines' Inkling 2 Mini, look at SaloQT/rdna4-amd-infer. I ran it against llama.cpp on the same model file, the same context size and the same benchmark.
The project
SaloQT/rdna4-amd-infer by SaloQT is a C11 inference engine for RDNA4 (gfx1201).
- It has 310 hand-written GPU kernels, 217 of them for Inkling 2, all fused with no register spills.
- It includes DSpark speculative decoding, a 4-bit global KV cache, and a VRAM expert cache that fits the full 256K context on a 16 GB card.
- It also has vision and an OpenAI-compatible server.
- It's built on hanw/amd.c by Han Wang, a from-scratch C11 inference engine for the same GPU with a formally verified indexing/quantization core. SaloQT credits it clearly, and the base engine is largely kept as-is. SaloQT added the Windows port, the Inkling and Saluki kernels, and the model-specific features on top.
- Licensing: neither repo has a license file yet, so treat both as personal use only.
Setup
- Hardware: RX 9070 XT 16 GB (RDNA4, gfx1201), i9-14900K, 32 GB DDR5, PCIe 5.0, Arch Linux with ROCm.
- Model: AtomicChat's Inkling-2-Mini IQ3_XXS GGUF for every engine (the ie engine and my fork read a layout-converted copy of the same weights).
- Context: 256K for every engine, each with its own memory layout for that size. The llama.cpp builds keep the experts of 9 outer blocks in system RAM; my fork adds a hot-expert VRAM cache. rdna4-amd-infer keeps all 12 outer blocks' experts in RAM behind a 64-slot VRAM cache per block.
Benchmark: the same script for every engine, greedy:
- three short prompts (code, edit, prose), up to 512 tokens each, twice;
- a 14K-token prompt, twice;
- a 56K-token prompt.
- Speeds: each server's own timings.
- Safety: total VRAM capped at 15.8 GB, desktop included.
Engines
| Engine | Build | Speculative decoding |
|---|---|---|
| llama.cpp | ggml-org master 87f816e | n-gram only (master can't load any Inkling drafter) |
| llama.cpp + DSpark PR | master + PR #32218 (e4b1cb5) | DSpark (depth 5) + n-gram |
| My fork | Unsloth's llama.cpp fork + 37 Inkling patches (fused kernels, banded flash attention, expert cache) | DSpark + n-gram |
| rdna4-amd-infer | SaloQT 90c7d21 | DSpark, 7 drafts |
Stock llama.cpp needs ubatch 32 at 256K, because its Inkling attention reserves a 12.9 GB buffer at 512.
Results (IQ3_XXS, 256K context)
| Engine | Code / edit / prose | 14K prompt read, then decode | 56K prompt read, then decode | Peak VRAM |
|---|---|---|---|---|
| llama.cpp | 23 / 22 / 23 tok/s | 181 tok/s, then 44 | 146 tok/s, then 23 | 14.6 GB |
| llama.cpp + DSpark PR | 31 / 26 / 17 | out of VRAM* | — | 15.8 GB |
| My fork | 89 / 88 / 60 | 1,726, then 106 | 1,512, then 72 | 14.8 GB |
| rdna4-amd-infer | 146 / 153 / 108 | 3,084, then 134 | 2,997, then 104 | 12.8 GB |
*The PR's DSpark drafter needs extra VRAM; at this placement it went over the 15.8 GB cap during the 14K prompt.
The decode after the 14K prompt is higher than on the short prompts for the llama.cpp builds because the summary repeats text from the prompt, which n-gram drafting picks up.
Against stock llama.cpp, rdna4-amd-infer is 5–7× faster on short chats, 17–21× faster at reading long prompts, and 4.6× faster decoding after a 56K prompt, while using less VRAM.
Notes
- The engine reads only specific quants: IQ3_XXS experts with IQ4_NL down projections. Q4_K_M and similar files still need llama.cpp.
- SaloQT targets Windows, but it builds and runs fine on Linux with the system ROCm. Image decoding is Windows-only (WIC) out of the box.
- One machine, greedy benchmarks, ±5–10% noise because the desktop shares the GPU.
If you have an RX 9070 / 9070 XT, try it, and give SaloQT's repo and Han Wang's amd.c a star.
r/llamacpp • u/Severe-Tank-5252 • 2d ago
We gave Qwen3.5 9B and Qwen3.6 35B A3B 12 everyday file jobs on a 12 GB GPU: 35/36 and 36/36
r/llamacpp • u/Mindless_Ad_407 • 2d ago
Inkling 2 Mini GGUFs, various sizes for Mac GPU (vision included)
r/llamacpp • u/jjusko20 • 2d ago
a fast flash attention 2 kernel for volta, for FP16 keys and Q8_0 values in the KV cache. performance gains in both prefill and substantially in decode - benchmarks included with integration instructions for drop in integration with your engine
github.comreposting here! it's a native llama implementation
r/llamacpp • u/Opening-Broccoli9190 • 3d ago
3x speedup of DFlash2 for Inkling2m on llama.cpp (50 -> 150 on code tps)
r/llamacpp • u/Brief-Tap-6616 • 3d ago
Inkling 2 mini on 1x3090: 125 TPS at 100k tok depth, 1700 pp/s, 401K ctx, same KLD as UD-4K XL; 3x faster than stock llama.cpp
Updated as of today: boosted speed ~10% on decode (140+ tps) and 30-40%+ on prefill (24-2700/s) vs yesterday. No quality loss.
r/llamacpp • u/miloserdev • 3d ago
GLM-5.3-Flash on numallama CPU-only inference | 256 ARM Cores + 1TB RAM
r/llamacpp • u/CoolGenius_1234 • 3d ago
Best llama.cpp Fork / Inference Engine for Running Inkling Small 2 Mini at Maximum Context on 16GB VRAM + 32GB RAM?
reddit.comr/llamacpp • u/roman_pokora • 3d ago
I tried fitting a quantization grid myself — sort of works on small models
I'm just a regular local-model user. Independent researcher, no lab, no affiliation. I use some models locally and wanted better quantization quality, so I started poking at it.
I tried fitting the grid per tensor, from the weight distribution plus Hessian diagonals. No training, no gradients, CPU/GPU only.
Tested on SmolLM-135M and Qwen2.5-0.5B. On Qwen at 4 bits, ppl went from 22.65 to 19.23 versus a uniform grid (fp16 is 17.07). On SmolLM at 3 bits, 1580 to 52.6 — still nowhere near fp32 at 23.36 but it is massive improvement from 32 to 3 bit - model still alive. So something is there, but it needs a lot more work. The llama.cpp version is a reference kernel: slower than Q4_K_M and worse in the runtime test, so don't treat it as a drop-in upgrade.
I wrote it up and put everything online — the preprint, the paper, code with raw results, the GGUFs, and a llama.cpp fork with the Q4_LUT format:
- preprint: https://zenodo.org/records/24517963 (DOI 10.5281/zenodo.24517963)
- paper: https://stiggigy-jpg.github.io/shapeq-paper/
- code and raw results: https://github.com/stiggigy-jpg/shapeq-paper
- llama.cpp fork: https://github.com/stiggigy-jpg/shapeq-q4lut
- GGUFs and fit packs: https://huggingface.co/RomanPokora/shapeq-q4lut-models
Ask away if you want details on the fitting or the format — I'll answer what I can.
r/llamacpp • u/BhatSahab • 4d ago
Inkling 2 Mini at 256k context on a single 16 GB RX 9070 XT: 55–85 tok/s with a patched llama.cpp (ROCm), ~3× upstream on chat and ~10× on long prompts
I spent the last few days getting Thinking Machines' Inkling 2 Mini (26B total / ~5B active looped MoE, 1M context) running as fast as possible on one 16 GB AMD card. Sharing the numbers and what actually mattered, because this model behaves very differently from the usual MoEs.
Hardware: RX 9070 XT 16 GB (RDNA4, gfx1201), i9-14900K, 32 GB DDR5, PCIe 5.0, Arch + ROCm. Everything stays under ~15.2 GB of VRAM including the desktop (a full card froze my session, so every test ran under a VRAM watchdog).
Software: Unsloth's llama.cpp fork plus 26 patches (24 of my own: custom HIP kernels, scheduler and launcher changes; plus two open upstream PRs, #32215 DPP warp reductions and #30685 async input copies), DSpark speculative decoding + n-gram lookup drafting, q4_0 KV cache for both the model and the drafter.
Results (greedy, 768-token coding answer; "edit" = rewrite a file; prompt = 54k tokens)
| Quant | Context | Chat | Code edit | 54k prompt | Peak VRAM |
|---|---|---|---|---|---|
| Unsloth UD-Q4_K_M | 256k | 55–57 tok/s | 120 | ~1,020 tok/s | 15.2 GB |
| Unsloth UD-Q4_K_M | 128k | 62 | 136 | 1,094 | 15.2 GB |
| GSQ-RCO IQ4_XS (abenzerps) | 256k | 67 | 136–162 | ~1,350 | 15.1 GB |
| GSQ-RCO IQ4_XS | 128k | 85 | 171 | 1,459 | 15.0 GB |
| AtomicChat IQ3_XXS | 256k | 79–83 | 180–200 | ~1,355 | 15.1 GB |
| AtomicChat IQ3_XXS | 64k (all in VRAM) | ~90 | — | 1,689 | 14.8 GB |
Where I started: Unsloth's prebuilt at 16k context did 23 tok/s, and 10.8 tok/s with DSpark (the drafter overcommitted VRAM).
Same weights against upstream llama.cpp (built today, same flags and toolchain)
| GSQ IQ4_XS | upstream master | upstream + DSpark PR #32218 | patched |
|---|---|---|---|
| 128k chat | 29.1 | 35.6 | 84.9 |
| 128k code edit | 89.6 | 88.8 | 171 |
| 128k, 54k prompt | 210 tok/s | 212 | 1,459 |
| 256k chat | 19.4 | — | 67 |
| 256k, 54k prompt | 125 tok/s | — | ~1,350 |
Kernel-only (llama-bench, no drafting): decode +17%, prompt at 32k depth 3.8×. Upstream has to drop to ubatch 64 (128k) / 32 (256k) because its Inkling attention wants a 12.9 GB buffer at ub 512.
Quant quality (wikitext-2 KLD against UD-Q4_K_M logits)
- GSQ-RCO IQ4_XS: KLD 0.015, same top token 95.1%. That's the best of the small quants: close to Q4_K_M and about 20% faster than it, so it's what I'd recommend for 16 GB.
- AtomicChat IQ3_XXS: 0.024 / 93.9%
- GSQ-RCO IQ3_XS: 0.051 / 91.0%. It hit ~100 tok/s with 256k fully in VRAM, but the quality loss was too much for me.
Things that didn't help
Vulkan (no banded attention kernels, 11–17 tok/s), F16 KV, an acceptance-driven adaptive draft length (its depth flips cost more than they save), overlapping the RAM-expert uploads with compute (needs ~0.8 GB of staging VRAM, which is worth more as expert cache), and a few upstream PRs that don't touch these quants.
Caveats
- One machine.
- Greedy benchmarks, with ±5–10% noise because the desktop shares the GPU.
- Generation at temperature 1.0 is a few tok/s lower (DSpark acceptance drops).
- DSpark for Inkling isn't in upstream master yet: PR #32218 works with Unsloth's new mainline-format drafter. Unsloth's old-format drafter only works with their fork.
I'm thinking about upstreaming the attention kernels if there's interest.
r/llamacpp • u/This-Parking-7885 • 4d ago
I almost sold my daughter's Roblox laptop for a used 3090. Instead, I linked it to my AMD desktop over Ethernet and hit 42.99 tok/s on Qwen3.8-27B (Q4_K_M, 64k)
r/llamacpp • u/Public-Net-8864 • 4d ago
VMAT Free: share one NVIDIA GPU between 4 VMs for CUDA, no passthrough or vGPU license
I've been building VMAT so that I could get several VMs to share one GPU at the same time, and today the the free tier is out today for Proxmox VE 9 and Linux desktops. I'd love if a people with consumer cards I don't own to try it and dish out some honest feedback.
Up to 4 VMs share one NVIDIA card and each one runs CUDA programs as if it had the card to itself. llama.cpp and PyTorch run inside the VMs. There's no passthrough, no SR-IOV and no vGPU license, and it works on stock QEMU. When a VM is idle its GPU time goes to the busy ones, or you can give each VM a fixed share.
I've debugged & tested it on Proxmox VE 9 with a rented H100 using 4 Debian VMs at once with llama.cpp ran in all four, and PyTorch 2.11 in the VMs on the host. On earlier builds with an RTX 6000 Ada, llama.cpp in a VM ran at 90 to 98% of native speed. I also ran an RTX 5090, where CUDA and PyTorch gave the same results through VMAT as native, but that was in a container with no VM.
So nobody wastes an evening: it's Linux VMs only, with Debian and Ubuntu guests on Proxmox. Free allows 4 VMs and 16 GB of GPU memory per VM. CUDA needs an NVIDIA card, and I haven't tested GeForce cards with VMs yet, or AMD. It's one GPU per host, and there's no graphics or games in this build. It's early software and it can crash.
The host side is closed. The guest side, which is the library and tools that run in our VMs is open source (BSD)@ https://github.com/b1nc0d3x/gVMAT.git
Downloads, checksums and install steps are at vmat.dev/getting-started.html. If it breaks, please get at me and let me know what card you tried as well as what happened.
r/llamacpp • u/W61k3r • 4d ago
LexiSuite T21: Inkling-2-Mini at 135 tok/s with its draft head on one RX 7900 XTX (llama.cpp's newest build: 39), 524k context on 24 GB, and now a single USB image with the model already inside
Follow up to my earlier Inkling-2-Mini posts. Testing image 21 of LexiSuite (my own Rust stack: inference engine, control panel, bootable OS image, not a wrapper around llama.cpp or Ollama) is out, and this time there is an all-in-one download: one USB image with the OS, the engine, the panel and the Inkling-2-Mini file already in the model folder. Write it to a stick, boot, open the address on the screen, load the model.
All in one image, the plain image and the model file by itself:
https://huggingface.co/Wa1k3r/Inkling-2-Mini-NVFP4exp-Q8-draft-LexiSuite-AIO-for-AMD-RDNA
Hardware for everything below: RX 7900 XTX 24 GB, i7-9700, 32 GB RAM, Vulkan. One card, whole model on the card, nothing in system RAM. 4-bit KV cache. Single runs, greedy decoding, nothing else running on the box. All measured November 23 on the published build.
The model file is 18.3 GB. It keeps the experts exactly as Thinking Machines shipped them (their own 4-bit format), the rest is 8-bit, and the model's own draft head is packed into the same file.
BENCHMARKS, LexiEngine
4,096 token prompt
2,430 tok/s prompt, 136.4 tok/s generation with the draft head (66.5 without it)
16,384 token prompt
2,332 tok/s prompt, 134.8 tok/s generation with the draft head (65.8 without it)
261,632 token prompt (262k context)
1,193 tok/s prompt, 65.5 tok/s generation with the draft head (50.3 without it)
523,264 token prompt (524k context)
764 tok/s prompt, 48.9 tok/s generation with the draft head (40.4 without it)
By kind of text, with the draft head after a 16,384 token prompt:
JSON records 159.0 tok/s
Rust code 121.3 tok/s
English prose 94.7 tok/s
Output with the draft head was identical to plain greedy decoding in every run. It only changes speed.
LLAMA.CPP GOT A LOT FASTER, SO I MEASURED IT AGAIN
In my last post llama.cpp was at 425 tok/s prompt and 25 tok/s generation on this model (build 12600, November 20). Its newest build (commit 1f8baae), same day, same card, same weights:
4,096 token prompt: 1,233 tok/s prompt, 40.4 tok/s generation
16,384 token prompt: 1,049 tok/s prompt, 39.2 tok/s generation
That is a big jump on their side in three days and the old 4x to 5x gap is gone. At 16k LexiEngine is now 2.2x on the prompt, 1.7x in plain generation and 3.4x with the draft head. I did not run llama.cpp at 262k or 524k this time.
DOES IT ACTUALLY READ THE CONTEXT
Ten facts planted through the prompt from 1% to 99% of its length, each asked back:
at 260,864 tokens: 10 of 10
at 523,264 tokens: 10 of 10
Against a reference run of the published weights the engine scores a mean KL of 0.0037 with the same top token on 98.6% of 510 positions (4-bit KV cache).
WHAT CHANGED SINCE THE LAST IMAGE
generation with the draft head at 4k: 110.7 -> 136.4 tok/s
generation with the draft head at 16k: 109.5 -> 134.8 tok/s
the draft head now helps at 524k too (48.9 vs 40.4 plain); two images ago it was a small loss there
Also in this build: the Linux entry is 7.4-rc4 (unmodified upstream tag) beside my own kernel, the experts of the last four layers can be stored in 4 bits (2.0 GB smaller, same speed, slightly lower accuracy), and repairs to the quantization tool in the panel.
THINGS YOU SHOULD KNOW BEFORE TRUSTING ANY OF THIS
Everything is single runs on one machine, with the card capped at 291 W. If you have a 7900 XTX I would genuinely like to know if you get the same numbers.
The model file is for my engine. Stock llama.cpp, Ollama and LM Studio do not load it: their converters decode the 4-bit experts and quantize them again (27.8 GB at 8 bits, which does not fit a 24 GB card), and they do not know the draft head's tensors.
It is tuned and measured on Radeon RDNA 3. I have not measured other cards on this build.
I trained a recovery adapter for the 4-bit expert file and it did not improve held out text measurably, so no adapter is published.
Not in this build: image input for Inkling, formats below 8 bits for its attention matrices, and a 1M context on 24 GB (the cache alone would be 9.85 GB).
This is a development image, not a production release. The all-in-one image is 17.6 GB to download and 23 GB when written, so it needs a 32 GB stick. The plain image is 353 MB and fits an 8 GB stick. Writing either one erases the stick.
LINKS
All-in-one image and model file: https://huggingface.co/Wa1k3r/Inkling-2-Mini-NVFP4exp-Q8-draft-LexiSuite-AIO-for-AMD-RDNA
Base model: https://huggingface.co/thinkingmachines/Inkling-2-Mini
Download and USB instructions: https://lexipanel.com/download/
Benchmarks and method: https://github.com/W61k3r/LexiSuite-Releases/wiki/Benchmarks
How the Inkling runtime works: https://github.com/W61k3r/LexiSuite-Releases/wiki/LexiEngine-Inkling-2
Release notes: https://github.com/W61k3r/LexiSuite-Releases/wiki/Release-Notes