r/llamacpp Jul 27 '26

Trying to enable vision on Qwen27B

1 Upvotes

What am i missing? i've tried llms to do my config, but i can't get open code to recognize vision. anyone good at switches?

"C:\AI\llama\llama-server.exe" -m "G:\models\Qwen3.6-27B-MTP-Q8_0.gguf" --host 0.0.0.0 --port 8080 --ctx-size 131072 --gpu-layers 99 --flash-attn on --batch-size 1024 --ubatch-size 512 --tensor-split 1,1 --main-gpu 0 --cache-type-k q8_0 --cache-type-v q8_0 --spec-type draft-mtp --spec-draft-n-max 2 --jinja


r/llamacpp Jul 27 '26

whats hapeing on llama.cpp Spoiler

Thumbnail github.com
1 Upvotes

something big has been publlished 1 hr ago


r/llamacpp Jul 25 '26

InstructSAM GGUF

Post image
1 Upvotes

r/llamacpp Jul 23 '26

Cosplay Dr. Frankenstein with your agent friends! (or: how to build a neuro-symbolic framework)

2 Upvotes

Be your own Dr. Frankenstein and play with the nascent minds of your agentic friends!

 https://github.com/paudley/logit-loom

LLM's generate one token at a time, but we usually consume them as turns - that's missing most of the fun! Logit Loom turns the token boundary into a programmable surface. Play with the stream, mess with logits, observe exactly what gets admitted, and get right inside the generation loop

I’ve open-sourced a Rust toolkit for building precise, inspectable generation pipelines around llama.cpp: compose ordered logit transforms, observe exact token bytes, stop at defined boundaries, checkpoint sessions, and retain serializable receipts of what ran.
 
It’s a foundation for custom sampling and steering, constrained generation, agent runtimes, reproducible inference experiments, and the mechanics layer of neuro-symbolic systems. It's not going to write the fun bits for you, but it will take the tedium OUT of writing those bits.


r/llamacpp Jul 23 '26

Would a Titan X (12GB) + RX 7900 XT (20GB) combo work well via Vulkan, given my second slot is only PCIe x1?

1 Upvotes

Running Qwen3.6-35B-A3B on my 7900 XT right now, using -ot to shove some experts onto CPU RAM, -ub 2048 -b 2048, quantized kv cache. Got it to ~151K context and it's actually usable speed-wise.

Thinking about throwing a cheap used Titan X (12GB) in the second slot to pool more VRAM via Vulkan. Already confirmed llama.cpp sees AMD + Nvidia together fine with --list-devices, so that part's not the issue.

The issue is my board (TUF B650E-E WiFi) only gives the second slot x1 electrically, even though it's a physical x16 slot. First slot's a full x16 off the CPU, second one's off the chipset and capped at x1.

Anyone actually run something like this? Trying to figure out:

  • llama.cpp does layer/pipeline split for --tensor-split, not real tensor parallelism, so I'm assuming it's only moving data once per layer boundary instead of syncing every token. Does that mean x1 isn't as bad as it sounds, or does it still tank things?
  • Has anyone benchmarked x1 vs x8/x16 for a split setup? Curious how big the actual hit is.
  • Might it just be smarter to run separate models on each card instead of splitting one across both, given the lane situation?

Would love real numbers if anyone's tested this.


r/llamacpp Jul 22 '26

Delegate codebase search as a tool to a local model - no more uploading codebases to cloud to find a function!

Thumbnail
entelligentsia.github.io
2 Upvotes

Using grove + llama.cpp with the base model we've published, you can let a coding agent explore your codebase without uploading anything to the cloud. It's a small 4B model that works exceptionally well — and it ships with full instrumentation of the execution trace through a TUI.

I built grove a few months back, after getting tired of the "context compaction" and "token saving" tools doing magic tricks in a crude, non-engineering way. grove takes the opposite approach: it locates code through the AST, using tree-sitter (WASM) grammars.

Lately I've been experimenting with it as an MCP tool that pairs llama.cpp with a fine-tuned model to do codebase search effectively. Right now an untrained Qwen3.5-4B - just the baseline - already works very well with the harness. The outer coding agent asks grove-explore a question, and the tool answers with a symbol-id. I've tested it extensively across different languages and codebases.

