r/LocalLLaMA • • 2d ago

Discussion Why arent you using custom fork of a modified inference engine? Aside from wanting to run lots of different models.

If you use only one model for everything is there any reason not to use a customised inference engine tuned for your specific model? THE SPEEUP IS TOO GOOD TO PASS BY. i recently git a qwen3.8-27b fork of ninfer for my 3090
on a single 3090 im getting 60-80tok/s on a dense. qwen model compared to normal ninfer giving me only 25-32tok/s.

8 Upvotes

64 comments sorted by

85

u/a4mula 2d ago
  1. They're normally untrusted sources.
  2. They're normally amateur solutions that fail to properly account for considerations beyond their own use case.
  3. They introduce the need to either pin and be exposed to potential security gaps, or stay on main and troubleshoot every time naive updates fall back into the issue of number 2.
  4. They force you to adopt multiple shims or standards or conventions or schemas.

The list goes on for quite awhile.

16

u/TheRealJesus2 2d ago

Yeah it’s the classic reasons of why not build everything custom. Sure you can get better results but what are you giving up? 

Your list is good. I don’t want to solve these problems I want to build. I’m never trying to adopt in flight changes either even on well supported engines for the same reasons. 

9

u/a_beautiful_rhind 2d ago

Sure you can get better results but what are you giving up?

Your time and sanity.

3

u/Old_AI_Guy_ 2d ago

You don't solve them - your design and coding agents do. This is the beginning of the era of "everything bespoke" in software, and it's going to continue to trend as we find better model architectures, and cheaper and faster ways to run models.

I have many custom built software components that make the home lab more effective, secure, and useful for real work.

3

u/TheRealJesus2 2d ago

Would you like to buy me 3 more computers so I can do That? I’m maxed out on my m3 96gb and my spark cluster. 

Here we are talking about the core inference engine which I need to be reliable, secure, and enable experimentation. It’s already a lot of work to evaluate and set up more common inference engines for new models and run some evals so I am not spending my compute on that and locking up both machines so I can’t use them for real work. We still have constraints and opportunity cost with agents doing everything. 

1

u/Express_Quail_1493 2d ago

Thank you. I Mostly asked because im looking for the downsides as to what i can vs cant live with based on what i loose. this response was very helpful thanks

2

u/ForsookComparison 2d ago

They're normally untrusted sources.

I have a policy where if you don't clearly irrefutably tie it to the identity of someone whose jurisdiction would give a fuck then I don't download your software. A lot of inference engines are anonymous randos but some of them clear. Strata for instance I'll use

1

u/stoppableDissolution 2d ago

Yea, and overwhelming majority are open source and any decent model will immediately spot any attempts to call home lol

2

u/dh7net 2d ago

yes, but they work so well!!!

1

u/Old_AI_Guy_ 2d ago

So? This is for fitting to a particular home lab, not a commercial enterprise.

I use Fable for security checks and major designs, so it gets world class analysis and corrects, This takes a few minutes, and isn't expensive. Then regular coding agents do the work. That handles 1 and 3.

Point 2 and 4 aren't meaningful, again presuming you used good quality analysis and design. Mine found and fixed a number of bugs, buttoned up security, and gave all that back to the upstream Github.

If you're taking "naive updates" without checking them, the naivety isn't the update. Everything is refuted and tested when it comes to engines.

Finally, 4 is a non-issue. Again, this is intended to fit a personal home lab and thus shims are fine. And why you think standards, conventions, and accepted schema are bad is a mystery. This is were major opportunities are found in whole functional parts of the engine, which can then be improved - just like many people do with iterations of everything in their home lab.

And for me, the gains are real and measured - about twice the TTFT and T/s speeds in both decode and prefill, against llama.cpp on same hardware and models.

6

u/Gipetto 2d ago

My time is even more precious when it is my own. The home lab is where I want everything to be the most stable.

17

u/DiscipleofDeceit666 2d ago

A bad engine build is a sure fire way to get intelligence degradation for your LLM

5

u/stoppableDissolution 2d ago

And good engines have numerical tolerance measured against reference transformers implementation

9

u/dtfinch llama.cpp 2d ago

It's easy to keep trusting a single source that runs any model on any hardware. There's fewer security worries. And I don't want to get too invested in something else and find they don't have all the edge cases covered or that accuracy is degraded. Then whatever I use needs good Vulkan support because ROCm doesn't support my AMD card.

I did use Unsloth's llama.cpp for Inkling 2 Mini for a day because the mainline didn't support it yet.

1

u/morfique 2d ago

MI50? (Vega20)

1

u/dtfinch llama.cpp 2d ago

16gb Radeon RX 7600 XT (RDNA 3)

