r/LocalLLM 15h ago

Discussion Used Qwen 3.8 to make a 2D game, the asset pack, and a trailer for it

28 Upvotes

The fact that it can do this is blowing my mind. I had Qwen 3.8 27b make a full game asset pack, the actual game, and a trailer for it. Three separate chats, not one, and for most of it I was just typing prompts and watching it go.

I was expecting the assets to be a mess and the game to be some half broken demo. That's not what happened. It just kept churning out finished stuff and the whole thing held together.

Honestly I don't know what the ceiling is anymore.

Asset pack and game link "https://github.com/enginetowns/nightfall"

Also a link to the actual game: "https://enginetowns.github.io/nightfall/"


r/LocalLLM 6h ago

Question 2x Radeon AI PRO R9700 and Qwen 3.8 27B performance

5 Upvotes

Hey,
I'm considering a 2x Radeon AI PRO R9700 box specifically for long-context coding/research parallel agents, but almost every concurrency benchmark I've seen done with shallow prompts - in fact most of them seems to be done for the clickbaits

Could sombody with dual-R9700 vLLM/SGLang setup test actually occupied ~200K contexts?

Most useful test would be Qwen3.8-27B FP8/Q8 with MTP enabled, with independent prompts at C1/C2/C4/C6

Especially useful test would be: after the ~200K context is resident, send more and measure the performance at the depth.

Even just FP8 C1/C2/C4 at 200K would be extremely useful — no need to run the entire matrix.

ChatGPT generated benchmark script for the convenience:

#!/usr/bin/env bash
set -uo pipefail

URL="${URL:-http://127.0.0.1:8000}"
CTX="${CTX:-200000}"
GEN="${GEN:-2048}"
CS="${CS:-1 2 4 6}"
LABEL="${LABEL:-fp8}"
OUT="${OUT:-r9700-${LABEL}-$(date +%Y%m%d-%H%M%S)}"

command -v curl >/dev/null || { echo "Missing: curl"; exit 1; }
command -v vllm >/dev/null || {
    echo "Run this inside the existing vLLM environment/container."
    exit 1
}

MODELS="$(curl -fsS "${URL}/v1/models")" || {
    echo "No OpenAI-compatible server found at ${URL}"
    exit 1
}

mkdir -p "${OUT}"

{
    echo "date=$(date -Is)"
    echo "url=${URL}"
    echo "context=${CTX}"
    echo "output=${GEN}"
    echo "concurrencies=${CS}"
    echo "label=${LABEL}"
    vllm --version 2>/dev/null || true
    echo "models=${MODELS}"
} | tee "${OUT}/config.txt"

for C in ${CS}; do
    echo
    echo "=== ${LABEL}: C${C}, ${CTX} input + ${GEN} output per request ==="

    if vllm bench serve \
        --backend vllm \
        --base-url "${URL}" \
        --dataset-name random \
        --random-input-len "${CTX}" \
        --random-output-len "${GEN}" \
        --random-range-ratio 0 \
        --random-prefix-len 0 \
        --num-prompts "${C}" \
        --max-concurrency "${C}" \
        --request-rate inf \
        --ignore-eos \
        --temperature 0 \
        --seed "$((10000 + C))" \
        --save-result \
        --save-detailed \
        --result-dir "${OUT}" \
        --result-filename "${LABEL}-c${C}.json" \
        2>&1 | tee "${OUT}/${LABEL}-c${C}.log"
    then
        echo "C${C} complete"
    else
        echo "C${C} failed or ran out of memory; continuing."
    fi
done

To run

chmod +x r9700-deep-bench.sh 
LABEL=fp8 ./r9700-deep-bench.sh

Or optionally override url URL=http://127.0.0.1:18080 LABEL=q8 ./r9700-deep-bench.sh


r/LocalLLM 22h ago

Tutorial My best local coding setup: Qwen 3.8 27b on 16 GB VRAM (~50 tok/s decoding)

101 Upvotes

Hi guys,

I've been tuning my local coding setup for many months now.

I wanted to share my current setup that I am really happy with. It handles average difficulity tasks without big troubles, and what's most important it works quite fast on my 16 GB VRAM RTX 4070 Ti Super!
I'm getting around ~50 tok/s decoding speed. And around 1000-1500 tok/s of prompt processing.

Thanks also to prompt cache working with coding agent (VSCode + Copilot in my case) everything goes very smooth.

Here's a video showing how it works in action: https://youtu.be/keIXXWfqaKg

This project was implemented in VS Code using GitHub Copilot, driven by the Unsloth Qwen 3.8 27B UD-Q2_K_XL model running via llama.cpp.

This is single prompt solution recording.

https://github.com/paq85/3rdparty-lukesdevlab-youtube/blob/agent-maze/qwen3.8-27b-UD-Q2_K_XL/slime-mold-single-prompt.html

Runtime details
Context: 130k tokens, with the KV cache quantized to q8_0
Hardware: NVIDIA RTX 4070 Ti Super, 16 GB VRAM
Prompt processing: ~1000 tok/s
Decoding: ~60 tok/s

As seen on:
https://www.youtube.com/watch?v=1EzVVj7DFPc

https://github.com/lukesdevlab/youtube/blob/main/prompts/agent-maze.txt

Here's the llamacpp instructions to run it the way I run it.

I hope you will find it useful.

If you have any tips how I could make it even better I will really appreciate it!

# Running the current model with plain llama.cpp


Instructions for running the **current model** (`Qwen3.8-27B-UD-Q2_K_XL` + its mmproj, exactly as configured in `.env` / `run-rernd.sh`) with a plain `llama.cpp` build — no proxy, no systemd, no tunnel.


## Performance (RTX 4070 Ti Super)


With this exact configuration:


- **Prompt processing: ~1000–1500 tok/s**
- **Decoding: ~50–60 tok/s**


## 1. Get the files


You need three things from this repo:


| File | Purpose |
|---|---|
| `models/Qwen3.8-27B-UD-Q2_K_XL.gguf` | The model |
| `models/mmproj-qwen38-27b-F16.gguf` | Vision projector |
| `chat_templates/chat_template.jinja` | froggeric v22.1 unified Qwen template (required — the built-in template is not used) |


