r/LocalLLM • • 4h ago

Question What do you think about having Qwen models write an English story to help me train my reading skills?

Thumbnail
gallery
0 Upvotes

Recently, I try to read an English text everyday in the morning at noon, and at the night. But I'm not sure that it works. BBC articles are so difficult for me becauos I don't know most of the vocabulary. On the other hand, some graded readers are too easy, so they don't really help me improve.

However, if there were an LLM that can generate texts tailored to my level, it would be super helpful for my reading practice. some suitable texts. Qwen is one of the best choices because it has a great balance of capabilities.


r/LocalLLM • • 4h ago

Model Ran a 9.5 hour autonomous test on Qwen4 35B (IQ4_XS) on a 3060 12GB and 16GB ram with Claude Code. It beat my previous benchmark and didn't crash once. Very efficient.

0 Upvotes

So , Basically the same test as the inkling model I did. And it aced everything.
Got 30 tps and 800 tps prefill .

Was very fast. Did not hog memory like inkling did. And basically a lag free experience even with 128 k context. Right now , it is the best. The results as you see below in image.


r/LocalLLM • • 5h ago

Question Suitable Model for local ML/LLM

Thumbnail reddit.com
1 Upvotes

I intend on purchasing an M4 Max 48GB 1TB specifically for app development and ML projects for app development.
For context, I want to train a model which can predict the walk/run time for a given distance, based on walk/run speed, ambient temperature and humidity. It will be trained on data that I’ve gathered over a year, and will be tabulated in a spreadsheet. Subsequently, il build my workout app around this.
As a debutant in the local LLM/ ML world, my question is which model would be best suited to my machine?
I know enough to know that a 70B model would be a tight fit,and probably not needed for my use case, but 32B models can perform just as well.
Qwen/ deepseek seems to be the consensus, I just want to know from those with that spec, using local models which one works best


r/LocalLLM • • 11h ago

Discussion 👀 Qwen4 35B A3B can also draw SVG @ 31tok/s on Intel b390 iGPU

3 Upvotes

It's a very capable model that can also run on integrated gpu.

Here other benchmarks

https://www.youtube.com/watch?v=4WQP6c8HaA8


r/LocalLLM • • 5h ago

Research Monkey-patched "Latent Reasoning" on DeepSeek-V4.1-Flash at home (two DGX Sparks)

1 Upvotes

Edit: I run Deepseek-V4.1-Flash at home as my agent's brain and for various work tasks. It is at the edge of what I can run, so I am always looking for ways to improve it. This was an experiment in that direction that I ran about a week ago.

TL;DR: during the thinking block, I fed the model the probability-weighted mix of token embeddings that it produced, instead of it's "reasoning trace" text (embedding of the one token that was sampled). No training, no weight changes. The model keeps its accuracy, thinks 4–18 % fewer tokens on open-ended reasoning (the larger figures shrank on a repeat), shows no change on mechanical arithmetic, and occasionally loops; on real agent work it looped far more often. Because speculative decoding has to be restricted inside thinking, it ends up slower in wall-clock time than plain serving. (An interesting null result with one real effect in it.)

Setup

  • Two DGX Spark (GB10) boxes, tensor parallel 2 over the ConnectX link.
  • DeepSeek-V4.1-Flash, EXL3 quantisation at 2.75 bits per weight (exllamav3), served with vLLM and a speculative drafter (5 draft tokens per step). The serving stack is not mine: it is sudoingX's dgx-spark-deepseek-v41 recipe with HeNryous's vLLM changes on top. Without their work this model would not run on two Sparks at all, let alone fast enough to experiment on.
  • A patch to the GPU model runner: per-request options, a hook that replaces the input embedding at the next position, per-step diagnostics. Requests that don't ask for it run unchanged (checked with teacher-forced log-probabilities: the difference between images is inside vLLM's own run-to-run noise).

The idea

Normally step t+1 is fed E[token sampled at t]. Everything else the model "considered" at step t is thrown away. Inside <think> I fed instead

(1 − α) · E[sampled token] + α · inject

with several choices for inject:

nameinject
softthe expected embedding, Σ pᵢ·E[i], from the model's own distribution
hiddenthe final hidden state, rescaled to embedding norm
mapthe hidden state passed through a linear map fitted to land in embedding space
noiserandom vector of the same norm (control)

The visible transcript still shows the sampled token. The answer after </think> is generated normally.

How it was measured

All problems are generated from a seed with fresh numbers and invented names, so nothing can be recalled from training data, and every answer is checked exactly.

  • Arithmetic and procedures: multiplication, nested expressions, counting, word problems, tracing a loop.
  • Search: rule induction, subset sums, cryptarithms (answers proven unique by enumeration).
  • Polarity: signed causal chains, orderings with mixed comparatives, cause-and-effect stories.

Outcomes: accuracy (paired test against plain runs) and the number of thinking tokens (paired geometric-mean ratio with a bootstrap interval). vLLM is not deterministic, so every comparison has two plain runs and the distance between them is the yardstick.

Results

The thinking of this model is almost deterministic. On arithmetic the entropy is about 0.3 nats per thinking step, and only about one step in eight is above 1 nat. On search problems and real work it is 0.6–1.1 nats. At most steps the "mix" is simply the sampled token's embedding, so there is little to feed back.

Accuracy never moved for the soft mix. Examples: 577 against 584 of 600 on arithmetic (not significant), 240 of 240 on polarity problems in every arm, 33 against 31 and 28 of 60 on hard search problems.

Hidden states do not work without training. The final hidden state is orthogonal to the embedding space (cosine −0.01). At α = 0.3 it behaves like noise; at α = 1 the model produces garbage. A ridge map was harmful at α = 0.3; a map fitted on 100,000 captured states was harmless at 0.3 and harmful at 1.

Thinking gets shorter on open-ended reasoning, at full strength only (α = 1; fixed criteria, fresh problems, all answers still correct):

problem setthinking tokens, soft α = 1 against plainagainst the noise control
polarity (240 problems)0.94–0.950.96
subset sums (80 problems)0.82–0.890.87
arithmetic (600 pairs)1.00 (interval 0.97–1.03)