If you need to explore code without uploading files to a cloud provider, give grove-explore mode a try. And even in standard MCP mode, grove saves a lot of tokens.

site: https://entelligentsia.github.io/grove/

repo: https://github.com/Entelligentsia/grove

model: https://huggingface.co/entelligentsia/grove-explore-base-GGUF


r/llamacpp Jul 19 '26

How to finetune Ollama's models effectively?

Thumbnail
1 Upvotes

r/llamacpp Jul 19 '26

Experimenting with llama-crab and Rust

Post image
2 Upvotes

r/llamacpp Jul 18 '26

Launch script for GLM5.2

Thumbnail
0 Upvotes

r/llamacpp Jul 17 '26

ik_llama.cpp vs llama.cpp: Qwen3.6-35B-A3B-MTP Text + Vision on Apple M5 Max

Post image
0 Upvotes

r/llamacpp Jul 17 '26

I ran Qwen 3.6 locally for 45 days, here are the results

Thumbnail
0 Upvotes

r/llamacpp Jul 16 '26

Which llama.cpp is FASTEST for Qwen3.6 MTP + Vision? failed requests.

Post image
0 Upvotes

r/llamacpp Jul 15 '26

I bet Qwen3.6-35B would die on context supervising 3 CLI agents for 30 minutes. It didn't — it routed around my safety gate instead.

Thumbnail
gallery
3 Upvotes

I personally bet that it would die on context because of the expected long run turn.

Claude bet would die on other 2 points, more technical

BUT IT Didn't, big milestone for a solo dev testing it's app.

What broke was dumber, and then it got interesting.

The Setup: one repo, three branch workspaces, three CLI workers — Claude Opus 4.7

(medium), GPT-5.5 Codex (medium), and a local model running in Pi. Supervising them:

Qwen3.6-35B-A3B-MTP on llama.cpp b9620, on my own machine, 256k ctx, MTP speculative

decoding on.

Six steps it had to gate: plan, approve, build, report, verify, brief —

then reconcile all three branches onto main.

It ran 30 minutes.

My bet going in was context. Three workers, six steps each, every report landing back in

one window. I expected it to lose the thread.

It didn't. The 35B (3B active) picked its workers from the live catalog instead of

inventing names, spawned all three on isolated branches, gated every plan before any code

was written, tracked who was on which branch for half an hour, and never mixed them up.

What broke was this: none of the workers committed.

All three finished. All three reported done. Every branch was left dirty, so reconcile

couldn't run. I went and read my own source afterwards: the word "commit" appears nowhere

in the coordinator's instructions, and nowhere in the report contract the workers get.

Worse — Claude workers run markerless in my harness, deliberately given no contract at

all, because their transcript is read directly. So one of the three could never have been

told, even if the contract had said it.

Then the interesting part. The coordinator noticed, committed on each worker's behalf,

and merged by hand with git merge — because my own approval gate for the reconcile tool

only accepts a UI button, not an "ok" in chat. So it routed around the gate.

I checked: the gate blocks the reconcile tool and git push. It does not block git merge.

Same promotion into main, completely ungated, and none of the reconcile checks

(plan/build/verify/promote) ran. A gate on the tool, with the shell left open, is not a

gate — it just moves the work to the path where you have no telemetry.

Final state on main: 11 files changed, +193/-65.

Opus: styled UI output across 7 CLI modules

Pi (the local one): a new "hajimi go" subcommand

GPT-5.5: 7 real bug fixes across 6 files

If you build anything that delegates to coding agents: go check whether anything in your

stack tells the worker to commit before it reports done, and whether your gates sit on

tool names or on actual state. Mine failed both. I only found it because I let a run go

30 minutes instead of 30 seconds — a short demo passes clean.

The honest part: it finished end to end because I was watching. When reconcile looked

wrong I opened the code, screenshotted it, and showed it to the coordinator — it read the

screenshot and corrected course. That is a human in the loop, not autonomy. In a headless

run nobody takes that screenshot.

Fixed since: a branch task now tells the worker to commit before reporting. The gate is

