Optimize the Cob, Then the Kernel: Optimizing Beam Search for Generative Recommendation Inference
Paper · https://arxiv.org/abs/2611.23339
arXiv:2611.23339v1 Announce Type: new Abstract: Generative recommendation (GR) inference differs substantially from conventional LLM serving, featuring long input sequences, wide beam search, and only a few fixed output tokens. Existing LLM serving engines such as vLLM process beams as batched independent sequences, causing redundant KV cache accesses over the shared prompt prefix. Furthermore, vLLM executes each beam search generation step as a separate engine invocation, incurring host-side beam processing overhead between decoding steps and substantial runtime KV block management in PagedAttention. Using Tree Attention, we concatenate beams along the sequence dimension to eliminate redundant KV accesses, and further optimize execution through pre-generated partial-attention masks, static KV cache allocation, loop-unrolled generation dispatch, TorchAir graph compilation, automatic operator fusion, and vocabulary-constrained decoding. Without the use of custom kernels, our approach reduces end-to-end latency by up to 25x over vLLM on Ascend NPUs, and achieves generation latency comparable to a SOTA solution using custom kernels, showing that the generation pipeline should be optimized holistically before resorting to custom kernel development.
First seen by Oriel on .
AI summary
This paper presents a holistic beam-search optimization for generative recommendation inference that reduces latency by up to 25× over vLLM on Ascend NPUs without custom kernels.
- Generative recommendation inference combines long inputs, wide beam searches, and few output tokens, unlike conventional LLM serving.
- vLLM redundantly accesses shared prompt-prefix KV caches and invokes the engine separately for each beam-search generation step.
- Tree Attention concatenates beams along the sequence dimension, eliminating redundant KV accesses across shared prefixes.
- Pre-generated masks, static KV allocation, loop-unrolled dispatch, TorchAir graph compilation, operator fusion, and vocabulary-constrained decoding reduce overhead.
- The approach achieves latency comparable to a state-of-the-art custom-kernel solution, suggesting holistic pipeline optimization should precede custom kernel development.
#generative recommendation #beam search #kv cache #ascend npus
Generated by gpt-5.6-sol. Check the original for details.
Aliases
| Source | External ID | URL |
|---|---|---|
| arXiv AI Papers | oai:arXiv.org:2611.23339v1 | https://arxiv.org/abs/2611.23339 Read discussion |