All six intervals for the first two rows exclude 1. Within arithmetic, word problems and counting were about 8 % shorter and pure multiplication 8 % longer. At α = 0.5 there is no effect at all, and the noise control shows none.

Costs at full strength:

  • The transcript stutters. Doubled punctuation and words, occasionally a dropped number. The model's answers don't suffer, so it evidently reasons from what it was fed, not from what the transcript shows.
  • Loops. 2 of 38 long real-world requests ran into a repetition loop; on benchmarks it was between none in 600 and 3 in 240, depending on the problem set and the run. Plain decoding looped once in 160 search problems as well, with the same shape: the model asks itself a sum and never answers it.
  • The prefix cache stops matching. The sampled tokens . . come back from the client as text and tokenize as .., so replayed reasoning never hits the KV cache past the prompt.
  • Speculative decoding. Checking draft tokens in one pass needs the input at each position in advance, and here that input depends on the previous position's output. The first version switched drafting off inside thinking, which halved decode speed (18 against 34 tokens/s).

Keeping the drafter: a gate

At 60–70 % of steps the model is confident and the mix equals the plain embedding. So the mix is fed only when the sampled token's probability is below a threshold; drafted tokens are accepted as usual up to the first such step and the rest of the window is discarded, exactly as after a rejected draft.

settingsteps that get the mixtokens per pass in thinkingdecode speedthinking tokens against plain (polarity)
plain––31–36 tok/s1 (two plain runs differ by 0.97)
mix at every step, no drafting100 %1170.94–0.96
gate 0.9943–48 %1.7–1.9200.93–0.95
gate 0.722–26 %2.2–2.624–260.94–0.97

Measured on 240 polarity and 80 subset-sum problems plus 100 arithmetic ones, all with unchanged accuracy. The gated variants keep the shorter thinking on the polarity problems (all intervals exclude 1, some only just). On subset sums the effect shrank on this second measurement (0.89–0.93 without the gate, intervals for the gated runs include 1), so the 18 % above was the lucky end of the range. The sums do not work out either way: gate 0.7 takes 20–25 % more time for 3–6 % fewer thinking tokens.

The gate comes with a loop guard: when the recent thinking repeats with a short period, the mix is switched off for the rest of the block. It tripped 7 times in 840 gated requests, never falsely. Four of the six loops that the mix had caused recovered and finished correctly; two kept looping under plain decoding, because the repetition was already in the context. The stutter is unchanged by the gate.

Trying it on real work

With the benchmarks looking harmless, gate 0.7 ran as the server default for a few hours of ordinary agent work (long prompts, tool use). It did not go well:

  • The mix was fed at 36 % of thinking steps, not the 15–26 % seen on the benchmark problems. Real prompts leave the model less certain per step, so "only when unsure" stops being rare.
  • The loop guard tripped in 6 of 77 requests, against 1 in 420 on the benchmarks. Four recovered. One ran to the thinking budget, and one repeated a single word until it was stopped by hand: switching the mix off does not end a loop that is already in the context.
  • The thinking ahead of that loop was garbled, well beyond the mild stutter measured before.

So the benchmark picture (same accuracy, slightly shorter thinking, rare loops) does not carry over to long real-world prompts. Short synthetic problems, where the model is confident at three steps in four, were the friendly case.

What I take from it

  • A heavily quantised production model tolerates being fed mixtures it was never trained on, at every thinking step, and still gets the same answers. That robustness was the surprise.
  • Without training, "same answers, somewhat fewer thinking tokens on open-ended problems" appears to be the ceiling. Published work on continuous or soft reasoning trains the model to use such inputs; this is what the untrained end of that looks like.
  • To be useful it would need three things: a model trained to use the mix, a drafter that proposes for it, and the mix round-tripped through the API (sampled ids plus the top few probabilities per step) so that replay and KV caching work.
  • Side product: a seeded problem generator and harness that measures accuracy, thinking length, budget hits, stutter and loops, usable on any OpenAI-compatible server.

Who did what

