r/LocalAIStack • • Jun 23 '26

Running Qwen3.6 27B / 35B locally with llama.cpp + Vscode Insiders + copilot as the harness - highest performance, quality and best usage while fitting on your GPU

170 Upvotes

I have been benchmarking Qwen3.6-27B and Qwen3.6-35B-A3B locally through llama.cpp, with GitHub Copilot Chat (Vscode Insiders needed) used as the frontend harness.

I am using Claude Opus, GPT 5.5 and Qwen 3.6 (27B) a lot in the past weeks.
The reason for Qwen is proprietary code areas where remote inference is not an option as it would leak the code out. And as long as you don't task it to write a complex cuda graph, it performs well.
Qwen 27.B is at Sonnet 4.6 if you combine it with a high value system prompt - or between Sonnet 4.5 and Sonnet 4.6 without.

Copilot Chat is an excellent harness for this kind of setup. You get the IDE integration, agent flow, tool calling UI, file context, and normal coding workflow, while the actual model is your own local llama-server endpoint.
All of this works while being LOGGED OUT of the Github Copilot account - as that is not affordable in pricing anymore.

This is a practical configuration guide for people already comfortable with llama.cpp, GGUFs, VRAM budgeting, and long-context local inference.

Models tested

Main focus:

  • unsloth/Qwen3.6-27B-GGUF
  • unsloth/Qwen3.6-27B-MTP-GGUF (same model but with MTP draft tensors)
  • unsloth/Qwen3.6-35B-A3B-GGUF

Recommended GGUFs:

27B:
Qwen3.6-27B-UD-Q4_K_XL.gguf
or
Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL

35B-A3B:
Qwen3.6-35B-A3B-GGUF:UD-Q4_K_M

If memory is tight on the 35B-A3B model, drop to a smaller Unsloth Dynamic quant:

Qwen3.6-35B-A3B-GGUF:UD-Q3_K_XL

If even that is tight, use UD-Q3_K_M or UD-Q3_K_S.

For the 35B model I do not recommend KV-cache quantization. Run the normal cache and keep the context sane. the 35B model is MoE and very low on kv-cache

For the 27B model, I do highly recommend:

--cache-type-k q4_0
--cache-type-v q4_0

Recent llama.cpp KV-cache improvements make q4_0 much more usable here. The 27B model handles q4_0 KV cache very well in my testing - almost identical to FP in evaluation results.

What changed: llama.cpp added something like Hadamard rotation to kv-cache which shuffles the tensor distribution in a higher dimensionality and allows quantization superblocks to function.

Why Copilot Chat?

Because Copilot is a very good harness - beating Codex, Cursor, Claude in my opinion
Vscode Insiders is needed to get the openAI compatible endpoint (to interface the model)

You get:

  • IDE-native chat
  • agentic file/code workflows
  • very good tool calling
  • project context
  • local model backend
  • OpenAI-compatible endpoint wiring

The important part is that Copilot Chat is only the harness. The model is served locally through llama-server.

Why llama-server and not lm-studio,ollama etc ?

It allows MUCH more control over settings, we do not just use MTP drafting. We use a combination of context and MTP drafting which can lead to 300+ tokens/sec on the 27B model. MTP is a medium speedup (1.5x) but once the model is paraphrasing source code from thinking or prefill the ngram draft speedup can reach 6x or more.

So the stack is:

VS Code Insiders
        ↓
custom OpenAI-compatible model config
        ↓
llama.cpp llama-server
        ↓
local Qwen3.6 GGUF

Copilot chatLanguageModels.json

This is the shape I used for VSCode Insiders:

[
  {
    "name": "WSL",
    "vendor": "customoai",
    "models": [
      {
        "id": "qwen3.6-27b",
        "name": "QWEN-27B-WSL",
        "url": "http://172.27.211.123:1234/v1/chat/completions",
        "toolCalling": true,
        "vision": true,
        "thinking": true,
        "maxInputTokens": 165000,
        "maxOutputTokens": 15000
      }
    ]
  }
]

Adjust the URL to your own llama-server host, in WSL you'll see it by entering ipconfig or ifconfig. port you can choose of course.
The input and output tokens need to be adapted to your context setting.
The id must match the llama-server id.

For local-only setups this is usually one of:

http://127.0.0.1:1234/v1/chat/completions
http://localhost:1234/v1/chat/completions
http://<WSL-IP>:1234/v1/chat/completions

If your Copilot Insiders build expects the newer custom endpoint shape, use the same model block but switch the provider shape accordingly. The key fields are the endpoint URL, model id, tool calling, thinking, and max token limits.

27B command: long context + q4_0 KV cache + MTP-ngram drafting

This is the 27B style I recommend.

CTX=150000
PARALLEL=1
HOST=0.0.0.0
PORT=1234
MODEL=/models/Qwen3.6-27B-UD-Q4_K_XL.gguf

/usr/src/llama.cpp/build/bin/llama-server \
  -m "$MODEL" \
  --ctx-size "$CTX" \
  --flash-attn on \
  --batch-size 1024 \
  --ubatch-size 1024 \
  --parallel "$PARALLEL" \
  --host "$HOST" \
  --port "$PORT" \
  -ngl 99 \
  --threads 8 \
  --threads-batch 8 \
  --cache-type-k q4_0 \
  --cache-type-v q4_0 \
  --temp 0.6 \
  --top-p 0.95 \
  --top-k 20 \
  --min-p 0.00 \
  --presence-penalty 0.00 \
  --jinja \
  --chat-template-kwargs '{"preserve_thinking": true}' \
  --reasoning-format none \
  --reasoning-budget 16000 \
  --slot-save-path /kv_cache/ \
  --props \
  --metrics \
  --checkpoint-every-n-tokens 1024 \
  --ctx-checkpoints 64 \
  --perf \
  --spec-default \
  --spec-type draft-mtp \
  --spec-type ngram-map-k4v \
  --spec-ngram-map-k4v-size-n 16 \
  --spec-ngram-map-k4v-size-m 24 \
  --spec-ngram-map-k4v-min-hits 1