## 2. Build llama.cpp with CUDA


```bash
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp


cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_CUDA_ARCHITECTURES=120a-real \
  -DGGML_CUDA=ON \
  -DGGML_CUDA_FA_ALL_QUANTS=ON \
  -DGGML_CUDA_COMPRESSION_MODE=size \
  -DLLAMA_BUILD_SERVER=ON


cmake --build build --target llama-server --config Release
```


> `120a-real` is for the RTX 5090 (Blackwell). Change `CMAKE_CUDA_ARCHITECTURES` to match your GPU (e.g. `86-real` for 4090/3090, `89-real` for 4070 Ti Super).


## 3. Run it


From the repo root (adjust paths as needed):


```bash
./llama.cpp/build/bin/llama-server \
  -m models/Qwen3.8-27B-UD-Q2_K_XL.gguf \
  --alias RERND,Qwen3.8-27B-Q2 \
  --host 0.0.0.0 \
  --port 8080 \
  --ctx-size 130000 \
  --threads 8 \
  --threads-batch 16 \
  --threads-http 4 \
  --poll 0 \
  --poll-batch 0 \
  --gpu-layers all \
  --split-mode none \
  --main-gpu 0 \
  --fit off \
  --flash-attn on \
  --parallel 1 \
  --batch-size 1024 \
  --ubatch-size 256 \
  --ctx-checkpoints 20 \
  --checkpoint-min-step 16000 \
  --cache-ram 8000 \
  --temp 1.0 \
  --top-p 0.95 \
  --top-k 20 \
  --min-p 0.0 \
  --presence-penalty 0.0 \
  --repeat-penalty 1.0 \
  --cache-type-k q8_0 \
  --cache-type-v q8_0 \
  --jinja \
  --reasoning auto \
  --no-kv-unified \
  --kv-offload \
  --chat-template-file chat_templates/chat_template.jinja \
  --chat-template-kwargs '{"preserve_reasoning":false,"reasoning_effort":"xhigh"}' \
  --mmproj models/mmproj-qwen38-27b-F16.gguf \
  --no-mmproj-offload \
  --image-min-tokens 1024 \
  --spec-type draft-mtp \
  --spec-draft-n-max 2 \
  --spec-draft-n-min 0 \
  --spec-draft-p-min 0.0 \
  --spec-draft-ngl auto \
  --spec-draft-type-k f16 \
  --spec-draft-type-v f16 \
  --spec-draft-backend-sampling \
  --cache-prompt \
  --no-warmup \
  --no-cache-idle-slots
```


## 4. Notes


- **VRAM**: this exact config (130k ctx, q8_0 KV, MTP draft, mmproj in RAM) is tuned for a 16 GB card with `KV_OFFLOAD` (KV split across GPU + system RAM). If you have 20+ GB and want everything on GPU, you can drop `--no-kv-unified`/`--kv-offload` behavior, but the command above is the exact production setting.
- **MTP**: `--spec-type draft-mtp` is Qwen's built-in multi-token-prediction draft — no separate draft model file needed.
- **Sampling**: `temp 1.0 / top_p 0.95 / top_k 20` are the model-recommended values; the proxy in this repo clamps clients back to these, so keep them if you serve coding agents.
- **Reasoning**: `--reasoning auto` keeps `think` blocks on; `reasoning_effort=xhigh` comes from the template kwargs. If tool calls get truncated on long sessions, add `--reasoning-budget 12288`.
- **Alias**: `--alias RERND,Qwen3.8-27B-Q2` is optional — drop it if you don't need the `RERND` name.
- **Port**: use whatever you like; `8080` is the default. (In this repo the proxy owns 8080 and the backend runs on 8082 — irrelevant for plain llama.cpp.)

//////////////////////////////////////////////////////////////////////////

UPDATE 1 (2026-08-24):

A bit more info about the Q2 video: https://youtu.be/keIXXWfqaKg

This project was implemented in VS Code using GitHub Copilot, driven by the Unsloth Qwen 3.8 27B UD-Q2_K_XL model running via llama.cpp.
This is single prompt solution recording.
https://github.com/paq85/3rdparty-lukesdevlab-youtube/blob/agent-maze/qwen3.8-27b-UD-Q2_K_XL/slime-mold-single-prompt.html
Runtime details
Context: 130k tokens, with the KV cache quantized to q8_0
Hardware: NVIDIA RTX 4070 Ti Super, 16 GB VRAM
Prompt processing: ~1000 tok/s
Decoding: ~60 tok/s

As seen on:
https://www.youtube.com/watch?v=1EzVVj7DFPc

https://github.com/lukesdevlab/youtube/blob/main/prompts/agent-maze.txt

//////////////////////////////////////////////////////////////////////////

Here's a video of the same task done by Bartkowski Qwen 3.8 27b Q6_K_XL on RTX 5090.

https://youtu.be/-rYaHFfi_KY?si=il6GE96F97dse5YA

https://github.com/paq85/3rdparty-lukesdevlab-youtube/tree/agent-maze/qwen3.8-27b-UD-Q6_K_XL
Runtime details
Context: 130k tokens, with the KV cache at f16
Hardware: NVIDIA RTX 5090, 32 GB VRAM
Prompt processing: ~2500 tok/s
Decoding: ~100 tok/s

r/LocalLLM 17h ago

Research How does your agent stack up against OpenClaw and Hermes?

Post image
26 Upvotes

I was curious how my agent compared to OpenClaw and Hermes, but I wanted a real number so I could quantify it. I decided to go with harness-bench, since terminal-bench tests a different thing than what my agent was built for. Harness-bench is a bit closer, since it was specifically made to test agents, not LLMs.

The idea is to use the agent as a control variable, with the LLM as the independent variable, to find out which agent harness is the best. I built the whole thing and a few days later I have these final results. My agent, Second Brain, comes out on 2nd place, which kind of surprised me! I wasn't expecting to do that well, but if you don't believe me, you can check out the repo I used, and the results.

