Live data from Hacker News

vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

vllm.ai

31–40 of 43 posts

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#31
post #25

I wonder how this compares to Flash Attention ( https://github.com/HazyResearch/flash-attention ), which is the other "memory aware" Attention project I'm aware of. I guess Flash Attention is more about utilizing memory GPU SRam correctly, where this is more about using the OS/CPU memory better?

The ideas are orthogonal, and can be used (theoretically) at the same time.

I believe you can slightly change the flash attention kernel to implement the same kernel of this page attention, since both of them work on the key/value cache at block level.

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#32
post #14

Earlier quoted context omitted.

this approach to managing KV cache can work with 4bit. imagine the speedup of pagedattention with quantization..

yep, it is agonistic to 4-bit. You can deploy a 4-bit model and still use vllm + pagedattention to double or even triple your serving throughput.

You mean like, theoretically, in the future? Or you mean today?

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#33

Reading between the lines, it sounds like some of the speedup comes from VRAM savings on an otherwise close to full GPU? This is definitely cool and needed, but it might not be so dramatic running 3-5 but quant on a less full GPU.

Yes, vLLM focuses on maximizing throughput when the VRAM is fully utilized. Nevertheless, I believe users can still benefit from vLLM even if they don't utilize the memory to its full capacity, because vLLM also includes other optimizations orthogonal to the PagedAttention (e.g., optimized CUDA kernels).

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#34

I wonder how this compares to Flash Attention ( https://github.com/HazyResearch/flash-attention ), which is the other "memory aware" Attention project I'm aware of. I guess Flash Attention is more about utilizing memory GPU SRam correctly, where this is more about using the OS/CPU memory better?

I think they are orthogonal. Flash attention is just another way to compute exact attention. This work mainly concerns how to resolve memory fragmentation across different sequences You still need to compute attention as is once you retrieve the needed key values

Thanks for the explanation! I believe the two ideas are basically orthogonal. FlashAttention reduces memory read/writes, while PagedAttention reduces memory waste.

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#38
post #20
post #5

Semi-related question: this page is full of little charts and diagrams. There are thousands of similar projects/sites/experiment sites with their own charts and diagrams. But it seems like there are always subtle-to-large differences in them that indicate they're made with totally different libraries. Are there just thousands of homebrewn non-standard chart & diagram builders out there? How does one even begin to pic…

We used matplotlib for the performance charts, and used a free website to convert google slides to the animation gifs.

Which "free website"?

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#39
post #11
post #9

Does this mean that GPT-4/65b level performance is closer to running on a say a m1/m2 with only 24+ gigabytes of ram?

Not really. vLLM optimizes the throughput of your LLM, but does not reduce the minimum required amount of resource to run your model.

But (in theory) - llama.cpp could implement similar approach to paging/memory and see a speedup for 4bit models on cpu?

Re: vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention

#40
post #27
post #15

Now do the same for image classifiers. I tried a few of them, they're just horribly slow. This is pretty outrageous considering the first robust image image classifiers appeared around 2007.

Doesn't work on image classifiers, because there's no KV cache. Also, standard image classifiers can do 100-1000 images/sec without any optimizations.

It's not really fast if makes intense usage of a GPU
Post reply on HN