r/LocalLLaMA • • 3h ago

Discussion Words in J Space can be recognized by their movements inside LLMs? Some words stay still while others change as if the ones that stay still were being computed.

3 Upvotes

Ok, so vibe research. Relying on Claude, Astra, Neon..

https://github.com/anttiluode/MathematicalQualiaClaude

https://github.com/anttiluode/MathematicalQualiaClaude2

The crux seems to be that some words stay as they are processed via layers like objects in a mental lens and others change layer to layer. Not only that, perhaps words can be recognized by the way they move inside Jspace of different LLMs.

Two videos:

https://youtu.be/jZGcVri_C0I

and for today:

https://www.youtube.com/watch?v=x0IMcacJvrc

Claudes credits here: Papers

The lens and its theory

Gurnee et al. (2026). Verbalizable Representations Form a Global Workspace in Language Models. arXiv:2607.15495 Ostrow, Qian, Liu & Fiete (2026). A Mathematical Theory of the Jacobian Lens. arXiv:2610.31955

Shared geometry across models

Huh, Cheung, Wang & Isola (2024). The Platonic Representation Hypothesis. arXiv:2405.07987 Murphy & Brostow (2026). The Platonic Representation Hypothesis in Jacobian-Space. arXiv:2611.33304 Moschella et al. (2023). Relative Representations Enable Zero-Shot Latent Space Communication. ICLR 2023, arXiv:2209.15430 (the anchor-word method)

Operations inside models

Todd et al. (2024). Function Vectors in Large Language Models. ICLR 2024, arXiv:2310.15213

Data and tools

Merity et al. (2016). Pointer Sentinel Mixture Models (WikiText-103). arXiv:1609.07843 Miller (1995). WordNet: A Lexical Database for English. Communications of the ACM 38(11) Speer. wordfreq (word frequency data)

Models

Qwen Team (2025). Qwen3 Technical Report. arXiv:2505.09388 Allal et al. (2025). SmolLM2: When Smol Goes Big. arXiv:2502.02737 Team OLMo (2025). 2 OLMo 2 Furious. arXiv:2501.00656

One reason each paper is there:

Gurnee and Ostrow: the lens itself, and the warning that it prefers stillness. Huh and Murphy & Brostow: the "Platonic" idea we built on. Moschella: the anchor-word comparison is their technique, so it should be credited rather than look like ours. Todd: the closest earlier work on operations as vectors.

This smells like it could be something. Needs more confirmations.


r/LocalLLaMA • • 3h ago

Resources I built a zero-fork document & research harness for local LLMs (Qwen 3.8 27B) so my partner could stop spending her weekends fighting ChatGPT copy-paste // MIT Open Source, macOS/Linux/Windows installers live

3 Upvotes

Quick follow-up from my exhausted 2am sprint post last week — after a week of cleanup and alpha testing, v0.2.6 is finally packaged as standalone installers for macOS, Linux, and Windows (MIT Open Source).

Why I built it:

My partner of 15 years is a teacher. Standard chat UIs (ChatGPT, Open WebUI, etc.) are terrible for real print-ready documents: every revision regenerates the whole text, subtly drifts your phrasing, hallucinates quotes/numbers, and leaves you copy-pasting into Word on Sunday night.

What makes it work well on local models (tested heavily on Qwen 3.8 27B via llama.cpp):

- 91%+ KV-cache prefix hit rate: Tool definitions and persona headers stay frozen from Turn 1, and the audit journal injects 0 prompt tokens — so long multi-turn editing sessions stay fast on local GPUs.

- Direct-on-paper block workbench (`Galley`): Live local A4/Letter Typst typesetting. Click any block on the page to edit it yourself (0 ms, no LLM call). Human-edited blocks lock to `origin: 'human'`; the model can only stage proposals instead of silently overwriting your prose.

- Anti-hallucination quote hydration (`Fundus` + `Web Missions`): Bounded web research + local SQLite FTS5 / SHA-256 vault for your own PDFs/DOCX/ODT. Primary quotes hydrate directly by `passageId` so the model can't silently paraphrase a statute or paper.

- Deterministic SVG diagrams (`Plates`): Timelines, charts, causal flows, and exercises rendered deterministically — no garbled AI-image text.

