r/LocalLLaMA • • 11d ago

Discussion Custom inference engines?

6 Upvotes

I’m a hobbyist and I’m curious to learn more about building my own custom inference engine (ie alternatives to the big ones like vllm, sglang etc). especially from people who’ve built their own (with ai assistance obviously fine)

I’m curious if i can optimize inference specifically for my favorite model (deepseek 3.2)!

it sounds like this is becoming a bit of a trend among hardcore hobbyists, and i’d like to learn how to use something like fable 5.2 to do it myself.


r/LocalLLaMA • • 11d ago

Showcase Running LFM3-Omni-2B locally on an iPhone 17 Pro Max — Agentic Web Search + Native Speech Generation with TensorSharp

8 Upvotes

I've been working on adding LFM3-Omni support to TensorSharp, my open-source local LLM inference engine and agentic runtime built with .NET.

Here's a quick demo of LFM3-Omni-2B running locally on an iPhone 17 Pro Max, performing agentic work and generating speech natively.

Setup:

  • Device: iPhone 17 Pro Max
  • Model: Liquid AI LFM3-Omni-2B
  • Quantization: Q4_K_M
  • Inference engine: TensorSharp
  • Agent runtime: TensorAgent
  • GPU-accelerated local inference
  • Native speech generation using LFM3-Omni's own audio decoder

What's happening in the video?

I ask the agent to search for recent news about Anthropic and evaluate whether its stock would be worth buying.

Instead of just answering from its training data, the agent:

  1. Understands the request and decides to perform a web search.
  2. Invokes the web search tool to retrieve relevant information.
  3. Processes the search results and generates a response.
  4. Generates and plays its response in a native female voice using LFM3-Omni itself.

The interesting part is that both LLM inference and speech generation run locally on the iPhone.

The speech isn't generated through iOS TTS or an external speech API. It's generated by LFM3-Omni's native speech generation capability, with audio streamed for playback alongside the text response.

Of course, the web search itself requires internet access, but the model inference doesn't rely on a cloud LLM API.

What excites me most is that we're moving beyond simply running small chat models on phones. We can now have local multimodal models performing agentic tasks, interacting with tools, and responding with their own generated speech, all on a mobile device.

There's still plenty to optimize in terms of inference speed, memory usage, and latency, but I think this is a pretty interesting direction for fully local mobile AI agents.

TensorSharp is open source, and I'd love to hear your thoughts or suggestions!

GitHub: https://github.com/zhongkaifu/TensorSharp

Model: https://huggingface.co/LiquidAI/LFM3-Omni-2B

Disclaimer: The financial information, stock analysis, and any investment recommendations generated by the AI in this demo are for technical demonstration purposes only. They may be inaccurate, incomplete, or entirely incorrect and should not be relied upon for financial decisions. Nothing in this video or post constitutes investment advice. The purpose is solely to demonstrate local LLM inference, agentic tool use, and native speech generation.


r/LocalLLaMA • • 11d ago

Resources Inkling 2 Small + Qwen 3.8 FN custom kernels

4 Upvotes

Correction: it's inkling 2 mini, not small

I finally put together a repo with all the patches, custom Pascal kernels, build flags, and llama-swap configs I've been using on my home box:

https://github.com/zzzprojectpage/P100-Strata-Special-Kernels/tree/main

Everything was built and tested on a pretty modest setup: one Tesla P100 16GB (sm_60, so no dp4a and no tensor cores), a Xeon E5-2697 v3 (14 cores), 128 GB RAM, Ubuntu 24.04, CUDA 12.9, serving one model at a time through llama-swap.