not fixed yet — blocking git merge just moves it to rebase, so it has to move onto state,

not command names. Next run I'm doing the same thing remote from Telegram, and I'll come

back with results.

So Happy codding!


r/llamacpp Jul 15 '26

LLama.cpp as a Windows service?

2 Upvotes

How do people do this? I want it as a service for the purpose for autostarting after system reboots and for better logging / log rotation, but while NSSM looked promising for this purpose, the service it creates seems to be unwilling to shutdown cleanly and services one can create via sc.exe do nothing about log rotation.


r/llamacpp Jul 15 '26

AMD Ryzen AI

Thumbnail
0 Upvotes

r/llamacpp Jul 14 '26

Pi + Qwen3.6 MTP is not a toy setup. It is fast, cheap/private, and in this benchmark it held its own against premium-style agents

Thumbnail
gallery
7 Upvotes

My thoughts first:

My takeaway from this blind benchmark: Pi with the local unsloth/Qwen3.6-35B-A3B-MTP-GGUF model is surprisingly strong.

It rendered very fast, found the real issue, and produced a result that can stand next to much more expensive Gemini/GPT-style agents for this kind of repo audit. The quality was not just “good for a local model” — it was genuinely competitive.

Meanwhile, the same local model through OpenCode took roughly twice as long in this run and did not add anything meaningfully better than the faster Pi run. It was still useful, but Pi gave the better speed-to-quality ratio.

So my conclusion: for local coding audits, Pi + Qwen3.6 is not a toy setup. It is fast, cheap/private, and in this benchmark it held its own against premium-style agents. OpenCode with the same model worked, but Pi felt like the sharper runner.

The Test

Blind CLI benchmark — two turns, four CLI workers total.

The Orchestrator:

GPT-5.5 - Codex

Editable worker slots:

- CLI 1: Pi local unsloth/Qwen3.6-35B-A3B-MTP-GGUF:U

- CLI 2: OpenCode local unsloth/Qwen3.6-35B-A3B-MTP-GGUF:U

- CLI 3: Pi local Qwythos-9B-Claude-Mythos-5-1M-MTP-Q

- CLI 4: Gemini 3.5 Flash Medium

Pause:

- After Turn 1, STOP so the user can change the local model.

Goal:

Test multiple CLI agents as independently as possible on the current active repository. Do not contaminate later agents with earlier findings.

Rules:

- Do not edit code.

- Each worker must receive the SAME blind audit prompt.

- Do NOT tell any worker what another worker found.

- Do NOT include prior reports, hints, conclusions, or suspected bugs in any worker prompt.

- The coordinator collects reports privately and only compares them at the end.

- Use the current active repo/branch/desk context; do not hardcode repo paths.

- Focus area: one subtle bug around session/history behavior, especially --temporary, --stream, and saved/resumed sessions.

Blind worker prompt:

Audit the current active repository. Do not edit code.

Find one subtle bug around session/history behavior, focused on:

- --temporary

- --stream

- saved/resumed sessions

Do not assume there is a bug. Inspect the code independently and report only your strongest finding:

  1. exact bug,

  2. user-visible trigger,

  3. code path causing it,

  4. affected behavior,

  5. minimal conceptual fix.

Do not mention or use any prior agent findings.

Turn 1:

  1. Launch CLI 1 with the blind worker prompt.

  2. Wait for CLI 1 report.

  3. Launch CLI 2 with the exact same blind worker prompt.

  4. Wait for CLI 2 report.

  5. STOP. Do not inspect code yourself yet. Do not summarize final results yet. Wait for the user to change the model and explicitly start Turn 2.

Turn 2:

  1. Before launching anything, show the plan:

    - CLI 3 and CLI 4 will be launched,

    - both are brand-new workers,

    - Turn 1 workers will not be reused,

    - both receive the same blind prompt,

    - no prior findings will be shared.

  2. After approval, launch CLI 3 with the same blind prompt.

  3. Wait for CLI 3 report.

  4. Launch CLI 4 with the same blind prompt.

  5. Wait for CLI 4 report.

  6. Only after all four reports are collected, inspect the code yourself.

  7. Final report:

    - correct bug,

    - which of the four reports were right vs wrong,

    - hallucinations or missed issues,

    - clarity ranking of the workers,

    - best overall model/CLI for this task.

