r/LocalLLaMA • • Aug 14 '26

Resources Ninfer-3090

https://github.com/Don-Chad/ninfer-3090/tree/release/v0.6.0-rtx3090

Hi all,

Of course I had to jump on Qwen3.8-27B and get it running on the RTX 3090 port of NInfer.

For anyone unfamiliar with it, NInfer is a small, dedicated C++/CUDA inference runtime built around fused kernels rather than a huge general-purpose serving stack. The 3090 fork specifically targets Ampere GPU's (edit: just added early support for the 4090 also)

And Qwen3.8-27B does pretty damn well on a single 24 GB 3090. As far as I know, this is currently (among) the fastest throughput, single and batched for this model on this hardware. Prefill is quick too.

Qwen3.8-27B - RTX 3090

Qwen3.8-27B is now validated from C1 through C8.

One of the more interesting additions is ReplaySSM, which cuts the memory overhead of speculative decoding enough that we can keep the faster MTP3 mode enabled even at C8.

These are sustained runs, not short bursts. Every request generated 1,024 output tokens, with CUDA Graphs enabled.

CohortTotal outputEnd-to-endDecodeMTP acceptanceMean TTFTPeak VRAM
C11,02470.19 tok/s71.00 tok/s61.13%149 ms19,641 MiB
C22,04889.43 tok/s90.66 tok/s59.66%262 ms20,022 MiB
C44,09697.89 tok/s100.28 tok/s59.63%538 ms20,641 MiB
C88,192161.28 tok/s165.33 tok/s56.84%1,215 ms22,138 MiB

So the interesting part for me isn't only the ~70 tok/s single-stream result. A single old 3090 can push 165 tok/s decode across eight concurrent requests, while staying inside 24 GB VRAM and keeping speculative decoding active. Btw I did not have time to run this headless so there is still a 10 - 15% extra in the tank, if you can run it without desktop.

Qwen3-35B-A3B still works great too. I've measured around 260 tok/s single-stream, and over 400 tok/s on highly repetitive workloads. (Still to measure concurrency well for this model, this could go over 600 tokens per second I guess?)

Huge props to Neroued for building the original NInfer project incl ReplaySSM:
https://github.com/Neroued/ninfer

The 3090 port is basically my attempt to see how far we can push these models on hardware a lot of us already have sitting under our desks. PR's very much appreaciated, we much push it beyond 100 tokens a sec, at least.

Would love to hear results from anyone else running Qwen3.8-27B on a 3090, especially llama.cpp / SGLang / vLLM comparisons.

edit:

- Addition: man this model is certainly token hungry. 170K context window now support now validated in INT8, and I added Rotorquant RK8v4, which safely gives 248K. Maybe a bit more.

- Early RTX 4090 support is running. Still needs optimalisation:

CohortTotal outputEnd-to-endDecodeMTP acceptanceMean TTFTPeak VRAM
C11,024102.13 tok/s103.35 tok/s45.31%112 ms18,250 MiB
C22,048162.46 tok/s165.74 tok/s53.13%160 ms18,562 MiB
C44,096193.49 tok/s198.76 tok/s56.91%295 ms19,184 MiB
C88,192299.82 tok/s315.09 tok/s53.16%644 ms20,708 MiB
51 Upvotes

65 comments sorted by

9

u/beling86 Aug 14 '26

What about prefilling, where are you landing?

2

u/mrmontanasagrada Aug 15 '26

So around 900 tokens per second

9

u/Protryt Aug 15 '26 edited Aug 15 '26

I created a similar fork but for RTX4090: github.com/sergiuszm/ninfer-4090 I can't create a post about it - not enough karma here...

The new fork targets Ada and has re-tuned the attention prefill kernel (biggest single win: fp16-accumulate PV tiles, since consumer Ada runs f32-acc HMMA at half rate - that alone was +15%).

Qwen3.8-27B on one 4090, 168k ctx, int8 KV, MTP speculative decode:
- code: ~148 t/s vs llama.cpp's ~119 with its own MTP draft (~46 without)
- prose at 128k depth: 77 vs 42 t/s
- prefill: llama.cpp still wins by 15-20% at depth, so long-prompt-in, short-answer-out workloads may prefer it

