姜慧强-长文本 LLMs 推理优化:动态稀疏性算法的应用实践.pdf

编号:182409 PDF 29页 6.28MB 下载积分:VIP专享
下载报告请您先登录!

姜慧强-长文本 LLMs 推理优化:动态稀疏性算法的应用实践.pdf

1、长文本长文本 LLMs LLMs 推理优化:动推理优化:动态稀疏性算法的应用实践态稀疏性算法的应用实践演讲人:姜慧强目 录01LLMs Inference优化方法02长文本推理挑战03观察与解决方案04总结和未来展望01LLMs Inference优化方法LLMs Inference优化方法Resummarized based on https:/arxiv.org/abs/2312.15234.LLMs Inference优化方法Q-SparseBitNetYOCO02长文本推理挑战Long-context will unlock intelligent applicationsRepo-l

2、evel Debugging/QASelf-play ReasoningLong-video Understanding/GenerationLong-context LLMs Inference Bottleneck in Pre-fillingO*1.5=21.78 mins=60+A100*20s TTFTLong Prefilling Latency,30 minutes to process 1M tokens on an A100 for an 8B LLM.How to Optimal the Attention FLOPsLong-context LLMs Inference

3、Bottleneck in KV CacheKV Cache Storage Issue,Storing 512K tokens requires 62GB of GPU memory in fp16.03观察与解决方案Observation 1:Attention is Dynamically Sparse Figure.The dynamic sparsity in attention.(a)How much attention scores can top-k(k=4096)columns cover in a 128k context.(b)Less attention scores

4、are retrieved when reusing the top-k indices from another examples,indicating its dynamic nature.Visualizations are based on LLaMa-3-8B with a single A100.in decodingin prefillingFigure.(c)The dynamic sparsity of each layer and head in Llama-3-8B model in the KV retrieval test of 100k tokens.The blu

5、e curve shows that dynamically selecting top-1000 critical tokens achieves an 89%average recovery ratio,indicating high attention sparsity.In contrast,the orange curve shows that statically using the initial top-1000 critical tokens drops the ratio to 71%.(c)Dynamically sparsity in decoding.(a)Atten

6、tion is sparse.(b)Sparsity of attention is dynamic.Sparse Attention via Vector RetrievalAttention from retrieval perspective=1expOut-of-Distribution degrades the effectiveness of ANNSRetrieve key by an inner-product distance(a)Scanned Vectors(b)Mahalanobis DistanceRetrievalAttentionRetrievalAttentio

友情提示

1、下载报告失败解决办法
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站报告下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

本文(姜慧强-长文本 LLMs 推理优化:动态稀疏性算法的应用实践.pdf)为本站 (张5G) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。
客服
商务合作
小程序
服务号
折叠