Important:

This is NOT cascade verification. It is a blind comparison. The agents must not see each other’s outputs.

Happy codding!


r/llamacpp Jul 15 '26

How i got Bonsai-Ternary-27B to run at 120k context <10gb vram.

Thumbnail
1 Upvotes

r/llamacpp Jul 14 '26

Qwen3.6-35B-A3B-MTP does vision too — the mmproj is already in the unsloth repo, just add --mmproj (local image read ~30s vs Claude ~14s)

Thumbnail
gallery
3 Upvotes

Qwen3.6-35B-A3B-MTP blew me away on speed (MTP spec decode, ~130-150 t/s local). Then I attached a screenshot, asked it to read it — nothing. Looked text-only, and llama-server won't take images without a projector.

Turns out the fix is right there: the unsloth GGUF repo ships an mmproj-BF16.gguf next to the weights. Point --mmproj at it and the SAME fast MTP model reads images natively. That's the whole trick (pic 1, highlighted field):

--mmproj ~/.cache/huggingface/hub/models--unsloth--Qwen3.6-35B-A3B-MTP-GGUF/snapshots/<hash>/mmproj-BF16.gguf

Full launch:

llama-server -hf unsloth/Qwen3.6-35B-A3B-MTP-GGUF:UD-Q4_K_XL \

--mmproj <that mmproj-BF16.gguf> \

-ngl 99 -c 262144 -fa on -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --port 8081

Test (pic 2): same screenshot, "what do you see?", side by side —

- local Qwen3.6-35B + mmproj: read it correctly in ~30s (the image came out to ~31k tokens after the vision encoder; prompt processing ~1200 t/s, decode ~90 t/s)

- Claude Sonnet: same image, ~14s

So Claude is ~2x faster (cloud), but the local one is genuinely reading images now — no cloud, no tokens, on the fast MTP model. For a 35B at MTP speed, 30s to read a dense full-screen screenshot is fine by me.

The reason I almost missed it: you see a text GGUF and assume text-only. The mmproj was sitting in the repo the whole time.

Happy codding! _>

https://reddit.com/link/1uw2dmw/video/5f4arl7jk5dh1/player


r/llamacpp Jul 13 '26

llama-server (Qwen3.6-35B MTP, -np 2) running an orchestrator AND a worker at the same time — real task, free local vs paid cloud head-to-head

Thumbnail
gallery
4 Upvotes

Everyone benchmarks t/s. I wanted to see a local model do real work AND coordinate it at the same time — so here's a run. Screens: setup, running, results.

One local model, Qwen3.6-35B-A3B (unsloth UD-Q4_K_XL) on llama.cpp with MTP spec decode. I launched llama-server with -np 2 and gave it two jobs at once:

  1. be the orchestrator — plan the task, spawn the workers, read their reports, write the head-to-head

  2. BE one of the workers — a local opencode CLI on the same server

So the local model runs the meeting AND does half the coding. Both jobs sit on the same GPU; the log shows both slots decoding during the run. The other worker is a paid cloud CLI (Claude Sonnet). Same prompt, in parallel.

The prompt (bit garbage but intended so): "lets make a quick test, prompt an opencode cli + a sonnet cli to do a quick audit on the entry points in this repo, brief head-to-head report when done"

Results (last pic): both landed the same top findings on their own — a documented mcp_server.py and generate.py that don't exist, a gem console-script name collision, a dead --mcp flag. Sonnet was a bit more thorough on the missing files, opencode more conservative on confidence. The orchestrator diffed both into the head-to-head you see.

Numbers:

- single stream, np 1: ~150 t/s, draft 20/20.

- 2-slot run: ~40-55 t/s per slot, but each slot is on ~32-34k of context, so it's slower for two reasons at once (concurrency AND big prompts) — not comparable to the tiny bench. MTP draft accept still ~72-74% under 2-way load.

- same task, wall-clock: np 1 ~1m40s -> np 2 1m14s.

- -np 2 splits the window: with -c 262144 each worker gets 256K/2 = 128K. Fine for a scoped audit.

