{"id":36207,"date":"2025-01-07T14:00:12","date_gmt":"2025-01-07T06:00:12","guid":{"rendered":"https:\/\/17aitech.com\/?p=36207"},"modified":"2025-01-07T14:00:12","modified_gmt":"2025-01-07T06:00:12","slug":"%e5%8f%88%e5%bf%ab%e5%8f%88%e5%87%86%ef%bc%8c%e5%8d%b3%e6%8f%92%e5%8d%b3%e7%94%a8%ef%bc%81%e6%b8%85%e5%8d%8e8%e6%af%94%e7%89%b9%e9%87%8f%e5%8c%96attention%ef%bc%8c%e4%b8%a4%e5%80%8d%e5%8a%a0%e9%80%9f","status":"publish","type":"post","link":"https:\/\/17aitech.com\/?p=36207","title":{"rendered":"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01"},"content":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-10-19-3\" target=\"_blank\">\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01<\/a><\/p>\n<p><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png\"><\/a><\/p>\n<blockquote data-author-name=\"\" data-content-utf8-length=\"166\" data-source-title=\"\" data-type=\"2\" data-url=\"\">\n<section>\n<p>AIxiv\u4e13\u680f\u662f<mark data-type=\"institutions\" data-id=\"9e96434f-5827-41e3-9b3c-36d39bc0d446\">\u673a\u5668\u4e4b\u5fc3<\/mark>\u53d1\u5e03\u5b66\u672f\u3001\u6280\u672f\u5185\u5bb9\u7684\u680f\u76ee\u3002\u8fc7\u53bb\u6570\u5e74\uff0c<mark data-type=\"institutions\" data-id=\"9e96434f-5827-41e3-9b3c-36d39bc0d446\">\u673a\u5668\u4e4b\u5fc3<\/mark>AIxiv\u4e13\u680f\u63a5\u6536\u62a5\u9053\u4e862000\u591a\u7bc7\u5185\u5bb9\uff0c\u8986\u76d6\u5168\u7403\u5404\u5927\u9ad8\u6821\u4e0e\u4f01\u4e1a\u7684\u9876\u7ea7\u5b9e\u9a8c\u5ba4\uff0c\u6709\u6548\u4fc3\u8fdb\u4e86\u5b66\u672f\u4ea4\u6d41\u4e0e\u4f20\u64ad\u3002\u5982\u679c\u60a8\u6709\u4f18\u79c0\u7684\u5de5\u4f5c\u60f3\u8981\u5206\u4eab\uff0c\u6b22\u8fce\u6295\u7a3f\u6216\u8005\u8054\u7cfb\u62a5\u9053\u3002\u6295\u7a3f\u90ae\u7bb1\uff1aliyazhou@jiqizhixin.com\uff1bzhaoyunfeng@jiqizhixin.com<\/p>\n<\/section>\n<\/blockquote>\n<p><strong>\u8bba\u6587\u7b2c\u4e00\u4f5c\u8005\u5f20\u91d1\u6d9b\u6765\u81ea<mark data-type=\"institutions\" data-id=\"4349d6b9-40ff-4e23-a237-f9ace91c6c81\">\u6e05\u534e\u5927\u5b66<\/mark>\u8ba1\u7b97\u673a\u7cfb\uff0c\u8bba\u6587\u901a\u8baf\u4f5c\u8005\u9648\u952e\u98de\u526f\u6559\u6388\u53ca\u5176\u4ed6\u5408\u4f5c\u4f5c\u8005\u5747\u6765\u81ea<mark data-type=\"institutions\" data-id=\"4349d6b9-40ff-4e23-a237-f9ace91c6c81\">\u6e05\u534e\u5927\u5b66<\/mark>\u8ba1\u7b97\u673a\u7cfb\u3002<\/strong><\/p>\n<p>\u5927\u6a21\u578b\u4e2d\uff0c\u7ebf\u6027\u5c42\u7684\u4f4e\u6bd4\u7279<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\uff08\u4f8b\u5982 INT8, INT4\uff09\u5df2\u7ecf\u9010\u6b65\u843d\u5730\uff1b\u5bf9\u4e8e\u6ce8\u610f\u529b\u6a21\u5757\uff0c\u76ee\u524d\u51e0\u4e4e\u5404\u4e2a\u6a21\u578b\u90fd\u8fd8\u5728\u7528\u9ad8\u7cbe\u5ea6\uff08\u4f8b\u5982 FP16 \u6216 FP32\uff09\u7684\u6ce8\u610f\u529b\u8fd0\u7b97\u8fdb\u884c\u8bad\u7ec3\u548c\u63a8\u7406\u3002\u7136\u800c\uff0c\u968f\u7740\u5927\u578b\u6a21\u578b\u9700\u8981\u5904\u7406\u7684\u5e8f\u5217\u957f\u5ea6\u4e0d\u65ad\u589e\u52a0\uff0cAttention\uff08\u6ce8\u610f\u529b\u8fd0\u7b97\uff09\u7684\u65f6\u95f4\u5f00\u9500\u9010\u6e10\u6210\u4e3a\u7f51\u7edc\u4f18\u5316\u7684\u4e3b\u8981\u74f6\u9888\u3002<\/p>\n<p>\u4e3a\u4e86\u63d0\u9ad8\u6ce8\u610f\u529b\u8fd0\u7b97\u7684\u6548\u7387\uff0c<mark data-type=\"institutions\" data-id=\"4349d6b9-40ff-4e23-a237-f9ace91c6c81\">\u6e05\u534e\u5927\u5b66<\/mark>\u9648\u952e\u98de\u56e2\u961f\u63d0\u51fa\u4e86 8Bit \u7684 Attention\uff08SageAttention\uff09\u3002\u5b9e\u73b0\u4e86 2 \u500d\u4ee5\u53ca 2.7 \u500d\u76f8\u6bd4\u4e8e FlashAttention2 \u548c xformers \u7684<strong>\u5373\u63d2\u5373\u7528<\/strong>\u7684\u63a8\u7406\u52a0\u901f\uff0c\u4e14\u5728\u89c6\u9891\u3001\u56fe\u50cf\u3001<mark data-type=\"tech_tasks\" data-id=\"f02bb483-1c90-4010-849a-f2d7e3f0ad59\">\u6587\u672c\u751f\u6210<\/mark>\u7b49\u5927\u6a21\u578b\u4e0a<strong>\u5747\u6ca1\u6709\u7aef\u5230\u7aef\u7684\u7cbe\u5ea6\u635f\u5931<\/strong>\u3002<\/p>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-35f78588fd6918693701587c028327cf.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-35f78588fd6918693701587c028327cf.png\"><\/a><\/section>\n<ul>\n<li>\n<p>\u8bba\u6587\u6807\u9898\uff1aSageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration<\/p>\n<\/li>\n<li>\n<p>\u8bba\u6587\u94fe\u63a5\uff1ahttps:\/\/arxiv.org\/abs\/2410.02367<\/p>\n<\/li>\n<li>\n<p>\u5f00\u6e90\u4ee3\u7801\uff1ahttps:\/\/github.com\/thu-ml\/SageAttention<\/p>\n<\/li>\n<\/ul>\n<section><strong>\u5373\u63d2\u5373\u7528\u4e3e\u4f8b<\/strong><\/section>\n<section><\/section>\n<section>SageAttention \u53ef\u4ee5\u4e00\u884c\u4ee3\u7801\u8f7b\u677e\u66ff\u6362\u6389 torch \u4e2d\u5f53\u524d\u6700\u4f18\u7684 Attention \u63a5\u53e3\uff08scaled_dot_product_attention\uff09\uff0c\u5b9e\u73b0\u5373\u63d2\u5373\u7528\u7684\u63a8\u7406\u52a0\u901f\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-3d5c59ae9c8b87932f4c7a9f4ec1e6a9.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-3d5c59ae9c8b87932f4c7a9f4ec1e6a9.png\"><\/a><\/section>\n<section>\u5177\u4f53\u6765\u8bf4\uff0cSageAttention \u7684\u4f7f\u7528\u975e\u5e38\u65b9\u4fbf\uff0c\u4f7f\u7528 pip install sageattention \u540e\uff0c<\/section>\n<section>\u53ea\u9700\u8981\u5728\u6a21\u578b\u7684\u63a8\u7406\u811a\u672c\u524d\u52a0\u5165\u4ee5\u4e0b\u4e09\u884c\u4ee3\u7801\u5373\u53ef\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-999481c79528997e6d7ebf146c24af88.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-999481c79528997e6d7ebf146c24af88.png\"><\/a><\/section>\n<section>\u6548\u679c\u4e0a\uff0c\u4ee5\u5f00\u6e90<mark data-type=\"tech_tasks\" data-id=\"29c7c16c-acac-4bc9-87f4-279f97bf02fc\">\u89c6\u9891\u751f\u6210<\/mark>\u6a21\u578b CogvideoX \u4e3a\u4f8b\uff0c\u4f7f\u7528 SageAttention \u53ef\u4ee5\u7aef\u5230\u7aef\u52a0\u901f 35%\uff0c\u4e14\u751f\u6210\u7684\u89c6\u9891\u65e0\u635f\uff1a<a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA3MzI4MjgzMw==&amp;mid=2650939511&amp;idx=3&amp;sn=dabddded9914c9219df01f93576b1930&amp;chksm=84e7e409b3906d1fb9a8aaa0c9a15728843ee54a848039841ff183967c9ce9d6105dd7c55d45&amp;token=1703962737&amp;lang=zh_CN#rd\"><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-2c08ef714b393b8ec990517c006104ef.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-2c08ef714b393b8ec990517c006104ef.png\"><\/a><\/a><em><sup>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u5168\u7cbe\u5ea6 Attention<\/sup><\/em><sup>\u00a0<\/sup><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA3MzI4MjgzMw==&amp;mid=2650939511&amp;idx=3&amp;sn=dabddded9914c9219df01f93576b1930&amp;chksm=84e7e409b3906d1fb9a8aaa0c9a15728843ee54a848039841ff183967c9ce9d6105dd7c55d45&amp;token=1703962737&amp;lang=zh_CN#rd\"><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-21f6af44a11bb2ca6bc91a321521de0b.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-21f6af44a11bb2ca6bc91a321521de0b.png\"><\/a><\/a><\/section>\n<section><em><sup>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SageAttention<\/sup><\/em><\/section>\n<section><\/section>\n<section>\u63a5\u4e0b\u6765\uff0c\u5c06\u4ece\u80cc\u666f\u4e0e\u6311\u6218\uff0c\u6280\u672f\u65b9\u6848\uff0c\u4ee5\u53ca\u5b9e\u9a8c\u6548\u679c\u4ecb\u7ecd SageAttention\u3002<\/section>\n<section><\/section>\n<section><strong>\u80cc\u666f<\/strong><\/section>\n<section><\/section>\n<section>\u968f\u7740\u5927\u6a21\u578b\u9700\u8981\u5904\u7406\u7684\u5e8f\u5217\u957f\u5ea6\u8d8a\u6765\u8d8a\u957f\uff08\u6bd4\u5982 Llama3.1 \u652f\u6301 128K \u7684\u5e8f\u5217\u957f\u5ea6\uff09\uff0cAttention \u7684\u901f\u5ea6\u4f18\u5316\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\u3002\u4e0b\u56fe\u5c55\u793a\u4e86\u4e00\u4e2a\u6807\u51c6\u7684 Transformer \u6a21\u578b\u4e2d\u5404\u8fd0\u7b97\u968f\u7740\u5e8f\u5217\u957f\u5ea6\u53d8\u5316\u7684\u65f6\u95f4\u5360\u6bd4\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-f44722f357f3566b2e660448d9dfd3db.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-f44722f357f3566b2e660448d9dfd3db.png\"><\/a><\/section>\n<section><strong>\u6311\u6218<\/strong><\/section>\n<section><\/section>\n<section>\u4e3a\u4e86\u65b9\u4fbf\u6307\u4ee3\u6ce8\u610f\u529b\u5143\u7b97\u4e2d\u5305\u542b\u7684\u77e9\u9635\uff0c\u6211\u4eec\u5148\u56de\u987e\u4e00\u4e0b\u6ce8\u610f\u529b\u7684\u8ba1\u7b97\u516c\u5f0f\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-cd40fb7a56b8d6f20c69bc3138de8491.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-cd40fb7a56b8d6f20c69bc3138de8491.png\"><\/a><\/section>\n<section>\u5c06<mark data-type=\"tech_methods\" data-id=\"72b0bcc0-d8f9-4edd-919f-fa7c2560388c\">\u795e\u7ecf\u7f51\u7edc<\/mark>\u4e2d\u5404\u8fd0\u7b97\u7684\u6570\u503c\u7c7b\u578b\u4ece\u9ad8\u6bd4\u7279<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u81f3\u4f4e\u6bd4\u7279\u662f\u4e00\u79cd\u6709\u6548\u63d0\u5347\u8ba1\u7b97\u548c\u8bbf\u5b58\u6548\u7387\u7684\u65b9\u6cd5\u3002\u7136\u800c\uff0c\u7814\u7a76\u56e2\u961f\u53d1\u73b0\u76f4\u63a5\u5c06\u6ce8\u610f\u529b\u8fd0\u7b97\u4e2d\u7684 Q, K, P, V \u4ece FP16 <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u4e3a INT8 \u6216\u8005 FP8 \u540e\u5c06\u4f1a\u5bfc\u81f4\u5728\u51e0\u4e4e\u6240\u6709\u6a21\u578b\u548c\u4efb\u52a1\u4e0a\u90fd\u4f1a\u5f97\u5230\u6781\u5dee\u7684\u7ed3\u679c\uff0c\u4f8b\u5982\uff0c\u5728 Unidiffuser \u6587\u751f\u56fe\u6a21\u578b\u4e2d\uff0c\u4f1a\u5f97\u5230\u4e00\u5f20\u5b8c\u5168\u6a21\u7cca\u7684\u56fe\u50cf\uff1b\u5728 Llama2-7B \u8fdb\u884c\u56db\u9009\u4e00\u9009\u62e9\u9898\u4efb\u52a1\u4e0a\u5f97\u5230 25.5% \u7684<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-dc16390ccc16b220b0e7c4a98045448b.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-dc16390ccc16b220b0e7c4a98045448b.png\"><\/a><\/section>\n<section>\u7ecf\u8fc7\u4ed4\u7ec6\u5206\u6790\u540e\uff0c\u7814\u7a76\u56e2\u961f\u53d1\u73b0\u4e3b\u8981\u662f\u4e24\u4e2a\u539f\u56e0\u5bfc\u81f4\u4e86<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u6ce8\u610f\u529b\u7684\u4e0d\u51c6\u786e\uff1a<\/section>\n<section><\/section>\n<ul>\n<li>\n<p>\u5927\u591a\u89c6\u9891\u3001<mark data-type=\"tech_tasks\" data-id=\"ba1ea8a1-a705-4f89-8348-ec71bae840dc\">\u56fe\u50cf\u751f\u6210<\/mark>\u6a21\u578b\u4e2d\uff0c\u77e9\u9635 K \u8868\u73b0\u51fa\u4e86\u6781\u5f3a\u7684\u901a\u9053\u7ef4\u5ea6\u7684\u5f02\u5e38\u503c\u5206\u5e03\uff0c\u76f4\u63a5\u4f7f\u7528 INT8 \u6216\u8005 FP8 \u6570\u636e\u7c7b\u578b\u5bf9\u5176\u8fdb\u884c<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u4f1a\u5bfc\u81f4\u5de8\u5927\u7684\u8bef\u5dee\u3002<\/p>\n<\/li>\n<\/ul>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-0a19c7619a29bc818978ec3bb7e59100.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-0a19c7619a29bc818978ec3bb7e59100.png\"><\/a><\/section>\n<ul>\n<li>\n<p>\u5728\u6240\u6709\u6a21\u578b\u4e2d\uff0c\u5bf9\u77e9\u9635 P, V \u8fdb\u884c<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u4e0d\u80fd\u4fdd\u8bc1\u4e00\u4e2a\u6a21\u578b\u4e2d\u6240\u6709\u5c42\u7684\u7cbe\u5ea6\u3002\u4e0b\u8868\u5c55\u793a\u4e86\u5bf9 P, V <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u540e\uff0cLlama2-7B \u548c Unidiffuser \u6a21\u578b\u6240\u6709\u5c42\u4e2d\uff0c\u6700\u5dee\u60c5\u51b5\u7684\u5c42\u5bf9\u5e94\u7684<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u6ce8\u610f\u529b\u7684\u51c6\u786e\u5ea6\uff0c\uff08\u8be5\u51c6\u786e\u5ea6\u4e3a<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u6ce8\u610f\u529b\u76f8\u6bd4\u5168\u7cbe\u5ea6\u6ce8\u610f\u529b\u7684\u8bef\u5dee\uff09\uff0c\u53ef\u4ee5\u53d1\u73b0\u4e0d\u7ba1\u5bf9 P, V \u77e9\u9635\u8fdb\u884c\u4f55\u79cd 8Bit \uff08INT8\uff0cE4M3\uff0cE5M2\uff09<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\uff0c\u603b\u6709\u4e9b\u5c42\u7684<mark data-type=\"concepts\" data-id=\"8be77eae-12da-4e9e-9a88-b7f5bae98c2e\">\u51c6\u786e\u7387<\/mark>\u975e\u5e38\u5dee\uff0c\u5bfc\u81f4\u4e86\u7aef\u5230\u7aef\u6548\u679c\u7684\u4e0b\u964d\u3002<\/p>\n<\/li>\n<\/ul>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-30ce52c80d172f62987610428f0e8a11.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-30ce52c80d172f62987610428f0e8a11.png\"><\/a><\/section>\n<section><strong>\u6280\u672f\u65b9\u6848<\/strong><\/section>\n<section><\/section>\n<section>\u4e3a\u4e86\u89e3\u51b3\u4e0a\u8ff0\u7684\u4e24\u4e2a\u5173\u952e\u95ee\u9898\uff0c\u7814\u7a76\u56e2\u961f\u63d0\u51fa\u4e86\u5bf9\u5e94\u7684\u89e3\u51b3\u529e\u6cd5\u3002<\/section>\n<section><\/section>\n<ul>\n<li>\n<p>\u5bf9 K \u8fdb\u884c\u5e73\u6ed1\u5904\u7406\u3002SageAttention \u91c7\u7528\u4e86\u4e00\u4e2a\u7b80\u5355\u4f46\u975e\u5e38\u5b9e\u7528\u7684\u65b9\u6cd5\u6765\u6d88\u9664\u77e9\u9635 K \u7684\u5f02\u5e38\u503c\uff1aK = K \u2013 mean (K) \u5176\u4e2d mean (K) \u662f\u6cbf\u7740\u901a\u9053\u7ef4\u5ea6\u6c42\u5e73\u5747\u503c\u3002\u8fd9\u4e2a\u7b80\u5355\u7684\u505a\u6cd5\u4e0d\u4ec5\u4e0d\u4f1a\u5f71\u54cd\u6ce8\u610f\u529b\u8ba1\u7b97\u7684\u6b63\u786e\u6027 Softmax (QK^T) = Softmax (Q (K-mean (K))^T) \uff1b\u4e14\u5bf9\u6574\u4e2a Attention \u901f\u5ea6\u7684\u5f71\u54cd\u53ea\u6709 0.2%\uff1b\u540c\u65f6\u8fd8\u4fdd\u8bc1\u4e86<mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u540e\u7684\u6ce8\u610f\u529b\u8fd0\u7b97\u7684\u7cbe\u5ea6\uff1a<\/p>\n<\/li>\n<\/ul>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-6e0df1a3bb340449264353e95e369398.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-6e0df1a3bb340449264353e95e369398.png\"><\/a><\/section>\n<ul>\n<li>\n<p>\u5bf9 Q, K \u8fdb\u884c<mark data-type=\"tech_tasks\" data-id=\"70d1a967-90f5-47be-b22f-1e2c746f4914\">\u5206\u5757<\/mark> INT8 <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u3002\u5bf9\u4e8e\u77e9\u9635 Q, K\uff0cSageAttention \u91c7\u7528\u4e86\u4ee5 FlashAttention \u7684<mark data-type=\"tech_tasks\" data-id=\"70d1a967-90f5-47be-b22f-1e2c746f4914\">\u5206\u5757<\/mark>\u5927\u5c0f\u4e3a\u7c92\u5ea6\u7684 INT8 <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u3002\u8fd9\u662f\u56e0\u4e3a\uff1a1. \u5bf9 Q, K \u77e9\u9635\u8fdb\u884c INT8 <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\u76f8\u6bd4\u4e8e\u8fdb\u884c FP8 <mark data-type=\"tech_tasks\" data-id=\"e1abaa20-0000-4ff4-ad42-f97ca7fca4b1\">\u91cf\u5316<\/mark>\uff0c\u6ce8\u610f\u529b\u7684\u7cbe\u5ea6\u66f4\u9ad8\u30022. \u5728\u4e00\u4e9b\u5e38\u7528\u5361\u4e0a\uff0c\u6bd4\u5982 RTX4090\uff0cINT8 \u77e9\u9635\u4e58\u6cd5\uff08INT32 \u4e3a\u7d2f\u52a0\u5668\uff09\u7684\u901f\u5ea6\u662f FP8\uff08FP32 \u4e3a\u7d2f\u52a0\u5668\uff09\u7684\u4e24\u500d\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9 P, V \u91c7\u7528 FP16 \u6570\u636e\u7c7b\u578b\u7684\u77e9\u9635\u4e58\u6cd5\u7d2f\u52a0\u5668\u3002\u5bf9\u4e8e\u77e9\u9635 P, V\uff0cSageAttention \u91c7\u7528\u4e86\u4fdd\u7559 P, V \u4e3a FP16 \u7684\u7c7b\u578b\uff0c\u4f46\u8fdb\u884c\u77e9\u9635\u4e58\u6cd5\u65f6\u91c7\u7528 FP16 \u6570\u636e\u7c7b\u578b\u7684\u7d2f\u52a0\u5668\u3002\u8fd9\u662f\u56e0\u4e3a\uff1a1. PV \u77e9\u9635\u4e58\u6cd5\u7684\u6570\u503c\u8303\u56f4\u59cb\u7ec8\u5728 FP16 \u7684\u8868\u793a\u8303\u56f4\u5185\uff0c\u4e14\u7ecf\u8fc7\u5927\u91cf\u5b9e\u9a8c\u9a8c\u8bc1\uff0cFP16 \u4f5c\u4e3a\u7d2f\u52a0\u5668\u7684\u6570\u636e\u7c7b\u578b\u4e0d\u4f1a\u5e26\u6765\u4efb\u4f55\u7cbe\u5ea6\u635f\u5931\uff08\u89c1\u4e0b\u8868\uff09\u30022. \u5728\u4e00\u4e9b\u5e38\u7528\u5361\u4e0a\uff0c\u6bd4\u5982 RTX4090\uff0c\u4ee5 FP16 \u4e3a\u7d2f\u52a0\u5668\u6570\u636e\u7c7b\u578b\u7684\u77e9\u9635\u4e58\u6cd5\u7684\u901f\u5ea6\u662f FP32 \u4f5c\u4e3a\u7d2f\u52a0\u5668\u7684\u4e24\u500d\u3002<\/p>\n<\/li>\n<\/ul>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-e26905a6935c0bf386d7b4584569ff42.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-e26905a6935c0bf386d7b4584569ff42.png\"><\/a><\/section>\n<section>SageAttention \u7684\u6d41\u7a0b\u56fe\u53ca\u7b97\u6cd5\u5982\u4e0b\u6240\u793a\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-6d42fcd5894d8d757f5e2065d0360ae3.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-6d42fcd5894d8d757f5e2065d0360ae3.png\"><\/a><\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-14cfe8a0f278b518c566efe9a841627d.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-14cfe8a0f278b518c566efe9a841627d.png\"><\/a><\/section>\n<section><strong>\u5b9e\u9a8c\u6548\u679c<\/strong><\/section>\n<section><\/section>\n<section>SageAttention \u5b9e\u73b0\u4e86\u5e95\u5c42\u7684 GPU Kernel\uff0c\u5728\u7b97\u5b50\u901f\u5ea6\u4ee5\u53ca\u5404\u4e2a\u6a21\u578b\u7684\u7aef\u5230\u7aef\u7cbe\u5ea6\u4e0a\u90fd\u6709\u5341\u5206\u4e0d\u9519\u7684\u8868\u73b0\u3002<\/section>\n<section><\/section>\n<section>\u5177\u4f53\u6765\u8bf4\uff0c\u7b97\u5b50\u901f\u5ea6\u76f8\u6bd4\u4e8e FlashAttention2 \u548c xformers \u6709 2.1 \u4ee5\u53ca 2.7 \u500d\u7684\u52a0\u901f\u3002\u4ee5\u4e0b 4 \u5f20\u56fe\u5c55\u793a\u4e86\u5728 RTX4090 \u4e0a\uff0c\u4e0d\u540c\u7684\u5e8f\u5217\u957f\u5ea6\u4e0b SageAttention \u7684\u5404\u79cd Kernel \u4e0e\u5176\u4ed6\u65b9\u6cd5\u7684\u901f\u5ea6\u6bd4\u8f83\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-f75c3b96d1f69b19ec874b0112c04026.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-f75c3b96d1f69b19ec874b0112c04026.png\"><\/a><\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-a10d6df6568ab5f9c0391144e22b791d.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-a10d6df6568ab5f9c0391144e22b791d.png\"><\/a><\/section>\n<section>\u4ee5\u4e0b 4 \u5f20\u56fe\u5c55\u793a\u4e86\u5728 RTX3090 \u4e0a\uff0c\u4e0d\u540c\u7684\u5e8f\u5217\u957f\u5ea6\u4e0b SageAttention \u7684\u5404\u79cd Kernel \u4e0e\u5176\u4ed6\u65b9\u6cd5\u7684\u901f\u5ea6\u6bd4\u8f83\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-382ecb3701660f1f107c9875440f7caa.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-382ecb3701660f1f107c9875440f7caa.png\"><\/a><\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-07ba7aa0f83049ccfbcfdd1846b97424.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-07ba7aa0f83049ccfbcfdd1846b97424.png\"><\/a><\/section>\n<section>\u4e0b\u8868\u5c55\u793a\u4e86\u5728 RTX4090 \u4e0a\uff0c\u5404\u6a21\u578b\u4e2d\u7684\u6ce8\u610f\u529b\u6a21\u5757\u4e2d SageAttention \u76f8\u6bd4\u4e8e\u4f7f\u7528\u6a21\u578b\u539f\u59cb\u7684\u6ce8\u610f\u529b\u7684\u52a0\u901f\u6bd4\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-a96079ad40edfc15f790ed12f505dfe0.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-a96079ad40edfc15f790ed12f505dfe0.png\"><\/a><\/section>\n<section>\u771f\u5b9e\u4efb\u52a1\u7684\u7cbe\u5ea6\u4e0a\uff0c\u4e0b\u8868\u5c55\u793a\u4e86 SageAttention \u5728\u89c6\u9891\u3001\u56fe\u50cf\u3001<mark data-type=\"tech_tasks\" data-id=\"f02bb483-1c90-4010-849a-f2d7e3f0ad59\">\u6587\u672c\u751f\u6210<\/mark>\u7b49\u5927\u6a21\u578b\u4e0a\u5747\u6ca1\u6709\u7aef\u5230\u7aef\u7684\u7cbe\u5ea6\u635f\u5931\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-40315d84b2959178a44bf7f18f06d22b.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-40315d84b2959178a44bf7f18f06d22b.png\"><\/a><\/section>\n<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-10-19-3\" target=\"_blank\">\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05 [&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":[68],"class_list":["post-36207","post","type-post","status-publish","format-standard","hentry","category-news","tag-68"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01 - \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=36207\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207\"},\"author\":{\"name\":\"AI\u5c0f\u52a9\u624b\",\"@id\":\"https:\\\/\\\/17aitech.com\\\/#\\\/schema\\\/person\\\/60225458499e817ae0af73e67e440b9d\"},\"headline\":\"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01\",\"datePublished\":\"2025-01-07T06:00:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207\"},\"wordCount\":157,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/17aitech.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/frc-493343e157774cf8daf7e4c01567dc1a.png\",\"keywords\":[\"\u5927\u6a21\u578b\"],\"articleSection\":[\"\u884c\u4e1a\u8d44\u8baf\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/17aitech.com\\\/?p=36207#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207\",\"url\":\"https:\\\/\\\/17aitech.com\\\/?p=36207\",\"name\":\"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01 - \u4e00\u8d77AI\u6280\u672f\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/17aitech.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/frc-493343e157774cf8daf7e4c01567dc1a.png\",\"datePublished\":\"2025-01-07T06:00:12+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/#\\\/schema\\\/person\\\/60225458499e817ae0af73e67e440b9d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/17aitech.com\\\/?p=36207\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#primaryimage\",\"url\":\"https:\\\/\\\/17aitech.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/frc-493343e157774cf8daf7e4c01567dc1a.png\",\"contentUrl\":\"https:\\\/\\\/17aitech.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/frc-493343e157774cf8daf7e4c01567dc1a.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/17aitech.com\\\/?p=36207#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/17aitech.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01\"}]},{\"@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\":\"\\\/\\\/17aitech.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/robot_3.png\",\"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":"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01 - \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=36207","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/17aitech.com\/?p=36207#article","isPartOf":{"@id":"https:\/\/17aitech.com\/?p=36207"},"author":{"name":"AI\u5c0f\u52a9\u624b","@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d"},"headline":"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01","datePublished":"2025-01-07T06:00:12+00:00","mainEntityOfPage":{"@id":"https:\/\/17aitech.com\/?p=36207"},"wordCount":157,"commentCount":0,"image":{"@id":"https:\/\/17aitech.com\/?p=36207#primaryimage"},"thumbnailUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png","keywords":["\u5927\u6a21\u578b"],"articleSection":["\u884c\u4e1a\u8d44\u8baf"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/17aitech.com\/?p=36207#respond"]}]},{"@type":"WebPage","@id":"https:\/\/17aitech.com\/?p=36207","url":"https:\/\/17aitech.com\/?p=36207","name":"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01 - \u4e00\u8d77AI\u6280\u672f","isPartOf":{"@id":"https:\/\/17aitech.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/17aitech.com\/?p=36207#primaryimage"},"image":{"@id":"https:\/\/17aitech.com\/?p=36207#primaryimage"},"thumbnailUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png","datePublished":"2025-01-07T06:00:12+00:00","author":{"@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d"},"breadcrumb":{"@id":"https:\/\/17aitech.com\/?p=36207#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/17aitech.com\/?p=36207"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/?p=36207#primaryimage","url":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png","contentUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/10\/frc-493343e157774cf8daf7e4c01567dc1a.png"},{"@type":"BreadcrumbList","@id":"https:\/\/17aitech.com\/?p=36207#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/17aitech.com\/"},{"@type":"ListItem","position":2,"name":"\u53c8\u5feb\u53c8\u51c6\uff0c\u5373\u63d2\u5373\u7528\uff01\u6e05\u534e8\u6bd4\u7279\u91cf\u5316Attention\uff0c\u4e24\u500d\u52a0\u901f\u4e8eFlashAttention2\uff0c\u5404\u7aef\u5230\u7aef\u4efb\u52a1\u5747\u4e0d\u6389\u70b9\uff01"}]},{"@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":"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png","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\/36207","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=36207"}],"version-history":[{"count":0,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/36207\/revisions"}],"wp:attachment":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}