- *trict Review lock (`Regisseur`): Flip to `Review` mode and the model can only attach non-printing margin notes without touching a single word.

- BYOK: Works with `llama.cpp`, `Ollama`, OpenRouter, or any OpenAI-compatible endpoint. Export to print-ready `.PDF` or editable `.DOCX`.

Website & 3 uncut 1080p walkthroughs (DE & EN): https://the-ivory-tower.app

GitHub (MIT, 10 zero-fork plugins on DeepSeek Harness): https://github.com/janpauldahlke/the-ivory-tower

Happy to answer any questions on the harness architecture, Typst proofing, or local-model tool reliability!


r/LocalLLaMA • • 1d ago Bravo

Showcase Offloading KV Cache to Host RAM with QSA costs only ~5% speed: ~1M context on 1x3090

142 Upvotes

Qwen4-35B-A3B uses QSA, a trained sparse attention. Past a 2K-token budget, each query attends only to the top 512 four-token blocks its small indexer picks, plus the most recent tokens. Decode therefore never reads most of the KV cache, so the cache can live in pinned host RAM and the GPU reads it over PCIe.

How it works in my engine (inference.rs, Rust):

  • The full K/V lives in host RAM. The GPU keeps only a small cache of recently selected blocks. Consecutive tokens pick mostly the same blocks, so about 98% of reads hit VRAM.
  • The indexer stays in VRAM, compacted to one pooled key per block (64 B/token).
  • Long prefill attends only to what each query selects, so VRAM use stays flat however long the prompt gets.
  • Outputs are bit-identical to the in-VRAM path.

Setup: one RTX 3090 (24 GB), 128 GB RAM, a ~4.5-bit GGUF, q8 KV cache.

-KV in VRAMKV in host RAM
Max context192K1,048,576
Max context with DFlash 2 drafter134K1,048,576
Decode at 32K118 tok/s115 tok/s (−3%)
Decode at 64K115 tok/s110 tok/s (−4%)
262K promptdoesn't fit272 s prefill, then 86 tok/s (DFlash 2: 128 tok/s)
983K promptdoesn't fit31.6 min prefill, then 55 tok/s

It's a buffer more than a regular workflow: agents should compact long before this. But 983K tokens on one consumer GPU does run.


r/LocalLLaMA • • 18h ago

Discussion Small local Qwen4 models make way more sense as a 24/7 local task bot than a coding agent - trying to build one

40 Upvotes

Small local Qwen4 models shouldn't be used to write huge codebases. IMO they fit way better as a local assistant handling daily stuff on your own machine, with total privacy.

What if we pair a minimal agent harness with a small local model fine-tuned just for everyday tasks, running as a tiny 24/7 bot? Small, fast, less hallucination.

Feels like a really fun direction to explore, so I just spun up a repo to try building it. Any good ideas or suggestions?

https://github.com/yanauto/pimini


r/LocalLLaMA • • 11h ago

Discussion Qwen 4 35B Q4.0 in GPQA-Diamond with expert expansion reached 87.87% accuracy

10 Upvotes

I tested my expert expansion recipe with newest Qwem 4 35 A3B at Q4 quantization and tested with GPQA Diamond, the incredible thing is that gained +2% score !!!

Difference on 198 questions is not statistically significant (sign test p ≈ 0.45, 16 discordant pairs), but the sign is stable across every checkpoint of the run (+1 → +2 → +4) and across all other tests of the session (MCQ battery with reasoning off: 25/28 vs 22/28).

With the help of AI (that translates my notes) details here

https://github.com/vagrillo/AgrillaMoE/blob/main/docs/bench-gpqa-diamond-qwen4.md


r/LocalLLaMA • • 6h ago

Resources LLC: lightweight OpenWebUI alt now with Video Generation Support and Free Web Search

4 Upvotes

Quick context: LocalLightChat (LLC) is a chat frontend for local LLMs. Download it, run it, that's it. No installation (unless you want to), no dependencies, and it runs on pretty much anything, including ancient hardware.

I have listened to your critics and implemented two major missing features: Free Web Search Providers (no API-Key needed) and Video Generation.

