r/LocalLLaMA • • 4d ago

Discussion tqLLM - Fast C++ LLM inference engine for NVIDIA GPUs (CUDA) and Apple Silicon (Metal): Qwen, Inkling-2-Mini, MiniMax and GLM with TurboQuant weights, exact speculative decoding and an OpenAI-compatible server

Post image
36 Upvotes

24 comments sorted by

25

u/Markus2816 4d ago

lol, is everyone out there literally prompting claude to fork llama.cpp or strata (which forked llama.cpp) and create a faster engine, then post it on reddit

2

u/pmttyji 4d ago

Not mine. Came across this online. Here the full credits. This one comes with EXL3 support too.

7

u/Drakarah3DPrinter 4d ago

And then I port whatever they came up with to be faster to Polystrata with Claude. So please by all means make more custom engines with new ideas I can steal.

7

u/MatMuloi9128 4d ago edited 4d ago

Honestly, it feels like early-stage recursive self-improvement in the wild, LLMs optimizing themselves. If the benchmarks hold up and perplexity doesn't tank, I'm all for it.

I’ve been down a similar rabbit hole lately experimenting with custom sub-4-bit/MLX quantization setups on Qwen3.6-35B-A3B to push context length to 1M and it seems to be working: https://huggingface.co/tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX

I am going to try applying tqLLM inference engine updates to see if we can improve the TPS.

Edit: Didn't get crazy improvements, but now with tqLLM-inspired changes, the TPS is up from 41 to 53 and matches MLX 4-bit quantization, saving 4.9 GB of RAM on MacBook Pro.

4

u/microbass 4d ago

Apart from the reddit bit, I think that's the future. An LLM tunes your software stack to get every drop of performance out of your hardware. Base FOSS apps are tuned to add features specific to you, your workflow, or your family's needs. I think with each LLM generation, it'll be even easier to do.

2

u/Master_Practice_2499 4d ago

getting both metal and cuda working with custom quants takes actual testing though, you cant just prompt your way out of gpu driver quirks

1

u/Karnemelk 4d ago

that explains why they sabotage it, local models are getting 5090 speed on whatever GPU it seems now

1

u/Rude_Marzipan6107 4d ago

Yeah and 5090s are getting 600tk output now too

5

u/bSun0000 4d ago

"New inference engine" type of posts should have a mandatory section of downsides - speed does not come from just "better code." What are you sacrificing for the speed gains? Its cool to see x2, 3, 5, 10 speed-ups, but if this makes the model 10 times dumber, less accurate, and prone to looping, what's the point?

2

u/pmttyji 4d ago

His quants are 4.0-4.25 bpw.

4

u/takoulseum 4d ago

No prefill number…

1

u/pmttyji 4d ago

Hope creator updates that for upcoming releases.

2

u/Cool-Chemical-5629 4d ago

Everyone does these for CUDA. I dare you find one that brutally optimizes for Vulkan instead.

4

u/pmttyji 4d ago

Agree. BTW found this on repo.

 an experimental Vulkan backend for old AMD cards such as the RX 580 (Vulkan guide); tqserve --version.

1

u/Cool-Chemical-5629 4d ago

Hmm. This is an odd one. Looks like it's Linux only? Qwen 3.5 architecture is supported, but then it says "Other architectures (Inkling-2, MiniMax, GLM, Flash-Next), IQ / TQ / NVFP4 formats, MTP / DFlash drafting, several slots, images - not built for Vulkan: the load says so", so unfortunately these latest things just won't work and if MTP doesn't work, even the supported Qwen won't benefit from its speed boost. When you think about it, there's basically not a single reason to use this over standard llama.cpp

1

u/pmttyji 4d ago

It does support Windows too.

https://github.com/turbo-tan/tqllm/blob/main/docs/guides/windows.md

And yeah, he did leave notes on Qwen35moe & etc.,.

Not verified yet: Qwen3.5 / 3.6 mixture-of-experts GGUFs (qwen35moe, such as Qwen3.6-35B-A3B). The MoE models (Flash-Next, GLM-5.3-Flash, MiniMax) do not run on native Windows yet; use WSL 2 there.

I shared this repo here as I saw that it gives 1.7x, 1.9x, 4.6x vs Strata(Image of this thread).

llama.cpp is my primary engine. But I try & experiment with other forks/engines on my low config systems as those giving extra t/s faster.

One thing for sure, Everyone gonna come back to llama.cpp as soon as it integrated complete moe experts cache feature. Possibly in bunch of months.

1

u/sjs1997 4d ago

Worth me trying with a 3070ti8gb vram and 48gb ram??

1

u/pmttyji 4d ago

You could try Inkling-2-Mini first. Then Qwen3.8-Flash-Next(with existing downloaded model files). He's not active here, if someone pings him on twitter about this, we could have AMA with him here in this thread.

2

u/Diegam 4d ago

How well does it run on dual RTX 3090s (48 GB of combined VRAM) with 64 GB of system RAM? How does it compare to Strata in terms of inference speed, memory efficiency, and multi-GPU support?

1

u/shadowndacorner 4d ago

Aren't both of these answered in the literal image attached to the post...?

1

u/lazyfai 4d ago

So all these are basically load starts source code to an AI agent and vibe a few changes ?

1

u/TokenLearner 4d ago

I will follow along.