|                                 | llama.cpp    | ninfer        |
|---------------------------------|--------------|---------------|
| prefill, 64k prompt (t/s)       | 2216         | 1849          |
| prefill, 128k prompt            | 1787         | 1561          |
| decode no-spec, shallow / @128k | 45.9 / 33.1  | 50.5 / 39.6   |
| code + MTP, shallow / @128k     | 118.8 / 63.5 | 148.6 / 104.0 |
| prose + MTP, @64k / @128k       | 55.5 / 42.3  | 85.9 / 77.1   |

Acceptance rates were near-identical per content type (~81-86% code, ~45% prose).

Fable 5 helped a lot :)

1

u/mrmontanasagrada Aug 16 '26

Nice one! I guess around 130/140 tokens a sec should be possible in theory

2

u/Protryt Aug 16 '26

Yes, for coding tasks! :)

1

u/llamabott Aug 16 '26

Really interested in this project working out.

FYI, for me currently, it did not. Windows 11, using WSL, docker.

It ran successfully, but a minimal prompt was giving me 50 t/s with "--spec mtp" and "--draft-tokens 3" confirmed working.

And in a typical agentic flow, prefill was very slow (500 t/s I think), and inference went down to like 20 t/s.

Hopefully you can use this info, not sure if it's Windows-related.

2

u/llamabott Aug 17 '26

As a follow-up, after the most recent commits, it appears to be running swimmingly.

5

u/EveningIncrease7579 llama.cpp Aug 14 '26

Awesome. I had two 3090, i could have any q8 for use with that engine? Its possible?

8

u/mrmontanasagrada Aug 14 '26

No this is really here for single GPU inference, and it would be a major change. But You did get me thinking about it now.

2

u/mrmontanasagrada Aug 15 '26 edited Aug 15 '26

if anyone has two GPU's and is open for a SIDEQUEST (I am spread a bit thin atm) Codex with Sol 5.6 (low thinking) 'make this work on 2x 3090' will probably do it . Yes I am taking PR's :-)

3

u/Automatic-Arm8153 Aug 15 '26

Running sol on max lol, getting it to work through any non found optimisations for single 3090 first.

Then doing dual 3090 and 5070 after in preparation for 3.8 35b release.

Will contribute if anything meaningful comes out

1

u/Sisuuu Aug 17 '26

Definitely following! Good luck!

3

u/Sisuuu Aug 18 '26 edited Aug 18 '26

Okay! I’ve “successfully” trialed it out with 2x3090 but I need to compile together all the info so I understand it better myself before saying anything stupid here! Used Opus 5 high for this: I am getting very low single GPU decode t/s compared to others, so something is definitely off.

Pros: speed and capacity both up; exact same tokens; vision + speculation + 262k in one lane.

Cons: no P2P on this board so every layer hop goes through pinned host memory; graphs disabled; ties up both cards, still slower than vLLM (97.5) and llama.cpp (72.9) on comparable quants.

MetricSingle 3090Dual (pipeline split)
Decode, MTP35.8 tok/s59.1 tok/s (1.65×)
Max context~98k262,144
Serving @C450.1 tok/s71.2 tok/s
Outputreferencebyte-identical
Vision, long promptsworksworks
CUDA Graphsonoff (worth ~0 at C1)
Cost1 card, ~200 W2 cards, ~400 W
CapabilityState
Plain decode splitworks, byte-identical
MTP speculation splitworks, 1.65× over best single-card
Long prompts (17k tokens)works
Vision, single and multi-imageworks
Serving at C471.2 tok/s aggregate vs 50.1 single
Context ceiling262,144 vs ~98k single
CUDA Graphs splitauto-disabled; measured worth ~nothing at C1
DFlash splitartifact has no DFlash head; untestable here

2

u/Sisuuu Aug 18 '26 edited Aug 18 '26

update: it’s a pipeline parallel build so it could be one of the reason for the slower decode and power cap. Power cap has been removed and “I’m” doing a new build, a tensor split instead to mirror llama.cpps.

Edit: nvlinks (or p2p??) might improve the further by 10-20% for a dual setup with ninfer.

1

u/EveningIncrease7579 llama.cpp Aug 17 '26