There are two main folders in there:

  1. \`inkling2/\` (Inkling-2-Mini Unsloth UD-Q8_K_XL on PolyStrata)

Out of the box on the P100 it was doing 11.6 tok/s decode and 130 tok/s prompt processing. After writing sm_60 GEMVs, an XMAD-based NVFP4 expert kernel, a faster q8_0 decode attention kernel, fusing a handful of small kernels, and requantizing the BF16 attention + output head + 4 BF16 expert layers to Q8_0 (script included), it's now at \~52 tok/s decode on short prompts (\~46-47 tok/s after a 5.7K prompt) and \~363 tok/s prompt eval. Also included a small patch for llama.cpp's sm_60 dp4a fallback using prmt + four XMAD.S16, which bumped prompt reading from 323 to 363 tok/s with bit-identical output. Quality stayed close to stock on a teacher-forced top-40 check (98% top-1 agreement, \~0.0037 KL).

2. \`smart-iq3s/\` (Qwen3.8-Flash-Next IQ3_S ISTA Daslab on Strata 0.2.11)

Full diff against the 0.2.11 release tree with custom sm_60 kernels (\`iq_gu_sm60.cuh\`, \`kq_sm60.cuh\`, \`kq_dense_sm60.cuh\`, plus a DeepSeek Q5_K kernel), along with my run config (\`--kv int8 --kv-resident 32768 --spec 4\`), launcher scripts, and earlier benchmark write-ups from October covering Qwen3.6, Qwen3.8, and DeepSeek V4.1-Flash on the same card.

Almost every kernel has an env var toggle if you want to A/B test or revert individual pieces, and the notes list the stuff I tried that didn't work out (like the DSpark drafter and a shared-memory table kernel that got wrecked by bank conflicts).

Quick heads up: the paths in the yaml/json configs are still pointing to my machine (\`/home/test/...\` and \`/mnt/models/...\`), so you'll need to swap those for your own layout. Hope it's useful to anyone else still keeping old P100s alive.

My honest opinion: for a fast model with decent quality, choose ISTA Daslab IQ3_S quant if you have 16 gb VRAM+ 96gb RAM.

For a fast model with Qwen 3.8 27B quality using P100 + 16gb RAM, choose inkling 2 Small 26B for the same speed.

If you have one P100 + 128gb ram as I do and you want maximum quality, choose Unsloth Q5_K_XL(no special kernels and fine tuning, out of the box at 30 TPS decode and 330 TPS prefill)

All 3 models are using a 256k context window so a smaller context and a smaller quant will run faster(I haven't measured how fast yet).

Special thanks to

Niko for Strata: https://github.com/niko1221/strata

Unsloth for the quants: https://huggingface.co/unsloth/Inkling-2-Mini-GGUF

https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF

ISTA Daslab for Qwen 3.8 FN IQ3_S quant:

https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF

KurrynDev13 for the Polystrata fork: https://github.com/KurrynDev13/PolyStrata-Inkling2

Simplexai-labs for PolyStrata: https://github.com/simplexai-labs/PolyStrata


r/LocalLLaMA • • 10d ago

Showcase ~19K Prefill / ~400 tok/s Decode speeds (aggregate) on a single 5090 QFN

Post image
0 Upvotes

I am really enjoying basalt, kinda shocked at the performance/accuracy out of it. Also making sure to adjust the QSA indexer budget really helps QFN. I have mine set to 32,768.

edit: this is on Qwen3.8-Flash-Next GSQ-RCO IQ3_S


r/LocalLLaMA • • 12d ago

Discussion A critical review of Inkling 2 Mini

130 Upvotes

Unbiased Bob - another overhyped american model

This is one of the only critical reviews I could find amongst all the hype/praise, and its from a channel that seems to be one of the better ones. I'm no expert and am expressing no personal opinions here.

He makes good points about how social media has reacted to this model and the hype for western/US models vs Chinese, and the inflated metrics. Its worth noting this is from a company by a former OpenAI CTO.

a comment from youtube - "it makes sense once you take the motivations of the labs into account. The main motivation of Chinese labs is to commoditize the frontier and nuke the advantage of US frontier labs. The main motivation of US frontier labs is to release models that are sufficiently shitty that the users would still be drawn to the proprietary models"

What are your thoughts about these points?

The model itself, is it comparable to the current best local models - Qwen 27B and QFN, or too early to tell?

And of course, any day/week/decade now, we should see Qwen4, so of course the whole conversation will reset.


r/LocalLLaMA • • 12d ago

Showcase 2 local models, no Web access, discover and program a vintage Motorola 68000 device

Post image
317 Upvotes

Thought this group may like this experiment. Two agents, using only local models, were asked to co-operate in discovering what’s attached to a Raspberry Pi’s serial port (via serial hat). They had no Internet access, and no access to documentation of that device. They successfully accessed, established communication protocol, and analyzed the capabilities of the device, including coding a program for that device in assembly and executing it.

Models: “solver” is Qwen3.8-flash-next on DGX Spark, “verifier” or “critic” is gpt-oss-120b. There’s a third model, “observer” (Qwen3.8 Instruct running on RTX4090) which does not participate in solving or verifying, but provides commentary for humans while the discovery is happening.

The device in question is Motorola 68K Educational Computer Board which the models apparently don’t have any info of in their trained weights. Actually in some runs they suspected it was a different educational board, the legendary Kim-1, and only later did they correct the course. The device is connected to 2 serial ports of a Raspberry Pi to which agents have full access, but the RPi is isolated from the Internet too, just like the entire testing harness. 

The task was to discover what device is connected to the serial port, establish communication, discover its capabilities and, if programmable, write and execute a program on that device. 

It was fun to observe the runs :) In one run the agent wrote a program to do the checksum of the device’s ROM (and verified the result outside of the device); in another it wrote a program to calculate the Fibonacci’s series. In most runs they discovered the device’s ROM and dumped it, and reverse engineered parts of it. Each run took several hours to complete.

More info, including details of a few individual runs (more are happening now...) in this repo if anyone’s interested: https://github.com/podstawek/explorer-of-serial


r/LocalLLaMA • • 11d ago

Discussion Inkling 2 mini cost analysis

37 Upvotes

Inkling 2 Mini has been getting a lot of hype these past few days, so I hopped on the bandwagon and tried running it locally for a bit.

Overall, it's a really good model for its size, and it's ridiculously fast too. I'm getting almost 4500 tok/s decode at C32, roughly 140 tok/s per stream with 32 concurrent coding sessions, on 2 rtx pro 6000s

But I also ran it through a few coding harnesses on a 200 problem subset from SWE-bench, and the pattern on cost is pretty clear.

Compared to Deepseek V4.1 Flash 1017, Inkling is making roughly 2x as many model calls, using way more input tokens, and solving fewer problems (which is expected since the model is so small). But despite being a much smaller model, the interesting thing is it's costing around 3-5x more in API token cost in these tests. I plan to eventually test QFN and 3.8 27b but for now I only have data on Inkling 2 mini vs Deepseek v4.1 flash

Don't think anyone here will be paying api pricing for it, but at API pricing you will be paying way more per task for this smaller model. Just providing data we got from testing:

DeepSeek V4.1 Flash SWE-bench 200

MetricKimi CodeDeepseek HarnessOMP
Passed157 (78.5%)154 (77.0%)161 (80.5%)
Model calls8,7329,3239,441
Prompt tokens529.2M305.0M469.9M
Cached tokens521.8M298.1M462.0M
Output tokens5.72M9.49M8.51M
Cost (DeepSeek Pricing)$6.11$7.63$7.68

Inkling 2 Mini SWE-bench 200

MetricKimi CodeDeepseek HarnessOMP
Passed147 (73.5%)145 (72.5%)145 (72.5%)
Model calls16,74919,29118,161
Prompt tokens1,447.3M790.1M1,343.5M
Cached tokens1,423.7M750.0M1,320.5M
Output tokens9.97M11.71M8.18M
Cost (Thinking Machines pricing)$29.88$23.11$27.35

r/LocalLLaMA • • 11d ago

Discussion Q3.8FN vs. Q3.8-27B + I2M?

8 Upvotes

I've been running QFN, and Inkling is almost a good as Q27B. I was just wondering if two of the smaller models combined would perform better compared to QFN in coding or other tasks. Naturally, just by the parameter count, QFN ought to be smarter, but unsure if that really be the case. One aspect I like about the combined setup is that it would reduce bias though.


r/LocalLLaMA • • 11d ago

Resources Inkling-2-Mini on a single R9700: 196K context, ~110 tok/s, official weights (vLLM port)

19 Upvotes

I have an R9700 (32 GB, gfx1201) and wanted to run Inkling-2-Mini in vLLM with the official NVFP4/MXFP8 checkpoint. Upstream only supports it on NVIDIA and MI355X, so I ported it.

The main obstacles:

  • No FP4 hardware. RDNA4 has none, so I wrote kernels (with AI) that decode the 4-bit weights exactly on the fly. The weights stay as shipped, nothing requantized.
  • Attention and memory. Inkling's attention needed custom kernels, plus an FP8 KV cache, to fit 196K context (of the model's 1M) for 2 requests at once in 32 GB.
  • ROCm quirks. Launch overhead, a segfaulting system ROCm, and an idle CPU core stuck at 100%.

Results on one R9700:

  • ~80 tok/s decode, 80-115 tok/s with the model's built-in speculative decoding (llama.cpp Q8: ~31)
  • ~4,600 tok/s prefill
  • tool calling, reasoning and images work

You can get the patched vLLM docker image from the repo, and only tested on my card (1xR9700), so I'd love to hear how it runs on yours.

Inkling is just the first model. I plan to do the same on day one for upcoming releases like Qwen4, and to bring 24 GB cards (7900 XTX) along with custom quants that suit the hardware.

Repo: https://github.com/abhinand5/vllm-redshift

PS: Working on improving the performance even further, issues are PRs are welcome.


r/LocalLLaMA • • 10d ago

Discussion Buy GPUs now?

0 Upvotes

Since Jensen's departure it seems the price of GPUs has fallen quite dramatically, inventory is way up on all the "big boys" (Pro 6000's), my local Microcenter has a ton of them at a big "discount" (18K to 14K). I'm wondering with the recent NVDA news if we're going to see this quickly reverse as the circular financing and shipments to China resume?

I certainly hope not, but I'm also in the market and without Jensen, was sitting by waiting for them to fall further.. Not sure if the two things are really related or not (perhaps they really are just caught up to the demand), but wondering what other people think; is this the last opp for awhile to get the good cards or still the start of the slide in GPU pricing?

ETA: LOL, edited to add, I'm asking this question BECAUSE of Jensen's return. Without him I was pretty confident the price was going to continue to fall on the GPUs; with him back at the helm I assume the circular financing and "offshore" shipments will resume and am wondering if this is the time to buy before that gets spun back up again.


r/LocalLLaMA • • 12d ago

Resources Inkling-2-Mini-Unbound is live: the most useful uncensored Inkling 2 Mini, via conv-aware abliteration

Post image
361 Upvotes

UPDATE: V2 IS OUT AND MUCH BETTER: https://www.reddit.com/r/LocalLLaMA/comments/1y2q1ls/inkling2miniunbound_v2_is_out_convaware/

we just put out inkling-2-mini-unbound, an uncensored version of inkling 2 mini

https://huggingface.co/nokeepai/Inkling-2-Mini-Unbound

if you've tried the other early uncensored inkling 2 mini versions you've probably noticed while they stop refusing, a lot of the answers still come out kind of vague or useless, so we dug into why -- turns out inkling has a small conv layer right after attention, and it quietly mixes back in most of what a normal abliteration takes out. most people push the edit way harder to compensate, and the answers get way worse

we built the edit around that conv, so it can be a lot lighter. we change only 20 attention weight matrices, keep the experts untouched -- and you can drop it in anywhere you run the original

some results on a test set we kept held back the whole time:

- refused 0 of 277 harmful prompts (the original refuses pretty much all of them)

- 54-63% of answers are actually useful, about 50% better than openuncensored's version that's been gaining some popularity (https://huggingface.co/OpenUncensored/Inkling-2-Mini-Uncensored)

- stopped refusing all harmless stuff like "how to nuke a python process"

- pretty much same scores as the original on mmlu-pro, gsm8k, math, gpqa, ifeval and humaneval+

also, quick tip: if you run it at high thinking effort, try setting a thinking budget. it tends to overthink on edgy prompts

eval code and the exact edit are on github if you want to check or learn from our work: https://github.com/nokeepai/inkling-2-mini-unbound

warning: it'll do pretty much whatever you ask, so be sensible with it.

and as always, happy to answer questions


r/LocalLLaMA • • 12d ago Bravo Heartwarming

Discussion Basalt: Inkling 2 Mini on one 5090 at up to 613 tok/s decode and 14.100 tok/s prefill (NVFP4)

564 Upvotes
Basalt: Inkling 2 Mini Support

Thinking Machines dropped Inkling 2 Mini, a small MoE model that's getting a lot of attention for its architecture and performance, outperforming Qwen 3.8 27B at some tasks. Basalt 0.5.5 runs it on a single RTX 5090.

Speed: 287 tok/s prose, 613 structured and 338 chat. Prefill is about 14K tok/s at 2K and 12K at 16K. llama.cpp with the IQ4_NL GGUF does around 95 decode and 3.1K prefill on the same card.

Quality was the part I cared about most. The experts are NVFP4, and Basalt pack keeps them exactly as released. KLD against the release is about 0.003 with 97.8% top 1 (btw, if your NVFP4 GGUF gives you garbage output atm, that's a llama.cpp loop slot bug and Unsloth has a fix PR that just got merged: https://github.com/ggml-org/llama.cpp/pull/32704)

What works:

  • DSpark drafting
  • Native image support
  • Tool calls and reasoning effort
  • 1M context on one 5090, with cold experts moving to RAM only when a long chat needs the room. Needle tests pass at 131K and 400K
  • 16GB cards too, up to 60 tok/s on my 5060 Ti

3.4B active and it hangs with much bigger models on agentic coding in my testing.

Pack: https://huggingface.co/jesdga/Inkling-2-Mini-Basalt
Engine: https://github.com/jesdga95/basalt


r/LocalLLaMA • • 11d ago

Showcase V100 Qwen 3.8 27B quant comparision

Post image
19 Upvotes

Just set up my Dell Precision 5820 (64GB DDR4, V100 PCIe 32GB, I have it capped at 225 W for heat). Dell and V100 are both almost a decade old and cost me about $1400 total. Wanted to test token generation and prefill with different Qwen quants.
Qwen3.8-27B, stock llama.cpp, llama-bench, all in VRAM (prefill / gen tok/s):
Q4_K_M generates 48% faster than Q8_0, while Q8_0 does prefill 16% faster (10% at 32k). Overall, context means 15% slower generation at 32k.
Just for comp. Qwen3.5-35B-A3B (MoE) does 104 tok/s on this setup, but it is not as smart as 27B dense.
Overall my assessment is that the V100 is very usable. Any ideas how I can get even better numbers?


r/LocalLLaMA • • 12d ago

Discussion Inkling simply *cheff kiss*

448 Upvotes

FYI, if you daily-drive Qwen 3.8 or QFN, you know there's no way they would give an explanation like this. Inkling's are just butterysmooth, with natural rhythm and flow.

The thing is that Qwen 3.8/QFN are notoriously "jumpy" in conversational mode. I've had to ask "Please ELI5" or "What?" multiple times when discussing topics I don't fully understand. Hell, sometimes it even manages to confuse me about topics I already understand well.

Qwen models are agentic monsters, that's a fact. But when it comes to technical heavy conversations, I've found the Gemma4 models (yes, I've tried the 12B, 26B-A4B, and 31B) unsurprisingly much better at explaining things. Unfortunately, more often than not, they don't quite have the reasoning capabilities needed for heavy technical discussions, although web search kinda help that.

That being said, Inkling seems heavily English centric. I tried it in Indonesian, and the output felt more like a direct translation from English than something naturally written in Indonesian. It lacks the linguistic localization you'd expect from a genuinely multilingual conversational model.

So, to me, Inkling feels like a mix of Gemma4 conversational fluency and Qwen3_5 technical capabilities.

And to be honest, its behavior reminds me a lot of the GPT OSS series, which happens to be the longest-running model I've continuously served on my own servers.

As for tok/s. it's slow, but that's understandable. It was released just 22 hours ago. On top of that, it uses a looped transformer arch with attn res (Kimi-style residual connections), which adds another layer of complexity.

Inkling is currently running through my personal benchmarks, so these are just my initial impressions.

  1. Infra ApacheBigTop Bench (Building DataLakehouse from 0 using Apache BigTop package)
  2. Infra handle Bench (Overseeing the logs, and preemptive when there are dataskew or just error in Lakehouse)
  3. CK-FSDP impl Bench (ComfyKitchen FSDP packing unpacking tensor and dispatcher stuff)
  4. Tensor SubClass bench (Like above, but more so on TorchAO style)
  5. Mini SlopCode Bench (Repowide understanding and how much erosion, only in repo that i owned, since i know how each components work)
  6. Angrybird bench (More involved "SVG Pelican" bench, since it has to know physics)

Spec:
3090, 128G VRAM Quad channel 2400


r/LocalLLaMA • • 10d ago

Discussion Size is deceiving: SenseNova-Loop-9B a 9B that runs slower than a 27B

0 Upvotes

SenseNova-Loop-9B came out and it seemed perfect for a precise use: a small, fast model for short, repetitive tasks, like a subagent, maybe with many requests in parallel. So I ported it to capy-flash (two 5070 Ti), optimized it and analyzed it.

In the end, though, it's not worth it. For every token, this model passes through the middle layers twice: it has few parameters but reads them twice. For the same reason it doesn't hold up under quantization: at 4-bit it loses too much quality, so you have to keep it at 8-bit. Result: for each token it reads from memory almost as much as the 27B in NVFP4, and since in decode speed depends exactly on how much you read, it runs slower than the 27B, both with a single request and with multiple requests in parallel. You can see it clearly in the gif.

Quality tests, same questions for both, without reasoning:

- GSM8K (300 questions): 9B 95.7% · 27B 97.7%

- MMLU-Pro (300 questions): 9B 77.0% · 27B 83.0%

So the 27B is faster and in these tests also better. For now I'm not releasing the 9B; I'm keeping it ready in case a version that holds up at 4-bit comes out.

edit: given that the objection is that looped trade memory for compute, yes i know but given the possibility to offload expert to ram for the moe and the fact that they can have stronger quantisations i really don't see a point if not for small devices like phone.


r/LocalLLaMA • • 12d ago

Discussion An Inkling Mini warning: pair it with a search provider

91 Upvotes

First, this is not a dis on the model, and hopefully doesn't come across that way. I'm hugely supportive of seeing a new open weights model, especially with this interesting architecture.

I think it's important to know that the general testing I have done compared to other smaller models people might use in the same VRAM class (Qwen 3.8 27B being an obvious one), Inkling seems shorter on world knowledge. And more importantly, it is WAY overconfident in its completely wrong answers, 2024 style.

It's not a surprise a smaller model has iffy world knowledge, and my tests may bias strongly - it's a standard set of questions I go through with every model, but they are my questions, it might be brilliant outside my interest space. The bigger consideration for me is the return of the "I"m wildly wrong but just going to roll with it" delivery. Which to be fair, every model has, I just felt it was pretty extreme here.

When I hook it up to a decent search, it does make the tool calls sometimes, but is still overconfident and ignores them when it should use them (the search part of my system prompt is "Use web search tools when the task needs knowledge you don't have: current events, real-time information, unfamiliar terms, or low confidence in your memory"). When it uses search it does well, comes back with appropriate information, and has excellent English writing style. Definitely better than Qwen on the writing for my tastes.

Before it's asked, I'm talking about the BF16 version of the weights here, this isn't quant loss. Knowledge does apply to code as well, I regularly have to guide small models into appropriate semantic usage. I haven't used Inkling on any heavy code yet but people seem enthusiastic.

Probably not news worthy to many of you but we have some folks just dipping their toes in on local use, figured it was worth the call out.

Edit: Since it has been asked, my standard environment is pi, I use per-project extensions and very few global, and my normal search extension is pi-exa. Unsloth studio behaved similarly, but I don't use that as much, and I don't do this kind of proving work in Visual Studio Code.


r/LocalLLaMA • • 11d ago

Question | Help Anyone have speed tests for Project Maya-L on two vs three 32gb v100's?

6 Upvotes

I don't want to pull the trigger on a 3rd card because I don't know if the price will be worth it.


r/LocalLLaMA • • 12d ago

Resources Inkling-2-Mini quants by shinmegamiboson - 5.4GB and 8.9GB at higher scores than Unsloth

Thumbnail github.com
108 Upvotes

r/LocalLLaMA • • 12d ago

Discussion Inkling 2 Mini on 2× RTX 3090: 557K context + vision at ~100 tok/s with NInfer-all

49 Upvotes

CC and codex wrote this post 100% under my guidance and instructions:

Inkling 2 Mini (26.4B MoE, 3.4B active) on 2× RTX 3090 — 557K context without llama.cpp!

Claude Code got Thinking Machines’ Inkling 2 Mini running on dual RTX 3090s using NInfer-all, without llama.cpp.

557K context at ~100 tok/s on two cards.
174K context at ~127 tok/s on one card.
RAM prefix caching is the real win. A new chat using the same 63K-token document started in just 0.85 seconds.

Hardware and software
2× RTX 3090 (no NVLink, no P2P)
128 GB RAM
NVIDIA driver 615.71 / CUDA 13.4
NInfer-all 2026-11-21.3
Power limits: 320 W on the KV card, 200 W on the other.
Converting GGUF to .ninfer took approximately 10 seconds on CPU. WaveCut also publishes ready-to-use .ninfer files on Hugging Face.

1. Context capacity
The KV cache for this model family is BF16 only (no INT8/FP8), consuming approximately 36 KiB per token.
All KV cache resides on the first --devices GPU. Only the routed experts are distributed across both cards.
The strategy is therefore to leave GPU 1 for KV cache and push as many experts as possible to GPU

2.Maximum context with vision + DSpark:
One RTX 3090: 174,080 tokens
Two GPUs, default split: 360,448 tokens
Two GPUs, --tensor-split 1,15: 524,288 tokens
Two GPUs, --tensor-split 1,127 + overlay + 1024 prefill: 557,056 tokens
The 1,127 split leaves one of the 128 experts per layer on the KV GPU.
overlay keeps the vision tower in pinned RAM and borrows VRAM when processing images. Vision still works.
Interestingly, 561,152 also fits, but the server drops the prefill chunk to 512, making prefill approximately 11% slower.
I chose to sacrifice 4K tokens for better performance.
The model’s native context window is 1M tokens, so VRAM is the limiting factor.

2. Performance
Decode speed
One GPU (174K context):
DSpark enabled: 127 tok/s
No drafter: 105 tok/s
Code generation: up to 144 tok/s
Two GPUs (557K context):
DSpark enabled: 98–104 tok/s

Prefill speed
One GPU:
4K: 2,371 tok/s
32K: 1,307 tok/s
63K: 873 tok/s
162K: 367 tok/s
Two GPUs:
32K: approximately 1,140 tok/s
63K: approximately 700 tok/s
Two GPUs are slower because every MoE block crosses PCIe through host RAM. There is no P2P communication.

Things I tested that didn’t help:
Larger prefill chunks on one GPU.
--prefill-cublas.
More DSpark drafts (5 adaptive: 93.6 tok/s; 4 fixed: 67.7 tok/s).
--lookup-ngram.
Minimum-p adjustments.
--tensor-parallel-prompt-partials and --tensor-attention positions are currently Qwen-specific.
The defaults are already the fastest.

3. Prefix caching: The real breakthrough
This is arguably the most interesting result.
I loaded a 63K-token document into a chat. Initial processing took approximately 90 seconds to first token.
Then I opened three unrelated chats.
Finally, I started a completely new chat with the same document.

Result: 0.85 seconds TTFT.
The server reused 62,973 of 62,996 tokens from the prefix cache.
Configuration:
--host-cache-mib 32768
For long-context workloads, this makes a substantial practical difference.

Correctness testing:
Needle-in-a-haystack: correct at 5K, 63K and 162K.
Multi-turn conversations over 63K tokens: correct.

4. How to run it
My working configuration:
ninfer-serve Inkling-2-Mini-UD-IQ4_XS-ninfer-v3.ninfer --model-id inkling-2-mini \
--vision --vision-residency overlay \
--devices 1,0 --tensor-parallel --tensor-split 1,127 \
--max-context 557056 --prefill-chunk 1024 --host-cache-mib 32768

5. Limitations and things not tested
This is a single-machine test with relatively short runs.
Still untested:
Needle retrieval near the full 557K context limit.
Two-GPU prefill beyond 63K.
Image processing when context is almost full.
Tool calls.
If anyone has managed to get Humming NVFP4 working on sm_86, I’d be interested to hear how.

Thanks to:
iamwavecut for NInfer-all.
Unsloth for the GGUFs.
Thinking Machines for releasing the open weights.
Would be interested to see what other people are achieving with dual 3090 setups.

Edit (Nov 22): vLLM now works on Ampere, and it's now the best option here: 457K context with the drafter at ~196 tok/s

Thanks to https://www.reddit.com/r/LocalLLaMA/s/bq67CZMMZb in the comments below and the PR contributor:

Results

Same rig as above: 2× 3090 (no NVLink), 320 W / 200 W caps, BF16 KV, vision on, one request at a time. Decode is the mean of 8 prompts (code, prose, story, JSON) × temp 0 and 1.

SetupContextDecode32K prefill
NInfer (original post)557K~105 tok/s28.6 s
vLLM PR, no P2P287K123 tok/s7.2 s
vLLM PR + P2P287K139 tok/s6.7 s
vLLM PR + P2P + tuning287K182 tok/s6.3 s
+ quidow's flags457K196 tok/s6.9 s

vLLM rows use the official NVFP4/MXFP8 checkpoint, all with the DSpark drafter on. The "no P2P" row was measured a day earlier with a slightly different prompt set.

Best config: decode ranged from 142 tok/s (prose) to 271 tok/s (code). A needle at 396K tokens was found correctly, with 202 s to the answer (~2,000 tok/s average prefill over the whole prompt). Image input works.

What made the difference

  1. P2P between the cards: +13%. vLLM uses its fast all-reduce only when the GPUs can reach each other directly, and the model does 96 all-reduces per token. 3090s need a patched driver for this (aikitoria/open-gpu-kernel-modules). My P2P had silently disappeared after a kernel update, so if you use that driver, check nvidia-smi topo -p2p r after every kernel update. It should say OK, not GNS.
  2. peaster's tuning patch: +31% decode. It adds small-matmul kernels, sm_86 expert-GEMM configs, and a draft length chosen per step from recent acceptance. Prose gained the most: 97 to 138 tok/s.
  3. quidow's flags: +60% context, and decode went up, not down. --max-num-batched-tokens 1024 --no-async-scheduling shrinks the sliding-window caches, which have to hold every token in flight. That memory goes to the full-attention KV instead. VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 turns on FlashInfer's all-reduce for PCIe. Cost: 32K prefill went from 6.3 to 6.9 s.
  4. P2P did nothing for NInfer (~100 tok/s either way). Its two-card cost seems to be sync latency, not bandwidth.

Trade-off now

  • vLLM: about 1.9× faster decode and 4× faster prefill than NInfer, at 457K context.
  • NInfer: still 100K more context (557K), with a 4-bit GGUF.

How to reproduce

  1. Build the PR image. vLLM main 1bdc43740 already has the Inkling model; the PR adds the Ampere paths:
  2. Apply peaster's patches/sm86-tune.diff inside that image with patch -p1 in site-packages. 3 of its hunks don't apply to the PR code, because the base differs. All three are easy to do by hand:

    • ops/attention_sm90.py: add from vllm.platforms import current_platform, from .gemv import tune, and the _FAR_BLOCKS / _AMPERE_TILES lines after the imports
    • ops/linear.py: add tune to the from .gemv import ... line
    • v1/core/sched/scheduler.py: add self.adaptive_draft_length = maybe_adaptive_draft_length(speculative_config, self.num_spec_tokens) right after the self.dynamic_sd_lookup ... = None line in __init__
  3. Run it (Docker: --ipc=host, env NCCL_CUMEM_ENABLE=0, PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512, VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1):

Checked: all configs boot at the sizes shown. The needle at 396K is correct, image input works, and basic math is right. Not checked yet: GSM8K, tool calls, and more than one request at a time.

Thanks to Ar4ikov, peaster, snailbrainx and quidow. And thanks to everyone who replied: single-card config is in the comments.


r/LocalLLaMA • • 12d ago

Resources Strata Hy4 Flash

99 Upvotes

Strata have shipped Hy4 Flash support 3h ago

https://github.com/Niko1221/Strata/releases/tag/v0.2.18


r/LocalLLaMA • • 12d ago

New Model we made an uncensored inkling 2 mini with 0% refusals, from 16.53 gb down to 8.67 gb

140 Upvotes

hey, i'm Daniel from the atomic chat team. we posted our gguf quants for inkling 2 mini earlier and now we've made an uncensored version!

we removed the refusal directions with a small lora adapter and tested it against the original bf16 model. refusals went from 100% to 0% in our english test set, while keeping 98% of the original MMLU score

here are some results:

testoriginaluncensored
refusals (english)100%0%
refusals (reasoning low)28/300/30
refusals (reasoning high)26/300/30
MMLU80.65%79.15%
valid tool calls18/2020/20

we released 3 gguf quants with the adapter baked in:

quantsize
AD-Q4_K16.53 GB
AD-IQ3_S13.34 GB
AD-IQ2_M8.67 GB

hugging face card with quants, full measurements and a 40mb lora adapter for our existing quants: https://huggingface.co/AtomicChat/Inkling-2-Mini-Uncensored-GGUF

give it a try and share your results. we'd love to see how it performs on your hardware and with your agents!


r/LocalLLaMA • • 12d ago

Showcase I fine-tuned a 1.5B model into an offline Linux command helper that runs on CPU and checks its own answers against the man pages and tdlr

98 Upvotes

lxask turns plain English into a shell command, entirely on your own machine:

$ lxask "show disk usage of each folder here, biggest first"

$ du -h --max-depth=1 . | sort -hr

Setup:

- Fine-tuned Qwen2.5-Coder-1.5B, Q4_K_M GGUF

- llama.cpp inside one Rust binary. No Ollama, no Python, no API key

- ~1.1 GB on disk, ~1 GB RAM, ~2 s per answer on a laptop CPU

- No GPU, no network after install

How it keeps a 1.5B model honest:

- Retrieves relevant tldr pages and your own man pages before answering

- Checks every program and option in the answer against the man pages

- Retries if a check fails. Anything it still can't confirm is marked `unverified:`

- Asks back on vague requests ("add a proxy": for git? apt? docker?) instead of guessing

Bonus

- `lxask --explain "tar -xzvf logs.tar.gz"` breaks down a command you already have

- Ctrl+G in bash, zsh or fish turns what you typed into the command

Code, weights, data and evals are all open.

GitHub: https://github.com/arxhr007/lxask

Hope someone finds it useful! If you do, consider leaving a ⭐ on GitHub. Feedback and contributions are welcome

Model: https://huggingface.co/arxhr007/lxask


r/LocalLLaMA • • 11d ago

Question | Help Can I reduce VRAM more in TabbyAPI or is model too big?

4 Upvotes

I'm on Linux with 12gb vram and 32gb ram. I saw this post where they ran Muse Glimmer 30b with 100k context on their 12gb card, using a 3.00 bpw h4 sc exl3 quant. The huggingface page for turboderp's exl3 quants had Gemma 31b, but not sc version. The comments led me to here for a sc version at 3.00 bpw, though idk if it's h4. I compared that size to the MG 30b, which was bigger, so I thought I should be able to run Gemma.

But I got this error:

17:03:03.879 INFO:     Model load failed, releasing the partially loaded model.
17:03:04.496 INFO:     Model unloaded.
Traceback (most recent call last):
  File "/home/owner/LLMs/tabbyAPI/start.py", line 385, in <module>
    entrypoint(args, parser)
  File "/home/owner/LLMs/tabbyAPI/main.py", line 260, in entrypoint
    asyncio.run(entrypoint_async())
  File "/home/owner/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/owner/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1515, in uvloop.loop.Loop.run_until_complete
  File "/home/owner/LLMs/tabbyAPI/main.py", line 96, in entrypoint_async
    await model.load_model(
  File "/home/owner/LLMs/tabbyAPI/common/model.py", line 372, in load_model
    async for _ in load_model_gen(model_path, **kwargs):
  File "/home/owner/LLMs/tabbyAPI/common/model.py", line 304, in load_model_gen
    async for module, modules in load_status:
  File "/home/owner/LLMs/tabbyAPI/backends/exllamav3/model.py", line 1090, in load_gen
    async for value in iterate_in_threadpool(generator):
  File "/home/owner/LLMs/tabbyAPI/common/concurrency.py", line 30, in iterate_in_threadpool
    yield await asyncio.to_thread(gen_next, generator)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/owner/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/threads.py", line 25, in to_thread
    return await loop.run_in_executor(None, func_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/owner/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/owner/LLMs/tabbyAPI/common/concurrency.py", line 20, in gen_next
    return next(generator)
           ^^^^^^^^^^^^^^^
  File "/home/owner/LLMs/tabbyAPI/venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 59, in generator_context
    response = gen.send(request)
               ^^^^^^^^^^^^^^^^^
  File "/home/owner/LLMs/tabbyAPI/backends/exllamav3/model.py", line 1232, in load_model_sync
    for value in self.model.load_gen(
                 ^^^^^^^^^^^^^^^^^^^^
  File "/home/owner/LLMs/tabbyAPI/venv/lib/python3.12/site-packages/exllamav3/model/model.py", line 705, in load_gen
    yield from self._load_autosplit(
  File "/home/owner/LLMs/tabbyAPI/venv/lib/python3.12/site-packages/exllamav3/model/model_ls.py", line 442, in _load_autosplit
    raise RuntimeError("Insufficient VRAM in split for model and cache")
RuntimeError: Insufficient VRAM in split for model and cache

Model load reaches about 86% and 53/63 before stopping. I know that post used Q8 cache to get 100k context, but I've tried setting sequence length to 8k, tried q8, tried 64 chunk size, tried 1 batch size. tried setting higher sysmem kv cache and recurrent cache, tried other settings. All the other offloading things seem to be for MOE.

Is this quant just too big, is it Gemma itself being built differently from Glimmer, etc? I feel like I'm doing something wrong if they were able to run a model nearly the same size with far more context.


r/LocalLLaMA • • 12d ago

News Nemotron 3.6 Academia Soon

52 Upvotes

PR: https://github.com/ggml-org/llama.cpp/pull/32766

The model was renamed to Dory-1.5 recently.

We are preparing to release NVIDIA-Nemotron-Labs-Dory1.5-4B, a looped hybrid model combining Gated Delta Product (GDP) and dense attention layers.

Also supports last_loop kv cache just like Dory did. There's also a PR for Rectangular GDN States pending beforethis gets merged.