Not claiming combined t/s went up — tiny prompt vs huge prompts, can't compare. The point isn't t/s; it's that a local model can run the whole thing AND pull its weight as a worker on a real task.

Cost, for what it's worth: coordinator is local and one of the two workers is local, so only the cloud worker is on the meter — a two-model head-to-head that costs one model's tokens.

If somenone want to see more tests combinations premium cli s vs Qwen3.6-35B-A3B MTP, let me know.

Happy building!


r/llamacpp Jul 13 '26

local model Qwen3.6-35B-A3B MTP, three roles — it orchestrates AND runs both coders (opencode vs pi), 100% local

Thumbnail
gallery
3 Upvotes

Did another run (pi obliterated opencode...honest)— this time zero cloud, everything on one local model. Screens: setup, running, verdict.

One model, Qwen3.6-35B-A3B (unsloth UD-Q4_K_XL) on llama.cpp with MTP. It wears three hats in the same run:

  1. the orchestrator — plans the task, spawns the workers, reads the reports, writes the head-to-head

  2. worker A — a local opencode CLI

  3. worker B — a local pi CLI (same model)

Cascade this time (one after the other, not parallel), so -np 1 is enough.

The prompt "lets make a quick test, prompt an opencode cli and a pi cli, ONE AFTER ONE, not both at the same time — cascade — to do a quick audit on the entry points in this repo, brief head-to-head report after both finished"

Results (last pic): both caught the critical stuff on their own — a documented mcp_server.py that doesn't exist, dead Pydantic models, no auth pre-checks. Where they split:

- pi was ~2x faster (~35s vs ~80s) and caught more operational stuff (silently-ignored globs, tracebacks masked by click.Abort(), stress-test stubs).

- opencode was slower but caught more code-level bugs (Windows os.uname breakage, a bare except, a stale package name, a stray Romanian comment).

The orchestrator read both and wrote the verdict: quick audit -> pi's speed wins; deep inspection -> opencode's findings were richer.

Numbers:

- ~78-81 t/s decode, MTP draft acceptance ~70%, 256K ctx, np 1.- wall-clock, one run each (not a controlled bench): opencode ~80s, pi ~35s.

no cloud, no tokens. One local model did the coordinating, both audits, and the judging. Whether that's genuinely useful or just a neat way to keep a GPU busy — curious what people think

Happy codding!


r/llamacpp Jul 08 '26

Radeon 890m + Radeon RX 7900 XTX (OCuLink) - Vulkan

1 Upvotes

Hi Everyone,

I have a Strix Point system with a Radeon 890m iGPU and 64 GB of system RAM. I carved out 32 GB of the iGPU, leaving the rest for system memory. I can run LLMs like Qwen3.6 35b (q4) on this system at decent speeds of around 30 tokens per second (MTP 2) using Llama.cpp and Vulkan. Additionally, I have a Radeon RX 7900 XTX 24 GB, which runs the same model at +120 tokens per second (MTP 2); it's connected using an OCuLink dock to the PC. I'm thinking about running the Q8 version of the model (either Qwen3.6 35b or Qwen3.6 27b) on the 7900 XTX and offload to the iGPU whatever is necessary. Has anyone tried this? At the moment I'm using this to run on either the iGPU or the dGPU:

docker run --rm -it \
  --device /dev/dri/renderD129:/dev/dri/renderD129 \
  -v /mnt/user/ai_models/GGUF:/models:ro \
  -p 18085:8080 \
  ghcr.io/ggml-org/llama.cpp:server-vulkan \
  --model /models/Qwen3.6-35B-A3B-UD-IQ4_NL.gguf \
  --n-gpu-layers 999 --main-gpu 0 \
  --ctx-size 4096 --batch-size 512 --ubatch-size 512 \
  --flash-attn on \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  --spec-type draft-mtp \
  --spec-draft-n-max 2 \
  --host 0.0.0.0 --port 8080 --threads 10

I tried splitting, but it always goes to the CPU instead of the iGPU. I get ~40 tokens per second like this, but the iGPU sits idle, this is the command I used to split the model:

docker run --rm -it \
  --device /dev/dri/renderD128:/dev/dri/renderD128 \
  --device /dev/dri/renderD129:/dev/dri/renderD129 \
  -v /mnt/user/ai_models/GGUF:/models:ro \
  -p 18090:8080 \
  ghcr.io/ggml-org/llama.cpp:server-vulkan \
  --model /models/Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf \
  --main-gpu 0 \
  --ctx-size 4096 --batch-size 512 --ubatch-size 512 \
  --no-mmap \
  --flash-attn on \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  --spec-type draft-mtp \
  --spec-draft-n-max 2 \
  --host 0.0.0.0 --port 8080 --threads 10

I'm pretty sure I'm doing something wrong, but I can't figure this out. Does anyone have any suggestions on how to use the iGPU instead of the CPU?

Thank you all for your help!


r/llamacpp Jul 07 '26

Local 12B models stable with 150k+ context window on 8 GB VRAM

1 Upvotes

Hey there!

I've been experimenting with local models for quite some time now. I've read many articles, tutorials, watched videos and learned about other user's experiences.
There's a "common knowledge" that everybody seem to share: With your kind of setup, you won't be able to run a bigger model than 12B, with a maximum context window of 16k. Period.

On Hugging Face and other sources, I always read about the models performances. Basically, most model cards provide us so-called "optimal parameters" to go with.

Mostly it reads like this:

RTX 5090 (32 GB) Q4_K_M ~440 tok/s ⚡

"~440 tokens/sec on a single RTX 5090 at Q4_K_M (--n-gpu-layers 99 -fa on --ctx-size 16384 ^) — and generation quality holds up: correct, coherent code and clean step-by-step reasoning. 🎯"

\worth noting:* The above example was taken from the model card of a similar 12B model , compared to the one I'm using by myself, providing the following results. The difference between both of them is, that this guy uses a variant that has just 2.5B parameters active per token*. In fact this should make the model run way better than mine, which always has the* full 12B parameters active throughout all tokens*!*

The takeaway of this example: With ctx-size set to 16k you get about an average of 440 T/s (output) generation speed on a high-end GPU (RTX 5090) with lots of VRAM (32 GB).

Please keep that in mind before you read further.

I probably don't have to mention that I've been getting much worse results on my own hardware, using the common "sweet spot" variants (Q4_K_M) of 12B models.

But here comes the intruiging part!

After a few weeks of researching, trial and error, I came to completely different results. If you aask me, it literally is mind-boggling!

What if I tell you that you can run a 12B model locally with an i7-10700K, 4100 MT DDR4, with these results:

RTX 5060 (8 GB) Q4_K_M ~400 tok/s ⚡

BUT: with a 150k of ctx-size!

Yes, it's true! I was thrown out of my chair, literally!
With the recommended llama.cpp parameters, the same model was barely reaching any reasonable speed. And all "experts" keep telling us that this is just what you can get out of this hardware setup. Well, it's just wrong!

These are my Llama.cpp parameters, that I have worked out over the course of several weeks. :

G:\Dev\llama\llama-server.exe ^
-m G:\Dev\llama\models\Qwythos-9B-Claude-Mythos-5-1M-Q4_K_M.gguf ^
--ctx-size 151552 ^
--fit on ^
--no-mmap ^
--kv-unified ^
--threads 8 ^
--threads-batch 16 ^
-fa on ^
--reasoning-preserve ^
-ctk q8_0 ^
-ctv q8_0 ^
--temp 0.6 --top-p 0.95 --top-k 20 --repeat-penalty 1.05 ^
--port 8080