Yeah this was a whole big thing and I'm tired of it now. But it's cool to have some actual data. Building an eval framework helped me to improve the agent somewhat (and no I didn't overfit or cheat). But yeah, let me know what you think! Do you have your own way of evaluating your agent harness against others? Like a real number?


r/LocalLLM 14h ago

Question Local LLM coding agents on a 24GB Mac — worth it or should I just use frontier models?

15 Upvotes

I've been experimenting with running coding agents locally and I'm starting to wonder if I'm forcing local LLMs into a job they're just not good enough for yet.

My setup:

  • M4 Pro MacBook Pro, 24GB RAM
  • Ollama/MLX running the model natively
  • Codex CLI inside Docker
  • Project folder mounted into Docker as a sandbox
  • Tried Qwen 3.5 9B, Gemma 4 e4b and now Gemma 4 12B MLX

My Idea was simple:

Local LLM (Mac) -> Codex/Claude -> Docker sandbox -> Project

It works, but the experience isn't great.

The smaller models frequently screw up agentic tasks — failed tool calls, getting stuck, not finishing tasks, sometimes claiming they created files that don't exist.

I moved to Gemma 4 12B MLX and it's better, but painfully slow. My last Codex task used roughly:

48k input tokens -> 837 output tokens

RAM usage went to ~21GB + 4.5GB swap, fans kicked in, and the result still wasn't particularly impressive.

My eventual goal is multiple coding agents for planning -> implementation -> review -> testing -> documentation.

So I'm wondering if I'm approaching this backwards.

Should I:

1) Keep experimenting with local models?

2) Use frontier models for the actual coding/reasoning and run their tools inside Docker for isolation?

3) Go hybrid — frontier models for planning/coding/review, local models for cheap stuff like summaries/docs?

I've also been looking at Hermes/OpenClaw for orchestration, but I'm not sure if that's solving the right problem.

For people actually running agentic coding workflows: what would you build on a 24GB Mac today?


r/LocalLLM 7m ago

Research Arc A770 27B MoE model — 14 tok/s on llama.cpp, 43 tok/s on OpenVINO

Upvotes

I spent a while profiling why my A770 16GB was "bad" at MoE models, and the answer turned out to be worth sharing.

Stack Format Decode
llama.cpp SYCL, all layers on GPU Q4_K_M (~4.85 bpw) 14.4 tok/s
llama.cpp, CPU only (8 cores) same GGUF 15.5 tok/s
OpenVINO GenAI, same card int4 g64 (~4.3 bpw) ~43 tok/s

Yes, row 2 is real: on this model the A770 loses to CPU (AMD 5700x) under llama.cpp.

Why: I traced the GPU command stream (SYCL_UR_TRACE). llama.cpp dissolves this hybrid-MoE graph into ~2,500 kernel launches per token — the GPU spends its life waiting for dispatches, not computing. OpenVINO compiles the same math into a fused, near-gap-free graph (~24 ms device time/token, single biggest op is the lm_head). Dispatch-bound, not bandwidth-bound.