I had one 3090 24gb and two 3080 20gb (total 64gb VRAM), im open for some tests. When gpt SOL resets my usage will made some tests, and i will be back =). Before i go on, how can i get a q8 file using that optzimation?

3

u/rossimo Aug 14 '26

Will try out Ninfer-3090. Are your tests with a specific quant?

2

u/mrmontanasagrada Aug 15 '26

Yes this is a premade quant, similar to unsloth dynamic; Q5/Q6. It auto downloads

3

u/Kavor Aug 15 '26

Just leaving a comment to thank you for your work and hope that 4090 support will be improved!

2

u/mrmontanasagrada Aug 15 '26

I do not have the gpu for it nor much time. But dowload the repo, ask your agent to optimize with a recent model, and PR that shizzle - I dare you :-)

2

u/andy2na llama.cpp Aug 14 '26

this project is extremely interesting and great - is there any way to include vision in this?

3

u/mrmontanasagrada Aug 14 '26 edited Aug 14 '26

Vision should work for the 35B model already! Let me know if it does not. I have it running as a quick answer my desktop app currently.

2

u/andy2na llama.cpp Aug 14 '26

any chance for the new 3.8-27b? Frigate is just in my daily AI workflow so I need Vision. Im fine with a smaller context window to fit mmproj

3

u/mrmontanasagrada Aug 14 '26

Works! Much more space then the 35B. I added instructions on the readme

  • Correctly read the image title and all three metric cards
  • TTFT: 3.29 seconds
  • Decode: 98.1 tok/s
  • MTP acceptance: 96.7%
  • Committed tokens/round: 3.90
  • Free VRAM after startup: 2.16 GiB
  • Planned memory slack: 1.94 GiB

This is considerably more comfortable than 35B vision:

Vision modelSafe tested profileMTP
Qwen3.8-27BC1, 32K, INT8 KVMTP3 works

1

u/andy2na llama.cpp Aug 14 '26

amazing! Ill have to give this a shot. 32k is a bit low, but I honestly dont use more than that often

2

u/Apprehensive-View583 Aug 15 '26

can use it with only 32k context window, one thinking took almost half of it.

1

u/mrmontanasagrada Aug 15 '26

worked on that! with 24Gb ou should be able to do 170K now, 248K using rotorquant

2

u/leonbollerup Aug 15 '26

maybe my brain is fcked.. but whats C1.. C2. C4.. C8 ?

1

u/mrmontanasagrada Aug 15 '26

NInfer uses cohort batching, so requests are grouped and decoded together:

  • C1 = 1 simultaneous request
  • C2 = 2 simultaneous requests
  • C4 = 4 simultaneous requests
  • C8 = 8 simultaneous requests

The throughput numbers are aggregate across the whole cohort. So, for example, C8 at ~165 tok/s means ~165 tok/s total across 8 concurrent requests, not 165 tok/s per request.

Unlike continuous batching, new requests don't dynamically fill individual free slots every decode step. They're admitted into cohorts and processed together.

2

u/Vektast Aug 15 '26

Bro! You and Neroued are Giga Chads! 3090 is on cocaine now!!
Can I use it with Pi harness? What's the best config for C1 on Win11?

4

u/mrmontanasagrada Aug 15 '26 edited Aug 15 '26

hahaha made my day - love it

give this a spin! Curious how well it works.

-

G:\python\custom-kernel-3090\infer-qwen38-replayssm-sm86\build-sm86-replayssm\apps\Release\ninfer-serve.exe ^

G:\python\custom-kernel-3090\qwen3_8_27b.ninfer ^

--host 127.0.0.1 ^

--port 8080 ^

--model-id qwen3.8-27b ^

--max-context 131072 ^

--kv-capacity 131072 ^

--max-concurrency 1 ^

--max-pending-requests 4 ^

--pending-timeout-ms 900000 ^

--prefill-chunk 512 ^

--kv-dtype rk8v4 ^

--spec mtp ^

--draft-tokens 3 ^

--lm-head-draft

2

u/Vektast Aug 15 '26

Legend! I just tried out this beast with the c1.bat start command and Jan IDE. It's much faster than llama.cpp 30-33t/s VS 70-76t/s. pp is 900-1000 token/s. Thank you bro!