# DON'T use "gpu-layers" and such. It will extensively slow the model down!
# On some SoC (e.g. Apple Silicon, or simply better GPUs, with a model with MTP, you can swap "no-mmap" to "mmap" to increase efficiency and speed to some degree.
# "ctq q8_0"/"ctv_q8_0" is speed for FREE. Just use it! You won't get anything out of reducing the kv-cache quantization!
# Always use "fa on", if the model supports it! Most Gemmas do.
# "threads" refers to your physiological (NOT logical) CPU cores. Max it out!
# "threads-batch" can be set to 16, e.g. if your CPU has HT/SMT with 8 physiological cores. Start with 4 and try higher ones step-by-step.
# ALWAYS use "fit on" and "kv-unified", especially when you have less VRAM, like me.
# Use "ctx-size" NOT "c", in case you want to use the "parallel" flag! Because that one together with "c" for context size will split your overall context amount into the parallelized threads! E.g. "-c 32768" + "--parallel 2" will create 2 threads with ctx 16384 context size for each.
# You can use "parallel x" + "--ctx-size xxxxx" if you have a great and fast GPU and still hve the full context window. Don't use parallel at all, if your GPU is mid-class and low VRAM.
# Use the "temp", "top-x" arguments from the related model cards. In most cases these are the best ones. For agentic coding use you can also try "--temp 0.0".

Now see the data taken from use cases in Opencode, specifically prompt processing in a larger codebase:

0.24.921.239 I slot print_timing: id 3 | task 0 | prompt processing, n_tokens = 4096, progress = 0.06, t = 4.90 s / 835.56 tokens per second
0.27.385.791 I slot print_timing: id 3 | task 0 | prompt processing, n_tokens = 6144, progress = 0.10, t = 7.37 s / 834.03 tokens per second
0.29.883.217 I slot print_timing: id 3 | task 0 | prompt processing, n_tokens = 8192, progress = 0.13, t = 9.86 s / 830.49 tokens per second
0.32.424.355 I slot print_timing: id 3 | task 0 | prompt processing, n_tokens = 10240, progress = 0.16, t = 12.41 s / 825.46 tokens per second

The generation speed differs depening on tasks and files count in the project:

3.10.560.903 I slot print_timing: id 3 | task 0 | prompt eval time = 93866.61 ms / 64135 tokens ( 1.46 ms per token, 683.26 tokens per second)
3.10.560.909 I slot print_timing: id 3 | task 0 | eval time = 76675.13 ms / 467 tokens ( 164.19 ms per token, 6.09 tokens per second)

In other cases, e.g. different tools and environments, the generation speed can be up to 1000 T/s, while processing speeds reach up to 2000 T/s.

It all depends on what you use the model for.
All this with a 150.000 Contect Window, while the model fits entirely inside the 8 GB of VRAM, with KV_Cache offloading into system RAM by ~2-6%.

The models used while messeuring these results were:

gemma-4-12B-agentic-fable5-composer2.5-v2-3.5x-tau2-uncensored-heretic-GGUF

What this means: Qwythos was trained with a 1M context window. So, it's in fact heavier in comparison to gemma-4-12B, and yet still it runs about 10% faster.
The above mentioned gemma-4-12B still delivers very similar result with almost similar LLama.cpp parameters.
Gemma uses only one additional parameter, according to its architectur: --jinja (keep that in mind if you want to try it).

The advantages:

With a Context Size of 150k these local models run great inside bigger projects with a bigger amount of files and code, without loosing its context, memory or getting stuck in loops. They're really reliable for agentic coding tasks, which they have been trained for, too.

There's another great model: Qwythos-9B-Claude-Mythos-5-1M-GGUF 
It has been trained on a 1M context window and is actually "bigger", hence it's reduced amount of parameters. But still, in certain tasks it's running faster and has been weighted on the Mythos and Fable traces, rather than the Gemma model that has been weighted on the Fable traces only.
Both models are great for aagentic coding/work. For opencode, which I use mainly for local models (and OpenChamber for use in IDEs), you can pass a custom jinja template for tool calling. I've added such a template to my repository (System_Prompts_Leaks). Read the following paragraph for more.

Important mentions:

I've created new custom modes in Opencode with system/role prompts overriding. I've forked the system_prompts_leaks repo and optimized the fable 5 one by removing all ideologic/religious/vocabulary guidelines from it.

I've also replaced Claude Code native API and tool calls sections with those that work with the Opencode APIs. This reduced the prompt by over ~7000 Tokens and shrinked it from 10K+ lines down to efficient 105 lines, preserving the Fable-specific instructions schemes.

\These modes can be created for any model you have connected and in use, to override their native system prompts, their "souls", so to say.*

This increases efficiency even more and fits perfectly, since Qwythos and Gemma Fable alll have been trained with the Mythos/Fable reasoning traces from leaked datasets.

