{"id":39597,"date":"2025-03-23T21:02:35","date_gmt":"2025-03-23T13:02:35","guid":{"rendered":"https:\/\/17aitech.com\/?p=39597"},"modified":"2025-03-23T21:02:35","modified_gmt":"2025-03-23T13:02:35","slug":"%e3%80%8c%e6%b3%a8%e6%84%8f%e5%8a%9b%e5%ae%9e%e9%99%85%e4%b8%8a%e6%98%af%e5%af%b9%e6%95%b0%e7%9a%84%e3%80%8d%ef%bc%9f%e4%b8%83%e5%b9%b4%e5%89%8d%e7%9a%84transformer%e8%bf%98%e6%9c%89%e6%96%b0%e5%8f%91","status":"publish","type":"post","link":"https:\/\/17aitech.com\/?p=39597","title":{"rendered":"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e"},"content":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2025-03-23-4\" target=\"_blank\">\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e<\/a><\/p>\n<section data-mpa-powered-by=\"yiban.io\" data-style='-webkit-tap-highlight-color: transparent; margin-bottom: 0px; outline: 0px; text-shadow: transparent 0px 0px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px; background-color: rgb(255, 255, 255); letter-spacing: 0.544px; text-wrap: wrap; caret-color: rgb(34, 34, 34); font-family: \"Helvetica Neue\", Helvetica, \"Hiragino Sans GB\", \"Microsoft YaHei\", Arial, sans-serif; visibility: visible; line-height: 27.2px; color: rgb(163, 163, 163) !important;'>\n<section data-style=\"-webkit-tap-highlight-color: transparent; outline: 0px; text-shadow: transparent 0px 0px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px; visibility: visible; line-height: 27.2px;\">\n<section data-style=\"-webkit-tap-highlight-color: transparent; outline: 0px; text-shadow: transparent 0px 0px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px; visibility: visible; line-height: 27.2px;\">\n<section data-color=\"rgb(117, 117, 118)\" data-custom=\"rgb(117, 117, 118)\" data-id=\"85660\" data-style=\"-webkit-tap-highlight-color: transparent; outline: 0px; text-shadow: transparent 0px 0px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px; border-width: 0px; border-style: initial; border-color: currentcolor; visibility: visible; line-height: 27.2px;\">\n<section data-style=\"-webkit-tap-highlight-color: transparent; margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; outline: 0px; text-shadow: transparent 0px 0px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px; border-top: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204); border-right-style: none; border-left-style: none; text-decoration: inherit; visibility: visible; line-height: 27.2px;\">\n<section>\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4eca\u5929\uff0c\u4e00\u7bc7\u535a\u5ba2\u518d\u6b21\u6380\u8d77\u4e86AI\u793e\u533a\u5bf9\u6ce8\u610f\u529b\u673a\u5236\u7684\u8ba8\u8bba\u3002<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png\"><\/a><\/section>\n<section>\u4f5c\u8005\u8ba4\u4e3a\uff0cTransformers \u4e2d\u5b9e\u73b0\u7684\u6ce8\u610f\u529b\u673a\u5236\uff0c\u5728\u8ba1\u7b97\u590d\u6742\u5ea6\u4e0a\u5e94\u8be5\u88ab\u89c6\u4e3a\u5bf9\u6570\u7ea7\u522b\u7684\u3002<\/section>\n<section><\/section>\n<section>\u8fd9\u7bc7\u535a\u5ba2\uff0c\u8fd8\u5f97\u5230\u4e86 Karpathy \u7684\u9ad8\u5ea6\u80af\u5b9a\uff1a<\/section>\n<section><\/section>\n<blockquote data-author-name=\"\" data-content-utf8-length=\"201\" data-source-title=\"\" data-type=\"2\" data-url=\"\">\n<section>\n<section>\n<section>\u6709\u65f6\u6211\u4f1a\u5728\u60f3\u8c61\u4e2d\u7684\u795e\u7ecf\u7f51\u7edc\u5b8c\u6574\u8ba1\u7b97\u56fe\u4e2d\u5c06\u5176\u63cf\u8ff0\u4e3a\u300c\u5e7f\u5ea6\u662f\u514d\u8d39\u7684\uff0c\u6df1\u5ea6\u662f\u6602\u8d35\u7684\u300d\u3002<\/section>\n<section><\/section>\n<section>\u636e\u6211\u6240\u77e5\uff0c\u8fd9\u9996\u5148\u662f Transformer \u80cc\u540e\u7684\u4e3b\u8981\u89c1\u89e3 \/ \u7075\u611f\u3002\u6211\u7b2c\u4e00\u6b21\u771f\u6b63\u53d7\u5230\u5b83\u7684\u9707\u64bc\u662f\u5728\u5f88\u4e45\u4ee5\u524d\u6211\u8bfb\u5230 Neural GPU \u8bba\u6587\u7684\u65f6\u5019\uff08https:\/\/arxiv.org\/abs\/1511.08228\uff09\u3002<\/section>\n<section><\/section>\n<section>\u53e6\u5916\uff0c\u5728\u300c\u4ece\u6bd4\u7279\u5230\u667a\u80fd\u300d\u4e2d\u4e3a\u4ec0\u4e48\u8fd8\u8981\u5305\u542b python\uff1f\u5220\u9664 python\uff0c\u6211\u8ba4\u4e3a\u4f60\u53ef\u4ee5\u5c06\u5176\u51cf\u5c11\u7ea6 10 \u500d\uff0c\u5c31\u50cf llmc \u4e00\u6837\u3002<\/section>\n<\/section>\n<\/section>\n<\/blockquote>\n<section><\/section>\n<section>\u6211\u4eec\u77e5\u9053\uff0c\u6807\u51c6\u7684\u6ce8\u610f\u529b\u673a\u5236\uff08\u5982 Transformer \u4e2d\u7684\u81ea\u6ce8\u610f\u529b\uff09\u8ba1\u7b97\u6b65\u9aa4\u5982\u4e0b\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-fdfaddda57be73f764dd5dba1d648e4e.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-fdfaddda57be73f764dd5dba1d648e4e.png\"><\/a><\/section>\n<section>\u5176\u590d\u6742\u5ea6\u4e3b\u8981\u6765\u6e90\u4e8e\uff1a<\/section>\n<section><\/section>\n<ul>\n<li>\n<section>\u70b9\u79ef\u8ba1\u7b97\uff1aQK^\u22a4 \u7684\u77e9\u9635\u4e58\u6cd5\uff0c\u590d\u6742\u5ea6\u4e3a O (n^2d)\uff0c\u5176\u4e2d n \u662f\u5e8f\u5217\u957f\u5ea6\uff0cd \u662f\u7279\u5f81\u7ef4\u5ea6\u3002<\/section>\n<\/li>\n<li>\n<section>Softmax \u5f52\u4e00\u5316\uff1a\u5bf9\u6bcf\u4e2a\u4f4d\u7f6e\u7684\u6ce8\u610f\u529b\u6743\u91cd\u8fdb\u884c\u5f52\u4e00\u5316\uff0c\u590d\u6742\u5ea6\u4e3a O (n^2)\u3002<\/section>\n<\/li>\n<\/ul>\n<section><\/section>\n<section>\u4e00\u822c\u6765\u8bf4\uff0c\u7814\u7a76\u8005\u8ba4\u4e3a\u603b\u590d\u6742\u5ea6\u968f\u7740\u5e8f\u5217\u957f\u5ea6 n \u5448\u5e73\u65b9\u589e\u957f\uff0c\u8fd9\u4e5f\u662f\u6807\u51c6 Transformer \u96be\u4ee5\u5904\u7406\u957f\u5e8f\u5217\u7684\u6838\u5fc3\u74f6\u9888\u3002<\/section>\n<section><\/section>\n<section>\u800c\u8fd9\u7bc7\u535a\u5ba2\uff0c\u5374\u63d0\u51fa\u4e86\u53e6\u5916\u4e00\u4e2a\u5168\u65b0\u7684\u89c6\u89d2\u3002<\/section>\n<section><\/section>\n<section>\u5173\u4e8e\u5982\u4f55\u7406\u89e3\u8fd9\u4e00\u89c2\u70b9\uff0c\u6211\u4eec\u770b\u770b\u535a\u5ba2\u5185\u5bb9\u4fbf\u77e5\u3002<\/section>\n<section><\/section>\n<ul>\n<li>\n<section>\u535a\u5ba2\u94fe\u63a5\uff1ahttps:\/\/supaiku.com\/attention-is-logarithmic<\/section>\n<\/li>\n<\/ul>\n<section><\/section>\n<section>\u4ee5\u4e0b\u662f\u535a\u5ba2\u5185\u5bb9\uff1a<\/section>\n<section><\/section>\n<section>\u65f6\u95f4\u590d\u6742\u5ea6\u662f\u8861\u91cf\u7b97\u6cd5\u5feb\u6162\u6700\u5e38\u7528\u7684\u6807\u51c6\u3002\u5728 20 \u4e16\u7eaa 80 \u5e74\u4ee3\uff0c\u90a3\u65f6\u5019\u8ba1\u7b97\u673a\u5927\u591a\u53ea\u6709\u4e00\u4e2a\u6838\u5fc3\uff0c\u5927\u5bb6\u8fd8\u4e0d\u77e5\u9053\u4ec0\u4e48\u662f\u5355\u6307\u4ee4\u591a\u6570\u636e\uff08SIMD\uff09\u6280\u672f\uff0c\u6240\u4ee5\u7528\u65f6\u95f4\u590d\u6742\u5ea6\u6765\u8bc4\u4f30\u7b97\u6cd5\u57fa\u672c\u662f\u5408\u7406\u7684\u3002<\/section>\n<section><\/section>\n<section>\u4f46\u73b0\u5728\u662f 2025 \u5e74\uff0c\u5355\u6838\u8ba1\u7b97\u673a\u5df2\u7ecf\u5f88\u5c11\u89c1\u4e86\uff0c\u5c31\u8fde\u667a\u80fd\u624b\u673a\u90fd\u6709 4 \u5230 8 \u4e2a\u6838\u5fc3\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ea\u7528\u65f6\u95f4\u590d\u6742\u5ea6\u6765\u8861\u91cf\u7b97\u6cd5\u7684\u5feb\u6162\u5c31\u4e0d\u591f\u5168\u9762\u4e86\u3002<\/section>\n<section><\/section>\n<section>\u4e3e\u4e2a\u4f8b\u5b50\u6765\u8bf4\uff0c\u4e00\u4e2a\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a O (n\u00b3) \u4f46\u80fd\u591f\u5e76\u884c\u7684\u7b97\u6cd5\uff0c\u548c\u4e00\u4e2a\u5fc5\u987b\u6309\u987a\u5e8f\u6267\u884c\u7684\u7b97\u6cd5\uff0c\u5355\u4ece\u65f6\u95f4\u590d\u6742\u5ea6\u4e0a\u770b\u4e0d\u51fa\u6765\u5b83\u4eec\u7684\u533a\u522b\u3002\u800c\u4e14\uff0c\u6709\u4e9b\u7b97\u6cd5\u5929\u751f\u5c31\u662f\u5e76\u884c\u7684\uff0c\u6bd4\u5982\u7ebf\u6027\u4ee3\u6570\uff0c\u4f46\u4eba\u4eec\u8fd8\u5728\u7528\u65f6\u95f4\u590d\u6742\u5ea6\u6765\u63cf\u8ff0\u5b83\u4eec\uff0c\u8fd9\u5176\u5b9e\u662f\u5f88\u8352\u8c2c\u7684\u3002<\/section>\n<section><\/section>\n<section>\u6211\u4eec\u9700\u8981\u4e00\u79cd\u66f4\u597d\u7684\u65b9\u5f0f\u6765\u8861\u91cf\u7b97\u6cd5\u7684\u590d\u6742\u5ea6\u3002\u300cwork-depth \u6a21\u578b\u300d\u5206\u6790\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u601d\u8def\u3002\u5b83\u4e0d\u4ec5\u5173\u6ce8\u8f93\u5165\u5927\u5c0f\u5bf9\u5e94\u7684\u64cd\u4f5c\u6570\u91cf\uff0c\u8fd8\u80fd\u4ece\u7406\u8bba\u4e0b\u9650\u7684\u89d2\u5ea6\u601d\u8003\u7b97\u6cd5\u7684\u590d\u6742\u5ea6\u3002<\/section>\n<section><\/section>\n<section>\u6211\u4eec\u4e0d\u4ec5\u8981\u8003\u8651\u7b97\u6cd5\u6267\u884c\u7684\u539f\u59cb\u64cd\u4f5c\u6570\u91cf\uff08\u5373\u300cwork\u300d\uff09\uff0c\u66f4\u8981\u5173\u6ce8\u8ba1\u7b97\u56fe\u76f8\u5bf9\u4e8e\u8f93\u5165\u5927\u5c0f\u7684\u300cdepth\u300d\uff0c\u4e5f\u5c31\u662f\u4e0d\u53ef\u5e76\u884c\u7684\u987a\u5e8f\u64cd\u4f5c\u7684\u6700\u5c0f\u6570\u91cf\u3002\u56e0\u4e3a\u8fd9\u4e9b\u987a\u5e8f\u64cd\u4f5c\u662f\u4e0d\u53ef\u907f\u514d\u7684\uff0c\u65e0\u8bba\u4f60\u7684\u8ba1\u7b97\u673a\u6709\u591a\u5c11\u4e2a\u6838\u5fc3\uff0c\u5b83\u4eec\u90fd\u4f1a\u9020\u6210\u963b\u585e\u3002<\/section>\n<section><\/section>\n<section>\u6211\u4e3b\u8981\u7814\u7a76\u673a\u5668\u5b66\u4e60\u7cfb\u7edf\u7684\u6027\u80fd\u5de5\u7a0b\uff0c\u6240\u4ee5\u63a5\u4e0b\u6765\u6211\u4f1a\u91cd\u70b9\u8ba8\u8bba\u9002\u7528\u4e8e\u5f20\u91cf\u7684\u7b97\u6cd5\u3002\u300cwork-depth \u6a21\u578b\u300d\u867d\u7136\u4e0d\u5b8c\u7f8e\uff0c\u4f46\u5f88\u6709\u7528\u3002<\/section>\n<section><\/section>\n<section>\u5728\u6b64\uff0c\u6211\u5148\u629b\u51fa\u4e00\u4e2a\u95ee\u9898\uff1a\u9010\u4e2a\u5143\u7d20\u76f8\u4e58\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u662f\u591a\u5c11\uff1f\u4ece\u8fd9\u4e2a\u95ee\u9898\u51fa\u53d1\uff0c\u6211\u4f1a\u8fdb\u4e00\u6b65\u9610\u8ff0\u6211\u7684\u89c2\u70b9\uff1aTransformers \u4e2d\u5b9e\u73b0\u7684\u6ce8\u610f\u529b\u673a\u5236\uff0c\u5728\u8ba1\u7b97\u590d\u6742\u5ea6\u4e0a\u5e94\u8be5\u88ab\u89c6\u4e3a\u5bf9\u6570\u7ea7\u522b\u7684\u3002<\/section>\n<section><\/section>\n<section><strong>\u6848\u4f8b 1\uff1a\u9010\u4e2a\u5143\u7d20\u76f8\u4e58<\/strong><\/section>\n<section><\/section>\n<section>\u7ed9\u5b9a\u4e24\u4e2a\u957f\u5ea6\u76f8\u540c\u7684\u5411\u91cf a \u548c b\uff0c\u9010\u4e2a\u5143\u7d20\u76f8\u4e58\u662f\u5c06 a \u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u4e0e b \u4e2d\u5bf9\u5e94\u7d22\u5f15\u4f4d\u7f6e\u7684\u5143\u7d20\u76f8\u4e58\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u50a8\u5728\u65b0\u5411\u91cf c \u4e2d\uff08\u6216\u8005\u76f4\u63a5\u5728\u539f\u4f4d\u7f6e\u4fee\u6539\uff09\u3002<\/section>\n<section><\/section>\n<section>\u4ee3\u7801\u5982\u4e0b\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-4b0c9f3f331a4853d195768cb0002772.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-4b0c9f3f331a4853d195768cb0002772.png\"><\/a><\/section>\n<section>\u4ece\u65f6\u95f4\u590d\u6742\u5ea6\u7684\u89d2\u5ea6\u770b\uff0c\u8fd9\u597d\u50cf\u662f\u7ebf\u6027\u7684\u3002\u5982\u679c\u7528\u5355\u7ebf\u7a0b\u6765\u8dd1\uff0c\u90a3\u786e\u5b9e\u5c31\u662f\u7ebf\u6027\u7684\u3002<\/section>\n<section><\/section>\n<section>\u7136\u800c\uff0c\u5982\u679c\u4ed4\u7ec6\u89c2\u5bdf\uff0c\u4f60\u4f1a\u53d1\u73b0\u5728\u8fd9\u4e2a\u95ee\u9898\u7684\u8ba1\u7b97\u56fe\u4e2d\uff0crange (n) \u4e2d\u7684\u5404\u4e2a\u6b65\u9aa4\u4e4b\u95f4\u6ca1\u6709\u4f9d\u8d56\u5173\u7cfb\u3002\u5b83\u4eec\u5b8c\u5168\u72ec\u7acb\u3002\u90a3\u4e48\u4e3a\u4ec0\u4e48\u4e0d\u5e76\u884c\u6267\u884c\u5b83\u4eec\u5462\uff1f<\/section>\n<section><\/section>\n<section>\u8fd9\u6b63\u662f\u6bcf\u4e2a\u7ebf\u6027\u4ee3\u6570 \/ \u5f20\u91cf\u5e93\u5728\u5e95\u5c42\u6240\u505a\u7684\u4e8b\u60c5\u3002<\/section>\n<section><\/section>\n<section>\u4f60\u5f88\u5feb\u4f1a\u53d1\u73b0\uff0c\u9010\u4e2a\u5143\u7d20\u76f8\u4e58\u5b9e\u9645\u4e0a\u6839\u672c\u4e0d\u662f\u7ebf\u6027\u65f6\u95f4\u7684\uff01\u5b83\u5b9e\u9645\u4e0a\u770b\u8d77\u6765\u50cf\u662f\u5e38\u6570\u65f6\u95f4\uff0c\u76f4\u5230\u8fbe\u5230\u4e00\u4e2a\u795e\u79d8\u7684\u4e34\u754c\u70b9\u3002<\/section>\n<section><\/section>\n<section>\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u5206\u6790\u9010\u4e2a\u5143\u7d20\u76f8\u4e58\u65f6\u7684\u300cwork\u300d\u548c\u300cdepth\u300d\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-782f58193f6c4050ce84a6c35a3d5d45.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-782f58193f6c4050ce84a6c35a3d5d45.png\"><\/a><\/section>\n<section>\u7b97\u6cd5\u91cc\u7684\u6bcf\u4e00\u6b65\u64cd\u4f5c\uff0c\u6bd4\u5982\u52a0\u8f7d\u6570\u636e\u3001\u505a\u4e58\u6cd5\u3001\u5b58\u50a8\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u672c\u8eab\u90fd\u4e0d\u590d\u6742\uff0c\u7406\u8bba\u4e0a\u53ea\u9700\u8981\u5e38\u6570\u65f6\u95f4\u5c31\u80fd\u5b8c\u6210\u3002\u53ea\u8981\u4f60\u7684\u8ba1\u7b97\u673a\u6709\u8db3\u591f\u7684\u5e76\u884c\u8ba1\u7b97\u80fd\u529b\uff0c\u76f4\u5230\u67d0\u4e2a\u4e34\u754c\u70b9\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u90fd\u662f\u5e38\u6570\u65f6\u95f4\u3002<\/section>\n<section><\/section>\n<section><strong>\u6848\u4f8b 2\uff1a\u5411\u91cf\u6c42\u548c<\/strong><\/section>\n<section><\/section>\n<section>\u5411\u91cf\u6c42\u548c\u6bd4\u76f8\u4e58\u66f4\u590d\u6742\u4e00\u4e9b\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u53ef\u4ee5\u6e05\u695a\u5730\u770b\u5230\u4e24\u4e2a\u6b65\u9aa4\u4e4b\u95f4\u5b58\u5728\u4f9d\u8d56\u5173\u7cfb\uff08\u56e0\u4e3a\u7d2f\u52a0\u9700\u8981\u8c03\u7528 c \u7684\u72b6\u6001\uff09\u3002\u8fd9\u65e0\u6cd5\u5b8c\u5168\u5e76\u884c\u6267\u884c\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-c2f3be6409476938a7d1a5f0ece89961.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-c2f3be6409476938a7d1a5f0ece89961.png\"><\/a><\/section>\n<section>\u4e0d\u8fc7\uff0c\u5411\u91cf\u6c42\u548c\u770b\u8d77\u6765\u597d\u50cf\u6bcf\u4e00\u6b65\u90fd\u5f97\u4f9d\u8d56\u524d\u4e00\u6b65\uff0c\u4f46\u4ed4\u7ec6\u60f3\u60f3\uff0c\u4e0d\u96be\u53d1\u73b0\u5b83\u53ea\u662f\u6bcf\u4e24\u4e2a\u6b65\u9aa4\uff08\u6216\u8005\u8bf4\u6bcf\u5bf9\u5143\u7d20\uff09\u4e4b\u95f4\u6709\u70b9\u5173\u8054\u3002<\/section>\n<section><\/section>\n<section>\u5b9e\u9645\u4e0a\uff0c\u8fd9\u4e2a\u64cd\u4f5c\u4ecd\u7136\u53ef\u4ee5\u5e76\u884c\u5316\uff0c\u65b9\u6cd5\u662f\u4e0d\u5728\u4e00\u4e2a\u6b65\u9aa4\u4e2d\u5e76\u884c\u6267\u884c\u6bcf\u4e2a\u64cd\u4f5c\uff0c\u800c\u662f\u5728\u4e00\u4e2a\u6b65\u9aa4\u4e2d\u5bf9\u6bcf\u961f\u6267\u884c\u64cd\u4f5c\u3002<\/section>\n<section><\/section>\n<section>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u957f\u5ea6\u4e3a n \u7684\u5217\u8868\uff0c\u5411\u91cf\u52a0\u6cd5\u662f\u8fd9\u6837\u7684\uff1a<\/section>\n<section><\/section>\n<section>1. \u5148\u628a\u5217\u8868\u91cc\u6bcf\u4e00\u5bf9\u76f8\u90bb\u7684\u6570\u5b57\uff08\u6bd4\u5982\u7b2c 1 \u4e2a\u548c\u7b2c 2 \u4e2a\u3001\u7b2c 3 \u4e2a\u548c\u7b2c 4 \u4e2a\u2026\u2026\uff09\u52a0\u8d77\u6765\u3002\u56e0\u4e3a\u4e00\u5171\u6709 n \u4e2a\u6570\u5b57\uff0c\u6240\u4ee5\u4f1a\u6709 n\/2 \u5bf9\u3002\u628a\u6bcf\u5bf9\u7684\u7ed3\u679c\u5b58\u5230\u5176\u4e2d\u4e00\u4e2a\u4f4d\u7f6e\uff08\u6bd4\u5982\u5076\u6570\u4f4d\u7f6e\u6216\u8005\u5947\u6570\u4f4d\u7f6e\uff09\u3002<\/section>\n<section>2. \u518d\u628a\u4e0a\u4e00\u6b65\u5f97\u5230\u7684\u6bcf\u4e00\u5bf9\u7ed3\u679c\uff08\u73b0\u5728\u6bcf\u5bf9\u662f\u4e4b\u524d\u4e24\u5bf9\u7684\u548c\uff09\u518d\u52a0\u8d77\u6765\u3002\u8fd9\u6b21\u4f1a\u6709 n\/4 \u5bf9\u3002<\/section>\n<section>3. \u6bcf\u6b21\u90fd\u662f\u628a\u4e0a\u4e00\u6b65\u7684\u7ed3\u679c\u4e24\u4e24\u76f8\u52a0\uff0c\u76f4\u5230\u6700\u540e\u53ea\u5269\u4e0b\u4e00\u4e2a\u6570\u5b57\u3002\u8fd9\u4e2a\u6570\u5b57\u5c31\u662f\u6574\u4e2a\u5217\u8868\u6240\u6709\u6570\u5b57\u7684\u603b\u548c\u3002<\/section>\n<section><\/section>\n<section>\u8fd9\u6837\u4e00\u6765\uff0c\u6bcf\u6b21\u64cd\u4f5c\u7684\u6b65\u9aa4\u6570\u91cf\u90fd\u4f1a\u51cf\u534a\u3002\u6bd4\u5982\uff0c\u7b2c\u4e00\u6b21\u662f n\/2 \u5bf9\uff0c\u7b2c\u4e8c\u6b21\u662f n\/4 \u5bf9\uff0c\u4ee5\u6b64\u7c7b\u63a8\uff0c\u603b\u5171\u53ea\u9700\u8981 log\u2082(n) \u6b65\u5c31\u80fd\u628a\u6240\u6709\u6570\u5b57\u52a0\u8d77\u6765\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-76e7079a6a796e1c8d8e521e9bbd61a5.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-76e7079a6a796e1c8d8e521e9bbd61a5.png\"><\/a><\/section>\n<section><strong>\u6848\u4f8b 3\uff1a\u5f20\u91cf\u79ef<\/strong><\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-10e357c3d42db488c0415fb48e5106e9.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-10e357c3d42db488c0415fb48e5106e9.png\"><\/a><\/section>\n<section>\u5f20\u91cf\u79ef\u662f\u4e00\u4e2a\u57fa\u672c\u64cd\u4f5c\u3002\u5b83\u83b7\u53d6\u4e24\u4e2a\u5f20\u91cf\u7684\u6240\u6709\u7d22\u5f15\uff0c\u5e76\u5bf9\u6240\u6709\u8bf7\u6c42\u7684\u7d22\u5f15\uff08\u5176\u4e2d\u4e00\u4e9b\u53ef\u80fd\u662f\u5171\u4eab\u7684\uff09\u9010\u4e2a\u76f8\u4e58\u3002<\/section>\n<section><\/section>\n<section>\u6bd4\u5982\uff0c\u6c42\u4e24\u4e2a\u77e9\u9635\u7684\u5f20\u91cf\u79ef\u5e76\u4e14\u5171\u4eab\u4e00\u4e2a\u8f74\u7684\u65f6\u5019\uff0c\u7ed3\u679c\u4f1a\u662f\u4e00\u4e2a\u4e09\u7ef4\u7684\u5f20\u91cf\u3002\u4e0d\u8fc7\uff0c\u8fd9\u4e2a\u64cd\u4f5c\u5176\u5b9e\u5e76\u4e0d\u590d\u6742\uff0c\u56e0\u4e3a\u5b83\u53ea\u9700\u8981\u505a\u5e76\u884c\u7684\u52a0\u8f7d\u3001\u5b58\u50a8\u3001\u9010\u4e2a\u76f8\u4e58\uff0c\u6240\u4ee5\u5b83\u7684\u300cdepth\u300d\u662f\u56fa\u5b9a\u7684\uff0c\u4e0d\u4f1a\u968f\u7740\u6570\u636e\u91cf\u53d8\u5927\u800c\u589e\u52a0\u3002<\/section>\n<section><\/section>\n<section>\u4f46\u8981\u6ce8\u610f\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ea\u6709\u5728\u5f20\u91cf\uff08\u6216\u8005\u5f20\u91cf\u7684\u4e00\u90e8\u5206\uff09\u80fd\u591f\u5b8c\u6574\u5730\u88c5\u8fdb\u7f13\u5b58\u7684\u65f6\u5019\u624d\u6210\u7acb\u3002\u5982\u679c\u5f20\u91cf\u592a\u5927\uff0c\u88c5\u4e0d\u4e0b\u7f13\u5b58\uff0c\u90a3\u5c31\u4f1a\u51fa\u73b0\u74f6\u9888\uff0c\u56e0\u4e3a\u7f13\u5b58\u4e0d\u591f\u7528\u7684\u65f6\u5019\uff0c\u8ba1\u7b97\u673a\u5c31\u4e0d\u5f97\u4e0d\u6309\u987a\u5e8f\u5904\u7406\u6570\u636e\uff0c\u8fd9\u65f6\u5019\u300cdepth\u300d\u5c31\u4f1a\u589e\u52a0\u3002<\/section>\n<section><\/section>\n<section>\u5f20\u91cf\u79ef\u5728\u673a\u5668\u5b66\u4e60\u91cc\u5176\u5b9e\u4e0d\u592a\u5e38\u88ab\u63d0\u5230\uff0c\u4f46\u7f6e\u6362\u3001\u6c42\u548c\u3001\u77e9\u9635\u4e58\u6cd5\u3001\u54c8\u8fbe\u739b\u79ef\u3001\u76f4\u79ef\u3001\u5404\u79cd\u6279\u5904\u7406\u64cd\u4f5c\u7b49\u7b49\uff0c\u6240\u6709\u8fd9\u4e9b\u64cd\u4f5c\u90fd\u53ef\u4ee5\u770b\u6210\u662f\u67d0\u79cd\u5f62\u5f0f\u7684\u5f20\u91cf\u79ef\uff0c\u518d\u52a0\u4e0a\u67d0\u79cd\u5f62\u5f0f\u7684\u5f52\u7ea6\uff08\u628a\u591a\u4f59\u7684\u7ef4\u5ea6\u53bb\u6389\u6216\u8005\u5408\u5e76\uff09\u3002<\/section>\n<section><\/section>\n<section>\u8fd9\u6837\u4e00\u6765\uff0c\u80fd\u8ba9\u590d\u6742\u7684\u5f20\u91cf\u64cd\u4f5c\u53d8\u5f97\u66f4\u52a0\u7cfb\u7edf\u3001\u66f4\u6709\u6570\u5b66\u7f8e\u611f\uff0c\u5c24\u5176\u662f\u5728\u9ad8\u6027\u80fd\u8ba1\u7b97\u548c\u5206\u5e03\u5f0f\u7cfb\u7edf\u91cc\uff0c\u7528\u8d77\u6765\u7279\u522b\u65b9\u4fbf\u3002<\/section>\n<section><\/section>\n<section><strong>\u6848\u4f8b 4\uff1a\u77e9\u9635\u4e58\u6cd5<\/strong><\/section>\n<section><\/section>\n<section>\u77e9\u9635\u4e58\u6cd5\uff08MATMUL\uff09\u5c31\u662f\u8fd9\u6837\u4e00\u79cd\u5f20\u91cf\u8fd0\u7b97\uff0c\u5b83\u901a\u8fc7\u5f20\u91cf\u79ef\u7684\u6536\u7f29\u5f97\u5230\u4e86\u4f18\u96c5\u7684\u63cf\u8ff0\u3002<\/section>\n<section><\/section>\n<section>\u7ed9\u5b9a\u4e24\u4e2a\u5f20\u91cf\u5206\u522b\u4e3a\uff08i j\uff09\u548c\uff08j k\uff09\u7684\u5f20\u91cf A\u3001B\uff0c\u5f20\u91cf\u4e58\u6cd5\u6784\u9020\u51fa\u4e00\u4e2a\u5f20\u91cf C\uff0c\u5176\u5143\u7d20 C [i,j,k] = A [i,j] * B [j,k]\uff0c\u7136\u540e\u6cbf j \u7ef4\u76f8\u52a0\uff08\u6536\u7f29\uff09\u6210\u4e00\u4e2a\u5f62\u72b6\u4e3a\uff08i k\uff09\u7684\u77e9\u9635 D\u3002(\u4e3a\u4e86\u63d0\u9ad8\u6548\u7387\uff0cC \u901a\u5e38\u4e0d\u4f1a\u5b8c\u5168\u5b9e\u4f53\u5316\uff0c\u800c\u662f\u5728\u5f20\u91cf\u79ef\u7684\u788e\u7247\u4e4b\u95f4\u8fdb\u884c\u6536\u7f29\u878d\u5408\uff09\u3002<\/section>\n<section><\/section>\n<section>\u53ea\u9700\u5ffd\u7565\u5916\u8f74\uff0c\u5c31\u53ef\u4ee5\u5bf9\u77e9\u9635\u8fdb\u884c\u6279\u5904\u7406 \/ \u5e7f\u64ad\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-eeab1cdf489095841f3c1ca93db471bc.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-eeab1cdf489095841f3c1ca93db471bc.png\"><\/a><\/section>\n<section>\u5e95\u5c42\u5185\u5bb9\u7684\u4f2a\u4ee3\u7801\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-18271f1efb1b20071fb8d72cbd04bcaf.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-18271f1efb1b20071fb8d72cbd04bcaf.png\"><\/a><\/section>\n<section>\u6ce8\u610f\uff0c\u8fd9\u53ea\u662f\u5c06 TENSOR \u987a\u5e8f\u7ec4\u5408\u6210 CONTRACT\uff0c\u5176\u6df1\u5ea6\u590d\u6742\u5ea6\u5206\u522b\u4e3a O (1) \u548c O (logn)\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-ffd0b7c1e3871fe1d60d365bca9c3b40.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-ffd0b7c1e3871fe1d60d365bca9c3b40.png\"><\/a><\/section>\n<section><strong>\u6848\u4f8b 5\uff1asoftmax<\/strong><\/section>\n<section><\/section>\n<section>softmax \u4e00\u70b9\u4e5f\u4e0d\u7279\u522b\u3002\u5148\u6309\u5143\u7d20\u5e94\u7528 e^x\uff0c\u7136\u540e\u6536\u7f29\uff0c\u6700\u540e\u6309\u5143\u7d20\u9664\u6cd5\u3002<\/section>\n<section><\/section>\n<section>\u4e0b\u9762\u7167\u4f8b\u8fdb\u884c\u6df1\u5ea6\u590d\u6742\u6027\u5206\u6790\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-98cc92d3d6866133cc0f7ea47a0be9ae.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-98cc92d3d6866133cc0f7ea47a0be9ae.png\"><\/a><\/section>\n<section><strong>\u6848\u4f8b 6\uff1a\u6ce8\u610f\u529b<\/strong><\/section>\n<section><\/section>\n<section>\u6ce8\u610f\u529b\u5c31\u4e0d\u7528\u591a\u8bf4\u4e86\u3002\u4ee5\u4e0b\u662f\u6df1\u5ea6\u5206\u6790\uff1a<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-097046bd17bda915f39719138dca42f5.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-097046bd17bda915f39719138dca42f5.png\"><\/a><\/section>\n<section>\u53ef\u4ee5\u770b\u5230\uff0c\u901a\u8fc7\u6574\u6570\u4e2a matmuls \u6536\u7f29\u548c\u4e00\u7cfb\u5217\u5143\u7d20\u5355\u4e49\u64cd\u4f5c\u7684\u987a\u5e8f\u7ec4\u5408\uff0c\u6ce8\u610f\u529b\u7684\u6e10\u8fd1\u6df1\u5ea6\u590d\u6742\u5ea6\u4ec5\u4e3a O\uff08logn + logd\uff09\uff0c\u5176\u4e2d n \u548c d \u5206\u522b\u4e3a\u5e8f\u5217\u957f\u5ea6\u548c\u5d4c\u5165\u7ef4\u6570\u3002<\/section>\n<section><\/section>\n<section>\u5b9e\u9645\u4e0a\uff0c\u8fd9\u901a\u5e38\u610f\u5473\u7740 O\uff08log sequence_length\uff09\uff0c\u56e0\u4e3a sequence_length \u901a\u5e38\u8fdc\u5927\u4e8e embedding_dim\u3002<\/section>\n<section><\/section>\n<section><strong>\u5c40\u9650\u6027<\/strong><\/section>\n<section><\/section>\n<section>\u7136\u800c\uff0c\u6df1\u5ea6\u5206\u6790\u5e76\u4e0d\u5b8c\u7f8e\uff0c\u5f53\u8003\u8651\u5230\u5185\u5b58\u8bbf\u95ee\u6a21\u5f0f\u548c\u9ad8\u901f\u7f13\u5b58\u7684\u53cb\u597d\u6027\u65f6\uff0c\u95ee\u9898\u7acb\u5373\u663e\u73b0\u51fa\u6765\u3002<\/section>\n<section><\/section>\n<section>\u7279\u522b\u662f\uff0c\u5f53\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\u65f6\uff0c\u8be5\u6a21\u578b\u5c31\u4f1a\u5931\u6548\uff1a<\/section>\n<section><\/section>\n<ul>\n<li>\n<section>\u6811\u7684\u6700\u5927\u5bbd\u5ea6 &gt;&gt; \u8ba1\u7b97\u5355\u5143\uff08\u4e0d\u7ba1\u662f\u4ec0\u4e48\u5185\u6838\uff09\u3002<\/section>\n<\/li>\n<li>\n<section>\u5185\u5b58\u8bbf\u95ee\u6a21\u5f0f\u4e0d\u8fde\u7eed \/ \u4e0d\u53ef\u77e2\u91cf\u5316\uff1f<\/section>\n<\/li>\n<li>\n<section>\u7269\u5316\u53d8\u91cf\u4e0e\u5185\u5b58\u5c42\u6b21\u7ed3\u6784\u4e0d\u5339\u914d\u3002<\/section>\n<\/li>\n<\/ul>\n<section><\/section>\n<section>\u5728\u5b9e\u8df5\u4e2d\uff0c\u8fd9\u4e3b\u8981\u610f\u5473\u7740\u7269\u5316\u5f20\u91cf\u7684\u5927\u5c0f\u5fc5\u987b\u4fdd\u6301\u5728 L2- \u5de6\u53f3\u7684\u7f13\u5b58\u8303\u56f4\u5185\uff0c\u6df1\u5ea6\u590d\u6742\u5ea6\u8fb9\u754c\u624d\u80fd\u6210\u7acb\u3002<\/section>\n<section><\/section>\n<section><strong>\u90a3\u4e48\u4e3a\u4ec0\u4e48\u6ce8\u610f\u529b\u4e0d\u662f\u5bf9\u6570\u7684\u5462\uff1f<\/strong><\/section>\n<section><\/section>\n<section>\u4e8b\u5b9e\u4e0a\uff0c\u7531\u4e8e\u6ce8\u610f\u529b\u81f3\u5c11\u9700\u8981\u5c06 QK^T \u90e8\u5206\u5b9e\u4f53\u5316\uff08\u901a\u5e38\u662f\u975e\u5e38\u5927\u7684\u6574\u6570\uff0c\u975e\u5e38\u5927\u7684\u6574\u6570\uff09\uff0c\u8fd9\u51e0\u4e4e\u80af\u5b9a\u4f1a\u6ea2\u51fa\u4e8c\u7ea7\u7f13\u5b58\uff08\u8fd9\u8981\u4e48\u8feb\u4f7f\u4f60\u5728\u5185\u5b58\u4e2d\u8ba1\u7b97\u7684\u901f\u5ea6\u6162\u4e8e OOM\uff0c\u8981\u4e48\u8feb\u4f7f\u4f60\u901a\u8fc7\u5c06 QK^T \u77e9\u9635\u5206\u7247\u4e3a\u90e8\u5206\u5173\u8054\u5757\u5e76\u4f20\u5165 softmax \u6765\u5c06\u5176\u8f6c\u5316\u4e3a\u987a\u5e8f\u95ee\u9898\uff09\u3002<\/section>\n<section><\/section>\n<section>\u8fd9\u5c31\u610f\u5473\u7740\uff0c\u5bf9\u4e8e\u666e\u901a\u8ba1\u7b97\u673a\u800c\u8a00\uff0c\u6ce8\u610f\u529b\u7684\u6df1\u5ea6\u590d\u6742\u5ea6\u66f4\u50cf\u662f O (n log n)\u3002\u867d\u7136\u8fd9\u7edd\u4e0d\u662f\u4e00\u4e2a\u4e0d\u53ef\u8fd8\u539f\u7684\u95ee\u9898\uff0c\u4f46\u6211\u5728\u4e0b\u4e00\u8282\u4e2d\u4f1a\u63d0\u51fa\u4e00\u4e9b\u63a8\u6d4b\u6027\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/section>\n<section><\/section>\n<section><strong>\u5bf9\u672a\u6765\u8ba1\u7b97\u7684\u731c\u6d4b\uff1f<\/strong><\/section>\n<section><\/section>\n<section>\u90a3\u4e48\uff0c\u8fd9\u5bf9\u76ee\u524d\u7684\u82af\u7247\u548c\u672a\u6765\u7684\u82af\u7247\u610f\u5473\u7740\u4ec0\u4e48\uff1f<\/section>\n<section><\/section>\n<section>\u6211\u8ba4\u4e3a\u8fd9\u610f\u5473\u7740\u5f88\u591a\uff0c\u524d\u63d0\u662f\u4e00\u4e2a\u5173\u952e\u4e8b\u5b9e\uff0c\u5373\u8bad\u7ec3\u8303\u5f0f\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u4ecd\u7136\u662f\u975e\u5e76\u53d1\u7684\uff08\u5373\u770b\u8d77\u6765\u50cf\u5faa\u73af\u4e0a\u7684\u524d\u5411\u2192\u540e\u5411\u4f20\u9012\uff0c\u6216 dualpipe \u4e4b\u7c7b\u7684\u6df7\u5408\uff09\uff0c\u4e3a\u4ec0\u4e48\uff1f<\/section>\n<section><\/section>\n<section>\u56e0\u4e3a\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u90a3\u4e48\u795e\u7ecf\u7f51\u7edc\u7684\u6743\u91cd\uff08\u5728 nn \u6b21\u5faa\u73af\u4e2d\u5360\u8fd0\u52a8\u64cd\u4f5c\u91cf\u7684\u5927\u90e8\u5206\uff09\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u5c31\u662f\u9759\u6001\u7684\uff0c\u800c\u4e14\u8ba1\u7b97\u5355\u5143\u7684\u5c40\u90e8\u6027\u4f1a\u8d8a\u6765\u8d8a\u5f3a\u3002<\/section>\n<section><\/section>\n<section>\u6211\u4eec\u5df2\u7ecf\u770b\u5230\u8fd9\u79cd\u60c5\u51b5\u7684\u53d1\u751f\u3002\u6743\u91cd\u66fe\u7ecf\u88ab\u5378\u8f7d\u5230\u78c1\u76d8\u6216\u4fdd\u5b58\u5230\u5185\u5b58\u4e2d\uff0c\u53ea\u6709\u5728\u4e13\u95e8\u7684\u5185\u6838\u4e2d\u624d\u4f1a\u542f\u52a8\u5230 GPU\u3002<\/section>\n<section><\/section>\n<section>\u540e\u6765\uff0c\u6bcf\u4e2a\u4eba\u90fd\u5f00\u59cb\u5b8c\u5168\u4f7f\u7528\u8bbe\u5907\u5185\u5b58\uff08VRAM \u6216 HBM\uff09\u8fdb\u884c\u8bad\u7ec3\u3002<\/section>\n<section><\/section>\n<section>\u73b0\u5728\uff0c\u82af\u7247\u5236\u9020\u5546\u5df2\u7ecf\u610f\u8bc6\u5230\uff0c\u901a\u8fc7\u5c06\u6743\u91cd\u8f6c\u79fb\u5230\u66f4\u5feb\u7684\u5185\u5b58\uff08\u5982 L2\uff09\u4e0a\uff0c\u4ed6\u4eec\u53ef\u4ee5\u83b7\u5f97\u53e6\u4e00\u4e2a OOM\uff08\u5728\u6df1\u5ea6\u590d\u6742\u6027\u5206\u6790\u5931\u8d25\u7684\u5730\u65b9\u6709\u6548\u5730\u780d\u6389\u6574\u4e2a\u90e8\u5206\uff09\u3002<\/section>\n<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2025-03-23-4\" target=\"_blank\">\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684 [&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,55],"class_list":["post-39597","post","type-post","status-publish","format-standard","hentry","category-news","tag-rag","tag-55"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e - \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=39597\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/17aitech.com\/?p=39597\",\"url\":\"https:\/\/17aitech.com\/?p=39597\",\"name\":\"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e - \u4e00\u8d77AI\u6280\u672f\",\"isPartOf\":{\"@id\":\"https:\/\/17aitech.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/17aitech.com\/?p=39597#primaryimage\"},\"image\":{\"@id\":\"https:\/\/17aitech.com\/?p=39597#primaryimage\"},\"thumbnailUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png\",\"datePublished\":\"2025-03-23T13:02:35+00:00\",\"author\":{\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d\"},\"breadcrumb\":{\"@id\":\"https:\/\/17aitech.com\/?p=39597#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/17aitech.com\/?p=39597\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/17aitech.com\/?p=39597#primaryimage\",\"url\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png\",\"contentUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/17aitech.com\/?p=39597#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/17aitech.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e\"}]},{\"@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":"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e - \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=39597","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/17aitech.com\/?p=39597","url":"https:\/\/17aitech.com\/?p=39597","name":"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e - \u4e00\u8d77AI\u6280\u672f","isPartOf":{"@id":"https:\/\/17aitech.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/17aitech.com\/?p=39597#primaryimage"},"image":{"@id":"https:\/\/17aitech.com\/?p=39597#primaryimage"},"thumbnailUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png","datePublished":"2025-03-23T13:02:35+00:00","author":{"@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d"},"breadcrumb":{"@id":"https:\/\/17aitech.com\/?p=39597#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/17aitech.com\/?p=39597"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/?p=39597#primaryimage","url":"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png","contentUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2025\/03\/frc-d81fd9207a12b39e91b4005660954838.png"},{"@type":"BreadcrumbList","@id":"https:\/\/17aitech.com\/?p=39597#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/17aitech.com\/"},{"@type":"ListItem","position":2,"name":"\u300c\u6ce8\u610f\u529b\u5b9e\u9645\u4e0a\u662f\u5bf9\u6570\u7684\u300d\uff1f\u4e03\u5e74\u524d\u7684Transformer\u8fd8\u6709\u65b0\u53d1\u73b0\uff0cKarpathy\u70b9\u8d5e"}]},{"@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\/39597","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=39597"}],"version-history":[{"count":0,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/39597\/revisions"}],"wp:attachment":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}