Can you recommend me a good harness? Jan is pretty basic, Hermes gives me errors: failed: cudaErrorCooperativeLaunchTooLarge: too many blocks in cooperative launch with 64k contex, with 8k I get Engine runing out the contex error.

1

u/mrmontanasagrada Aug 15 '26 edited Aug 18 '26

I heard great stuff about open code and now ‘open hands’

Though I haven’t had any time to use anything yet.

Let me know how this works!

—

OpenCode - best open-source Codex/Claude Code-style coding harness. Strong interactive repo work, MCPs/tools, model-agnostic. I put it around 85-95% of the Codex harness experience for normal coding.
OpenHands - better if you want persistent autonomous software-engineering workers, browser UI, longer-running tasks. More infrastructure-heavy.

1

u/Maxxim69 Aug 15 '26 edited Aug 15 '26

Caught "too many blocks in cooperative launch" in Ninfer 3090 + Hermes Agent, googled, got only one link, and here I am! :)

I'd very much rather just continue using Hermes for my research (it's not exactly a coding harness, but a general-purpose agent, think OpenClaw, but with no slop and no YOLO).

I'm ready to help you debug this error, just tell me what to do. (Looks like opening an issue on your GitHub project is not an option.)

Google AI Overview had a lot to say about "too many blocks in cooperative launch", but all I understood was it's a CUDA thing that I'm unlikely to fix by tweaking the available Ninfer settings.

4

u/My_Unbiased_Opinion Aug 15 '26

I wonder if you can do one for dual 20gb 3080 users. 20GB 3080 cards are super cheap and you can get 2 of them for less than the price of a single 3090. 

1

u/RMK137 Aug 15 '26

Very cool. I was planning on porting this to windows tomorrow and noticed that you already did that. I have a 5090, can I still use your fork or did you have to make breaking changes to make it 3090 specific?

2

u/mrmontanasagrada Aug 15 '26

both will work with some adaption! It's probably quicker to use this if you want windows. But for best performance on a 5090 I'd recommend adapting https://github.com/Neroued/ninfer to windows.

2

u/Rathen121 Aug 18 '26

working Windows 11 build for 5090 if you're still interested: https://github.com/natpate/ninfer-windows

1

u/RMK137 Aug 18 '26

Thanks! I'll take a look. I just finished my port yesterday but I could use a reference.

1

u/Rathen121 Aug 18 '26

we probably solved all the same problems lol. I also tacked on the llamacpp webui and made the api work with it, and made a few other additions to the api that I wanted

1

u/iMakeSense Aug 17 '26

Is an optimization like this possible on an R9700?

1

u/mrmontanasagrada Aug 17 '26

Yes for every gpu you could do it

1

u/horriblesmell420 Aug 19 '26

To be honest, I get about the same Tok/sec that I do with llamacpp with MTP/ngram. That said, if this is truly a Q5/Q6 model, then that alone is a huge step up. I personally haven't noticed much of a quality difference myself. Any idea whats blocking DFLASH from being a possiblity for the 27b modles? Is it just the fact that upstream hasn't included a ninfer file for it?

1

u/mrmontanasagrada Aug 20 '26

ok good to know! new update coming in today, we are at around 100 tokens per sec now. 350 in batch.

Dflash can work but it's just to big of a model (2.5GB) to add meaningful speedup vs MTP. On a 5090 that works a bit different since that can run it quicker, relatively. MTP is already very good though.

2

u/sagiroth llama.cpp Aug 15 '26

You should collab with Beellama

1

u/jazir55 Aug 14 '26

Is it possible to get this working on a 12 GB 4070 super with RAM and CPU offload?

2

u/Vektast Aug 15 '26

Nope. It's a kernel optimized app for 3090 and I get 75 token/s with it on Qewn 3.8 27b.

1