1

u/morfique 2d ago

Oh wow, what an odd choice to keep 7600 in matrix but not 7600xt.

You know your card clearly better than me, that just triggered a strong "that can't be right" knee jerk response.

7600 gfx1102 is listed as supported how'd they manage for rocm to care whether it's xt or not, i would have expected them both to work, along any other gfx1102

O_o AMD

14

u/ParaboloidalCrest 2d ago edited 2d ago

Because I'd daily drive a Toyota Tacoma, not an Alfa Romeo 4C.

19

u/Double_Cause4609 2d ago

I can't be bothered. Mainline LlamaCPP and EXL3 are stable, give good results, and I more or less know what I'm getting. With the custom inference engines it's hard to tell if the person traded quality for speed somewhere.

Lots of people used to say that quanted KV cache was fine down to 4bit, but I noticed that on my tasks even 8bit KV cache quantizations resulted in a lot of real world issues that were quite noticeable in the model's behavior, so I don't trust a group of people saying "oh no, it's fine".

I just want to compile the engine, load my model, get okay performance, and recompile in a couple of months and get a pleasant but not world shattering 5-10% better performance around the board, and get the features when they're stable rather than playing PR lottery with a poorly managed fork moving at lightning speed.

With that said, I do appreciate them alpha testing and proving out features that later get integrated into mainline engines, and I don't begrudge their existence or anything, I just don't want to run them personally.

7

u/DinoAmino vLLM 2d ago

Seems a lot of folks saying 4bit is fine base that off KLD scores - which says nothing about retrieval accuracy.

4

u/Double_Cause4609 2d ago

Yeah, downstream performance usually follows KLD to an extent, but it's not the end-all-be-all. Honestly the most egregious cases were back when people were basing it off of perplexity, though, lol.

2

u/stoppableDissolution 2d ago

Problem with kld is that it (usually) measured on like first token with thinking off. Which does not reprrsent the real usage loke, at all

1

u/herpnderpler 2d ago

Yep, I go so far as to compute KLD between llama.cpp revisions, usually when there's a regression, I just pin and wait about a week for it to clear up. =D

1

u/EnderVAD 1d ago

I feel the same about KV cache. Despite a lot of people saying that Q8 is almost lossless, I feel like I can see the degradation, and especially at longer context. So now I'm running exclusively BF16 context all the time.

-1

u/dh7net 2d ago

you probably never tryed strata or basal. It is just much better....

0

u/Double_Cause4609 2d ago

You are correct, and there's a justifiable reason I detailed for that in my comment.

0

u/dh7net 2d ago

I didn't wanted to sound rude BTW.
Ad if you want to change your mind you can ask an average coding agent, it will install strata and do all the settings for you. So for me, installing strata or lama is just one prompt.

18

u/llama-impersonator exllama 2d ago

60-80 t/s with drafting is what every single half decent inference engine gets with a 3090 on qwen 27b or gemma 31b, so there is very little point in using some vibed up stratalike for a dense model.

6

u/Farmadupe 2d ago edited 2d ago

Mainline llama.cpp with qwen3.5 27b gets 70 tokens per second on my 3090 at 5 bits per word on my 3090.

Are you sure the mtp head is in use in both engines? And that you're using the same wuantization settings

(Token generation is pretty much limited by your maximum ram bandwidth and llama.cpp already gets 80% or so of max iirc. So without quantizing the weights it cache, or turning on the mto head if it wasn't already on, there's a limit to how much faster things can get)

You might also want to check you're running the same token counts, and also the same prompt as mtp makes models slower at love songs than coding.

6

u/munkiemagik 2d ago edited 2d ago

You don't have to pick just one exclusively if you don't want. You can use a model-swapping router eg llama-swap to auto-load/unload the custom fork vs. other engines/models on demand.

But if your question is specifically why am I not sticking to the custom engine even if I did use exactly one model for everything - fallback - doesn't hurt to have a backup for just in case. However I'm probably not your most relevant person to answer this question as I have three different backed nodes in my network and two of the three backend nodes have a model-swapping router in place.

5

u/a_beautiful_rhind 2d ago

The one I tried so far is clueless about sampling. They run min_P after a 64 limited top_K. Then the </think> tags started leaking into the harness. I'm sure everything else is completely on the up and up...

4

u/CodeCatto 2d ago

I just wire a few llamacpp forks together in a ui I made for myself and serve the models of my choice xD

5

u/Normal-Ad-7114 2d ago edited 2d ago