For the MTP-specific Unsloth repo, use:

MODEL=/models/Qwen3.6-27B-MTP-UD-Q4_K_XL.gguf

or the HF shorthand if your build supports it:

-hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL

The important part is the drafting chain:

--spec-default
--spec-type draft-mtp
--spec-type ngram-map-k4v
--spec-ngram-map-k4v-size-n 16
--spec-ngram-map-k4v-size-m 24
--spec-ngram-map-k4v-min-hits 1

MTP gives useful speedup, but leave VRAM headroom. In practice I budget roughly +1 to +2 GB VRAM headroom for the MTP/drafting path and related buffers. If you are right on the edge, reduce context before blaming the model.

At q4_0 KV cache, every extra 1 GB of free VRAM is roughly another 13k tokens of 27B context, before runtime overhead.
If you are tight in vram, remove only the MTP part as ngram drafting is free.
You can also just use `mod-ngram` as an alternative to the more complex k4v map.

Thinking settings

This part matters.

I use:

--jinja
--chat-template-kwargs '{"preserve_thinking": true}'
--reasoning-format none
--reasoning-budget 16000

The reasoning-format none is important for Qwen3.6 because it avoids bad stop behavior and broken multi-turn thinking state during long coding sessions.
Copilot Chat was created to hide thinking from you (proprietary GPT models) but you want to see the thinking usually. So this solves both issues.

I also keep:

--reasoning-budget 16000

This gives the model room to think, but avoids runaway reasoning loops eating the whole session.

35B-A3B command: no KV-cache quantization

For 35B-A3B, I recommend being more conservative.

CTX=100000
PARALLEL=1
HOST=0.0.0.0
PORT=1234
MODEL=/models/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf

/usr/src/llama.cpp/build/bin/llama-server \
  -m "$MODEL" \
  --ctx-size "$CTX" \
  --flash-attn on \
  --batch-size 1024 \
  --ubatch-size 1024 \
  --parallel "$PARALLEL" \
  --host "$HOST" \
  --port "$PORT" \
  -ngl 99 \
  --threads 8 \
  --threads-batch 8 \
  --temp 0.6 \
  --top-p 0.95 \
  --top-k 20 \
  --min-p 0.00 \
  --presence-penalty 0.00 \
  --jinja \
  --chat-template-kwargs '{"preserve_thinking": true}' \
  --reasoning-format none \
  --reasoning-budget 16000 \
  --slot-save-path /kv_cache/ \
  --props \
  --metrics \
  --checkpoint-min-step 1024 \
  --ctx-checkpoints 16 \
  --perf

No q4_0 KV cache here - the sub 4B active parameters need barely any VRAM anyway.

I recommend keeping 35B-A3B below roughly:

110k context

The 35B model can be pushed past 200k context, but in my testing it becomes more likely to fall into reasoning loops. Once that happens, the session usually does not recover cleanly. Start a fresh session.
The upside of the 35B model is extreme performance, as in hundreds of tokens without any drafting enabled.
You CAN use drafting on top, mod-ngram, MTP and other drafting can be added for more speed but those will need a careful balance (that I have not tested yet)

So my practical 35B rule is:

35B-A3B: stay below 110k if you want stable coding behavior.
27B: can go as high as it fits, but below 150k is where it feels strongest.

