Remix.run Logo
Why we write our own C and C++ inference engines(localai.io)
20 points by eatonphil 3 days ago | 8 comments
scottcodie an hour ago | parent | next [-]

I did took a native c++ approach when writing a relational transformers engine (RelativeDB). My journey was pytorch -> c++ -> Triton (lang). While C++ was more performant than Triton, I couldn't afford to optimize on every gpu. I just accepted the ~15% throughput loss for my cloud service, which honestly wasn't bad for the amount of flexibility I got out of it.

But the cpp port of vllm looks great, that'd be great if you'll maintain that. I hit the same limitations with vllm.

dennis16384 2 hours ago | parent | prev | next [-]

I had a similar success with Model2Vec static embedder and NER inference (both GGUF, compiled for WASM), ported to plain C from ONNX Runtime.

Wasm size from 30Mb to 300kb and 1.5x speedup. It's definitely worth it for performance or distribution size.

stephbook 2 hours ago | parent | prev | next [-]

Should have started with writing your own blog posts.

winter_blue 15 minutes ago | parent | next [-]

I found the post insightful and interesting. I'm not sure it was written with AI assistance, but even if it was, I don't see that as a reason to dismiss it. For what it's worth, I spend hours everyday reading AI output and summaries.

nnevatie 2 hours ago | parent | prev | next [-]

Came here to say the same. Really tiring to read these slop-infested posts, where everything has the “right shape”.

altmanaltman an hour ago | parent | prev [-]

I went through the post because of your comment but it really doesn't look like AI slop. Can you please share why you feel like its slop and not written by a human? I can also say "should have started writing your own comments" to you and its unfalsifiable. Blanket accusations with no proof is not a good move really.

nnevatie 28 minutes ago | parent [-]

The post is full of signs. Here's only a couple of examples:

> The method, the measurements, and what it costs us.

> That is the general shape of these wins.

> Parity is the gate, speed is the follow-up

I could go on and on, but you probably get the point. If you don't find anything funny with the above, you might have not been enough-exposed to slop.

adithyassekhar an hour ago | parent | prev [-]

What you get: X is the A, Y is the B.