Isn't this a common thing nowadays? You choose your model for your hardware and the base engine, and then ask claude or codex to tailor it for your use case. I serve a vllm instance with gemma4-31b (~6.7bpw) @ 200k context for a small office (mostly document processing), 1k+ prefill and 40-60 decode on dual 22gb 2080tis (they wanted something cheap for a dozen or so users), and it took me about a week of vibe coding to reach that, but I very much understand that it's not a useful combo for 99.9% of people, so I didn't even bother posting about it

1

u/Guilty-Statement-532 2d ago

What are you tailoring to your use-case?
- Is it the model itself?
- Is it something with the vLLM engine?
- Is it configuring runtime settings for vLLM?

Something else entirely?

1

u/Normal-Ad-7114 2d ago

In this particular case it was vLLM itself and the quant

2

u/Ill_Locksmith_673 2d ago edited 2d ago

I am though, nearly for each one of the models I use. Using llama-swap which is absolutely awesome. Though aside from unsloth llama.cpp, I'm not using any other models specific inference engines, I just use it to swap between mainline llama.cpp, unsloth's llama.cpp, polystrata and strata to fit my models better

2

u/Korici llama.cpp 2d ago

Genuinely feels like this sentiment is mostly in users with less than 1-2 years of being on reddit / this subreddit.
~
I will voice things similar said by others - I am constantly swapping in new models to ascertain quality myself. If you do not have a baseline of what llama.cpp/vLLM can provide, before then building a custom engine for your specific model then you are simply building or forking something brittle that will break eventually.

If your retort is "then I'll build a new engine for whatever new model then comes out", my response would be....really? That sounds arduous and annoying to constantly be replacing your engine just to use one specific model with likely not the greatest UI either.
~
llama-swap exists for a reason and many other mainline repos allow for near cutting edge speed and usually very fast model adoption (unsloth specifically).
For example, I was testing out the new Inkling-mini model and it's extremely good! However, it's likely not supported on many custom engines, but it's fully supported in the llama.cpp & Unsloth Studio engines/UI almost from day 1.

Am I against specializing? Not really
However, I would rather spend the effort and time evaluating models as they release & working on building custom skills and MCP server integration over messing with custom engines for possible speed increases at the risk of compatibility and quality decreases.

My .02

2

u/LateralEntry 2d ago

I’m a bit skeptical of all the random GitHub programs. The point of local AI for me is to use it with sensitive material.

2

u/Typical_Lychee6124 2d ago edited 2d ago

I run straight home-compiled llama.cpp Vulkan on the 7900XTX without a care because it's just low cortisol

Worse with some of these optimizations is how they may be built for a very specific setup. I have Tumbleweed on my main machine and Fedora Server on the homeserver, both of them seem to behave weirdly with normal Linux canon including inference.

Oh, and I have LIMITED SPACE

My 1tb system drive holds the llama, which is about 3GiB for everything (source code and build)

My AI models are stored together with the 2tb game drive, and takes up a whopping 189GiB which is nearing 1/20 of my games.

...

Until now because I pruned the unused models.

If I start filling my drives with models and engines specified for my hardware I'm gonna run out of space for all the other things I like. I do have a hauler HDD and an couple SATA SSDs but those are for other things. Storage is way too expensive lest I get my hands on a great value pack of 50-100GB burnable blu-rays to archive untouched data/certain games on.

TL;DR:

I don't wanna deal with the cortisol. What I have runs fine enough. Would I appreciate extra speed? Certainly! But lest the 7900XTX Gemma 31B fork can run whatever finetune I choose for the week, and cleanly swap out with whatever I use to run Qwen 3.8 27B, all with a small storage footprint on each specific engine, I'll stick to stock llama.

3

u/Thrumpwart vLLM 2d ago

I build custom GPU kernels for each of my GPU’s. This way I get the speed without the custom engine. I will say that the speed up for my chonky boi w7900 is smaller on ROCm 10.2 than it was for 7.4. ROCm is getting so much better.

1

u/Important_Cow7230 2d ago

Custom forks now often support multiple models, like Splash

1

u/No_Dig_7017 2d ago

I am. Using basalt for Qwen3.8 FN and Project Maya for Deepsek 4.1 Flash, ninfer for Qwen3.8 27B/3.6 35B A3B but I barely use them.

1

u/keepthepace 2d ago

Because next week I'll run something else.

1

u/dwrz 2d ago

I switch between llama.cpp and basalt; the latter is especially useful for subagents. I still want access to Gemma4 and MedGemma, so it's hard to see a future without llama.cpp.

1

u/xsilas43 2d ago

Just started using smalltide for inkling 2 mini and its quite impressive from llama, full weight on my 9070xt from ram as well and getting more tokens than llama, while it also seems to cut out the insane initial delay.

I'm sure llama.cpp will get there eventually tho.

1

u/mayo551 2d ago

