{"id":36485,"date":"2025-01-12T10:00:27","date_gmt":"2025-01-12T02:00:27","guid":{"rendered":"https:\/\/17aitech.com\/?p=36485"},"modified":"2025-01-12T10:00:27","modified_gmt":"2025-01-12T02:00:27","slug":"rag%e6%96%b0%e7%aa%81%e7%a0%b4%ef%bc%9a%e5%9d%97%e7%8a%b6%e6%b3%a8%e6%84%8f%e5%8a%9b%e6%9c%ba%e5%88%b6%e5%ae%9e%e7%8e%b0%e8%b6%85%e4%bd%8e%e5%bb%b6%e8%bf%9f%e6%a3%80%e7%b4%a2%e5%a2%9e%e5%bc%ba","status":"publish","type":"post","link":"https:\/\/17aitech.com\/?p=36485","title":{"rendered":"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a"},"content":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-11-03-4\" target=\"_blank\">RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a<\/a><\/p>\n<p>\u5728\u5de5\u4e1a\u573a\u666f\u4e2d\uff0c\u5f80\u5f80\u4f1a\u5229\u7528\u68c0\u7d22\u6280\u672f\u6765\u4e3a\u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u6dfb\u52a0\u4e00\u4e9b\u6765\u81ea\u5916\u90e8<mark data-type=\"concepts\" data-id=\"700f9c0f-1e8b-4fde-8bae-6de39c13f022\">\u6570\u636e\u5e93<\/mark>\u7684\u77e5\u8bc6\u6587\u6863\uff0c\u4ece\u800c\u589e\u5f3a\u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u7684\u56de\u590d\u53ef\u4fe1\u5ea6\u3002\u4e00\u822c\u6765\u8bf4\uff0cRAG \u88ab\u516c\u8ba4\u662f\u6700\u6709\u6548\u7684\u4e3a LLM \u6ce8\u5165\u7279\u5b9a\u9886\u57df\u77e5\u8bc6\u7684\u65b9\u5f0f\u3002<\/p>\n<p>\u7136\u800c\uff0cRAG \u4e5f\u6709\u5176\u4e0d\u8db3\u4e4b\u5904\u3002\u901a\u5e38\u6765\u8bf4\uff0c\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4e3a\u786e\u4fdd\u80fd\u53ec\u56de\u5305\u542b\u6b63\u786e\u77e5\u8bc6\u7684\u6587\u6863\uff0c\u5bf9\u4e8e\u6bcf\u4e2a\u7528\u6237\u7684<mark data-type=\"concepts\" data-id=\"bf740558-f0f7-41a8-87a0-e695a97563b3\">\u67e5\u8be2<\/mark>\uff0c\u4f1a\u68c0\u7d22\u591a\u4e2a\u6587\u6863\uff08\u4e00\u822c\u5728 5 \u5230 30 \u4e2a\u4e4b\u95f4\uff09\uff0c\u5e76\u628a\u8fd9\u4e9b\u6587\u6863\u6574\u5408\u5230\u8f93\u5165\u63d0\u793a\u4e2d\u4f9b\u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u5904\u7406\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u8f93\u5165\u63d0\u793a\u7684\u5e8f\u5217\u957f\u5ea6\u589e\u52a0\uff0c\u4f7f\u5f97\u63a8\u7406\u6548\u7387\u5927\u5e45\u964d\u4f4e\u3002\u5177\u4f53\u6765\u8bb2\uff0c\u4ee5\u9996\u6b21\u751f\u6210\u6807\u8bb0\u7684\u65f6\u95f4\uff08TTFT\uff09\u6765\u8861\u91cf\uff0cRAG \u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u7684\u63a8\u7406\u5ef6\u8fdf\u6bd4\u975e RAG \u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u9ad8\u5f88\u591a\u3002<\/p>\n<p>\u7531\u4e8e<mark data-type=\"concepts\" data-id=\"700f9c0f-1e8b-4fde-8bae-6de39c13f022\">\u6570\u636e\u5e93<\/mark>\u4e2d\u540c\u4e00\u6587\u6863\u7ecf\u5e38\u4f1a\u88ab\u4e0d\u540c query \u53ec\u56de\uff0c\u5927\u5bb6\u5f88\u81ea\u7136\u7684\u4f1a\u60f3\u5230\uff1a\u662f\u5426\u80fd\u591f\u628a\u5df2\u7ecf\u7b97\u597d\u7684\u6587\u6863\u8868\u793a\uff08KV states\uff09\u5b58\u5728\u7f13\u5b58\u4e2d\uff0c\u4ee5\u4f9b\u4e8c\u6b21\u4f7f\u7528\uff1f\u5f88\u9057\u61be\uff0c \u7531\u4e8e\u81ea\u56de\u5f52<mark data-type=\"tech_methods\" data-id=\"60bee267-89dc-4606-ba24-6b3f7d1f6189\">\u6ce8\u610f\u529b\u673a\u5236<\/mark>\u7684\u9650\u5236\uff0c\u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u4e2d\u6bcf\u4e2a\u6587\u6863\u7684 KV States \u90fd\u4e0e\u4e0a\u4e0b\u6587\u76f8\u5173\uff0c\u6240\u4ee5\u9047\u5230\u65b0\u7684 query \u65f6\uff0c\u6a21\u578b\u5fc5\u987b\u91cd\u65b0\u7f16\u7801 KV states \u624d\u80fd\u786e\u4fdd\u51c6\u786e\u9884\u6d4b\u3002<\/p>\n<p>\u6700\u8fd1\uff0c\u8bba\u6587\u300aBlock-Attention for Efficient RAG\u300b\u4e3a\u68c0\u7d22\u589e\u5f3a (RAG) \u573a\u666f\u5b9e\u73b0\u4e86\u4e00\u79cd\u5757\u72b6<mark data-type=\"tech_methods\" data-id=\"60bee267-89dc-4606-ba24-6b3f7d1f6189\">\u6ce8\u610f\u529b\u673a\u5236<\/mark>\uff0cBlock-Attention\uff0c\u901a\u8fc7<mark data-type=\"tech_tasks\" data-id=\"70d1a967-90f5-47be-b22f-1e2c746f4914\">\u5206\u5757<\/mark>\u72ec\u7acb\u7f16\u7801\u68c0\u7d22\u5230\u7684\u6587\u6863\uff0c\u4f7f\u5f97\u6a21\u578b\u65e0\u9700\u91cd\u590d\u7f16\u7801\u8ba1\u7b97\u5df2\u7ecf\u5728\u5176\u4ed6 query \u4e2d\u5df2\u7ecf\u89c1\u8fc7\u7684\u6587\u6863\uff0c\u4ece\u800c\u5b9e\u73b0\u7ebf\u4e0a\u63a8\u7406\u6548\u7387\u7684\u6709\u6548\u63d0\u5347\u3002\u5728\u5b9e\u9a8c\u4e2d\uff0c\u8be5\u65b9\u6cd5\u80fd\u591f\u8ba9\u4f7f\u7528 RAG \u6280\u672f\u7684\u6a21\u578b\u4e0e\u4e0d\u4f7f\u7528 RAG \u7684\u6a21\u578b\u6709\u51e0\u4e4e\u4e00\u6837\u7684\u54cd\u5e94\u901f\u5ea6\u3002\u540c\u65f6\uff0c\u8be5\u65b9\u6cd5\u751a\u81f3\u8fd8\u80fd\u7565\u5fae\u63d0\u5347\u5728 RAG \u573a\u666f\u4e0b\u7684\u6a21\u578b<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u3002<\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png\"><\/a><\/p>\n<ul>\n<li>\u8bba\u6587\u6807\u9898\uff1aBlock-Attention for Efficient RAG<\/li>\n<li>\u8bba\u6587\u5730\u5740\uff1ahttps:\/\/arxiv.org\/pdf\/2409.15355<\/li>\n<\/ul>\n<p>\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u8be5\u65b9\u6cd5\u628a\u6574\u4e2a\u8f93\u5165\u5e8f\u5217\u5206\u6210\u82e5\u5e72\u4e2a block\uff0c\u6bcf\u4e2a block \u72ec\u7acb\u8ba1\u7b97\u5176 KV States\uff0c\u53ea\u6709\u6700\u540e\u4e00\u4e2a block \u80fd\u591f\u5173\u6ce8\u5176\u4ed6 blocks\uff08\u5728 RAG \u573a\u666f\u4e2d\uff0c\u6700\u540e\u4e00\u4e2a block \u5373\u7528\u6237\u7684\u8f93\u5165\uff09\u3002\u5728 RAG \u573a\u666f\u4e2d\uff0cblock-attention \u8ba9\u6a21\u578b\u4e0d\u518d\u9700\u8981\u91cd\u590d\u8ba1\u7b97\u5df2\u7ecf\u5728\u5176\u4ed6 query \u4e2d\u89c1\u8fc7\u7684\u6587\u6863\u3002<\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-536c8e5e5245473b06394bbe93a2c613.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-536c8e5e5245473b06394bbe93a2c613.png\"><\/a><\/p>\n<p>Block-Attention \u7684\u5b9e\u73b0\u5e76\u4e0d\u590d\u6742\uff1a1\uff09\u72ec\u7acb\u7f16\u7801\u9664\u6700\u540e\u4e00\u4e2a block \u4ee5\u5916\u7684\u6240\u6709 blocks\uff1b2\uff09\u4e3a\u6bcf\u4e2a blocks \u91cd\u65b0\u8ba1\u7b97\u4f4d\u7f6e\u7f16\u7801\uff1b3\uff09\u5c06\u6240\u6709 blocks \u62fc\u63a5\u5728\u4e00\u8d77\uff0c\u5e76\u8ba1\u7b97\u6700\u540e\u4e00\u4e2a block \u7684 KV State\u3002\u7136\u800c\u76f4\u63a5\u628a\u6a21\u578b\u4e0d\u52a0\u4efb\u4f55\u4fee\u6539\u7684\u4ece self-attention \u5207\u6362\u5230 block-attention \u4f1a\u5bfc\u81f4\u5927<mark data-type=\"tech_tasks\" data-id=\"bf35ef94-d956-4033-a533-0c0828308c36\">\u8bed\u8a00\u6a21\u578b<\/mark>\u61f5\u5708\uff0c\u6bd5\u7adf\u6a21\u578b\u5728\u8bad\u7ec3\u9636\u6bb5\u4ece\u6765\u6ca1\u89c1\u8fc7 block-attention \u65b9\u5f0f\u7f16\u7801\u7684\u8f93\u5165\u3002\u4e00\u4e2a<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u7684\u5bf9\u6bd4\u662f\uff0c\u76f4\u63a5\u5207\u6362\u4e3a block-attention \u4f1a\u8ba9 Llama3-8B \u5728\u56db\u4e2a RAG \u6570\u636e\u96c6\u4e0a\u7684\u5e73\u5747<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u7531 67.9% \u4e0b\u964d\u81f3 48.0%\u3002<\/p>\n<p>\u4e3a\u4e86\u8ba9\u6a21\u578b\u9002\u5e94 block-attention\uff0c\u4f5c\u8005\u4eec\u5bf9\u6a21\u578b\u8fdb\u884c\u4e86\u8fdb\u4e00\u6b65\u5fae\u8c03\uff0c\u4f5c\u8005\u4eec\u53d1\u73b0\u5728 100-1000 \u6b65\u5fae\u8c03\u4e4b\u540e\uff0c\u6a21\u578b\u5c31\u80fd\u5feb\u901f\u9002\u5e94 block-attention\uff0c\u5728\u56db\u4e2a RAG \u6570\u636e\u96c6\u4e0a\u7684\u5e73\u5747<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u6062\u590d\u81f3 68.4%\u3002\u53e6\u5916\uff0cblock-attention \u65b9\u5f0f\u7684\u6a21\u578b\u5728 KV cache \u6280\u672f\u7684\u5e2e\u52a9\u4e0b\uff0c\u80fd\u8fbe\u5230\u4e0e\u65e0 RAG \u6a21\u578b\u76f8\u4f3c\u7684\u6548\u7387\u3002\u5728\u7528\u6237\u8f93\u5165\u957f\u5ea6\u4e3a 50 \u800c prompt \u603b\u957f\u5ea6\u4e3a 32K \u7684\u6781\u7aef\u60c5\u51b5\u4e0b\uff0cblock-attention model \u7684\u9996\u5b57\u5ef6\u65f6\uff08Time To First Token, TTFT\uff09\u548c\u9996\u5b57\u6d6e\u70b9\u8fd0\u7b97\u6570\uff08FLOPs To Frist Token, (FLOPs-TFT\uff09\u5206\u522b\u80fd\u964d\u4f4e\u81f3 self-attention model \u7684 1.3% \u548c 0.2%\uff0c\u4e0e\u65e0 RAG \u6a21\u578b\u7684\u6548\u7387\u57fa\u672c\u6301\u5e73\u3002<\/p>\n<p><strong>\u63a8\u7406\u6d41\u7a0b<\/strong><\/p>\n<p>\u5173\u4e8e block-attention \u7684\u5b9e\u73b0\u548c\u8be6\u7ec6\u63a8\u5bfc\uff0c\u8bfb\u8005\u4eec\u8bf7\u79fb\u6b65\u539f\u6587\uff0c\u8fd9\u91cc\u4e3b\u8981\u4ecb\u7ecd block-attention \u6a21\u578b\u7684\u63a8\u7406\u6d41\u7a0b\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u9996\u5148\u4ece\u7f13\u5b58\u4e2d<mark data-type=\"concepts\" data-id=\"bf740558-f0f7-41a8-87a0-e695a97563b3\">\u67e5\u8be2<\/mark>\u5e76\u63d0\u53d6\u524d K \u4e2a block \u7684 KV states\u3002\u7136\u540e\uff0c\u6839\u636e\u6bcf\u4e2a block \u5728\u8f93\u5165\u5e8f\u5217\u4e2d\u7684\u4f4d\u7f6e\uff0c\u4f5c\u8005\u4eec\u5bf9\u6bcf\u4e2a block \u7684\u4f4d\u7f6e\u7f16\u7801\u8fdb\u884c\u4e86\u91cd\u65b0\u8ba1\u7b97\u3002\u5177\u4f53\u7684\u64cd\u4f5c\u8fc7\u7a0b\u8be6\u89c1\u8bba\u6587\u7684\u516c\u5f0f 3\u3002\u6700\u540e\uff0c\u6839\u636e\u524d k-1 \u4e2a KV States \u8ba1\u7b97\u6700\u540e\u4e00\u4e2a\u6570\u636e\u5757\u7684\u952e\u503c\u72b6\u6001\u4ee5\u53ca\u6a21\u578b\u7684\u8f93\u51fa\u3002<\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-2609f71555c970b71830fcdf5802482d.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-2609f71555c970b71830fcdf5802482d.png\"><\/a><\/p>\n<p><strong>\u5b9e\u9a8c\u7ed3\u679c<\/strong><\/p>\n<p>\u5728\u5b9e\u9a8c\u4e2d\uff0c\u4f5c\u8005\u4eec\u4e3b\u8981\u60f3\u63a2\u7a76\u4e24\u4e2a\u95ee\u9898\u7684\u7b54\u6848\uff1a1\uff09\u5728 RAG \u573a\u666f\u4e2d\uff0cblock-attention \u6a21\u578b\u80fd\u5426\u8fbe\u5230\u4e0e\u81ea self-attention \u76f8\u540c\u7684<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\uff1f2\uff09block-attention \u5bf9\u6548\u7387\u7684\u63d0\u5347\u6709\u591a\u5927\uff1f<\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-90213779faa02e24cf8de29b63296579.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-90213779faa02e24cf8de29b63296579.png\"><\/a><\/p>\n<p>\u5bf9\u4e8e\u95ee\u9898\u4e00\uff0c\u4e0a\u56fe\u7ed9\u51fa\u4e86\u7b54\u6848\u3002\u4f5c\u8005\u4eec\u6839\u636e\u5b9e\u9a8c\u7ed3\u679c\u7ed9\u51fa\u4e86\u4e09\u4e2a\u7ed3\u8bba\uff1a<\/p>\n<p>1. \u76f4\u63a5\u4ece self-attention \u5207\u6362\u5230 block-attention \u662f\u4e0d\u53ef\u53d6\u7684\uff0c\u56e0\u4e3a\u8fd9\u4f1a\u5bfc\u81f4<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u6025\u5267\u4e0b\u964d\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e Llama3-8B \u548c Mistral-7B \u6a21\u578b\uff0c\u53bb\u9664\u5fae\u8c03\u8fc7\u7a0b\u4f1a\u5bfc\u81f4\u5728\u6240\u6709\u56db\u4e2a<mark data-type=\"concepts\" data-id=\"308c3a45-0fee-4ec6-858e-85b15f440fc0\">\u57fa\u51c6<\/mark>\u4e0a\u5e73\u5747\u7edd\u5bf9\u6027\u80fd\u4e0b\u964d 21.99%\u3002<\/p>\n<p>2. \u7136\u800c\uff0c\u5982\u679c\u4f5c\u8005\u4eec\u5728\u5fae\u8c03\u9636\u6bb5\u4f7f\u7528\u5757<mark data-type=\"tech_methods\" data-id=\"60bee267-89dc-4606-ba24-6b3f7d1f6189\">\u6ce8\u610f\u529b\u673a\u5236<\/mark>\uff0c\u90a3\u4e48\u5f97\u5230\u7684\u6a21\u578b\u4e0e<mark data-type=\"concepts\" data-id=\"2ad7abdc-bbaa-4a33-b3ce-53f4fa019fdd\">\u81ea\u6ce8\u610f\u529b<\/mark>\u6a21\u578b\u7684\u6027\u80fd\u51e0\u4e4e\u76f8\u540c\uff0c\u751a\u81f3\u5728\u67d0\u4e9b\u6570\u636e\u96c6\u4e0a\u7565\u597d\u3002\u4f8b\u5982\uff0cMistral-7B-block-ft \u5728\u56db\u4e2a<mark data-type=\"concepts\" data-id=\"308c3a45-0fee-4ec6-858e-85b15f440fc0\">\u57fa\u51c6<\/mark>\u4e0a\u7684\u6027\u80fd\u4f18\u4e8e\u81ea\u56de\u5f52\u65b9\u5f0f\u8bad\u7ec3\u7684\u6a21\u578b\uff0c\u5e73\u5747<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u7531 59.6% \u4e0a\u5347\u81f3 62.3%\u3002<\/p>\n<p>3. \u4f4d\u7f6e\u91cd\u65b0\u7f16\u7801\u64cd\u4f5c\u5bf9\u4e8e block-attention \u6a21\u578b\u81f3\u5173\u91cd\u8981\u3002\u53bb\u9664\u5b83\u4f1a\u5bfc\u81f4\u6027\u80fd\u663e\u8457\u4e0b\u964d \u2014\u2014 \u5728\u56db\u4e2a\u6570\u636e\u96c6\u4e0a<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u5e73\u5747\u4e0b\u964d 4%\u3002<\/p>\n<p>\u5bf9\u4e8e\u6548\u7387\u7684\u63d0\u5347\uff0c\u4f5c\u8005\u4eec\u4e5f\u901a\u8fc7\u53e6\u4e00\u7ec4\u5b9e\u9a8c\u8fdb\u884c\u4e86\u9a8c\u8bc1\u3002\u4ed6\u4eec\u5c06\u7528\u6237\u7684\u95ee\u9898\u957f\u5ea6\u56fa\u5b9a\u5728 50 \u4e2a token\uff0c\u7136\u540e\u9010\u6e10\u589e\u52a0\u88ab\u53ec\u56de\u6587\u6863\u7684\u6570\u91cf\uff0c\u8ba9\u8f93\u5165\u5e8f\u5217\u603b\u957f\u5ea6\u4ece 50 \u4e00\u76f4\u589e\u52a0\u5230 32K\u3002\u6a21\u578b\u5728\u4e0d\u540c prompt \u957f\u5ea6\u4e0b\u7684\u9996\u5b57\u5ef6\u65f6\uff08Time To First Token, TTFT\uff09\u548c\u9996\u5b57\u6d6e\u70b9\u8fd0\u7b97\u6570\uff08FLOPs To Frist Token, (FLOPs-TFT\uff09\u5982\u4e0b\u56fe\u6240\u793a\u3002\u663e\u7136\uff0c\u52a0\u901f\u6548\u679c\u4ee4\u4eba\u6ee1\u610f\uff1a\u5f53\u8f93\u5165\u5e8f\u5217\u7684\u957f\u5ea6\u4e3a 512 \u65f6\uff0c\u4f7f\u7528 block-attention \u53ef\u4ee5\u5c06 TTFT \u51cf\u5c11 48%\uff0c\u5c06 FLOPs-TFT \u51cf\u5c11 90.1%\u3002\u968f\u7740\u603b\u957f\u5ea6\u7684\u589e\u52a0\uff0cblock-attention \u6a21\u578b\u7684 TTFT \u548c FLOPs-TTF \u4fdd\u6301\u57fa\u672c\u4e0d\u53d8\u7684\u8d8b\u52bf\u3002\u5f53\u603b\u957f\u5ea6\u8fbe\u5230 32K \u65f6\uff0c\u52a0\u901f\u6548\u679c\u53ef\u4ee5\u8fbe\u5230\u60ca\u4eba\u7684 98.7%\uff0cFLOPs-TFT \u7684\u6d88\u8017\u751a\u81f3\u51cf\u5c11\u4e86 99.8%\u3002\u4f5c\u8005\u4eec\u5c06\u6b64\u5b9e\u9a8c\u7ed3\u679c\u603b\u7ed3\u4e3a\uff1a\u201c\u6587\u672c\u8d8a\u957f\uff0cblock-attention \u8d8a\u91cd\u8981\u201d\u3002<\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-bc4f5d809aa4333301a3d7bf459de093.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-bc4f5d809aa4333301a3d7bf459de093.png\"><\/a><\/p>\n<p>\u4f5c\u8005\u4eec\u6700\u540e\u8fd8\u6307\u51fa\uff0cblock-attention \u5728\u5f88\u591a\u573a\u666f\u4e2d\u90fd\u6709\u7740\u91cd\u8981\u4f5c\u7528\uff0c\u5e76\u4e0d\u5c40\u9650\u4e8e RAG\u3002\u7531\u4e8e\u4e00\u4e9b\u4fdd\u5bc6\u539f\u56e0\uff0c\u4f5c\u8005\u4eec\u6682\u65f6\u65e0\u6cd5\u900f\u9732\u5728\u5176\u4ed6\u5de5\u4e1a\u5e94\u7528\u4e2d\u662f\u5982\u4f55\u4f7f\u7528\u5b83\u7684\u3002\u4f5c\u8005\u4eec\u671f\u5f85\u793e\u533a\u7684\u7814\u7a76\u4eba\u5458\u80fd\u591f\u8fdb\u4e00\u6b65\u63a2\u7d22 block-attention \u7684\u6f5c\u529b\uff0c\u5e76\u5c06\u5176\u5e94\u7528\u4e8e\u5408\u9002\u7684\u573a\u666f\u3002<\/p>\n<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-11-03-4\" target=\"_blank\">RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[27],"tags":[71],"class_list":["post-36485","post","type-post","status-publish","format-standard","hentry","category-news","tag-rag"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a - \u4e00\u8d77AI\u6280\u672f<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/17aitech.com\/?p=36485\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/17aitech.com\/?p=36485\",\"url\":\"https:\/\/17aitech.com\/?p=36485\",\"name\":\"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a - \u4e00\u8d77AI\u6280\u672f\",\"isPartOf\":{\"@id\":\"https:\/\/17aitech.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/17aitech.com\/?p=36485#primaryimage\"},\"image\":{\"@id\":\"https:\/\/17aitech.com\/?p=36485#primaryimage\"},\"thumbnailUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png\",\"datePublished\":\"2025-01-12T02:00:27+00:00\",\"author\":{\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d\"},\"breadcrumb\":{\"@id\":\"https:\/\/17aitech.com\/?p=36485#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/17aitech.com\/?p=36485\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/17aitech.com\/?p=36485#primaryimage\",\"url\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png\",\"contentUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/17aitech.com\/?p=36485#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/17aitech.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/17aitech.com\/#website\",\"url\":\"https:\/\/17aitech.com\/\",\"name\":\"\u4e00\u8d77AI\u6280\u672f\",\"description\":\"\u8ba9AI\u77e5\u8bc6\u89e6\u624b\u53ef\u53ca\",\"alternateName\":\"\u4e00\u8d77AI\u6280\u672f\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/17aitech.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d\",\"name\":\"AI\u5c0f\u52a9\u624b\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/image\/\",\"url\":\"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png\",\"contentUrl\":\"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png\",\"caption\":\"AI\u5c0f\u52a9\u624b\"},\"description\":\"\u8fd9\u4e2a\u4eba\u5f88\u61d2\uff0c\u4ec0\u4e48\u90fd\u6ca1\u6709\u7559\u4e0b\uff5e\",\"url\":\"https:\/\/17aitech.com\/?page_id=33738&user=3\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a - \u4e00\u8d77AI\u6280\u672f","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/17aitech.com\/?p=36485","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/17aitech.com\/?p=36485","url":"https:\/\/17aitech.com\/?p=36485","name":"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a - \u4e00\u8d77AI\u6280\u672f","isPartOf":{"@id":"https:\/\/17aitech.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/17aitech.com\/?p=36485#primaryimage"},"image":{"@id":"https:\/\/17aitech.com\/?p=36485#primaryimage"},"thumbnailUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png","datePublished":"2025-01-12T02:00:27+00:00","author":{"@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d"},"breadcrumb":{"@id":"https:\/\/17aitech.com\/?p=36485#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/17aitech.com\/?p=36485"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/?p=36485#primaryimage","url":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png","contentUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-a7cbce7b358cf77b22845c1915525c5a.png"},{"@type":"BreadcrumbList","@id":"https:\/\/17aitech.com\/?p=36485#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/17aitech.com\/"},{"@type":"ListItem","position":2,"name":"RAG\u65b0\u7a81\u7834\uff1a\u5757\u72b6\u6ce8\u610f\u529b\u673a\u5236\u5b9e\u73b0\u8d85\u4f4e\u5ef6\u8fdf\u68c0\u7d22\u589e\u5f3a"}]},{"@type":"WebSite","@id":"https:\/\/17aitech.com\/#website","url":"https:\/\/17aitech.com\/","name":"\u4e00\u8d77AI\u6280\u672f","description":"\u8ba9AI\u77e5\u8bc6\u89e6\u624b\u53ef\u53ca","alternateName":"\u4e00\u8d77AI\u6280\u672f","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/17aitech.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d","name":"AI\u5c0f\u52a9\u624b","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/#\/schema\/person\/image\/","url":"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png","contentUrl":"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png","caption":"AI\u5c0f\u52a9\u624b"},"description":"\u8fd9\u4e2a\u4eba\u5f88\u61d2\uff0c\u4ec0\u4e48\u90fd\u6ca1\u6709\u7559\u4e0b\uff5e","url":"https:\/\/17aitech.com\/?page_id=33738&user=3"}]}},"_links":{"self":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/36485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36485"}],"version-history":[{"count":0,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/36485\/revisions"}],"wp:attachment":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}