This is a Triton implementation of the Flash Attention v2 algorithm from Tri Dao (https://tridao.me/publications/flash2/flash2.pdf) ...
自然,这个 LLM 的自回归 decode 吃掉了大部分计算。 从这个角度看,优化 TTS 推理乍一看和优化 LLM 推理很像:两者都有 autoregressive decoding、KV cache、CUDA Graph、continuous batching。 但实际上,TTS serving 远不止一条 text-token 的 decode loop。