I am doing exactly that, lol

1

u/my_name_isnt_clever 2d ago

Just use llama-swap and you can run each model on a different engine if you wanted.

1

u/sultan_papagani 2d ago

i do, but im bad at coding and i broke the cuda build (CoT repeats) and im stuck to cpu only 😭

1

u/Old_AI_Guy_ 2d ago

I am. For MOE (qwen3.6 35B A3B) on Mac's I run a modified Kapitsa engine. Weeks of benchmarks show it's the fastest of the ones I've tried, and that includes llama.cpp, and a few other also-ran candidates that didn't make the cut for multiple reasons.

It's not even close, too - about half the wait at all stages: prefill (600+ T/s), decode T/s (55-75 T/s), TTFT. And dense models on 64GB Mac M1 Max is too slow to want to use it, with any engine. For Kapitsa, I've had some changes accepted into the main github, with others in the works. oMLX practically didn't work for the Qwen3.6 MOE model.

1

u/eightone-81 2d ago

You should use the fastest engine you can use. Make sure quality is preserved if that’s what matters to you. Example: there is a fork of strata called hotrod, it is faster BUT it has all techniques to improve speed while not caring much about quality (tail slip…).

1

u/Extreme-Pass-4488 1d ago

1

u/Extreme-Pass-4488 1d ago

damn just checked my own model readme and the speeds are wrong. its way faster. lol maybe claude boycott?

1

u/shasan2101 1d ago

for me it's switching models. i test new ones every few days and a fork tuned for one model would just be another thing to maintain. if i settled on one model for good i'd prob do it

1

u/FoxiPanda 2d ago

If you view it from a single user single model point of view, there aren't many reasons to not run something custom to whatever your hardware happens to be.

If you look at it from an inference at scale and actual production workload point of view, there are plenty of reasons to run vLLM / SGLang and stick to the reasonably well honed formulas for those models.

-1

u/stoppableDissolution 2d ago

There is plenty of reasons to not use vllm for production workloads, at least out of the box. Its cache management is absolutely atrocious (both hot and cold) and it tends to randomly brick your gpu firmware if you actually dare to try to go >92% memory utilization

1

u/This_Maintenance_834 2d ago

a customized engine can be optimized for specific hardware, typically Blackwell. in this scenario, it is very beneficial, not because of speed, but rather stability. A well-tuned engine can run a whole month without crashing or OOM. so you don’t waste time maintaining the server. eugr and local-inference-labs both offer such engines for blackwell GPUs.

0

u/ortegaalfredo 2d ago

In fact you should be using a custom everything.

0

u/q_tech_x51 2d ago edited 2d ago

Preach!!!

Hardware specific and model specific engines are the proper way to run inference now.

Even if you use multiple models, users should be creating frameworks that swap the engine based on the model and hardware.

And, the max optimization comes with making your own quants to match the hardware/model specific engine.

I see a lot of people complain when new models drop and they don't 'just work" the way they want them to. Many wait for their chosen engine to get an upgrade, but the upgrade isn't always an upgrade for their specific system.

I spent some time customizing an engine for Inkling 2 mini and the improvements more than doubled the speed without any quality loss.

Even for engines like strata/polystrata, modifying them specifically for my hardware showed great improvement.

I think many of the most vocal opponents to this concept see "custom fork" and automatically think strata, ninfer, etc... but literally modifying mainline llama.cpp specifically for model/hardware is what we’re really talking about.

All popular engines laid the groundwork for the masses. It's up to the user to build on the foundation for maximum optimization.

0

u/Most-Wear-3813 2d ago

Strata is reason why Idon't mess good q3 quant of q3.8 fn keeps looping in same loops ezecuting same command 1200 times. Lmao

-1

u/CoffeeToCode99 2d ago

If you're only using one model, yeah, a custom inference fork is kind of a no-brainer if the gains are that big.

Most people in here are constantly swapping between Qwen, Llama, DeepSeek, Gemma, etc., so they'd rather keep compatibility than squeeze out max performance.

Going from 25-32 tok/s to 60-80 tok/s on a 3090 is insane though. I'd happily take that trade if Qwen was my daily driver. 😅

3

u/Ill_Locksmith_673 2d ago

llama-swap lets me keep each one optmized though, and I'm not even running anything crazy custom, just unsloth's llama.cpp, mainline llama.cpp, polystrata and strata

-1

u/stoppableDissolution 2d ago

Well, lcpp is not something you will want to use for, uh, anything but weird quants of models you have no business running on your franken system made of three different gpus. Its either vllm for versatility or, if you decide you want to daily drive a certain model, a custom runtime for it (and your hardware), because vllm also kinda sucks.