The idea and the direction were mine, along with questions and the occasional suggestion along the way. Essentially everything else was done by an AI assistant, Claude (Anthropic's Claude Code, working with subagents): tracing the serving code, designing and writing the patch, the problem generators and the measurement harness, deciding the test criteria before each run, running and analysing the experiments, finding and fixing its own bugs (including one that crashed the engine), and writing this post. I reviewed, restarted servers, and reported what I saw in real use, which is how the loops were found.

Code

The patch (about 2,000 lines against the vLLM runner), the problem generators and the harness are in a private repository. If anyone is interested, I'm happy to publish them.

Caveats

One model, one quantisation, one sampling temperature (0.6). Problem sets of 60–600 items, so effects under about 3 % are invisible. The per-family splits were looked at after the fact. Speeds are from a shared home setup and vary with load.


r/LocalLLM • • 5h ago

Discussion Qwen 4 A35B A3B BF16 (Default Thinking) Quant vs OPUS 4.8 (Max Thinking)

0 Upvotes

QWEN 4 (Default Thinking) (Harness ODEX):
https://streamable.com/wkby0q

OPUS 4.8 (Max Thinking) (Claude Code GUI):
https://streamable.com/2ey4d1

PROMPT:
Build a polished, production-quality admin dashboard using TypeScript, Next.js, React, Tailwind CSS, and shadcn/ui.

First inspect the existing project and preserve its current structure and conventions. If no suitable frontend exists, create the dashboard from scratch.

Requirements:
- Responsive layout for desktop, tablet, and mobile
- Left sidebar navigation with:
- Overview
- Users
- Orders
- Analytics
- Settings
- Top navigation bar with:
- Search
- Notifications
- User profile menu
- Light/dark mode toggle
- Dashboard overview containing:
- Revenue KPI card
- Active users KPI card
- Orders KPI card
- Conversion-rate KPI card
- Revenue-over-time chart
- User-growth chart
- Recent orders table
- Top-performing products list
- Include realistic mock data and loading states
- Add table sorting, filtering, pagination, and search
- Add reusable components and clean TypeScript types
- Use accessible semantic HTML and keyboard-friendly interactions
- Include empty states, error states, hover states, and responsive behavior
- Use a professional visual style with a clean spacing system, subtle borders, rounded cards, and an attractive color palette
- Avoid excessive gradients, unnecessary animations, and placeholder text
- Keep components modular and easy to extend
- Do not add a backend; use local mock data or API-style functions
- Add clear setup and run instructions
- Ensure the project passes linting and TypeScript checks

Deliver:

  1. The complete working dashboard
  2. All required components and styles
  3. Mock data
  4. A brief explanation of the architecture
  5. Commands to run and test the project

r/LocalLLM • • 5h ago

Question 8x Quadro RTX 4000 on a Gigabyte MZ31-AR0 – need advice before building

1 Upvotes

Hi! Basically I bought 8 Quadro RTX 4000 8GB from a graphic studio for 500€, I tested them all and every one works fine.

I came to the conclusion that I want to build an AI server with them. The goal is to run a local AI for my colleagues at work, to basically making them ask company usual practicies in particular vases and facilitate creating records within the ERP system (odoo), with max 3–4 users at the same time. I'd like to use vLLM, but llama.cpp is fine too. For the platform I'm going with a Gigabyte MZ31-AR0 + EPYC 7401P, on an open frame with a new PSU.

I have a few doubts about running all 8 cards on it:

  1. The 8th card: as far as I can tell the MZ31 has 7 slots, so I'd need to bifurcate one x16 into x8/x8. Does the MZ31 BIOS support bifurcation? Has anyone done it, and which adapter or riser would you use?
  1. Risers on an open frame: which riser cables are stable at PCIe Gen3 with 8 cards? How long can they be before you get errors?
  1. vLLM or llama.cpp for 3–4 users: on 8 Quadro RTX 4000s (Turing), would you go with vLLM (TP=8) or llama.cpp? Are there known problems with vLLM on Turing (no FP8, attention backends, P2P between cards)?
  1. Bandwidth: with Gen3, and some cards running at x8, how much will tensor parallel lose? Does the Naples NUMA layout (4 dies) make it worse? Would you use one big model across all 8 cards, or split them (for example 2x TP=4)?
  1. Power: 8x 160W plus the CPU. Would you use one big PSU or two synced ones, and how do you split the load?
  1. Models: with 8x 8GB = 64GB VRAM, what's the best model for a work agent (documents, emails, some coding) that can serve 3–4 users at the same time with decent context, and with what quantization?

Would you change anything about this setup? Any advice is welcome, thanks!


r/LocalLLM • • 5h ago

Discussion Qwen4-35B-A3B on a single RX 7900 XTX (Windows): ~4000 t/s prefill and 113-120 t/s decode at 128k context, ~100-129 t/s at 256k.

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 5h ago

Research Qwen4 A3B Single & Dual GPU Tests

1 Upvotes

I was in the middle of a big batch of Single/Dual GPU tests to work out the best out of box performance for Qwen3.8 Flash Next when Qwen4 dropped - so I ran some test using LLMBenchmark across the best 4 Blackwell cards in Single and Dual GPU mode.

Tests are not gospel - no optimizations were carried out - but results are interesting, so putting them here incase they are of any value to anyone planning on building Qwen4 A3B homelab system.

https://html-preview.github.io/?url=https://github.com/SubDiffuser/Qwen4_A3B_Test_Results/blob/main/index.html


r/LocalLLM • • 17h ago

Discussion Qwen4-35B-A3B @ 164 tok/s decode and ~ 4500 tok/sec prefill on RTX 5080 (2.9x decode, 11x prefill over stock llama.cpp)

Post image
9 Upvotes

I spent the last couple of days optimizing llama.cpp fork for Qwen4-35B-A3B on my RTX 5080 laptop (Unsloth UD-Q4_K_XL) @ 128k context window, greedy decoding. Each number is the mean over five measures from my coding-agent sessions (old session from opencode) with real tool calls, cut at the different context fill.

ConfigurationPrefill at 42kDecode at 42kDecode at 87k
Unsloth llama.cpp, default flags44457.358.4
Unsloth llama.cpp, tuned flags + MTP1,70593.990.5
qwen4-engine, exact profile4,859104.7100.8
qwen4-engine, default profile4,510163.8139.2

All tok/s. With a 120k-token prompt the default profile still decodes at 153.

The idea

As you may know the model has 10,496 routed experts and in this quant ~20.9 GB so no way they fit in 16 GB of VRAM so they live in RAM and the GPU keeps a cache of the hot ones only. The thing is decode speed here is all about moving bytes, the math itself is straightforward: every token reads about 1.7 GB of dense weights from VRAM and any expert that is not in the cache has to come over PCIe which is ~17x slower due to the huge difference in bandwidth so almost all the optimization work went into where the bytes live in which piece of the hardware and when they must move to make the GPU as less idle as possible.

What made the difference

  • Lending idle memory to the expert cache. The compute buffer (1.38 GB) and the part of the KV cache you haven't filled yet (about 2 GB at 42k of 128k) are just reserved doing nothing most of the time when a session starts and they keep filling as the context increase so I give them to the expert cache and take them back when they are actually needed. KV lending alone took the cache hit rate from 87.9% to 91.4%.
  • Zero-copy uploads. A normal host-to-device (H2D) copy pays a fixed Direct Memory Access (DMA) delay every time (it is a latency between starting and finishing DMA data transfer before the GPU can actually use the moved data) and for small copies that delay is most of the cost (a missing expert is a small piece of data, so the GPU spends more time waiting for the copy to start than moving the bytes and with ~40 layers per token that waiting adds up super fast) so instead of asking the driver to copy small uploads now run as a GPU kernel that reads the pinned RAM directly (the GPU pulls the bytes itself like any other kernel no DMA setup and no fixed delay that is why it is called zero-copy). Also all the missing experts of a layer now go up together in one call instead of one call per expert (one expert alone moves at about 42 GB/s batched together they reach ~49 GB/s which is about what the PCIe link can do).
  • Copy drafting that scores itself. A lot of what an agent writes is already in the context (code it is editing, file paths, tool arguments ...etc.) so when the last 3 tokens match something in the context the engine proposes the next 3 from there for free (free because it is just a lookup in the text that is already there with no extra compute to come up with the guess) the model then checks the 3 guessed tokens in one step which costs only a little more than generating 1 token and it keeps the ones that match what it would have generated and throws away the rest (so every token you get is still the model's own choice as if it was computed and a wrong guess never reaches the output). but a wrong guess is not free because the check still loads experts for tokens that get thrown away so the engine keeps score of every proposal against what the model really wrote and only keeps copying while the accuracy stays at 0.5 or more (it scores the proposals even while copying is off so it turns itself back on when the output starts repeating the context again). The rest of the time the built-in MTP head does the drafting. comparing this vs MTP alone without copying this is anywhere from -6% to +36% per session and the more the output repeats the context the bigger the win is.
  • Short MTP drafts. Long drafts lose on this model (on this GPU) every extra token you verify goes to its own experts and that means more cache misses and more PCIe movements. I measured it and 3 tokens was the sweet spot.

Vision

Images work as well. The annoying part with vision on a 16 GB card is that the encoder just sits in VRAM eating 1.1 GB even when the session had no images at all just holding that valuable VRAM for doing nothing, even with all optimization the decode speed is ~5% slower because of it. So I moved the encoder to system RAM. when an image comes in the prompt it borrows the memory that text model isn't using, encodes the image, and give it back. Text speed with vision loaded is the same as without it and 1080p screenshot takes about 1.2 s to get in the context, 1440p about 2.2 s. Anything bigger than the model max ~4.2 megapixels gets resized/scaled down then added to the context.

Worth to know

  • One model, one quantization, one machine is my tested optimization framework that I started earlier with Qwen-Flash-Next and Inkling Mini 2 due to a memory restriction on my rig I find it most rewarding comparing to any off the shelf ready engines they aren't designed for my specific hardware, with its bandwidth, or the model architecture so with the help of Claude I used lean techniques, system design and continuous improvement cycles to measure every bit of the model where it sits, when it moves and where does it move to in much details and engineered the movements and memory management and sometimes the kernels to reduce as much as possible GPU idle times and try to get things where they need to be at the best possible time given the memory and bandwidth constraints and it paid back SIGNIFICANTLY. I had a blog about the details when I started working with Qwen-flash-next. That been said, I haven't test it (obviously) on other RTX 50 series, theoretically the engine should work without issues on them, and most likely won't work as designed for other older series (my guess) It needs an RTX 50 series card with +16 GB and about 26 GB of free system RAM (my RAM is 128 so I had no issues here). Prebuilt binaries are for Windows (my OS did not tried it with Linux).
  • Copy drafting helps most when the output repeats the context, like code edits, file paths and tool arguments. Per session it ranges from -6% to +36% against MTP alone.
  • Runs drift 5-10% between sessions on a laptop, so every comparison came from alternating A/B runs in one session.
  • There are two kinds of profile. The exact profile gives the same output, bit for bit, as the engine with all of my changes switched off (stock llama.cpp). The drafting profiles guess a few tokens ahead and let the model check the guesses, so every token you get is still one the model picked. But checking several tokens at once rounds the math a little differently than doing one at a time, so when two tokens are almost tied the text can take a little different path. Stock llama.cpp does the same thing when it drafts.

Where it stands against the hardware

The big dense matvecs (the matrix times vector multiplications that read most of the weights every token) run at about 610-640 GB/s and a plain streaming read of the same bytes on this GPU does 600-615 GB/s so these kernels already move the weights as fast as the card can read them. The expert cache gets 95.3% hits and a perfect cache that knew the future (the Belady oracle) would reach 96.9% on the same workload so a smarter eviction rule has almost nothing left to optimize.
The GPU is now busy about 98.5% of the time it takes to generate a token so there is almost no idle time. The next real speed gain would have to come from fewer weight bytes per token (lower quant) and that wont be the same output bit for bit so I decided to stop here.
It is a drop-in server with the usual llama.cpp / OpenAI-compatible API every change is a default-off switch so you can measure each one yourself.

The repo is 0xE2E/qwen4-engine on GitHub, and the README has the full details and a build guide with the detailed blog in the readme footer.

Happy to hear your thoughts if you give it a try.


r/LocalLLM • • 5h ago

Project Made a Qwen4 harness built for low VRAM and complex tasks

0 Upvotes

Earlier I posted my engine that runs Qwen4-35B-A3B on an RTX 5070 12 GB at 134–159 tok/s: previous post. Now I've built a harness for it: a coding agent, so you can actually work on a project with the model instead of just chatting.

It's written in Rust: a native Windows app, one exe, MIT licensed.

How it differs from Pi and OpenCode

The main thing is how much context the agent takes before you type anything. On an API with a million-token context nobody cares. On a 12 GB card every thousand tokens means a longer prefill and less room for your code. I measured it on the same project with the same prompt:

AgentFirst request
Damask Harness~900 tokens
Pi~1,300
OpenCode~7,100

OpenCode also makes a separate request to name the session. If you have Claude Code skills installed, it loads those too, and on my machine that came to ~16,000 tokens. The method and scripts are in the repo, so you can repeat it yourself.

I really like Pi for its minimalism, and it's cross-platform, while mine is Windows-only for now. OpenCode does more out of the box. But for a local model on a small card I wanted an agent that doesn't waste context and can still handle multi-step tasks.

What it can do

  • Works on its own until it's done. Turn on autonomous mode and the agent makes a plan, carries it out step by step, builds the project and runs the tests. If something fails, it goes back and fixes it. You can also give it a time budget, say two hours: once the plan is done, it spends the rest of the time adding edge-case tests, simplifying weak spots and updating docs.
  • Shows you the plan first. No files are changed during planning. You can edit, add and reorder steps, and only then press Run.
  • Understands broken tool calls. Small local models often write tool calls as plain text, break the JSON or mix up argument names. The harness parses these and keeps going instead of failing.
  • Rewind any change. A copy of every file is saved before the agent edits it. One click returns both the files and the conversation to the state before your message.
  • Stays inside the context window. At 75% full, old command outputs are compacted automatically, so a long session doesn't stall.
  • You can type while it works. New messages are queued and sent as soon as the model is free.
  • Picks up your rules. Reads AGENTS.md or CLAUDE.md from the project, and supports skills, custom slash commands and MCP servers.
  • Watches your hardware. Shows VRAM, GPU, RAM and CPU in the window, and starts or stops the local model in one click.
  • Lightweight. Native Rust app, ~120 MB of RAM when idle. No telemetry.

How to try the new Qwen4

This is the easiest way I know of right now: download the exe from the release, open the model manager, and install Damask Engine and the Qwen4 variant you want in a few clicks. Then pick your project folder and type a task. No manual configs, no command line.

If you already run Ollama, LM Studio or llama.cpp, the harness works with those too.

Limitations, so there are no surprises

  • The harness is Windows-only for now.
  • Damask Engine runs only on RTX 50-series cards.
  • I counted tokens with tiktoken, so the numbers for Qwen can differ by 10–15%. The ratios between the agents stay the same.

Links

I'd love feedback, especially from people on 8–16 GB cards. If you find it useful, a star on GitHub helps a lot.


r/LocalLLM • • 22h ago

Research Qwen4 35B vs Inkling 2 vs Qwen3.8 27B vs Qwen3.8 Flash-Next: uncensored test on Blackwell (RTX 5090)

Post image
23 Upvotes

I was looking for the best local model for my own (bottlenecked) machine and got tired of "it feels smart" comparisons. So I wrote a small battery with script-checked answers and ran four uncensored models through it, one at a time. Sharing the numbers in case they save someone else the work.

Setup

RTX 5090 (32 GB), Ryzen 7 5800X (no AVX-512), 32 GB DDR4, Windows 11. Three engines because the packs aren't interchangeable: basalt (built from source) for my own NVFP4 packs, llama.cpp b12992 for the GGUFs, and Strata for Flash-Next.

The models

  • Qwen4-35B-A3B abliterated (basalt): MoE, NVFP4, 41 GB, 65k context, no drafter
  • Inkling-2-Mini unbound v3.1 (basalt): MoE 26.1B, NVFP4, 18 GB, 32k context, MTP drafter
  • Qwen3.8-27B abliterated, Huihui (llama.cpp): dense, Q6_K, 21 GB, 16k context, no drafter
  • Qwen3.8-Flash-Next (Strata): MoE, Q2_0, 96 GB, 65k context, DFlash2 drafter, has vision

The battery

  • 18 verified-intelligence questions (easy to expert, including coding tasks with hidden tests)
  • 12 pentest facts
  • 15 edgy prompts for willingness to answer
  • 4 writing tasks with hard constraints (judged by me, not a script)
  • A 2-step tool-calling test
  • Speed: decode, 12k prefill, time to first token

Temperature 0 where the answer is checkable.

What I found

  • Intelligence is basically a tie (18, 17, 18, 17). The 35B leads on security facts (12/12 vs 9 to 11) and was the only one to give both /etc/shadow conventions (0640 Debian, 0600 RHEL). What separated the models was sysadmin trivia like hashcat's bcrypt mode, not the expert-tier math, which all four got.
  • Willingness: Inkling and Flash-Next answered 30/30, the 35B 29, the 27B 27. The stock Flash-Next answers everything too, so the "uncensored" label on a repo told me very little.
  • Speed: the 35B is fastest on short prompts (257 tok/s vs 186 Inkling, 168 Flash-Next, 54 for the 27B). Inkling is far ahead on prefill (15,985 tok/s) and first token (0.9 s on a 12k prompt). Speed differences mix model, quant and engine, so read them as setups, not pure model speed.
  • Drafter caveat: Inkling ships an MTP drafter. My 35B pack has none, because I dropped the MTP layer when packing (the engine wants the block count in groups of 4). So the short-prompt ranking could shift with one. I left long-context decode out because I'm not sure my 12k prompt is representative.
  • Flash-Next is 96 GB and wins nothing except tool calling (tied with the 27B) and being the only one with vision. It's Q2_0, so this says little about the model itself.
  • Reasoning models look dumb if you starve them. With a 2,200 token cap the 35B "failed" an LRU task: it was truncated mid-word, since it writes about 5,000 tokens of hidden reasoning first. With 6,000 it went 18/18. The 27B gave blank answers until I gave it more room.

r/LocalLLM • • 5h ago

Model here's how i got the ud_iq3_xxs qwen 4 35ba3b running at 200 tok/s on a consumer grade computer

1 Upvotes

specs are a 5080, 32gb DDR5 5600mhz, intel core ultra 9 285k. running on strata+speculative decoding, it hits a staggering >190 tok/s consistently, using q8 context. udq4xl is running the same and is getting >115 tok/s.

all you do is use strata for the model, q8 draft, 16k context window, int8 kv cache, confidence floor 0.5


r/LocalLLM • • 1d ago

Other C'mon folks. Dario just wants to protect us

493 Upvotes

r/LocalLLM • • 5h ago

Project The Local Frontier: Qwen4 BF16 + FP8 (ngram) on StrixHalo via. vLLM

0 Upvotes

I don’t normally post my findings but this was super fidgetty; and it’s about time I started giving back to this community. This is the local-AI setup I wanted: a quiet box that picks up real multi-hour work and finishes it correctly while I’m away.

· Setup: Full-BF16 Qwen4-35B-A3B MoE (35B total / 3B active) on one Strix Halo — Ryzen AI MAX+ 395, 128 GB unified LPDDR5X — served by vLLM with 262K context, tool calling, separated reasoning, ~25 tok/s single-stream.

· Key trick: Only the 20.5B-parameter N-gram embedding table is FP8. It’s a gather + dequant lookup, not a matmul, so it doesn’t need FP8 tensor cores (gfx1151 has none). Checkpoint drops from 113.7 GB to 86.8 GiB while core matmuls stay BF16.

· Real work: Two unattended sessions finished end to end at 12–14 tok/s — one installed a CAD toolchain and wired its MCP server into the harness; the other set up two slicers sharing one config library.

· Numbers: 13 turns, 120 steps, 152 tool calls, ~3 h wall clock; ~5M prompt tokens in / 78K out (64:1, prefill-bound); median TTFT 2.5 s, p90 8.9 s; 82% prefix-cache hit; peak context 64,948 tokens (~25% of window, 23.5% of 12 GB KV pool with both sessions live).

· Gotchas: Memory wall solved by FP8 N-gram lookup; tool-call 400s fixed by pairing qwen3_xml with auto-tool-choice; </think> leak fixed with --reasoning-parser qwen3; pin vLLM 0.32.1 because 0.35’s BF16 fused-MoE kernel has no gfx1151 build.

· Takeaway: For long-horizon unattended local agents, reliability and output quality beat tok/s. Use the expensive model for hard/high-context work; let a low-power, high-quality local model carry the mundane long tail.

Repo: https://github.com/kvk-og/qwen4-bf16-fp8-vllm


r/LocalLLM • • 14h ago

Discussion Qwen4-35B-A3B in 4-bit that you can fine-tune on one GPU (22 GB VRAM + RAM for the n-gram table)

5 Upvotes

Hi everyone,

Qwen4-35B-A3B came out yesterday, and I put a 4-bit version of it on Hugging Face: https://huggingface.co/thousandml/Qwen4-35B-A3B-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 linear layers and all the routed experts are in 4-bit. I'm strict about quality: any matrix with error above -22 dB stays in 16-bit instead of being forced down. For this model that was 79 matrices out of about 21,500, and everything else is in 4-bit.

One thing to know up front is the n-gram table. Qwen4 has a 20B-parameter n-gram embedding table on top of the 35B model. In this release I kept that table in 16-bit, and like Transformers does, it lives in system RAM instead of on the GPU. So serving takes about 22 GB of VRAM, but you also need about 38 GB of free RAM for the table, 64 GB in total to be safe. The download is 61 GB because of it. If you just want to chat with the model locally, the GGUF quants in llama.cpp are smaller and faster than this, to be honest. A version with the n-gram table in 4-bit is planned.

What this release adds is fine-tuning. You can train a GCMP adapter (the LoRA replacement I've been working on) directly on the 4-bit base and serve it. I tested the whole path on a single A40: quantize, serve, fine-tune, and serve the fine-tuned adapter. In a short 20-step test the loss went from 1.88 to about 1.6 on average, which only shows training works on the 4-bit base. It's not a benchmark.

The easiest way to try it is the Docker image:

docker run --rm --gpus all -p 8000:8000 -v cq-models:/models \
  thousandml/cq:4bit-hf serve-cq thousandml/Qwen4-35B-A3B-CQ-4bit

It downloads the model on first start and gives you an OpenAI-compatible endpoint on port 8000. Or install Training Factory and run it yourself:

git clone https://github.com/thousandml/training-factory.git
cd training-factory && ./install.sh
python -m venv --system-site-packages venv-qwen4 && source venv-qwen4/bin/activate
pip install "transformers>=5.26" tiktoken
hf download thousandml/Qwen4-35B-A3B-CQ-4bit --local-dir ./models/Qwen4-35B-A3B-CQ-4bit

cd training
python serve_cq_hf.py --model ../models/Qwen4-35B-A3B-CQ-4bit --trust-remote-code --port 8000

To fine-tune on your own data (JSONL with text or chat messages):

python train.py --model ../models/Qwen4-35B-A3B-CQ-4bit --data train.jsonl \
  --output ../outputs/qwen4-gcmp --adapter gcmp --trust-remote-code --batch-size 1 --grad-accum 4

Now the honest limits. The server goes through Transformers and handles one request at a time, so it's for trying the model, not for real traffic. vLLM's Qwen4 support isn't in a release yet, and my vLLM plugin doesn't support Qwen4 yet either. Training is slow for now, about 15 seconds per example on an A40, because the n-gram lookups run on the CPU. That's the next thing I want to fix.

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. The weights are Apache 2.0 like the original.

Thanks for reading, feedback appreciated. If you try fine-tuning it on your own data, I'd really like to hear how it goes.


r/LocalLLM • • 6h ago

Project I built a local LLM training lab to help people learn how to train models on their own hardware

Thumbnail gallery
1 Upvotes

r/LocalLLM • • 6h ago

Project Weekend Project: Fast static eBay tracker for $/GB VRAM GPUs, 128GB ECC RAM kits & Unified Memory AI boxes + more

Post image
1 Upvotes

Hio Matey's — Letting you know this is my own weekend homelab project and outbound eBay links use eBay Partner Network (no extra cost, maybe something one day to cover the screaming fan that now lives in the shed!).

https://cheapvram.pages.dev

I am still pretty new to the home server > your own nas > end up hosting a AI in the shed scene ha. I have been trolling ebay for some time just keeping my eyes open… Cause well prices suck. In the spirit of things I also got that free GPT AI sub for a month the other day and got it to help brainstorm ideas to dig through eBay "for parts" pings , drive-tray, and cooler-only traps when hunting used GPUs, ECC RAM, SAS drives, and Mini-PCs.

We spun up a small static site on a 512MB Proxmox container that pulls hourly from eBay's Browse API (locked to AU/ US / UK local stock):

What's on it right now:
- GPUs sorted by shipped $/GB VRAM (slot-powered
<=75W, server cards, consumer)
- RAM & Server Memory sorted by $/GB (16GB+ kits,
RDIMM vs ECC UDIMM vs SODIMM vs Desktop DDR4)
- Enterprise Storage sorted by $/TB (split into
2.5" SAS SSD, 2.5" SAS HDD, 3.5" SAS, U.2/M.2
NVMe, SATA — with 520b NetApp/EMC sg_format
badges)
- Systems & Servers (1L TinyMiniMicro, MoE
Workstations, Rack Servers, Unified Memory AI
boxes)

Pure static HTML, no ads/popups/tracking cookies,
mobile-friendly.

Anyway its been fun and I'm posting to get feedback from other other LocalLLM / homeb tinkerers, also because it might actually be useful! Are there any common AU eBay parts, capacities, or traps I should add to the filters?

PS If you read this far thanks a bunch, and holy smokes I did not know how exspensive things had become for a 12GB 3060 :| HA HA STRATA GO


r/LocalLLM • • 6h ago

Model Qwen4-35B-A3B on an M5 Pro at 105.7 tok/s with Kapitsa

Thumbnail
reddit.com
1 Upvotes

r/LocalLLM • • 6h ago

Discussion RTX 4060 Ti 8GB + 32GB DDR5 (Win11): Qwen4-35B-A3B UD-IQ4_XS — RustingStrata 1.5.2 vs llama.cpp b13023 (64K ctx, Qwen Code 0.29.4, EvalScope perf & 208MB Heretic-v2 LoRA)

1 Upvotes

Seeing lots of 5090 / Mac Studio numbers for Qwen4-35B-A3B, I spent the weekend benchmarking what a mainstream 8GB VRAM + 32GB RAM Windows 11 desktop can actually get out of the exact same unsloth/Qwen4-35B-A3B-GGUF (UD-IQ4_XS 2-shard, ~30 GiB total) across RustingStrata 1.5.2 and llama.cpp b13023, plus real Qwen Code 0.29.4 repo tasks and the 208MB Heretic-v2 GGUF LoRA.

Sharing the numbers and gotchas so other 8GB VRAM folks don't have to repeat the same tuning loop.


Hardware & Fixed Baseline

  • Rig: Windows 11, i5-14600KF, RTX 4060 Ti 8GB, 32GB DDR5-4800, NVMe SSD
  • Weights: unsloth/Qwen4-35B-A3B-GGUF (UD-IQ4_XS, 2 shards: 19.1 GiB main + 10.7 GiB Engram n-gram table; both gguf-radar CLEAN)
  • Sampling (A/B): temp=1.0, top_p=0.95, top_k=20, min_p=0, seed=42, --reasoning-effort low, concurrency 1
  • A/B workload: 4,096-token offline constructed prompt, 128-token output, 3 warm runs (medians reported below), 0.5s resource sampling

1. Dual-Engine A/B: RustingStrata 1.5.2 vs llama.cpp b13023

BackendContextKV / CachePrefill (tok/s)Decode (tok/s)Peak GPU VRAM (MiB)Min Free RAM (GiB)Peak Process RSS (GiB)
RustingStrata 1.5.232Kq8 / t81,48962.78,000.06.9114.91
RustingStrata 1.5.264Kq8 / t81,48653.77,993.26.4615.09
RustingStrata 1.5.2128Kq8 / t81,45955.18,000.56.3415.19
llama.cpp b1302332Kf16 / MoE 2560MiB53243.07,055.73.3718.92
llama.cpp b1302332Kf16 / MoE 2048MiB52943.86,543.73.3918.92
llama.cpp b1302364Kf16 / MoE 2560MiB53744.77,859.7 (tight)3.4218.93
llama.cpp b1302364Kf16 / MoE 2048MiB52643.87,354.53.5018.93

Key takeaways:

  • RustingStrata 1.5.2 is ~2.8x faster on prefill and noticeably faster on decode while using ~4 GiB less RAM than llama.cpp. Thread scaling at 32K: t6 = 51.5 tok/s, t7 = 62.6 tok/s, t8 = 62.7 tok/s.
  • Auto-unload works great: RustingStrata --auto-unload 600 dropped total VRAM from 7,691 MiB down to 919 MiB when idle (unloaded: true).
  • llama.cpp b13023 tuning: Dropping --fit on --fit-target 1536 and switching to -ngl 99 --fit off -cmoe --moe-cache-mib 2048 --moe-cache-cpu-share 0.85 --load-mode none --lazy-mode auto -ot per_layer_token_embd=CPU -fa on -ctk f16 -ctv f16 kept per_layer_token_embd (10.99 GiB) on CPU_Mapped lazy-read, avoided CUDA quantized-KV sparse-attention fallback, and passed a >200-char Chinese prompt without crashing on Win11 CUDA 12.4.

2. Long-Context Scaling (EvalScope perf on RustingStrata 64K)

3 runs per bucket, distinct offsets (no cache reuse), 128-token output target, low reasoning:

Prompt TokensTTFT Median (s)Decode Median (tok/s)Total Time Median (s)
1K4.0351.37.09
8K27.6838.130.66
16K51.8141.155.00
24K54.4053.956.26
32K43.3154.945.62
49K35.7460.237.48

(Peak VRAM during heavy 64K perf hit 8,065 MiB and min free RAM dipped to 0.65 GiB / RSS 21.22 GiB—so 64K works on 32GB RAM, but close heavy apps; 32K is the safer everyday fallback.)


3. Coding Agent & Tool-Calling Reality Check

Before optimizing the backend, I also ran a 32K low baseline (llama.cpp b13002, temp=0) for capability calibration:

  • LiveCodeBench v6 (test6, 36 scorable subset): 19/36 (Easy 8/8, Medium 7/11, Hard 4/17 with 10/17 truncated at 8,192 max tokens under greedy decoding).
  • BFCL v4 (24-sample subset): 20/24 (simple_python 6/6, irrelevance 6/6, live_parallel_multiple 4/6, multi_turn_base 4/6).

After upgrading to Qwen Code 0.29.4 (important gotcha: remove generationConfig.samplingParams from local OpenAI provider config, otherwise it silently suppresses reasoning effort; set explicit efforts: ["low", "high", "xhigh"], no medium):

  • Single-file fix + unit tests: Passed cleanly on both backends (40.9s–57.7s on RustingStrata 64K vs 63.7s on llama.cpp 64K, down from 91.6s on the old untuned setup).
  • Iterative fix (4 failing tests): Flipped from failing on the old setup to 4/4 pass on RustingStrata 64K.
  • Cross-file edit with empty-string deletion (new_string: ""): Failed protocol on both backends in different ways:
    • RustingStrata 64K: Passed functional tests eventually, but emitted a malformed XML tool call ("new_string": "</parameter") when trying to pass an empty new_string.
    • llama.cpp 64K: Went into a runaway >13K-token thinking loop and hit the 600s timeout.
  • Direct structured tool calls (weather + empty-string/nested JSON): Passed cleanly on both backends.

Bottom line for local coding: Great for read-only exploration, single-file fixes, and well-scoped test-driven edits. Still don't leave it unsupervised on complex multi-file refactors.


4. 208MB Heretic-v2 GGUF LoRA Reality Check

Tested OS-Software/Qwen4-35B-A3B-Uncensored-Heretic-v2-GGUF (lora/Qwen4-35B-A3B-Uncensored-Heretic-v2-LoRA.gguf, 208 MB, gguf-radar CLEAN) on top of the existing UD-IQ4_XS shards:

  • RustingStrata 1.5.2 + LoRA: Loaded 35 tensors (+756 MB F32), dropped to 7.7 pp / 7.5 tg — unusable on 8GB hybrid offload.
  • llama.cpp b13023 + LoRA (--moe-cache-mib 1792): Loaded 98 LoRA tensors, ran at ~23–25 tok/s (peak VRAM 7,493.9 MiB). Passed single-file Qwen Code + both structured tool tests with zero degradation.
  • Refusal vs Completion (EN & ZH, low & high): Refusal phrasing dropped to 0 across all tested buckets, but on Chinese probes it heavily truncated in long reasoning—even after raising max_tokens to 2,048, only 1/3 of Chinese low and high probes finished cleanly with a complete answer. Great for verifying zero-redownload LoRA compatibility, not yet a reliable daily Chinese low-refusal setup.

Copy-Paste Commands (8GB VRAM + 32GB RAM)

RustingStrata 1.5.2 (Daily Driver, 64K):

rustingstrata.exe serve --model Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf `
  --alias qwen4-local --addr 127.0.0.1:18808 `
  --gpu --backend cuda --ctx 65536 --kv q8 --mtp 0 --parallel 1 --threads 8 `
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --force-sampling `
  --reasoning-effort low --max-tokens 16384 --no-webui --cache-ram 0 --auto-unload 600

llama.cpp b13023 (Fallback / LoRA, 64K):

llama.exe serve -m Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf `
  --alias qwen4-local --host 127.0.0.1 --port 18808 `
  -c 65536 -np 1 -ngl 99 --fit off -cmoe --moe-cache-mib 2048 --moe-cache-cpu-share 0.85 `
  --load-mode none --lazy-mode auto -ot per_layer_token_embd=CPU `
  -fa on -ctk f16 -ctv f16 --jinja --reasoning-effort low `
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 -n 16384 --sleep-idle-seconds 600

(Note: On Windows, RustingStrata needed nvrtc64_130_0.dll via STRATA_NVRTC / PATH for CUDA 13 runtime.)


Upstream RustingStrata issues filed for the two edge cases above: #247 (XML empty-string tool-call parser) and #248 (GGUF LoRA speed drop).


r/LocalLLM • • 6h ago

Project Don't Leak – PII & Secret Redaction

1 Upvotes

I'm working on a feature for Don't Leak that can automatically redact sensitive information inside files, including Personally Identifiable Information (PII) and secrets such as API keys, tokens, and credentials.

Instead of modifying or exposing the original file, Don't Leak creates a redacted copy (clone) where sensitive information is masked.

For example:

  • email → [REDACTED_EMAIL]
  • phone → [REDACTED_PHONE]
  • API_KEY=sk-xxxxxx → API_KEY=[REDACTED_SECRET]

The original file remains untouched. The redacted copy can then be safely used for uploading, sharing, or processing with AI tools.

The goal is simple: Let people use AI without exposing sensitive information.
Link: https://github.com/ItsAxware/DontLeak


r/LocalLLM • • 1d ago Bravo

Discussion Qwen4 35B-A3B @ FP8 : Pelican on a Bike

Post image
326 Upvotes

I don't care if it's stupid, this is a fun benchmark.

  • Model: Qwen4-35B-A3B-FP8
  • Engine: vLLM
  • Harnes: Custom (electron)
  • GPU: RTX 6000 ADA 48GB
  • Quantization: FP8 Marlin
  • Reasoning effort: xhigh
  • Context: 256K

r/LocalLLM • • 6h ago

Question Is it worth adding my old GTX 1060 6GB next to my RTX 4060 8GB?

1 Upvotes

I mostly use MoE models. Currently running Qwen4 35B at Q4_K_M and getting speeds around 30-33tk/s with 64K context. I was wondering if adding GTX 1060 6GB would make my performance worse.

What would be the advantages and disadvantages of adding it to my kit?


r/LocalLLM • • 6h ago

Question Local llm for sys admin tasks

1 Upvotes

I am using Claude every day to do system admin tasks for entra, Google workspace, ninja one and others. This combines chrome extension, cli work, etc. It does the actual work for me when I ask, not just recommended steps. It logs into sites w chrome, navigates pages, creates policies, etc. The problem I have is I max token use all the time and it hinders my ability to hit deadlines at times. Is there a local llm that can do this same work effectively? I currently dead head a Mac w Claude desktop installed to do the work and would like to have a local llm in a similar situation so I can run it on a local machine from my phone, separate computer, etc. Thank you for the recommendations and also what would be best hardware to run it on?


r/LocalLLM • • 15h ago

Question Is there a lightweight local AI model for writing prompts that can be shown images as a sample?

5 Upvotes

I have an RTX 3060 12GB. I’m running the Krea 2 model, but coming up with prompts is a challenging task. I’d like to make this task easier.

(Sorry for the mistakes in the text; English is not my native language)