Checkpointing
The --checkpoint-min-step (or --checkpoint-every-n-tokens (legacy now) is an important option for qwen models. Briefly explained: qwen models have two kv caches, one is more conventional and one is a recurrent-state (SSM/Mamba) that can not be reversed by n tokens. So if you change something (like remove the last answer and message to benefit from existing context) then you can only do that if a checkpoint exists. Otherwise the entire context is reprocessed which is very slow on a 27B model.
Each checkpoint costs 160MB RAM, the internal API supports VRAM checkpointing but I believe currently only the MTP implementation uses that.
--checkpoint-min-step and --ctx-checkpoints multiplied define how much of your LAST context is protected and can be rewound. 1024*16 means 16K context can be reversed with low re-compute cost (almost instant).

LM Studio as local server

Using LM Studio is possible but you need to use a few tricks and it won't achieve the same top-tier performance.
LM Studio does not support our chained drafting, but it supports MTP.

  1. Go to your Qwen 3.6 model, enable Flash attention and the quantization needed for kv cache. Go to the Inference tab, disable the button for "Reasoning Section Parsing"
  2. Go to Developer, Server Settings and set the port, serve on local network if needed, no auth, enable CORS, consider disabling just-in-time loading.
  3. Start the local server and then use the "clipboard copy" icon to get the precise Server ID which you use in the vscode json config.

Everything else is similar to llama-server, you'll not have the same max performance but it works well.
You can always just install the latest llama release binaries, and use the commandline to load the model from the lmstudio models directory.

VRAM planning

These are practical planning numbers, not hard guarantees. Actual fit depends on:

  • exact GGUF
  • CUDA/ROCm/Metal/backend
  • batch/ubatch
  • -ngl
  • whether the desktop is using the same GPU
  • whether MTP/speculative decoding is enabled
  • whether you are using full GPU offload or spilling to CPU RAM

Qwen3.6-27B UD-Q4_K_XL, q4_0 KV cache

Recommended cards:

24 GB: RTX 3090, RTX 4090, RTX A5000, RTX 4500 Ada, RTX PRO 4000 Blackwell, A10
32 GB: RTX 5090, RTX 5000 Ada, Tesla V100 32GB

Approximate context fit with full GPU offload:

VRAMExample NVIDIA cardsPractical context
16 GBRTX 4060 Ti 16GB, RTX 4080 Laptop 16GB, RTX 5080 16GB, RTX 5070 Ti 16GB, RTX A4000 16GBNot recommended for full 27B UD-Q4_K_XL offload. Use smaller quant or partial CPU offload.
24 GBRTX 3090, RTX 4090, RTX A5000, RTX 4500 Ada, RTX PRO 4000 Blackwell, A10~45k-60k with MTP, ~60k-75k without MTP
32 GBRTX 5090, RTX 5000 Ada, Tesla V100 32GB~140k-160k with MTP, ~160k-180k without MTP

For 27B, q4_0 KV cache is the difference between normal local context and huge local context. It is the main reason this setup is viable.
On a 5090 you have enough VRAM to supply 2 sessions in parallel with both model types.
Or you could run one fast model for context summarization and 27B for code.

Qwen3.6-35B-A3B UD-Q4_K_M, normal KV cache

Recommended cards:

24 GB minimum for useful GPU-resident contexts
32 GB strongly preferred

Approximate context fit:

VRAMExample NVIDIA cardsPractical context
16 GBRTX 4060 Ti 16GB, RTX 4080 Laptop 16GB, RTX 5080 16GB, RTX 5070 Ti 16GB, RTX A4000 16GBNot recommended for full 35B-A3B Q4. Use Q3 or partial offload.
24 GBRTX 3090, RTX 4090, RTX A5000, RTX 4500 Ada, RTX PRO 4000 Blackwell, A10~40k-50k
32 GBRTX 5090, RTX 5000 Ada, Tesla V100 32GB~100k-110k recommended; more will fit but stability drops

The 35B-A3B model is very good, but I would not treat it as a “just max the context” model. Keep it tighter.
If you have the VRAM: Instead of large context, consider multiple sessions with limited context, so you can have 2 or 3 chats simultaneously.

Quick test: Linux

Once llama-server is running:

curl -s http://127.0.0.1:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3.6-27b","messages":[{"role":"user","content":"Reply with exactly: local ai works"}],"max_tokens":16}' \
  | jq -r '.choices[0].message.content'

Expected output:

the model responds to your input

If your server is inside WSL or another host, replace 127.0.0.1 with the server IP.

Quick test: Windows PowerShell

(Invoke-RestMethod `
  -Uri "http://127.0.0.1:1234/v1/chat/completions" `
  -Method Post `
  -ContentType "application/json" `
  -Body '{"model":"qwen3.6-27b","messages":[{"role":"user","content":"Reply with exactly: local ai works"}],"max_tokens":16}'
).choices[0].message.content

Expected output:

local ai works

Notes from benchmarking

My current practical ranking:

27B:
Best long-context local coding model in this setup that is close to Sonnet 4.6
Use q4_0 KV cache.
Use MTP if you have the headroom.
Strongest below 150k context, but can go much higher if memory allows.

35B-A3B:
Excellent quality but will fail on hard tasks
Do not use KV-cache quantization.
Keep below ~110k context for best stability.
Can go above 200k, but reasoning loops become more likely.
If it loops, start a new session.

For Copilot usage, I prefer exposing a conservative maxInputTokens in the JSON, even if the server can technically run higher. For example:

"maxInputTokens": 165000,
"maxOutputTokens": 15000

If you set wrong context here you'll get issues serverside, so make sure that matches.
I had cases where the server went OOC (out of context) when getting too close to the max context so I'd leave a little room. copilot seems to not follow this very strictly.

Final recommendation

If you want the most practical Copilot-local setup:

Use Qwen3.6-27B UD-Q4_K_XL
Use llama.cpp server
Use q4_0 KV cache
Use preserve_thinking
Use reasoning budget
Use Copilot Insiders as the harness
Use MTP only when you have VRAM headroom

If you want the stronger but more conservative model:

Use Qwen3.6-35B-A3B UD-Q4_K_M
Do not quantize KV cache
Stay below ~110k context
Drop to UD-Q3_K_XL if memory is tight

This is the first local setup I have used where Copilot feels like a serious frontend for a fully local long-context coding model instead of just a toy endpoint test.

I have tested this on terminal use, debugging, and massive codebase development - it works just like Sonnet 4.6.

Qwen 27B also beats Sonnet 4.5 in most benchmarks and 4.6 in some.
https://artificialanalysis.ai/models/comparisons/qwen3-5-27b-vs-claude-4-5-sonnet-thinking#intelligence-evaluations


r/LocalAIStack • • 58m ago

If qwen 4 is this good,What will local ai look like in 2027?

Thumbnail reddit.com
1 Upvotes

r/LocalAIStack • • 2h ago

Recommendations for improving my local LLM setup

Thumbnail reddit.com
1 Upvotes

r/LocalAIStack • • 3h ago

multi machine AI set up

1 Upvotes

Hey guys! We thought setting up local inference across different machines annoying. Managing engines, models, configs, pausing models etc. was tedious so we started building dotcore, alpha available here: https://github.com/dotcoreai/dotcore

Currently supporting nvidia and mac.

Hopefully this is useful for some of you, if it is feedback is welcome 🤗


r/LocalAIStack • • 5h ago

LexiSuite ad31b74: my all-Rust local AI stack gets its own AI agent (LexiAgent, 81,000 lines), crypto that survives a broken RSA or "P=NP" (every signature doubled, a one-time-pad channel), and Qwen4-35B at 135 tok/s on one 7900 XTX, ahead of llama.cpp b13023 & New MedGemma2 support is now available

Thumbnail
github.com
1 Upvotes

I'm building a local AI platform from scratch in Rust: its own kernel (LexiKernel), OS (LexiOS), inference engine (LexiEngine) and control panel (LexiPanel), one USB image, no cloud. A new development image went out today, five days after the last post (996260c). 711 changes this time, and the biggest release so far: the code base grew by 394,000 lines to 2.51 million lines of Rust in 528 crates.

LexiAgent: an AI agent of my own, from the first line

55 crates, about 81,000 lines, 989 tests, no third-party crates. It works with the model you run yourself on LexiEngine (this machine, another one on your network, or through the Panel), not with a cloud model.

What it does:

- Carries a task from request to done: plans, keeps a task list, calls tools in order, stops on Ctrl-C together with every command it started. Helpers take sub-tasks inside limits they cannot escape.

- Reads a project: fast bounded search, and source navigation (symbols, definitions, references) without a language server. Project memory files and a digest of the project keep the context across a long session.

- Changes files safely: exact edits, new files and multi-file patches as one transaction, each undoable. It reads the patch formats models already write, the way GNU patch reads them.

- Runs commands in a real terminal with background jobs and a read-only fast lane, every command inside a sandbox.

- Git with fixed argument lists and no shell, qualified against a real repository (amend, forced reset, clean, branch delete). Off unless switched on.

- Web pages and files through my own HTTP client, from the origins you allow, treated as data.

- Model Context Protocol client for outside tool servers, every tool behind the same gate. Servers a project lists are imported for approval, never started unasked.

- Skills, slash commands, specialist definitions, hooks and plug-ins in the formats people already use, plug-ins installed into a private store pinned by digest.

Why I would let it near my own machine:

- One gate decides every call: mode (plan, ask, edit, auto), the person's rules, the person's answers. A project's settings can only narrow what you allow, never widen it. Approvals on the interactive screen are typed by a person, so the model cannot approve itself.

- On Linux every command runs under kernel-enforced confinement: it sees only what the session allows, reaches the network only through a proxy, and dies with the session. macOS has its own confinement.

- Secrets are found before a file is read and removed before the model sees them.

- A shield marks and contains whatever tools and tool servers bring back: text that tries to give orders stays data. A red-team corpus of attacks runs against the assembled session parts.

- Every decision and action goes into an append-only, chained record that can be verified afterwards.

- The Panel has a LexiAgent page: start a supervised session against a model instance you pick, answer its questions, stop it. The agent pairs with the Panel over the suite's own two-signature TLS.

- lexi-agent doctor tells you, check by check, what this build and this machine provide.

Built for the day the math breaks ("P=NP hardening")

Almost all security today rests on RSA and elliptic curves staying hard to break. If quantum computers or an AI-found shortcut toward P vs NP make them easy, everything signed with them opens. I rebuilt the suite so that no single broken assumption opens anything:

- My own Rust implementations of the new standards: ML-KEM (FIPS 203), ML-DSA (FIPS 204), SLH-DSA (FIPS 205), LMS/HSS (SP 800-208), SHA-3 and Shamir secret sharing, every parameter set checked against the official test files and an independent implementation.

- Every signature is doubled: a classical one plus one from another family (lattice, or hash-based that rests only on a hash function), and both must verify. Updates, the trust store, provenance, enrollment, image identity, licenses, evidence, release decisions, fleet actions, the Panel's certificates.

- Key exchange mixes unrelated methods: my own TLS 1.3 with the hybrid group and a pre-shared secret mixed in, one session key from several exchanges that share no math. LexiOS's SSH does the hybrid exchange first.

- LexiKernel's own boot chain now requires a hash-only signature (SLH-DSA-SHA2-256s) beside RSA on every owner-signed boot object. PC firmware itself can only check RSA on the very first loader; that one link is the firmware's.

- Vault keys are wrapped so one broken algorithm opens nothing; key backup is printed shares, 3 of 5.

- And for the owner's approvals, a one-time-pad channel made from a hardware randomness source: the one kind of encryption no computation breaks, P=NP included. The pad store was killed with SIGKILL at every step of reserve-then-use and never moved backwards.

- The release gate refuses any new use of RSA or a curve alone, so it cannot drift back.

Qwen4 on the card

- Qwen4-35B-A3B writes 99.5 tok/s after a short prompt against 92.5 on llama.cpp b13023, and 89.8 against 80.8 after 57,550 tokens of prompt.

- With the draft head built into the model file: 117.7 to 134.9 tok/s. The full model checks every drafted token, so the answer is the same token for token, only faster.

- It reads pictures on the card: on five test pictures the card wrote exactly the words of the processor path.

- Its own template, reasoning levels by the template's own names, required and named tool choices enforced (grammar on the processor, device allow-list on the card), thought kept apart from the answer on every API route.

- Attention cache in F16, Q8_0, Q6_0, Q4_1, Q4_0, rotated 4-bit or IQ4_NL, keys and values in different formats if you like.

- Found while measuring: the previous version fell from about 100 to 46 tok/s after some 30 requests (the engine reshuffled experts when the whole model was already on the card, and one evicted expert sent routing to the processor for good). Fixed: 70 requests in a row now all run at 102 to 104.

MedGemma 2 and Gemma 4

- Straight from the BF16 checkpoint to a quantized file in one pass with my own quantizer, the 26B-A4B mixture-of-experts layout on the card, picture input through the vision tower on the card, tool calls in Gemma 4's own format read as structured calls.

- MedGemma 2 E4B writes faster than llama.cpp up to about 14,000 tokens of prompt: 148.8 / 140.9 / 125.1 against 130.5 / 125.2 / 118.0 tok/s.

Pictures, video, voice and sound in the engine

- Image diffusion from a checkpoint (conditioner, DiT, VAE, scheduler on the chosen device), image editing from reference pictures, adapters merged per request, upscaling, Qwen-Image 2.1 on a Radeon card as a build option.

- Video generation (LTX stage family) into a real container, and video understanding in chat (H.264 decode and frame sampling into the prompt).

- Kokoro text to speech on my own graph library, Moonshine streaming recognition, speech from codebooks, live two-way voice sessions, sound input in chat.

- In the Panel: pictures made by LexiEngine, speech in and out, and a media model library.

Also new

- New model families on the processor: GPT-OSS, Mistral, Phi, and the diffusion text models LLaDA and diffusion Gemma. Experts read from an SSD through a signed manifest.

- My own quantizer as a Panel tool with recipes, a per-tensor table, progress and cancel. NVFP4, MXFP4 and FP8 products on Vulkan, exact NVFP4/MXFP4 import, 4-bit weights with 8-bit inputs on RDNA 3 integer dot products.

- The processor path computes exactly now (no 8-bit rounding of inputs), with fused AVX2 kernels that do it with less work.

- 21 template fixes, tokenizer fixes, Hermes-style tool calls read and written by the engine.

- LexiOS: a change authority with a TPM 2.0 anchor that cannot be rolled back, a control socket the engine reads to place itself on the right cores and memory, authenticated crash evidence.

- LexiKernel: a long list of new hardware support (NVMe recovery, xHCI, AHCI, USB4, TPM2, chipsets, Intel Macs, ARM boot, and detection of many accelerators).

- My own AMD code-object writer on my own RDNA 3 instruction encoder, and a KFD transport with a device-resident executor for my kernel IR.

- The Panel speaks 45 languages, every tab was read on a live engine and corrected, settings are offered per model family, and its gateway serves /v1/responses and /v1/messages with quotas.

- Windows installer with the Panel, the engine, the agent and six helpers, registered as services on an all-users install.

Speed, one Radeon RX 7900 XTX at 291 W, one request at a time, newest builds of the other engines on the same card and files

- Qwen4-35B-A3B: 99.5 tok/s writing, 134.9 with its draft head (llama.cpp b13023: 92.5). After 3,659 / 14,339 / 57,550 tokens: 92.6 / 91.9 / 89.8, with the draft head 120.9 / 120.3 / 117.7 (llama.cpp 90.8 / 89.6 / 80.8).

- Inkling-2-Mini against Strata 0.2.28, 8-bit cache on both (Strata's 4-bit cache is refused on this card): 4,096-token prompt read at 2,589 tok/s (2,302), then 75.6 tok/s writing (64.9). 261,632-token prompt read at 1,228 tok/s (828), then 57.9 tok/s writing (12.7).

- Qwen3.8 Flash-Next (94 GB) on the same 24 GB card: first token after 16k / 64k / 256k prompts in 36.3 / 136.4 / 572.1 s.

Things I am not hiding

- llama.cpp reads long Qwen4 prompts 1.5 to 3 times as fast (2,427 / 2,566 / 1,808 against 845 / 1,066 / 1,217 tok/s).

- On MedGemma 2 26B-A4B llama.cpp is clearly ahead (136.3 against 94.3 tok/s writing, 8 to 13 times faster reading prompts): my engine still runs that model's experts one token at a time while reading a prompt. IQ4_XS expert kernels for it are already in progress.

- At 56,123 tokens of prompt llama.cpp writes faster on MedGemma 2 E4B (97.5 against 86.4).

What it is not, yet

- No physical machine has booted this version yet; its nine Secure Boot checks and the install to a disk ran in a virtual machine.

- The Windows installer is built and tested on Linux and has not run on a Windows PC.

- LexiAgent's desktop control (screen, input, accessibility tree) is in the source with its tests but not yet in the program.

Tested: 22,536 tests passed in the full run (LexiOS with LexiKernel 8,822, the engine 7,757 including its device tests on the 7900 XTX, the Panel 5,957), nine boot checks and an 18-step install to a disk.

Links: lexipanel.com/download (about 1 GB image). Release notes, the full change list and the new LexiAgent page are in the wiki of the LexiSuite-Releases repository on GitHub.


r/LocalAIStack • • 9h ago

Qwen4-35B-A3B on a single RTX 5080 (16GB VRAM, 32GB RAM) — 958K context, up to 577 tok/s, benchmarks vs Inkling 2 Mini

Thumbnail reddit.com
2 Upvotes

r/LocalAIStack • • 6h ago

"Oh great, another RAG tool nobody asked for." — Why I built prjxp anyway

1 Upvotes

During my studies, there was a motto I always liked:

"Wissen heißt, wissen wo es steht."
"Knowledge is knowing where to look."

I've carried that idea with me ever since. And it has become the guiding principle behind a project I've been working on: prjxp.

I recently introduced prjxp in a Discord channel. The immediate reaction was:

"Oh great, just another RAG tool nobody asked for."

Honestly, I can understand that reaction. There are already plenty of tools that put embeddings on top of a vector database, retrieve some chunks and stuff them into an LLM's context window.

But that reaction also made me realize that I hadn't explained what I'm actually trying to solve.

I think there's a distinction worth making:

An AI agent doesn't always need more code in its context. It needs to know where the relevant code is.

That's the idea behind prjxp: help the model navigate a codebase before it starts reading large amounts of source code.

prjxp: a navigation-first approach to code intelligence

prjxp builds two complementary graph representations of a software project:

  • A structural AST graph that captures concrete code relationships.
  • A semantic graph that connects related code and documentation based on vector similarity.

Both graphs are clustered using the Leiden algorithm. Semantic cluster descriptions are generated using c-TF-IDF, without requiring an LLM during indexing.

But the most important part isn't the graphs themselves.

It's how the agent uses them.

Progressive disclosure: pointers first, source code later

Rather than dumping large chunks of code or entire graph neighborhoods into the context, prjxp follows a progressive disclosure approach:

Level 1 — Orientation

The agent receives compact references: files, symbols, keywords, cluster information and relevant pointers.

Level 2 — Navigation

The agent follows relationships, explores graph neighbors, discovers callers or implementations, and investigates relevant clusters.

Level 3 — Source

Only when it knows what it wants to inspect does it retrieve the actual source code — a complete file, class or method.

The agent remains in control of the investigation. prjxp doesn't try to answer every question itself. It gives the agent a map and tools to explore the project.

Don't fill the context window with code before the model knows why it needs that code.

The HUB mode: the code doesn't have to be on your machine

Another aspect of prjxp that I think is worth highlighting is its HUB mode.

The agent does not need a local checkout of the codebase. The code only needs to be available on the prjxp Hub, where it can be indexed and explored.

This is particularly useful for legacy libraries and unfamiliar dependencies.

Take Apache Struts as an example. I can make the Struts codebase available on the Hub and let a locally running Qwen3.8-27B explore it through prjxp. The model does not need to download, install, or have a local copy of the Struts source code.

This separates code intelligence from the agent's local workspace. The agent gets access to a navigable representation of the codebase and can retrieve source code when needed.

The code is available through the Hub; the agent only needs access to the prjxp interface, not a local copy of the repository.

The benchmark: does this actually help?

I wanted to test whether this navigation-first approach makes a measurable difference, rather than just sounding like a nice architectural idea.

I designed a code-understanding benchmark using two codebases:

  • The prjxp codebase itself.
  • A separate, real-world legacy codebase.

For each codebase, I prepared nine questions covering structural relationships, architecture, implementation details, documentation and internal logic.

Each question was run three times per configuration. Answers were evaluated against predefined answer keys containing individually verifiable facts and source-code evidence. A blinded LLM judge assessed both coverage and precision.

The resulting score is:

Score = Coverage × Precision

In other words, an answer needs to cover the relevant facts without introducing unsupported claims.

Phase 1: Four retrieval approaches, one model

Before comparing different models, I wanted to understand how different retrieval approaches perform when the model stays exactly the same.

For this experiment, I used Qwen3.8-27B-Splash across four configurations:

  • Native tools: grep, glob, read and shell
  • prjxp: the dual-graph index accessed through MCP
  • Graphify: a code graph using Graphify's --code-only mode
  • Vector search: LlamaIndex and Chroma with standard 1000/100 chunking

The results on the prjxp codebase:

ApproachCoveragePrecisionScore
prjxp0.631.000.63
Native tools0.601.000.60
Graphify0.410.990.41
Vector search0.380.940.36

In this particular experiment, prjxp achieved the highest score.

The result suggests that combining structural and semantic navigation can offer an advantage over both conventional vector retrieval and a code graph alone.

There are important caveats, though:

  • I deliberately ran Graphify with --code-only. My goal was to compare solutions that can realistically be operated locally, without requiring a separate LLM-based extraction pipeline. Graphify's full LLM-based graph extraction is a different configuration with substantially different resource requirements. So this benchmark does not evaluate Graphify's full GraphRAG capabilities — it evaluates the code-only mode, chosen to keep the comparison within a practical local-first setup.
  • The vector-search baseline used deliberately simple, non-code-aware chunking. The comparison therefore measures chunking quality as well as retrieval.
  • The four-way experiment used an eight-tool-call limit, which later turned out to be problematic for exploratory navigation.

So this is a comparison of four concrete configurations, not proof that prjxp is universally better than every graph or vector retrieval system.

Phase 2: Native tools vs. prjxp, across two models

The next question was whether the observed benefit depends on the model.

I therefore extended the benchmark with DeepSeek-V4.1-Flash and compared both models using native tools and prjxp:

  • Qwen3.8-27B with native tools
  • Qwen3.8-27B with prjxp via MCP
  • DeepSeek-V4.1-Flash with native tools
  • DeepSeek-V4.1-Flash with prjxp via MCP

This phase also addressed a methodological problem in the original benchmark.

My earlier measurements used an eight-tool-call limit. That turned out to penalize exploratory navigation: the limit was reached in 24 of 27 sessions in the affected legacy-codebase configuration.

A tool call is not necessarily expensive in itself. What matters more is the amount of context returned by the tool. Limiting the number of calls therefore restricted the very kind of exploration prjxp is designed to support.

I repeated the comparison without a tool-call limit, using a token ceiling and timeout instead. The following results are from that corrected measurement.

Each question was run three times per configuration, giving 27 sessions per configuration and codebase.

Legacy codebase

ModelNative toolsWith prjxpChange
Qwen3.8-27B0.5830.655+12.4%
DeepSeek-V4.1-Flash0.6830.723+5.9%

Both models improved when they had access to prjxp.

For Qwen, coverage increased from 0.609 to 0.655, while precision improved from 0.958 to 1.000.

For DeepSeek, coverage was almost unchanged (0.738 to 0.727), but precision increased substantially from 0.926 to 0.995.

prjxp codebase

ModelNative toolsWith prjxpChange
Qwen3.8-27B0.7620.760−0.3%
DeepSeek-V4.1-Flash0.8360.808−3.3%

Here, prjxp did not help. The results were essentially neutral for Qwen and slightly negative for DeepSeek.

I think this contrast is important. It suggests that the benefit depends on the codebase, rather than prjxp being universally better than native tools.

One possible explanation is that a precomputed structural and semantic map becomes more valuable in a complex or unfamiliar legacy system. In a smaller or already well-understood project, an agent may be able to reconstruct the relevant relationships using ordinary tools without much difficulty.

That's a hypothesis, not a proven general rule.

What about context consumption?

The token numbers from the corrected legacy-codebase comparison are also interesting:

Legacy codebaseNative toolsWith prjxp
Qwen effective tokens175,20896,925
DeepSeek effective tokens265,092246,694

For Qwen, prjxp reduced effective tokens by roughly 45%. For DeepSeek, the reduction was about 7%.

This doesn't mean prjxp always reduces total context or runtime. The number of exploratory tool calls and the size of their responses matter, and the effects vary between models and codebases.

In fact, in the corrected measurement, prjxp did not consistently reduce response time. The larger MCP tool schema and the additional navigation steps have their own costs.

So the benchmark does not prove that prjxp is always faster, cheaper or more accurate. It provides evidence that navigation support can improve answer quality in at least some codebase scenarios.

Limitations

There are obvious limitations to this evaluation:

  • Only two codebases were tested.
  • Each codebase has nine benchmark questions, with three repetitions per configuration.
  • The four-way comparison of native tools, prjxp, Graphify and vector search used the earlier eight-tool-call limit. Only native tools and prjxp were included in the later uncapped re-measurement.
  • Graphify and vector search represent specific configurations, not the full range of possible graph-based or vector-based retrieval systems.
  • Qwen ran locally using 4-bit MLX, while DeepSeek was hosted through OpenRouter. Model and infrastructure effects cannot be separated.
  • The legacy-codebase results are based on one real project. Its name, domain and technology stack are not disclosed.

The results are therefore an initial evaluation, not a general proof that this approach works better across all projects or models.

Why I care about smaller models

I originally started exploring this because I wanted to make codebase analysis more accessible to smaller local models.

Larger models can often reconstruct a project's structure through repeated grep searches, file reads and tool calls. Smaller models may struggle with that process, especially when the codebase is large or unfamiliar.

My hypothesis was that providing navigation guidance could reduce the amount of orientation work the model has to do at query time.

Some of that work is moved into a deterministic, precomputed index.

The model still decides what matters and what to inspect. It just gets better guidance about where to start and where to go next.

The DeepSeek results were interesting in this respect, too: the benefit was not limited to the smaller local model. The larger hosted model also showed a measurable improvement on the legacy codebase.

So, is this just another RAG tool?

Technically, prjxp does use retrieval, embeddings and a vector index. I'm not trying to pretend otherwise.

But I think there's a meaningful difference between:

  • retrieving chunks and asking the model to make sense of them, and
  • giving the model a structural map so it can navigate to the relevant code itself.

That's the approach I'm exploring.

I'd be interested in hearing what others think:

When building coding agents, are we spending too much effort on retrieving more context and not enough on helping models navigate to the right context?

Maybe that's what prjxp is really about:

"Wissen heißt, wissen wo es steht."
Not putting all the knowledge into the context window. Helping the agent know where to look.

Project: https://github.com/carstenSpraener/prjxp

Homepage and architecture overview: https://prjxp.spraener.de/


r/LocalAIStack • • 6h ago

"Looped DeepSeek-V4.1-Flash" is unfortunately under-tested and overhyped. Here are the receipts.

Thumbnail reddit.com
1 Upvotes

r/LocalAIStack • • 8h ago

Hitting up to 109.2 tok/s (71.3 tok/s avg) on Qwen4-35B-A3B (UD-Q4_K_XL) at 256K Context on a 12 GB RTX 4070 + PCIe Gen3 — Unsloth vs Strata + Real Compiler Benchmarks

Post image
1 Upvotes

r/LocalAIStack • • 12h ago

What are your use cases for your local LLM?

Post image
2 Upvotes

Video game composer here with a mac studio m2 max with 96gb RAM. I recently installed qwen4:35b-a3b-q4_K_M but am kind of at a loss as to how to use it advantageously on my mac. right now I'm simply running the LLM because my mac can easily handle it

what can you do with that kind of power?


r/LocalAIStack • • 9h ago

DGX Spark vs. Strix Halo: how long does a 32K prompt take to start answering on a 70B model?

Thumbnail reddit.com
1 Upvotes

r/LocalAIStack • • 9h ago

How are you evaluating local models’ output quality?

0 Upvotes

I have been running and trying to find use cases for local models for a long time now, however a problem that I routinely face is that while a new model seems good at the time of initial testing (sometimes too good to be true), it later turns out to be missing the polish for some of the more “real world” tasks (especially coding). So I just want some advice on how people of this community are benchmarking/comparing/evaluating open weight models?

This is not for the hard metrics like PP and TG, those can be found easily. What I want to understand is the following:-

  1. How are you evaluating the model’s output quality and whether anyone has been able to create a standard evaluation set for their use-case?
  2. What are the variables you are testing for an evaluation set for the same model (using different settings, different harnesses etc.) [In my experience harnesses is also changing model’s output quality - case in point Qwen models seem to work way better with Qwen code for me]
  3. How are you scoring model output?

r/LocalAIStack • • 12h ago

I benchmarked Qwen4-35B-A3B against Qwen3.8-27B on 108 agent sessions: 40% faster, slightly worse quality, unusable without reasoning

Thumbnail reddit.com
1 Upvotes

r/LocalAIStack • • 1d ago

I built a coding agent for small local models. Qwen3.5 9B solves 41/45 on aider polyglot with it

Thumbnail
gallery
30 Upvotes

Hey all. Been building this for a while on my own two GPUs and its finally in a state I'm ok showing people. I named it parmanu, a coding agent harness made for the small models most of us can actually run.

Yes, I deliberatrely named it parmanu, inspired from Sanskrit/hindi word meaning smallest atom. mine runs smallest models in a usable way.

The main reason I started all this was after noticing that small models dont really fail because they dont know stuff. They stop too early. say the tests pass when they didnt run them, or go in circles. So I made parmanu in a way that it makes them a plan, run the real tests, and it wont accept "done" without proof. If they get stuck it can race a second attempt and keeps whichever one passes.

I benchmarked it on aider polyglot, dev split, 45 exercises in 6 languages. Same model, same llama.cpp server, same limits for every harness. Grading was done by the benchmark's own tests in docker, also no internet. I ran these for about a week, in between life, work, and kids. :D.

  • Qwen3.5 9B: 41/45 with parmanu. aider with the same model solves 8, Claude Code pointed at the same local server gets 26
  • Qwen3.5 4B: 23/45. next best was opencode at 14
  • Qwen3.8 27B (IQ4_XS, one 16GB card): 45/45. same as Claude Code + Haiku 5.5

Note: In the sessions where I ran all five harnesses back to back parmanu got 35 on 9B, not 41. 41 is the current config after more tuning, and I tuned on that split. So I also ran the 180 held-out exercises it never saw, 9B gets 150/180 there. 27B is still the better model, it just costs you a bit more time and VRAM.

Install is

npm i -g parmanu

the launch command is anu. Works with anything OpenAI compatible. Charts and the per-language breakdown are at parmanu.dev/benchmarks, code is at github.com/dadwritestech/parmanu (MIT)

What models should I run next? Qwen4? Gemma? Inkling-small or something else? :o


r/LocalAIStack • • 14h ago

Qwen4-35B-A3B runs on Android tablet

1 Upvotes

Qwen4-35B-A3B, released on 4 December 2026, runs in BigMoeOnEdge² since v7.60 — the brand-new MoE model in a standard 4-bit Q4_K_M quant, on a 16 GB tablet, at up to 9.8 tokens per second: fast enough to read along as it writes.

Honor MagicPad 3 Pro 13.3 , orcarouter abliterated Mix-33G (imatrix; experts IQ4_XS/Q4_K, dense Q8_0), 16k context, Decode: 9.5–11.1 t/s over a 1151-token answer), Prefill: 62 t/s (431-token prompt)

https://github.com/int3ks/BigMoeOnEdge-Snap

https://huggingface.co/orcarouter/Qwen4-35B-A3B-abliterated-GGUF


r/LocalAIStack • • 14h ago

Qwen 4 35b configuration

Thumbnail reddit.com
0 Upvotes

r/LocalAIStack • • 21h ago

Qwen4-35B-A3B at 8-bit on Tesla V100s: level with Flash-Next on accuracy, at 81 to 89 tokens per second on two cards

Thumbnail
madweights.ai
2 Upvotes

r/LocalAIStack • • 17h ago

Does anyone use AI in anything besides chat?

0 Upvotes

I created a shared inferece service for Android, because I tried making a simple app and it required inference to handle unstructured text. I had no good options to do this. One was to rely on a wep API and pay for it, and the other was to make my app contain the LLM model and inference runtime.

I thought both were bad and wanted a shared service, so I spent months making it. For now I only have one demo app which is "chat" essentially. I did this to demonstrate the capability of the loaded models and different modalities like STT, Text reasoning, tool calling, TTS, Vision, and image generation.

What are some use cases you had where an app would be a great way to reuse the "skills" of the AI agent in a more targeted way? Or does everything just boil down to chat in the end?

I know AI is much much more than summarizing and rewriting, and even small local models are very powerful. Hopefully with a shared inferece service, more apps can be made that don't rely on paid web LLM APIs or can connect to locally hosted models to allow more intelligent apps.

I'm actually curious, but also want to plug my open source free app www.bindx.dev


r/LocalAIStack • • 19h ago

I created the first LittleBit inference engine! NEVER DONE BEFORE

Thumbnail
github.com
1 Upvotes

If you are running local AI models you need to check this out. This is game changer, you can run good AI models for half the resources. Frontier models could be ran on average consumer hardware.

Let me know what you think.


r/LocalAIStack • • 22h ago

Kvark-Sparkle-2.0-35B-A3B: our Qwen4-35B-A3B fine-tune with 34% fewer reasoning tokens (Apache 2.0)

0 Upvotes

With Qwen4 out, we wanted to see how fast we could bring what we learned from Sparkle 1.x to the new generation. So today we're releasing Kvark-Sparkle-2.0-35B-A3B, built on Qwen4-35B-A3B and the first MoE model in the Sparkle family.

Initial results across 10 benchmarks:

  • -46.8% median, 34.2% fewer reasoning tokens on average, with fewer tokens on all 10 benchmarks and up to 63% less
  • Better accuracy on GPQA Diamond, tool calling and HMMT
  • Less than 2 points of accuracy trade-off on average

For us, efficiency isn't just about faster answers, it's about getting more out of the same hardware.

This is our first iteration on Qwen4, and there's still plenty of room to improve. Open weights, Apache 2.0:

Give it a try and let us know what you think and stay tuned for new versions!


r/LocalAIStack • • 22h ago

I made my own Jarvis that works locally (better than those open source repos)

Thumbnail
youtu.be
0 Upvotes

r/LocalAIStack • • 2d ago

Qwen4-35B-A3B - up to 512tk/sec and VERY CLOSE to Qwen 3.8 27B performance

Thumbnail
stealthmodels.com
117 Upvotes

We just completed StealthMark ratings for the new Qwen 4 model! Apache 2 Weights !
We used llama.cpp with a Q6_K (Unsloth UD variant) quantization and later verified the scores using full precision via openrouter alibaba cloud.
Full precision showed identical performance to Q6K, a little up and down in normal uncertainty - the model likely can go to 4-5 bit without much loss in fluid intelligence.

Inkling 2 Mini got all the hype, Qwen4 35B is much stronger in every StealthMark metric.

This model is a ngram enhanced Qwen 3.8 architecture, it basically is Qwen3.8-Flash - just smarter and half as large!

Speed:
The token speed is amazing, even with partial CPU offload we reach 124 tokens/sec on a 5090, benchmarks show speed can reach 512 tokens/sec on such a GPU.
Qwen4 35B is one of the fastest models you can use today.

Efficiency:
Qwen4-35B is among the MOST EFFICIENT models ever tested by Stealthmodels !
It's the 3rd best ever tested in that category, it's very affordable to run or pay.

Reasoning effort:
Qwen4 35B is an over-thinker, it's not beating Qwen3.8 27B, surprisingly. However, it has 1 million context window and it is so fast that the additional thinking time can be acceped.

Intelligence:
Who would have guessed that a 3 billion active parameter model is on EYE LEVEL with Qwen3.8-27B ? Alibaba did it!
The 27B model is still beating it, but very narrowly.
Look at the comparison between Qwen3.8 27B, Qwen3.8 Flash and Qwen4 35B.
The tiny 35B model is just a few percent below the dense 27B, and Flash is behind both.

https://stealthmodels.com/compare/qwen3.8-27b-vs-qwen4-35b-a3b-vs-qwen3.8-flash

Qwen4-35B might be one of the or "the" most important open LLM release of 2026, given how well this performs and how easily accessible it is.
The expectations for Qwen4-27B are very high now.


r/LocalAIStack • • 1d ago

Building a fully local, distributed JARVIS-like AI assistant with 152GB of VRAM and 256GB RAM. How would you architect it?

Thumbnail reddit.com
0 Upvotes

r/LocalAIStack • • 1d ago

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

Post image
0 Upvotes

r/LocalAIStack • • 1d ago

New to llms, generations are truncated, how to fix?

Thumbnail reddit.com
0 Upvotes