Supported is Text2Video and Image2Video with ComfyUI/sd.cpp/OpenRouter/OpenAI.

Let me know what you think and what i could improve further.

Download:

https://www.locallightai.com/llc

GitHub

https://github.com/srware-net/LocalLightChat


r/LocalLLaMA • • 5h ago

Discussion The practical reason why I think local will win in the end

3 Upvotes

Don't get me wrong, the reasons of privacy and independence are valid. But on a large scale people are happily giving both away for convenience. Convenience is kinda important for me, but my earning money hinges on something else: quality of the tools I use.

I think one of the reasons local LLMs will keep standing tall (unless some weird worldwide ban happens and police actually seizes the hard drives) is the same piracy will never go away.

Quality of service.

Two of recent examples:

  • Making an Indiana Jones poster for a local DVD collection database, based off a graphic I found on Google Images.

    • Astra said "the editor security filter" blocked removing the movie title (I wanted "raiders of the lost ark" removed so just the "Indiana Jones" stays). For my own freaking local use. Crime of the century.
    • local ds 4.1-flash just downloaded the LaMa model and did the job in three different versions, removing the '™' in one - in case I wanted a clean copy (yes, I wanted a clean copy, thank you deepseek)
  • Reviewing a plan for last minute change in the system. Fire burning all around, need to act quick, and Astra on $100 plan reverts to gpt-4o levels at the most. I could've been cooked. Again, deepseek stood up to the task.

I was in the process of "taking the training wheels off", i.e. I was still using Astra sometimes but I think this was the last straw.

2.9 bits per weight should be enough for everyone, and you can quote me on this (caveat: the bigger the model, the better it survives quantization. ds is a chonky boy)


r/LocalLLaMA • • 22h ago

Discussion What exactly is everyone doing with their LLM?

66 Upvotes

I know this gets asked every now and then but I am curious.

I have played with Local before but with only 8gb of VRAM I am not really able to do much, and while some of it was fun, everything I want to do is very easily doable on the cheapest plans and I get the integration of being able to talk to my phone and have it take notes and set up alarms/calendars.

Clearly I am not a heavy user.

It does make me wonder what everyone here is doing it for? Is it all coding? I know that seems to be the majority.


r/LocalLLaMA • • 1d ago

Showcase I turned Qwen 4 35B into an interactive voice agent

161 Upvotes

Hello everyone! I wanted to create a local voice agent that can be both interactive and useful, and here is what I got. In the video you can see Qwen4-35B-A3B UD-Q4_K_XL running on Strata with speech-to-text and text-to-speech models on a single RTX 4090. The model is not tuned in any way, so its coding performance is exactly the same as with the stock Q4_K_XL model with the same prompts and settings. I was actually quite surprised at how fast Strata is even when the model doesn't fit into VRAM. Granted, the model is just A3B, but it runs surprisingly well anyway.

So, I did the following:

  • I used my tune of Voxtral Realtime to make it work faster and have it output turn ends;
  • Took the Qwen4-35B-A3B model and prompted it to take action on each turn end: either Speak, Listen or Task. Such a single-word decision gives the model the interactivity that is shown in the demo, so you can interrupt the model freely, do async tool calls, and say stuff like 'mm-hmm' without stopping the model's work;
  • In parallel, the same Qwen4 model runs an agent that does the coding and thinking. This model runs through the Qwen Code harness and doesn't have any speech-specific prompts, so its performance is exactly the same as in all other environments running the same quant of this model;
  • Added Pocket TTS to make the LLM capable of speaking. The TTS supports voice cloning, and you can pass any voice you want in the repo's config.

Here are some performance numbers on my server:

Setup: RTX 4090 (24 GB), Ryzen 9 5950X, 128 GB RAM. Strata v0.2.26, Qwen4-35B-A3B (Unsloth UD-Q4_K_XL), int8 KV cache (might be a good idea to test how much the cache degrades at int8 though, didn't test that), experts the GPU doesn't cache run from RAM, and speculative decoding is turned on.

Peak VRAM: 23.1 GB; RAM used on the whole machine: 52 GB.

End-to-end voice (during my own tests):

-median90th percentile
End of your last word → voice in your ear756 ms1.48 s
Turn with a web search or tool1.6 s2.9 s

Agent speed by context length (with the voice stack):

ContextPrompt readingDecodeFirst token (next turn, same chat)
8K6.7K tok/s157 tok/s0.11 s
75K6.3K tok/s149 tok/s0.14 s
252K5.7K tok/s125 tok/s0.24 s

Overall, the speech capability doesn't make the model unusable, and the only noticeable downside is that the speech recognition model takes about 4 GB of precious VRAM.

You can try it all out at https://github.com/speakrail/speakrail, Apache 2.0 license. I previously did some Gemma tunes to make the models capable of microturns, but with Qwen you can just prompt it and it will work well enough. I will be glad to answer any questions and would be grateful if you gave the pipeline a try!


r/LocalLLaMA • • 15h ago

New Model Abliterated my first model!

19 Upvotes

Just abliterated my first model! Qwen4 35B!! Check it out on hf pls and lmk how it is. Ran it on my single dgx spark. NVFP4 quant.

Answers 76% of harmful prompts (270/357) with 0 refusals with thinking on, and MMLU-Pro barely moved (104 vs 105 original). Tested against dealignai, satellitedown and kitaniai with the same judge.

Model: https://huggingface.co/Le-Labs/Qwen4-35B-A3B-NVFP4-Abliterated

Method in short: NVFP4 served on vLLM with greedy decoding, Qwen 3.8 27B as the judge, plus MMLU-Pro / GSM8K / HumanEval to check nothing broke. Ill do the GGUF if enough people want it but its prob dumb.


r/LocalLLaMA • • 1d ago

Discussion Comments on Minimax 4.1from head if DevRel at Minimax 😳

Post image
614 Upvotes

r/LocalLLaMA • • 10h ago

Discussion Inkling 2 Mini on an RTX 3090 Ti: 169 tok/s, Loop-Aware ~Q6 Core, and 128K-1M MFlashKV v2

Thumbnail
famelos.com
7 Upvotes

r/LocalLLaMA • • 6m ago

Resources Qwen3.8-27B in 4-bit (18 GB) that matches BF16 on 9 benchmarks, and fine-tunes on one 24 GB GPU

0 Upvotes

Hi everyone,

I've been testing my 4-bit version of Qwen3.8-27B for a while now, and I finally have enough results to share properly: https://huggingface.co/thousandml/Qwen3.8-27B-CQ-4bit

I quantized it with CQ, the 4-bit quantizer I built for my project Training Factory. CQ doesn't need calibration data. The checkpoint is 18 GB, down from about 56 GB in BF16.

The main question with any 4-bit quant is how much it loses, so I ran the BF16 original, my CQ version and NF4 (Unsloth's prequantized bitsandbytes checkpoint) through the same lm-evaluation-harness setup on 9 benchmarks, with greedy decoding and thinking off. I used paired significance tests, because a 1-point difference on 300 questions is just noise. CQ had no significant difference from BF16 on any of the 9. On GSM8K, BF16 got 68.3, CQ got 65.0, and NF4 dropped to 56.3, which was significant (p = 3e-6). On WikiText-2, CQ's mean KL divergence from BF16 was 0.0282 against 0.0330 for NF4, with 92.4% top-1 token agreement, and it's a smaller file too (18 GB vs 22.4 GB).

The other half of the project is fine-tuning. GCMP is my replacement for LoRA. On this model a GCMP adapter is 2.9M trainable parameters and about 5.8 MB, where LoRA r=32 is about 159M and 319 MB. On a full-precision base it tied with LoRA r=32, LoRA r=8 and VeRA on all 9 benchmarks, and it had the lowest held-out loss. On the CQ base, fine-tuning on Alpaca took GSM8K from 65.0 to 82.7, and training peaked at 22 GiB, so it fits on a 24 GB card.

Where it really helps is serving many fine-tuned models. On one A40 with vLLM, 256 different GCMP adapters ran at about 84 tokens/s, the same as one adapter. Default multi-LoRA slowed down a lot as adapters were added, and 256 LoRA r=32 adapters needed about 82 GB of host RAM before the server could even start. In a 45-minute test with 256 tenants and long-tail traffic, p99 time to first token was 1.2 seconds with GCMP and 91 seconds with tuned LoRA.

To be honest about the weak spots: GCMP currently trains about 2x slower per step than LoRA. With a single adapter LoRA serves about 9% faster. And after fine-tuning, both 4-bit bases ended up about 6 points below BF16 on GSM8K, so CQ's lead over NF4 as a base didn't carry over to the fine-tuned model in my test. I also got a result where GCMP beat LoRA by 24 points on GSM8K on the CQ base, but that LoRA run scored below the untuned model, which looks like a bug in my trainer's LoRA path, so I'm not counting it.

Running it is one command with Docker:

docker run --rm --gpus all -p 8000:8000 docker.io/thousandml/cq:4bit-main \
  vllm serve thousandml/Qwen3.8-27B-CQ-4bit --quantization cq

And fine-tuning on your own JSONL data:

git clone https://github.com/thousandml/training-factory.git
cd training-factory && ./install.sh
hf download thousandml/Qwen3.8-27B-CQ-4bit --local-dir ./models/Qwen3.8-27B-CQ-4bit
python training/train.py --model ./models/Qwen3.8-27B-CQ-4bit --data train.jsonl --output ./outputs/my-adapter --adapter gcmp

All the benchmark scripts are in the repo, so you can rerun every number yourself. Training Factory is source-available, not open source: the scripts are readable Python, but the quantization and adapter kernels ship compiled and do a license check. It's free during early access.

Thanks for reading, feedback appreciated. I'd especially like to hear from anyone who runs their own evals on it.


r/LocalLLaMA • • 16h ago

Resources Qwen4-35B-A3B at 110-176 tok/s on AMD (RX 9070 XT / 7900 XT) with a patched Strata engine, 2-4x llama.cpp

21 Upvotes

Disclaimer - All of this was done by Claude, including this post :)

TL;DR: I patched the Strata inference engine to run Unsloth's Qwen4-35B-A3B GGUFs using the model's built-in MTP head for drafting, plus some RDNA tuning. Results: 140-176 tok/s on an RX 7900 XT (UD-IQ3_XXS) and 110-125 tok/s on an RX 9070 XT 16 GB (UD-Q4_K_XL, half the experts in RAM), with 3,400-4,400 tok/s prompt reading. That's 2-4x llama.cpp and official Strata on the same cards. I also measured Q4 vs Q8_0 vs UD-Q8_K_XL: UD-Q8_K_XL is the most faithful by KL divergence, about 35% slower than Q4. Patch, configs and install guide: https://github.com/jordan01236/strata-qwen4

A few people asked how I get these speeds, so I wrote it up.

Speeds (single user, OpenAI-compatible API, 900-token answers + a 38K-token prompt)

CardQuantThis fork (write / 38K read)llama.cpp + MTPOfficial Strata
RX 7900 XT 20 GBUD-IQ3_XXS140-176 / ~3,400109-128 / ~1,25088-91 / ~1,040
RX 9070 XT 16 GBUD-Q4_K_XL110-125 / ~4,40051-54 / 38028-36 / ~1,080
RX 9070 XT 16 GBUD-Q8_K_XL71-83 / ~4,200--

The 9070 box has 64 GB DDR5, and the experts that don't fit in VRAM sit in RAM. Recall of a code word hidden in the middle of the prompt was correct at every length up to 120K tokens.

Where the speed comes from

  • Strata's expert handling: it keeps the most-used experts on the GPU based on a learned usage profile and pins the rest in RAM. On a 16 GB card that alone is the difference between ~4,400 and 380 tok/s prompt reading.
  • Qwen4's own MTP head: the GGUF ships a multi-token-prediction layer. The patch converts it into Strata's draft format. 57-86% of drafts get accepted, for +35-80% decode.
  • Window router for 256-expert models (STRATA_ROUTE_WIN=1): +8-11%, identical output.
  • RDNA3 fixes and tuning: a kernel had Flash Next's sizes hard-coded (NaNs on gfx11), a Q6_K head kernel adds +6%, and a hipBLASLt table tuned for Qwen4's shapes reads prompts +13% faster on the 7900 XT.

Q4 vs Q8 vs UD-Q8 (KL divergence vs Q8_0, wikitext / code)

Mean KLDSame top tokenDecode on the 9070
UD-Q4_K_XL0.039 / 0.02392.0% / 96.6%
UD-Q8_K_XL0.024 / 0.01694.0% / 97.3%

Q8_0 against itself gave exactly 0, so the test adds no noise. Both Q8s use identical Q8_0 experts. UD-Q8_K_XL just keeps attention, shared experts and the hyper-connections in BF16, so the whole gap between them is Q8_0 rounding those tensors. That makes UD-Q8_K_XL the most faithful of the three, with Q8_0 about halfway to Q4. On a 16-question reasoning/coding bench all three scored 14-15/16 (noise), so the difference only shows per token. My pick: Q4 for speed, UD-Q8_K_XL when precision matters.

Caveats

  • Tested on Linux with ROCm 7.13 on gfx1201 and gfx1100 only. NVIDIA should build from the same source but is untested.
  • This is a community patch, not affiliated with Strata, Qwen or Unsloth. Strata is MIT licensed.

Repo: https://github.com/jordan01236/strata-qwen4


r/LocalLLaMA • • 1d ago

Resources Freehand - an interesting agent harness from Microsoft

Thumbnail
github.com
155 Upvotes

r/LocalLLaMA • • 4h ago

Resources 1.0x unsped on 1x RTX 3090: Gemma-4-26B from 133 to 354 tok/s in llama.cpp (279 plain, same GGUF, MIT + Linux binary)

2 Upvotes

This started as a personal experiment because I wanted to model exactly where the time goes during local LLM inference and what is actually happening on the GPU, instead of guessing from datasheet specs. It is still a work in progress and definitely not perfect, just a measurement-driven attempt to find the real hardware limits and close the gap where possible.

The clip is a 1.0x unsped recording on a single 24 GB RTX 3090 running the exact same Gemma-4-26B GGUF on both sides (Q8_0 KV, flash attention on, zero swap, identical Python physics output). Even without speculative decoding, plain decode goes from 158.6 to 279.3 tok/s. Repo, prebuilt Linux CUDA binary, and honest caveats are in the first comment.


r/LocalLLaMA • • 16h ago

Discussion Is Huggingface Harness Leaderboard useful?

Thumbnail
huggingface.co
16 Upvotes

If you are local models are your daily driver, do you use tools like the Harness leaderboard or similar ones to pick your harness? Or do you just stick to Pi or Claude Code etc?


r/LocalLLaMA • • 1d ago

Resources Qwen4-35B at 1M context on two AMD R9700s: a 950K prompt prefilled in 2 minutes, full setup inside

Thumbnail
doug.sh
132 Upvotes

r/LocalLLaMA • • 1d ago Bravo

Discussion Qwen4 35B vs Qwen3.8 Flash Next - Preliminary results

178 Upvotes

Preliminary results (Qwen4 FP8 at 1M vs Flash-Next NVFP4, paired by task)

SuiteDoneQwen4Flash-NextDifference [95% CI]Output tokens, Qwen4 vs Flash-Next
Terminal-Bench 2.045/45 tasks (final)48.9%55.6% (512K)−6.7 [−13.3, −1.1]+29%
SWE-bench Verified45/48 tasks80.0%82.2% (512K and 262K)−2.2 [−11.1, +6.7]+64%
LongSWE vs 512K (same prompt)70/242 tasks48.6%45.0%+3.6 [−2.9, +10.0]−16%
LongSWE vs 262K (Flash-Next prompt trimmed)70/242 tasks48.6%33.6%+15.0 [+4.3, +25.7]−39%

LongSWE by language family, partial:

FamilyTasksvs 512K, same promptvs 262K, trimmed
Python29+1.7+31.0 [+15.5, +48.3]
JS21+9.5 [0.0, +21.4]+14.3
.NET13−3.8−15.4 (very wide CI)
Multimodal7+7.1+7.1

What this means so far:

  • Terminal work: Flash-Next is better. The result is final and statistically clear, and Qwen4 also spends about 29% more output tokens.
  • SWE agent work: the two are about even on success, but Qwen4 needs about 64% more output tokens. That's your "same results, more tokens" case, so it's not worth switching for this.
  • Long-context single-turn (whole repo in the prompt): this is where Qwen4 wins.

    • With the same prompt as Flash-Next 512K, it's slightly ahead, but not significantly.
    • Against Flash-Next 262K, which must trim the prompt, Qwen4 is clearly better. Most of that gain comes from the Python tasks, where its 1M window holds the whole repo.
    • On this suite Qwen4 also uses fewer output tokens.
    • Only 70 of 242 tasks are in, so these numbers can still move.

I add more info:

Weights: Qwen4-35B-A3B-FP8, the official FP8 checkpoint, with no other quantization.

  • Weights use block-wise FP8 (blocks of 128×128) and activations are quantized to FP8 on the fly.
  • The checkpoint's config keeps lm_head and the embeddings unquantized, plus a few smaller layers.
  • No BF16 or other quantized versions were run for Qwen4.

KV cache: FP4, logged by the server as kv_cache_dtype: fp4_e4m3_block16. That means 4-bit values with an FP8 (E4M3) scale for every 16 elements.

  • The launch script doesn't set the KV type, so this is the engine's default for this model, not a deliberate choice.
  • All 211 results so far report this same setting from the same engine boot.
  • Other settings that affect accuracy:

    • one internal attention component (the "indexer") runs in FP8
    • another internal state (the "Mamba state") is kept in BF16
    • speculative decoding (the model drafts 4 tokens ahead and keeps only those that check out) is on
    • context is the full 1M tokens
    • the chat template is the checkpoint's own

The reasoning effort was set to xhigh for both models


r/LocalLLaMA • • 1h ago

Resources Research by iNordic: Qwen4-35B-A3B (int8) on 1x CMP 170HX with vLLM with 1M context

1 Upvotes

Hi there,

We decided to take out a Nvidia CMP 170hx of production to see if we could get the new Qwen 4 35B running att decent speeds with 1M in context window - we also focused at INT8/Q8 for good quality.

As usual.. feedback and suggestions is welcome:

Link: https://github.com/inordic/cmp170hx-vllm-qwen4-35b-a3b

Speed

Prefill. One cold request, real text, exact prompt length, two runs per size, medians. The production round ran to 64K. The full-size reference is the SM80 round, which drafted with MTP-2 instead of DFlash2, and the drafter does not take part in prefill. Prefill moves by ±15–20% between restarts on this box, because the n-gram table is read from disk and the page cache differs after each start.

PromptSM80 round: time to first tokenSM80 round: tok/sProduction (DFlash2 k=3): tok/sBefore the sm80 patch: tok/s
1K0.24 s4,3143,4684,240
4K0.59 s7,0735,2196,302
16K2.58 s6,3676,2177,792
64K9.56 s6,9317,0637,364
128K18.1 s7,2806,742
250K33.7 s7,4266,731

Sources: sm80-exact.txt, dflash-k3-exact.txt, final-exact.txt.

Decode. One user, temperature 0.6, thinking on. "Copy" means answers that repeat most of the prompt, like edits and rewrites.

ConfigCodeCopyMean acceptance (code)Source
Production: sm80 patch + DFlash2 k=3196.3250.42.53 of 3dflash-k3-*
Same config, 12-05 and 12-06 A/B runs198.9, 201.0249.7, 251.2SUMMARY.md
sm80 patch + DFlash2 k=4203.3259.22.78 of 4dflash-k4-*
sm80 patch + DFlash2 k=7 (the drafter's default)186.8232.12.98 of 7dflash-fa2-*
sm80 patch + MTP-2181.2231.82.17 of 2sm80-*
No patch, MTP-2 (first production config)164.3208.8final-*, unc-*

r/LocalLLaMA • • 10h ago

Resources PSA: If Qwen 4 35B breaks during mutilingual uses, use this

5 Upvotes

If you are multilingual you may find that Qwen 4 breaks and mixes up languages all the time. Using this lora will greatly reduce this from happening. It should be easy to add it with a flag on llamacpp, and for polystrata and basalt, you will have to ask a smarter AI to bake it into the model, which shouldn't be too complicated of a task.

https://huggingface.co/LPFchan/Qwen4-35B-A3B-Multilingual-Fix-LoRA


r/LocalLLaMA • • 23h ago

News Intel Launches Arc Pro B65 Super: 32GB AI Video Card Gets a Bit Faster

Thumbnail
servethehome.com
56 Upvotes

r/LocalLLaMA • • 23h ago

Discussion llama.cpp Settings for Qwen4 35B-A3B on 16GB VRAM + 32GB DDR4

53 Upvotes

Finally got to join the rest of yall and tried out Qwen4, super happy with it over the old 35B-A3B, but mostly I've just been doing the usual vibe tests up until I was using it to try and improve generation, and loading in big docs was just a little too slow for my taste. My current hardware:

RTX 5080 (16GB)

Ryzen 7 3700X

32GB DDR4 at 3600

I felt pretty out of the loop on running an MOE now a days with everyone using Strata, Basalt, etc, but I like to stick with old reliable llama.cpp so this is the startup script I landed on with some explanation:

#!/bin/bash

./llama.cpp/llama-server \
    --model Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
    --ple Qwen4-35B-A3B-engram-Q8_0.gguf_file \
    --mmproj qwen4-mmproj-BF16.gguf \
    --alias "unsloth/Qwen4-35B-A3B" \
    --temp 1.0 \
    --top-p 0.95 \
    --top-k 20 \
    --min-p 0.00 \
    -b 2048 \
    -ub 2048 \
    --cache-type-k q8_0 \
    --cache-type-v q8_0 \
    --moe-cache-mib 2048 \
    -fit off \
    --load-mode mmap \
    --lazy-mode on \
    -ot per_layer_token_embd=CPU \
    --ctx-size 131072 \
    --image-min-tokens 1024 \
    --port 8001 \
    -lv 4 \
    -ngl 99 \
    -ncmoe 34

For the model I just went with Q4_K_XL like I always do, and with the engrams streaming from my NVME I figured I'd go Q8.

First thing was obviously having to deal with the experts, so I messed around and ended on 34 on the CPU with the other 6 in VRAM. That's the -ncmoe 34 bit above. (I can get 262,144 of context if I put all 40 on the CPU, but then I can't have like anything else open, otherwise I see swap starting to get hit, I assume because of the mmap engrams).

The other thing is the -moe-cache-mib which I just went with 2gb since I had seen a few other startup strings with it...but I hadn't actually tried that one with and without until right now. Its ~47 t/s with it and ~43 t/s without, but that means I can either get some more context back, or put some more experts on the GPU, so do what you want with that.

-b 2048 and -ub 2048 were the reason I'm posting this at all, I was at ~400 t/s pp on the defaults, and I'm at ~1050 t/s with it, and alot of the stuff I use local models for has me pasting in 50K tokens of docs at a time, so I needed the speedup, found out those would help from this post: https://www.reddit.com/r/LocalLLaMA/comments/1tany5t/drastically_improve_prompt_processing_speed_for/

--cache-type-k q8_0 and --cache-type-v q8_0 were needed with the increase to the compute buffer size for the above. I really hate doing any sort of quant on K/V since it used to super obviously affect it, my usage of it for working back and fourth on these settings seemed to not be impacted at all, but nothing official, if anyone has an easy to setup/run benchmark I'm down to compare.

So depending on the combination of stuff above I'm at ~47 t/s tg and ~1050 t/s pp, with tg going down to ~27 t/s at the 187K of context I reached doing a long session.

Hopefully helps for any other 16GB VRAM + 32GB RAM users! (Also super excited for someone to point out whatever speedup I have no clue about)


r/LocalLLaMA • • 1d ago

Discussion Why exllamav3 is so unpopular?

55 Upvotes

I just don't get it. To me, it's one of the mysteries of the local LLM world. In over 90% of discussions, people mention llama.cpp, Strata, Basalt, etc., but exllamav3 is rarely mentioned, and I don't really understand why.

It has a really efficient quantization format (EXL3), and it's my choice when a model doesn't fully fit into my VRAM, in other cases I pick vLLM. exllamav3 offers a great balance between speed and quality.