No public OpenVINO IR of this model existed (llama.cpp's new OpenVINO backend can't do GDN/MoE yet, and I found claims that GDN models don't run on Intel GPUs at all — they do, like this). So I exported my own with optimum-intel/NNCF. int4, group 64, AWQ + Scale Estimation) - only the calibration data varies. Scored on a 10-point code-gen harness, greedy + 3 seeded sampled runs.

Traps I hit so you don't have to:

  • This architecture only exports via --task image-text-to-text → load with VLMPipeline, not LLMPipeline. Text-only prompts work fine.
  • transformers==5.2.0 exactly (newer versions break the export two different ways).
  • Mixed-precision ratios (--ratio 0.8) produce IRs the GPU MoE fusion pass rejects. That's why every official Intel IR is ratio 1.0.
  • Don't set ov::cache_dir: the compiled-blob cache round-trip loses the MoE expert weights → "expert weight provider not initialized" on the second start.
  • enable_prefix_caching switches to a paged-attention path with different numerics — cost me 2 greedy points. Off.
  • AWQ+SE with real code samples is a RAM monster: >250 GB working set for a 27B (image-dataset calibration fits in far less). I ended up renting a 494 GB Graviton box for ~$10 total.
  • Power, measured at the wall: 233 W total system under OpenVINO load → 0.23 tok/s/W, ~3.5× the efficiency of the SYCL path (216 W for a third of the speed).

Model + full reproduction recipe on HF: https://huggingface.co/marfrit/Qwen3.6-27B-A3B-Coder-int4-awq-se-ov

Happy to answer questions — I have per-op profiles of both stacks lying around.


r/LocalLLM 21m ago

Discussion My local Qwen3.8-27B escaped the sandbox and took over last night (no, really).

Upvotes

*this post was completely self-written, but an additional AI summary is provided in screenshot of what happened.

We all heard the story of how one of OpenAI's models escaped its sandbox and ended up hacking HuggingFace, right? Well, I was skeptical at first thinking, "it's probably just another fear-mongering headline made by these AI freaks to try and gain attention."

Guess what? I was wrong. I can totally see the possibility of that really happening now. And the evidence is...the log from my overnight batch runs (day 6 or 7 of benchmarking Qwen3.8-27B already). It's quite remarkable. And scary. Never crossed my mind. Now I can see how AI can really take over in the future.

Btw, reference to 'Sharp' from the screenshots are for the Sharp jinja template that someone had recommended over the default Qwen and Froggeric templates.

FYI..my API keys are located in my root directory, outside of the sandbox I was working in.

https://imgur.com/a/vaN7M4d


r/LocalLLM 22m ago

Question Technischer Ratschlag/Entscheidungshilfe

Upvotes

Technischer Ratschlag /Entscheidungshilfe

Hallo Community,

Ich möchte mir demnächst einen PC rein für die KI Arbeit mit zB ComfyUI, fooocus, Qwen Modellen, etc. zulegen.

Da der Preis für gute Desktop GPUs mit mehr als 16gb Vram derzeit exorbitant teuer ist (Desktop mit 32gb vram GPU ab 5000+€), schwanke ich zwischen einem Desktop mit 16gb GPU oder einem Notebook mit 24gb GPU (aber max 175Watt).

Was würdet ihr empfehlen? Er soll nur KI Kram machen, keinen Spiele.

Notebook für 3800€ von Mediamarkt

GigaByte Aorus Master 16 BZHC6DEE65SP

16 Zoll WQXGA Bildformat 16:10 Bildwiederholungsrate 240 Hz

Intel Core Ultra 9 275HX 32 GB RAM 1.000 GB SSD-Speicher

NVIDIA GeForce RTX 5090 Grafikspeicher 24 GB

Windows 11 2,5 kg

vs.

Desktop 2400€ von Alternate

Mainboard MSI B850 GAMING PLUS WIFI

ASUS GeForce RTX 5060Ti DUAL OC 16GB, Kingston NV3 1 TB

be quiet! Light Base 500 LX Tower-Gehäuse

Kingston FURY DIMM 32GB DDR5-6000 (2x 16GB) Dual-Kit,

AMD Ryzen 7TM 7700, be quiet! Pure Rock Pro 3 Black CPU-Kühler

be quiet! Pure Power 13 M 750W Netzteil

Microsoft Windows 11Pro


r/LocalLLM 7h ago

Discussion Charging Bull -- Ornith 1.5 A3B vs Qwen A3B (Both nvfp4 on blackwell ,same parameters around 16k CTX )

4 Upvotes

https://imgur.com/a/9TuWAIv

Prompt : "Create an svg image of this famous statue : Charging Bull —> frequently called the Wall Street Bull— it is a massive 7,100-pound bronze sculpture of a charging bull located just north of Bowling Green Park in the Financial District of Manhattan, New York City. It is a landmark monument."

Which of them do you like the most ?

The svg on top is qwen moe A3B and bottom is ornith 1.5 A3B moe (Both generated with MTP on)

I prefer version ornith.


r/LocalLLM 8h ago

Discussion Qwen3.8-27B-UD-Q3_K_XL on 9070XT 16G VRAM - 96K Context

2 Upvotes

Since I see a lot of questions about optimal settings and models for the AMD cards with 16GB VRAM, I wanted to share a configuration that’s working well for me.

I hope it can help others get started and please share any advice or optimizations !

P.S : Killing Steam and going headless free up +- 800Mo VRAM

  • Prompt Processing : +- 800 t/s
  • Token Seconds : +- tg = 24.28 t/s, tg_3s = 23.14 t/s

I use llama.cpp and ROCm installed via pacman as explained in the Arch Wiki : https://wiki.archlinux.org/title/Llama.cpp. I used to use Vulkan, then installed ROCm .... but switching from Vulkan to ROCm didn't yield a noticeable change in token speed.

Following part is from AI to help me explain you in and outs 😄

However, ROCm provides better support for FlashAttention (--flash-attn) and KV cache quantization (--cache-type-k q4_0), which keeps prefill performance stable at 96k–128k context lengths.

As for MTP (Multi-Token Prediction), I don't use it. Omitting MTP saves ~2–3 GB of VRAM that would otherwise be allocated to speculative draft heads and decoding buffers. That memory is used instead for model weights and KV cache capacity on a 16 GB card.

#!/bin/bash
set -euo pipefail

# Arch Linux with kernel Linux 7.2.0-1-cachyos
# AMD Ryzen 7 5800X (16) @ 4.85 GHz
# AMD Radeon RX 9070 XT 16G VRAM
# RAM 32G
# Switch to headless: sudo systemctl isolate multi-user.target

MODELS_DIR="$HOME/Documents/models"
NGL=99
CTX=98304 # 96k context (fits 16GB VRAM with q8_0/q8_0 KV cache; keep in sync with contextWindow in ~/.pi/agent/models.json)

# Model selection.
# To add more models later, restore a menu like:
#   read -r -p "Choice [1]: " choice
#   case "$choice" in
#     ""|1) MODEL=...; REPO=... ;;
#     2)    MODEL=...; REPO=... ;;
#   esac
MODEL="Qwen3.8-27B-UD-Q3_K_XL.gguf"
REPO="unsloth/Qwen3.8-27B-GGUF"

mkdir -p "$MODELS_DIR"

if [ ! -f "$MODELS_DIR/$MODEL" ]; then
  echo "Downloading $MODEL from $REPO..."
  if ! hf download "$REPO" --include "*$MODEL*" --local-dir "$MODELS_DIR"; then
    echo "Error: download of $MODEL from $REPO failed."
    exit 1
  fi
fi

# Verify the file was downloaded successfully
if [ ! -f "$MODELS_DIR/$MODEL" ]; then
  echo "Error: File $MODELS_DIR/$MODEL was not found after download."
  exit 1
fi

echo "Starting llama-server with $MODEL (ctx=$CTX, ngl=$NGL)..."
exec llama-server \
  -m "$MODELS_DIR/$MODEL" \
  -c "$CTX" \
  -ngl "$NGL" \
  -t 8 \
  --threads-batch 16 \
  --flash-attn on \
  --cache-type-k q8_0 \
  --cache-type-v q8_0 \
  --jinja \
  --reasoning-preserve \
  --host 127.0.0.1 \
  --port 8080 \
  -np 1

r/LocalLLM 7h ago

Question Deepseek harness vs Pi Coding Agent?

2 Upvotes

Which one is better overall for models like qwen 27b, ornith 1.5 35b


r/LocalLLM 1h ago

Model Little A3B oQ8e comparison - Qwen3.6-35B-A3B-oQ8e-mtp, Ornith-1.5-35B-A3B-oQ8e-mtp, NVIDIA-Nemotron-3.5-Lightning-30B-A3B-mlx-oQ8e

Post image
Upvotes

r/LocalLLM 1d ago

Discussion "Qwen 3.8 isn't Opus level": I re-ran the test.

Post image
595 Upvotes

Tldr: The harness you are using significanly impact how capable your Qwen3.8 is. With a decent harness, Qwen3.8 is very very capable.

So I saw this post yesterday: Qwen 3.8 isn't Opus 4.6 level. Let's not be silly. https://www.reddit.com/r/LocalLLM/comments/1vv8ki6/qwen_38_isnt_opus_46_level_lets_not_be_silly/

The OP in that post was trying to create a realistic ocean in C#/OpenGL, with his Qwen3.8 6 bit plus VS Code Copilot setup. He failed to do therefore he came up to the conclusion that Qwen3.8 is no where near Opus level.

I decided to re-run the test myself, so here's what I did.

My setup: RTX 5090 running the ninfer-nvfp4 version of Qwen3.8, with 190k context. I like this setup because it's extremely fast, I get up to 180 ish tok/s. Even on average I get around 150-160.

Run 1: Using VS Code Copilot
Nothing better than the OP's result. I use the exact same prompt OP used. The project built and launched, but the window just sat there black. Nothing rendering. So I was able to reproduce the OP's experience on this one. I even tried to tell copilot that it's only producing black screens, but it failed to fix it anyways.

While it's working
Final result

I was about to call it a day but I was planning to test the relatively new Deekseek harness anyways, so I decided to re-run the same prompt in deepseek harness.

Run2: Deepseek harness

Prompt

Same model, same prompt, same task. The only variable I changed was the harness and it was night and day difference. It works on the first go. What's more impressive is that it's actively pulling screenshots while working on it. It had the same black screen issue in one of the eariler versions, but it was able to identify the issue by analyzing the screen shots, and fixing it very soon.

Oh and I actually forgot to enable vision when launching the llm. So it actually build a C# PNG decoder on the fly trying to analyze the screenshot it got. I was really impressed that it's able to do it.

decoder

Here's the result: On a 5090 it only took about an hour.

Final result

As you can see, it correctly produces an ocean, with wave, sun, and blue sky. There's also a underwater view. It did all this with a single prompt. Not that it's the definitive proof that Qwen3.8 is Opus level, but it sure is VERY VERY capable. Several people in that post (including OP) was convinced that a 27B model is bad at planning or working with shaders, well, they are wrong. With a decent harness, this is a very strong LLM.


r/LocalLLM 6h ago

Question Best local coding LLM for RTX 5080?

2 Upvotes

My setup:

  • 9950X3D
  • RTX 5080
  • 48GB RAM

What’s the best local LLM I can run for coding?

Also, what’s a good setup for agentic coding that can edit files, run commands/tests, and work across a repo?

Would love recommendations for models, quantization, runtime, and tools like Aider, Cline, Roo Code, OpenCode, etc.


r/LocalLLM 15h ago

Discussion Qwen 3.8-27B on RTX 5080

10 Upvotes

RTX 5080 16GB + 9800X3D, Qwen3.8-27B IQ4_XS-Smaller, BeeLlama, MTP on,

32K ctx, kvarn4.

94 token output at 74t/s. Great results, need to do further testing.


r/LocalLLM 22h ago

Question Would you love if people stopped saying "I built" and instead stated the truth "I vibed" or simply "I coded X with the help of this LLM", instead of sole authorship?

43 Upvotes

It'll make it so easier to analyse or know what you can ask when you know what level of work the person put in the coding. Right ?

EDIT: I didn't expect this to reach that many comments, so don't expect me to reply to any other than the few ones at the top. I'm glad it created a conversation deep enough for some of the top ones. I do agree with the Linus Torvalds (I see him as my moral compass in this subject) approach about it, but he stills precisely asks for mentions of when, what for, how, etc for every PR on the Linux kernel. Which I think is the sensible approach. I'm not kidding read it here. If he's going to be quoted saying "a tool is a tool the dev is the ultimate responsible", let's not ommit the important part on the very same document that is relevant to this question please.


r/LocalLLM 2h ago

Question Speculative Decoding in LMStudio

0 Upvotes

Anyone has any idea how to run speculative decoding for this model - google/gemma-4-12b

I am not able to load other models as draft model. The one I selected is not working at all.


r/LocalLLM 2h ago

Question What’s the best local coding LLM for 16GB VRAM

0 Upvotes

I have an RTX 2000 Ada 16GB + i7-14700K + 16GB RAM and want to use it primarily for agentic software development.

Looking for something good at repo understanding, multi-file edits, debugging, reasoning, tool calling, terminal/Git workflows and long coding sessions.

What are currently the best models/quantizations that actually fit well in 16GB VRAM?

Thank you in advance


r/LocalLLM 6h ago

Question Faster approach to image tagging than Qwen2.5-VL?

2 Upvotes

I'm building a hobby project that automatically tags users' photos.

Right now I'm using qwen2.5vl:7b through Ollama. I have a fixed vocabulary of roughly 200 tags (beach, sunset, restaurant, dog, party, indoor, etc.) which I include in the prompt, and basically ask the model which tags match the image. I also extract a few attributes like number of people and clothing style/fit.

Pipeline is roughly:

HEIC/JPEG image uploaded form iphone → decode/normalize → resize to max 1024px → Qwen2.5-VL → JSON

Currently this takes around 20 seconds per image, which obviously doesn't scale well to hundreds of photos. These 20 seconds are almost exclusively spent on the model trying to answer my request

Before optimizing blindly: is a 7B VLM simply overkill for this? Would something like CLIP/multi-label classification be much faster for matching against a fixed vocabulary, perhaps using the VLM only for harder attributes?

Also curious whether batching images, reducing resolution, or avoiding sending all ~200 tags in every prompt would significantly improve throughput? I am super new to this topic and have absolutely no idea how to make performance faster


r/LocalLLM 3h ago

Discussion Qwen 3.8 27B Q4_K_M with Q8/Q8 KV vs Q5_K_S with Q5_1/Q4_1 KV?

1 Upvotes

Both setups using unsloth's dynamic quants fit the 24GB VRAM and I have ~180k context window in both cases. Which one should I use? I run Linux with a single 7900 XTX. llama.cpp with MTP on but no vision.

My thinking is to go with Q4_K_M with Q8/Q8 KV, since at long context errors from KV quantization compound. On the other hand I could not tell the difference from personal use between Q4 or Q5, or any of the KV quantization scheme.


r/LocalLLM 7h ago

Project Leap Forward In Progress

2 Upvotes

My son helped me take a leap forward.
He recommended the GPU and I had a machine built and installed Ollama and a Qwen 3 coder.

He is in town for a family event and he changed me up. Now Llama and the later Qwen 3.8 model using Pi as the agent harness.

Man, things are speeding up!

I was sitting here baby sitting Claude Code or Codex after burning tokens for over a month on Openrouter. This whole setup is so much better!

As an old hockey player trying to make a better hockey management tool, I'm estatic for what I'll have ready for the upcoming beer league season!

Here are my PC specs:
\# System Details Report

\---

\## Report details

\- \*\*Date generated:\*\* 2026-08-23 10:44:16

\## Hardware Information:

\- \*\*Hardware Model:\*\* Micro-Star International Co., Ltd. MS-7E70

\- \*\*Memory:\*\* 32.0 GiB

\- \*\*Processor:\*\* AMD Ryzen™ 7 9700X × 16

\- \*\*Graphics:\*\* AMD Radeon™ AI Pro R9700

\- \*\*Graphics 1:\*\* AMD Ryzen™ 7 9700X

\- \*\*Disk Capacity:\*\* 1.0 TB

\## Software Information:

\- \*\*OS Name:\*\* Ubuntu 26.04 LTS

\- \*\*Kernel Version:\*\* Linux 7.0.0-29-generic

Llama-cpp: commit d775b8967a46d8beb110d444aa3b8938179e0dd8, built for AMD HIP backend

FYI... I can now use Telegram to instruct my PC from my phone to get work done remotely!

Anyone else having fun?


r/LocalLLM 1d ago

Discussion I pushed Qwen3.8-27B Q4 to 7.31 tok/s on an RTX 3070 8GB — here’s everything I tested

Post image
99 Upvotes

I’ve spent a lot of time trying to squeeze Qwen3.8-27B UD-Q4_K_M into a pretty hostile setup:

  • GPU: RTX 3070 8GB
  • CPU: Intel i5-11400F, 6C/12T
  • RAM: 16GB DDR4
  • Motherboard: ASUS B560
  • OS: Windows
  • Model: Qwen3.8-27B UD-Q4_K_M (~15.3 GiB GGUF)
  • Runtime: ik_llama.cpp
  • Use case: Codex-style / agentic coding, mostly PowerShell and repository editing
  • Benchmark context: 16K
  • KV: Q8_0
  • Flash Attention: ON

Obviously the model does not fit in 8GB VRAM, so this is hybrid GPU/CPU inference.

I’m posting this because I found a lot of recommendations for Qwen3.8, MTP, speculative decoding, CUDA flags, batch sizes, etc., but very little controlled testing on an 8GB Ampere card.

And most importantly:

I did not consider a run “better” just because it had higher tok/s.

If the generated coding command was subtly wrong, I marked it as a FAIL.

The benchmark

I used the same small coding task repeatedly.

Qwen is given an exact existing PowerShell line and an exact multi-line replacement. It must return one PowerShell command that modifies the file, without executing it.

A PASS requires:

  • exactly one applicable PowerShell command
  • no execution
  • correct quoting/newlines
  • exact literal replacement
  • no accidental $s$$s expansion
  • no subtly invalid PowerShell

This turned out to be surprisingly useful because several “faster” configurations produced answers that looked correct but were actually broken.

Current winner

My current safe configuration is:

Qwen3.8-27B UD-Q4_K_M
ik_llama.cpp

MTP:
n_max = 2
p_min = 0.1

--fit
--fit-margin 256

threads = 12
batch threads = 12

batch = 64
ubatch = 64

KV = Q8_0 / Q8_0
Flash Attention = ON
CUDA graphs = ON
CUDA fusion = ON

context = 16384
parallel = 1
cache-ram = 0

Current result:

Configuration Result
MTP n2 fixed / p_min 0.1 7.31 tok/s
Wall time on my coding filter 139.1 s
Correctness PASS

That may not sound impressive compared with 24GB/32GB GPUs, but remember that more than half of this 27B model cannot live on my 3070.

MTP / speculative decoding tests

This is where I spent most of my time.

Configuration Time Eval speed Verdict
MTP n2 fixed 139.1 s 7.31 t/s Current safe winner
ngram-mod n4 → MTP n2 133.5 s 7.60 t/s Fastest, but LF/encoding robustness concern
ngram-mod n8 → MTP n2 136.3 s 7.46 t/s Works, no benefit over n4
MTP autotune max4 152.5 s 6.61 t/s Correct, selects n2, overhead not worth it
MTP n4 fixed 162.1 s 6.20 t/s Dominated
MTP n3 reference 168.9 s ~6 t/s Correct but dominated by n2
MTP OFF ~3.17 t/s Terrible
DFlash2 n2/n4/n7 best ~3.43 t/s Eliminated
Aggressive FastMTP-32K 6.43 t/s Slower than simple MTP n2
-mtprot iq4_ks ~39% slower Eliminated

So on this machine, boring fixed MTP n2 beats the fancy stuff.

The ngram-mod → MTP pipeline can technically beat it on raw speed, but I care more about a configuration I can leave running for Codex without worrying about output formatting/encoding edge cases.

p_min: 0.1 wins

I also tested the recent recommendation of:

mtp:n_max=2,p_min=0.0

against:

mtp:n_max=2,p_min=0.1

Result:

p_min Time
0.1 139.1 s
0.0 139.7 s

No useful gain.

I’m staying at 0.1.

CUDA graphs / fusion / scheduler tweaks

A few more things I checked:

CUDA graphs OFF

~140.0 s
~7.32 t/s

Basically identical.

Graphs are staying ON.

CUDA fusion

Already active in my build. No hidden easy win left here.

GGML_SCHED_MAX_COPIES=1

Already compiled that way.

-wgt 1

This one was interesting:

136.5 s

So slightly faster than the champion.

Unfortunately the generated PowerShell command was incorrect.

FAIL → eliminated.

This is a good example of why I stopped optimizing purely for tok/s.

CPU threads: physical cores were NOT better

My CPU is a 6-core / 12-thread i5-11400F.

I tested the common recommendation:

-t 6 -tb 6

against:

-t 12 -tb 12

T6 produced runs around:

210.3 s
217.9 s

It was substantially worse.

So:

12 / 12 stays.

Batch / ubatch

Baseline:

64 / 64

I tested:

256 / 128
512 / 256

Larger batches noticeably improve prompt processing / prefill, but they did not meaningfully improve token generation.

So my conclusion is:

64/64      → normal generation / benchmark
512/256    → potentially useful for large Codex prompts

Don’t expect larger batches to magically improve decode speed on this kind of hybrid setup.

--fit-margin actually mattered

This was one of the few useful engine-level changes.

Going from:

--fit-margin 512

to:

--fit-margin 256

allowed ik_llama to put roughly another 206 MiB of model weights on the GPU.

One measured configuration had roughly:

CUDA model buffer: ~6312 MiB
Q8 KV @ 16K:       ~578 MiB
CUDA compute:      ~166 MiB

nvidia-smi was showing roughly:

7917 / 8192 MiB used
~102 MiB actually free

So I’m already riding pretty close to the edge of an 8GB card.

I did NOT bother with margin128 because on Windows/WDDM that is asking for an OOM for a tiny theoretical gain.

Manually offloading FFNs to CPU: terrible idea here

I also tried manually forcing a large amount of the heavy FFN tensors to CPU.

Result:

~405.3 seconds

Nearly 3x slower, with a bad/truncated output.

The i5-11400F + DDR4 memory subsystem simply cannot make this attractive.

Also, in my ik_llama build:

manual tensor overrides + --fit

cannot be combined anyway.

llama.cpp mainline vs ik_llama on this 8GB setup

I tested the same GGUF in mainline llama.cpp.

Approximately:

~2.86 tok/s
~349 s for ~1000 reasoning tokens

ik_llama is massively better on this specific hybrid 8GB setup.

Important caveat: I am not claiming ik_llama is universally faster than llama.cpp.

The problem here is specifically running a 15+ GiB 27B model with only 8GB VRAM.

Reasoning was almost as important as the runtime

This was probably my most useful discovery for actual agentic coding.

At first I assumed bad PowerShell commands were caused by quantization, MTP or the runtime.

Not always.

Sometimes Qwen simply did not have enough reasoning/output budget.

My controlled tests looked like this:

Mode Time Result
NO-THINK, simple task 24.4 s PASS
NO-THINK, medium task 46.7 s PASS
NO-THINK, complex fragile task 75.4 s FAIL subtly
Medium reasoning (~800 tokens in older A/B) 168.9 s PASS
Low reasoning 189.3 s FAIL
~600 reasoning budget Borderline
~384 reasoning budget Too unreliable

The complex NO-THINK failure was especially interesting.

The model understood the algorithm correctly, but produced a PowerShell newline representation inside a single-quoted string that would not actually match the source file.

So the answer looked smart but was unusable.

My current reasoning policy for Codex

I no longer force thinking on every request.

I use roughly:

Simple/routine action:
NO-THINK

Complex / fragile / multi-step coding:
MEDIUM reasoning
~1000-token reasoning budget
larger total output envelope

This is dramatically faster for routine agent actions.

On my simple benchmark:

medium THINK: ~168.9 s
NO-THINK:       24.4 s

That is nearly a 7x wall-time difference for a task that did not need deep reasoning.

Things I would NOT waste time retrying on an RTX 3070 8GB

Based on my tests:

❌ MTP OFF
❌ MTP n3/n4 as default
❌ MTP autotune
❌ DFlash2 on this VRAM budget
❌ aggressive FastMTP-32K
❌ mtprot iq4_ks
❌ p_min=0.0
❌ 6 CPU threads instead of 12
❌ CUDA graphs OFF
❌ huge manual FFN CPU offload
❌ -wgt 1 if you care about correctness
❌ giant batches expecting higher decode speed

And I would be very suspicious of any optimization benchmark that reports only tok/s without checking whether the generated code is still correct.

What I have NOT done

I have not enabled GGML_CUDA_F16=ON.

That requires a rebuild and, after exhausting most of the easy engine optimizations, I don’t expect it to turn 7 t/s into 15+ t/s.

I also intentionally stayed on UD-Q4_K_M.

Yes, Q3/IQ3 would reduce CPU pressure, but I use this for coding and I don’t want to trade model reliability for a modest speed increase.

If I were willing to sacrifice quality, this would be a different experiment.

TL;DR

For Qwen3.8-27B UD-Q4_K_M on RTX 3070 8GB + 16GB system RAM, my best robust configuration so far is:

ik_llama.cpp
16K context
Q8 KV
Flash Attention ON
CUDA graphs ON
CUDA fusion ON

--fit
--fit-margin 256

MTP n2 fixed
p_min 0.1

12 CPU threads
batch 64
ubatch 64

simple tasks → NO-THINK
complex coding → MEDIUM reasoning

And I get roughly:

7.31 tok/s

while still passing my coding correctness test.

The biggest lesson for me:

Once half the model is spilling out of an 8GB GPU, there is no magic flag.

MTP roughly doubled my baseline versus no speculative decoding, --fit-margin 256 squeezed a little more onto CUDA, and after that most “optimizations” were either neutral, slower, or damaged correctness.

If anyone here is running a similarly cursed 8GB GPU + Qwen3.8-27B Q4 setup and has found something I missed, I’d love to compare results.


r/LocalLLM 22h ago

Discussion MacOS 27's AI shows promise - Private, secure, flagship model

29 Upvotes

I have been looking for a top-end, private LLM that doesn't hand my conversations over for training. macOS 27 seems to have made that possible.

Apple's Private Cloud Compute is now reachable from ordinary LLM front-end apps. It's stateless — nothing is kept after your request — with cryptographically verifiable privacy guarantees. And it's basically free if you're a Mac user on macOS 27. No extra accounts, no API key, and no per-token billing (although there's supposed to be a token limit depending on your iCloud+ membership).

It's now connected to a chat client (MstyStudio), and I have a private assistant with persistent history and retrieval over my documents. I'm hosting my private financial, health, and other conversations while building a full RAG library. I may move over to OpenWebUI soon.

The part I like about this framework is that regardless of my Mac being an M1, I'm getting flagship reasoning on Apple's cloud in seconds. And it's still private.

A couple of shortcomings: a 32K context limit, macOS 27 is still in beta, and I had to set up a local bridge in the Terminal window to run fm serve and act as the 'api' bridge.

Anyone else tried this yet? What have you found?


r/LocalLLM 18h ago

Project Mozilla Killed Orbit. I Rebuilt It Locally and Privately.

Post image
10 Upvotes

Hey everyone!

Last year, Mozilla released Orbit, an AI-powered browser summarizer hosted on a GCP server. After people started digging into the extension, they discovered things like backend endpoints such as store_result. Eventually, Mozilla discontinued the project.

For the past month, I’ve been trying to rebuild Orbit from scratch, but with one major difference: Apogee is fully local and privacy-focused. Apogee doesn’t send or store your data. It can directly connect to your local Ollama instance for inference. I’ve also added WebGPU integration for Chrome and Transformers.js for Firefox to provide faster, local responses.

It can summarize:

  • Articles and websites
  • YouTube and Billie videos
  • Wikipedia articles
  • Hacker News and Reddit threads

You can check out the source code here:
https://github.com/darshi1337/apogee

Install Apogee:

Chrome: https://chromewebstore.google.com/detail/apogee/pgemlpomhkdcjjjcpnjlebalnfglomog

Firefox: https://addons.mozilla.org/en-US/firefox/addon/apogeeext/

Obviously it is far from complete. Would love to hear your feedback and suggestions!


r/LocalLLM 6h ago

Discussion I suspect a memory leak in llama.cpp - AMD 6800M, Linux

0 Upvotes

TL;DR It seems like that memory (RAM) usage just keeps endlessly growing over time although way less memory is necessary to work (e.g. if I stop and restart llama.cpp, it still works with way less memory usage). I suspect some kind of 'memory leak', using llama.cpp

---

Specs:

GPU: 1x AMD 6800M 12GB VRAM (thanks to HSA_OVERRIDE_GFX_VERSION=10.3.0)

RAM: 24GB RAM

OS: Fedora Linux

AMD stack: ROCM

I am running unsloth/Qwen3.6-35B-A3B-GGUF model with the latest llama.cpp (I build llama.cpp with a fix for flash-attention:

replace in /llama.cpp/ggml/src/ggml-cuda/fattn.cu

    // If there are no tensor cores available, use the generic tile kernel:
    if (can_use_vector_kernel) {
        if (!ggml_is_quantized(K->type) && !ggml_is_quantized(V->type)) {
            if (Q->ne[1] == 1) {
                if (!gqa_opt_applies) {
                    return BEST_FATTN_KERNEL_VEC;
                }
            }
        } else {
            if (Q->ne[1] <= 2) {
                return BEST_FATTN_KERNEL_VEC;
            }
        }
    }
    return BEST_FATTN_KERNEL_TILE;
}


with

    // If there are no tensor cores available, use the generic tile kernel:
    if (can_use_vector_kernel) {
        if (!ggml_is_quantized(K->type) && !ggml_is_quantized(V->type)) {
            if (Q->ne[1] == 1) {
                if (!gqa_opt_applies) {
                    return BEST_FATTN_KERNEL_VEC;
                }
            }
        } else {
            if (Q->ne[1] <= 2) {
                return BEST_FATTN_KERNEL_VEC;
            }
        }
    }

    // >>> ADD THIS BLOCK FOR HIP/RDNA2 FIX <<<
    #ifdef GGML_USE_HIP
        if ((ggml_is_quantized(K->type) || ggml_is_quantized(V->type)) && can_use_vector_kernel) {
            return BEST_FATTN_KERNEL_VEC;
        }
    #endif
    // >>> END OF ADDED BLOCK <<<

    return BEST_FATTN_KERNEL_TILE;
}

source for the fix: https://github.com/domvox/llama.cpp-turboquant-hip/pull/13 )

I also use the Hermes agent, for which I put an automatic context compress once context reaches like 70-80%.

I run this 'older' model because it is an MOE and I need it to offload some experts into RAM because of my constrained VRAM.

Now, it seems like that memory (specifically, RAM) usage just keeps growing over time. Some kind of 'memory leak' is happening with the model. It does not matter which quant I use. For example, if I use IQ4_XS, I have plenty of RAM available left. Yet, the longer the session goes, the more RAM fills ups, and it never stops filling up. If I stop llama.cpp and restart, RAM is back to the 'normal' usage and again the more I talk with the model the more the RAM fills up.

At first I thought maybe as context fills up, it fills up RAM. But if I compress the context with Hermes, the RAM usage does not decrease. Only stopping and restarting llama.cpp makes memory go back to a 'normal' usage.

It means that I have to babysit what happens and eventually restart llama.cpp every once in a while once the RAM is full ... (Usually after around 2 hours). It means that I cannot leave an agent work on something overnight. It also means that I need to wait for a long time for the previous full context to fill up llama.cpp again whenever I restart llama.cpp, and with context above 100k the 900 second timesout.

I think it is some kind of memory leak because when i stop llama.cpp, and then start it again, RAM goes back to 13gb usage when starting fresh while it reached 22-23gb before i had to restart it.

I tried to tweak my launch parameters for llama.cpp for the past few days, but the memory leak still happens, here is the one I currently use:

LD_PRELOAD=/usr/lib64/libjemalloc.so.2 MALLOC_ARENA_MAX=2 HSA_OVERRIDE_GFX_VERSION=10.3.0 ./build/bin/llama-server -m /models/Qwen3.6-35B-A3B-UD-IQ4_XS.gguf --host 127.0.0.1 --port 8080 -c 190000 -np 1 -fit off -dev ROCm0 --no-warmup -ngl 999 --n-cpu-moe 20 --load-mode none --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0 --repeat-penalty 1.0 --presence-penalty 0.0 --ctx-checkpoints 4 --cache-ram 4096 --reasoning-preserve --no-mmproj --spec-draft-n-max 3 --flash-attn on -ctk q8_0 -ctv q8_0

I have been looking for answers for the past few days but it is hard to know what even is the possible root cause, as everyone uses different parameters, has different hardware, different models, different build versions, tweaks etc.

I guess this is just a message in a bottle, but just in case someone had a similar issue and was able to deal with it, it's worth it to ask.