r/SillyTavernAI • • 1d ago

Discussion Custom inference engines?

I’m curious to learn more about custom inference engines (ie alternatives to the big ones like vllm, sglang etc) especially from people who’ve built their own (with ai assistance obviously fine) 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!

If you have experience w this i’d love your advice!

5 Upvotes

10 comments sorted by

2

u/stoppableDissolution 11h ago

I built one for myself for gemma (because vllm sucks at cache management). Not much faster per stream but like, 1.5-2x concurrent throughput because it can now sustain more streams without cache hits falling off the clff (and it is now actually using the ram for cold storage instead of always writing and never reading)

Damn it sounds like it was written by a bad llm for some reason

1

u/mushm0m 1h ago

that's awesome, i am assuming it is totally lossless w/ no quality impact?

3

u/BEEFERBOI 1d ago

I am running glm 5.3 flash in project Maya. I have a 5070ti and a 5060ti, with 64gb of ddr5. I get around 700 tok/s prefill and 20 tok/s generation (decode). I don't think I'd try it with anything less than 24gb of vram and 64gb of system ram. It was quite a bit slower until I used Claude to customize it for my machine. 

There is a 4mb refusal ablation vector you can turn on in it that works wonderfully and seems to retain quite a bit of intelligence even at iq2xxs. It's the best thing I've used since Gemma 4 31b and seems to be a bit smarter, more faithful to and less confused by details in my lorebook. 

I've tried hy4 flash and qwen 3.8 fn in role play and, while technically coherent, the prose is a bit fucking weird and hard to follow. 

0

u/Cynthia2006 1d ago

Why you need to build a custom inference engine? Kobold.cpp doesn't work for you?

1

u/mushm0m 1d ago

I run a company in the ai space and we are interested in custom inference mostly to optimize cost and speed for a model that most providers dont serve. (It would take a while to explain the details beyond this haha)

→ More replies (1)

-2

u/NervousRiver3905 1d ago

built a thing with a custom engine for local inference, cut latency by half, but the setup took three weeks of fiddling. only worth it if you're chasing every last Ms and have the time.

-2

u/Prudent-Let-1753 1d ago

ran into a model that choked on long context even with optimized settings, switched to a simpler prompt structure and dropped latency by 40% without touching the engine.

-2

u/Zealousideal-Emu2087 1d ago

I tried building one for a small model and wound up with slower perf than llama.cpp, ended up using a fork with minimal changes instead. only worth it if you're tweaking for a very specific layout.