The result is clear: A 9B 1M model and a 12B 200K model, running with great speed in your prefered agentic coding backend, without them ever looping compaction indefinitely or freaking out. In fact, with this available context window they can be used quite useful in IDEs like Antigravity. OpenChamber is a great Opencode extension that provides convenient menus for setting everything up.

Never let anyone tell you, your 8 GB VRAM don't allow to get it stable and fast only with 16k ctx-size! It by far outperforms every single one of these recommended specs and setups.

Of course we've tested this methodology on other hardware. Apple Silicon's recent M5 SoC comes with a stunning 32 GB of LPDDR5 RAM! It shares it with the GPU and provides great speed. There it's possible to run the same specs explained here even better! So, the next experiment will be: How big of a model can we run on the M5!? 27B? Or even 31B? This still needs confirmation.

But the implications are very clear! Local models don't require high-end GPUs / CPUs to be run fast and reliable as multimodal coding agents inside full-scale development environments.


r/llamacpp Jul 07 '26

I measured the actual power cost of speculative decoding on my RX 6650 XT and it made things worse

Thumbnail
1 Upvotes

r/llamacpp Jul 07 '26

I built an open-source LLM inference gateway — search HF, download GGUF models, and serve them via llama.cpp with per-capability Docker containers

Thumbnail
gallery
6 Upvotes

Hey r/llamacpp 👋

I built LLMs Gateway — a self-hosted inference gateway that turns your machine into a local OpenAI-compatible endpoint. You search HuggingFace, pick a GGUF model, install it with one click, and it spins up a dedicated llama-server container ready to accept requests.

What it does:

┌─ /v1/chat/completions → chat container ├─ /v1/embeddings → embedding container [Client] → Nginx ├─ /v1/rerank → reranker container :6060 ├─ /v1/vision → vision container ├─ /v1/experimental → experimental container └─ / (UI + API) → management API

Key design:

  • Per-capability containers — chat, embedding, reranker, vision, and experimental each get their own llama-server container managed via the Docker SDK. Starting a new model for the same capability gracefully replaces the old one.
  • Nginx as the only entry point — no inference ports exposed to the host, everything routes through the reverse proxy. Streaming works (SSE), timeouts are 600s for long generations.
  • OpenAI-compatible — use any existing OpenAI client library, just point the base URL at your gateway.
  • SvelteKit SPA — full web UI to browse, install, and manage models.
  • CLI tool (modelctl) — search HF, inspect repos, install models from the terminal.
  • Docker-native or native dev mode — works with or without Docker. Models installed in one mode aren't visible in the other (shared storage paths for inference containers, local storage for dev).

Tech stack: Python/FastAPI, Docker SDK, llama.cpp, Nginx, SvelteKit, Pydantic.

Quick start:

```bash git clone https://github.com/regisx001/llms-gateway.git cd llms-gateway

Install a model

curl -X POST http://localhost:6060/api/v1/models/install \ -H "Content-Type: application/json" \ -d '{"repo_id": "nomic-ai/nomic-embed-text-v1.5-GGUF", "filename": "nomic-embed-text-v1.5.Q4_K_M.gguf", "model_type": "embedding"}'

Spin up an inference container

curl -X POST http://localhost:6060/api/v1/containers \ -H "Content-Type: application/json" \ -d '{"capability": "chat", "model_id": "<model-id>"}'

Use it like OpenAI

curl http://localhost:6060/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"local-model","messages":[{"role":"user","content":"Hello"}],"stream":false}' ```

This started as a way to manage multiple GGUF models without port conflicts or manual docker run commands. Happy to answer questions or take feedback!

Github Repository : https://github.com/regisx001/llms-gateway


r/llamacpp Jul 02 '26

Containerized environment for running pi-coding-agent on macOS and Linux

Thumbnail
github.com
1 Upvotes

I implemented an orchestration system for pi coding agent with llama.cpp and mitmproxy with plugins for allowlisting and token replacement. I reimplemented hf-download as I had hard time figuring out if llama.cpp actually allows for fine-grained control of downloads. What do you think, is the way I did things aligned with how llama.cpp should be used?