frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

I patched llama.cpp to gain 20% prompt processing TPS. Help me make a PR

4•i_am_rocoe•8h ago
I've been running Qwen3.6-35B-A3B locally on llama.cpp and noticed that prompt processing throughput gets too low with MTP. I got nerd-sniped.

What started as curiosity turned into a two-week rabbit hole of experiments and ended with a PoC that fully recovers the MTP PP overhead on GPU, above any expectation I had.

TL;DR: instead of processing the last layer MoE FFN for the entire ubatch tokens (usually 512-2048 tokens), this PoC processes only the output row (usually 1 token during prefill). The result is PP TPS is back to the same as with MTP disabled, keeping most of MTP's benefits to TG TPS, even with a slight drop in draft acceptance rate in one of the benchs.

I'm not opening a PR to llama.cpp because this is AI-generated code, which goes against their contribution policy, which I support. If you know C++ and llama.cpp internals, I invite to work together with me to open a PR with a more mature implementation.

Comments

potus_kushner•8h ago
you have better chances opening an issue and explaining your findings. lots of people watch the repo so probably someone will chime in.
i_am_rocoe•7h ago
Thank you!

Everyone feared AI taking over; the real danger is AI serving just the few

40•PhilipDaineko•6h ago•21 comments

Fast feedback loops is the way

2•skyglider•3h ago•0 comments

Ask HN: Smallest amount of working ML weights that can be tattooed on a body?

6•thoughtpeddler•8h ago•0 comments

The open source DOCX editor submitted to HN a few weeks ago has been deleted

98•gcanyon•1d ago•43 comments

Ask HN: Where is the programming profession going?

143•syntaxbush•3d ago•158 comments

Ask HN: Is "no source code was copied" still a sufficient copyright defense?

64•oscgam1•1d ago•78 comments

Recursive self improvement for human skills

3•rando77•7h ago•1 comments

I patched llama.cpp to gain 20% prompt processing TPS. Help me make a PR

4•i_am_rocoe•8h ago•2 comments

Ask HN: MacBook vs. Dedicated GPU for LLM

31•mzubairtahir•1d ago•62 comments

Ask HN: What GUI/desktop app do you use to keep track of different AI sessions?

3•howToTestFE•17h ago•4 comments

Data Privacy while using API tools

4•11shyam11•12h ago•4 comments

Ask HN: What do you predict the world will look like in 5-10 years?

6•justanything•14h ago•8 comments

Tell HN: Mojo is becoming open source

7•theanonymousone•14h ago•3 comments

Ask HN: Is there a quiet market for 'no enforced AI' dev jobs?

7•reinhardt•15h ago•10 comments

Ask HN: How much coding should beginners learn in the AI era?

36•JohnDSDev•3d ago•48 comments

Ask HN: Running local LLMs? What's your model and hardware

10•alfiedotwtf•14h ago•7 comments

Ask HN: Has Ilya Sutskever spoken publicly lately?

6•aurenvale•19h ago•0 comments

Tell Zillow: Fee-Simple vs. Leasehold Filter

3•HoldOnAMinute•1d ago•1 comments

Ask HN: Norway bans AI in elementary schools

15•mellosty•2d ago•19 comments

Roblox parental controls are a dystopian security disaster

23•notsure357•1d ago•3 comments

Ask HN: Who remembers Fry's Electronics – the "church" of IT people?

7•netfortius•1d ago•4 comments

Ask HN: Which AI concepts are here to stay, and which will churn?

4•datsci_est_2015•1d ago•7 comments

Ask HN: Techniques for learning things quickly using coding agents?

3•throwaw12•1d ago•1 comments

Ask HN: Why did you learn Chinese?

5•alonsovm44•7h ago•1 comments

I feel like VSCode is falling apart

15•othmanosx•2d ago•16 comments

Ask HN: What home printer do you use/recommend?

19•niyazpk•4d ago•23 comments

Ask HN: How is GPU power draw measured at scale?

5•anax32•1d ago•2 comments

Decoupling Compute and Memory for Async GPUs

8•yiyingzhang•2d ago•2 comments

Ask HN: Why does every AI demo sound perfect but real world deployment always

7•VaderAi•1d ago•11 comments

Ask HN: What surprised you about Estonia e-Residency and running an Estonian OÜ?

81•jvilalta•2d ago•76 comments