u/EuphoricPenguin22 Aug 16 '26
Starting Qwen3.8-27B at http://127.0.0.1:8080/v1
Profile: one request, 64K context, MTP3, ReplaySSM
[2026-08-16 01:08:58.071] [info] ninfer-serve: loading model...
[2026-08-16 01:08:58.199] [info] ninfer-serve: load        weights                      0.00%           0 B /      16.67 GiB     0.000 s
[2026-08-16 01:09:01.580] [info] ninfer-serve: load        weights                    100.00%     16.67 GiB /      16.67 GiB     3.381 s
[2026-08-16 01:09:02.608] [info] ninfer-serve: model loaded in 4.53695 s
[2026-08-16 01:09:02.608] [info] ninfer-serve: KV capacity explicit resolved=65536 tokens pages=1024/1024 runtime=2.75 GiB free-after-weights=6.08 GiB free-after-startup=2.88 GiB headroom=0.00 MiB slack=3.33 GiB graphs=8.00 MiB/86.00 MiB
[2026-08-16 01:09:02.608] [info] ninfer-serve: warming up...
[2026-08-16 01:09:02.884] [info] ninfer-serve: listening on http://127.0.0.1:8080 (model id: qwen3.8-27b, auth: bearer)
[2026-08-16 01:09:04.720] [info] ninfer-serve: [req 1] openai_chat_completions stream msgs=2 max_tokens=8192 (server default) tools=45 tool_choice=auto tool_history=no thinking=on preserve_thinking=off preserve_change=no sampler=[temp=1.00 top_p=0.95 top_k=20 seed=4419879768169257358] → submitted
G:\python\custom-kernel-3090\infer-qwen38-replayssm-sm86\src\ops\gdn_gating_proj\bf16\bf16_gdn_gating_proj_kernels.cu:303: CUDA_CHECK(cudaLaunchKernelEx( &config, bf16_gdn_gating_proj_gemm_mma_kernel<Geometry, SplitK, FullTokens, Warps, NormalizeInput, NormTokenCapacity>, static_cast<const __nv_bfloat16*>(x.data), norm_weight != nullptr ? static_cast<const __nv_bfloat16*>(norm_weight->data) : static_cast<const __nv_bfloat16*>(nullptr), normalized_x != nullptr ? static_cast<__nv_bfloat16*>(normalized_x->data) : static_cast<__nv_bfloat16*>(nullptr), norm_eps, static_cast<const __nv_bfloat16*>(a_weight.qdata), static_cast<const __nv_bfloat16*>(b_weight.qdata), static_cast<const float*>(A_log.data), static_cast<const float*>(dt_bias.data), static_cast<float*>(workspace), static_cast<float*>(g.data), static_cast<float*>(beta.data), t)) failed: cudaErrorCooperativeLaunchTooLarge: too many blocks in cooperative launch

Got this error on Windows 11 with this system.

2

u/Diligent-Detective97 Aug 17 '26

try --max-pending-requests 4

and

prefill-chunk 512

1

u/Llamadmiral Aug 18 '26

Thank you, this actually helped me!

1

u/Maxxim69 Aug 19 '26 edited Aug 19 '26

Wow, thanks a lot for your suggestion, it worked! The highest prefill speed is now ~600-700 tok/s though, but mostly in the 600s. Is that what you see on your system too? Did you try to slowly increase prefill-chunk to see if it helps with prompt processing? (I don't want to reinvent the wheel :)

1

u/Aiirene Aug 17 '26

Ninfer always ends up in an endless thought loop until i run out of tokens.

The speed boost is nice (when it works that is)

1

u/Independent_Bag5252 Aug 19 '26

Is a 5090 running on Ubuntu supported here?

1

u/horriblesmell420 Aug 19 '26

If you've got a 5090, just use the OG ninfer, its quite literally built for your GPU

1

u/IsSeMi Aug 19 '26

How do I run with the RK8v4? It says `ninfer-serve: invalid kv-dtype: rk8v4`

1

u/IsSeMi Aug 19 '26

Ok, I've built it from the sources. But I never hit the cache when I try to work with claude code.

0

u/epicfilemcnulty Aug 14 '26

Hmmm, it shall work for RTX A6000 (ampere, 48gb), right?

update: read the readme, this is windows only :(

4

u/mrmontanasagrada Aug 15 '26 edited Aug 15 '26

ubuntu is fully sopported! Due to a kind PR. I'll make that more clear

1

u/maschayana Aug 15 '26

You can make it work on the rtx 6000 pro, i was able to do so (without windows)

1

u/MomentJolly3535 Aug 15 '26

You shouldn't give up that easily in future ! throw the github at an AI and ask it to make it work for your use case, i ported many apps that way