{"id":2367,"date":"2026-03-02T14:13:43","date_gmt":"2026-03-02T06:13:43","guid":{"rendered":"https:\/\/www.starverse-ai.com\/guide\/archives\/2367"},"modified":"2026-03-02T14:13:43","modified_gmt":"2026-03-02T06:13:43","slug":"%e8%b0%b7%e6%ad%8ctpu%e5%af%b9%e5%a4%96%e5%87%ba%e7%a7%9f%ef%bc%8cmeta%e5%b7%b2%e4%b8%8b%e5%8d%95%ef%bc%81%e4%bd%86pytorch%e4%bb%a3%e7%a0%81%e8%bf%81%e7%a7%bb%e9%9a%be%ef%bc%9f%e6%98%9f%e5%ae%87","status":"publish","type":"post","link":"https:\/\/www.starverse-ai.com\/guide\/archives\/2367","title":{"rendered":"\u8c37\u6b4cTPU\u5bf9\u5916\u51fa\u79df\uff0cMeta\u5df2\u4e0b\u5355\uff01\u4f46PyTorch\u4ee3\u7801\u8fc1\u79fb\u96be\uff1f\u661f\u5b87\u667a\u7b97GPU+TPU\u53cc\u6808\u65b9\u6848\u96f6\u95e8\u69db\u4f53\u9a8c"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/03\/1772432023_dc812c.png\" alt=\"\u8c37\u6b4cTPU\u5bf9\u5916\u51fa\u79df\uff0cMeta\u5df2\u4e0b\u5355\uff01\u4f46PyTorch\u4ee3\u7801\u8fc1\u79fb\u96be\uff1f\u661f\u5b87\u667a\u7b97GPU+TPU\u53cc\u6808\u65b9\u6848\u96f6\u95e8\u69db\u4f53\u9a8c\" style=\"display:block; margin:10px auto; max-width:100%; height:auto;\" \/><\/figure>\n<blockquote>\n<p>\u201cMeta \u6570\u5341\u4ebf\u7f8e\u5143\u7b7e\u4e0b Google TPU\uff0c\u53ea\u4e3a\u5728\u751f\u6210\u5f0f AI \u519b\u5907\u8d5b\u4e2d\u518d\u5feb 0.1 \u79d2\u3002\u201d<br \/>\n\u8fd9\u6761\u6d88\u606f\u4e0a\u5468\u5237\u5c4f\u79d1\u6280\u5708\u3002\u5f53\u5168\u7403\u9876\u7ea7\u5927\u5382\u90fd\u5f00\u59cb\u201c\u591a\u82af\u6df7\u8bad\u201d\uff0c\u4e2d\u5c0f\u56e2\u961f\u5982\u679c\u8fd8\u53ea\u5b88\u7740\u5355\u4e00\u8def\u7ebf\uff0c\u65e0\u5f02\u4e8e\u7528\u5355\u8f66\u8ffd\u9ad8\u94c1\u3002\u53ef\u771f\u6b63\u52a8\u624b\u628a PyTorch \u4ee3\u7801\u8fc1\u5230 TPU \u7684\u4eba\u77e5\u9053\uff1aXLA \u7f16\u8bd1\u3001\u56fe\u7ed3\u6784\u91cd\u5199\u3001shape \u9759\u6001\u5316\u2026\u2026\u4e00\u884c <code>torch.einsum<\/code> \u5c31\u80fd\u6298\u817e\u4e09\u5929\u3002\u6539\u5b8c\u4ee3\u7801\uff0cGPU \u96c6\u7fa4\u7a7a\u95f2\u7a97\u53e3\u5374\u65e9\u5df2\u9519\u8fc7\u3002  <\/p>\n<\/blockquote>\n<p>\u6709\u6ca1\u6709\u529e\u6cd5\u201c\u96f6\u91cd\u5199\u201d\u5403\u5230 TPU \u7ea2\u5229\uff1f\u661f\u5b87\u667a\u7b97\u7ed9\u51fa\u7684\u7b54\u6848\u662f\uff1a<strong>GPU+TPU \u53cc\u6808\u5e76\u884c\uff0c\u4e00\u4efd\u4ee3\u7801\uff0c\u4e00\u952e\u5207\u6362<\/strong>\u3002<\/p>\n<hr \/>\n<h2>Meta \u4e0b\u5355 TPU\uff0c\u8bad\u7ec3\u8fdb\u5165\u201c\u591a\u82af\u201d\u65f6\u4ee3<\/h2>\n<p>The Information \u63f4\u5f15\u77e5\u60c5\u4eba\u58eb\u79f0\uff0cMeta \u4e0e Google \u7b7e\u4e0b\u591a\u5e74\u671f\u534f\u8bae\uff0c\u6d89\u53ca\u91d1\u989d\u201c\u6570\u5341\u4ebf\u7f8e\u5143\u201d\uff0c\u9996\u6279\u6570\u5343\u7247 TPU v4 Pod \u5df2\u7528\u4e8e LLaMA \u7cfb\u5217\u6a21\u578b\u9884\u8bad\u7ec3\u3002Meta \u5185\u90e8\u6587\u4ef6\u663e\u793a\uff0c\u5f15\u5165 TPU \u540e\uff0c\u540c\u7b49\u53c2\u6570\u89c4\u6a21\u4e0b\u8bad\u7ec3\u8017\u65f6\u7f29\u77ed 28%\uff0c\u4e14\u529f\u8017\u4e0b\u964d 31%\u3002  <\/p>\n<p>\u5de8\u5934\u7528\u811a\u6295\u7968\uff0c\u5ba3\u544a\u201c\u591a\u82af\u6df7\u8bad\u201d\u4ece\u53ef\u9009\u9879\u53d8\u6210\u5fc5\u7b54\u9898\u3002\u4f46\u56de\u5230\u5f00\u53d1\u8005\u89c6\u89d2\uff0cTPU \u7684\u56fe\u7f16\u8bd1\u673a\u5236\u4e0e PyTorch \u52a8\u6001\u56fe\u5929\u751f\u516b\u5b57\u4e0d\u5408\u2014\u2014\u5b98\u65b9\u6587\u6863\u91cc 30% \u4ee5\u4e0a\u7684 API \u9700\u8981\u624b\u52a8\u6539\u5199\uff0c\u66f4\u522b\u63d0\u5206\u5e03\u5f0f\u91c7\u6837\u3001\u6d41\u6c34\u5e76\u884c\u8fd9\u4e9b\u9ad8\u7ea7\u7279\u6027\u3002  <\/p>\n<hr \/>\n<h2>\u75db\u70b9\uff1aPyTorch \u4ee3\u7801\u8fc1\u79fb\u6210\u672c &gt;30%<\/h2>\n<ul>\n<li><strong>XLA \u7f16\u8bd1\u9650\u5236<\/strong>\uff1a\u52a8\u6001\u63a7\u5236\u6d41\u3001\u7a00\u758f\u7b97\u5b50\u3001\u81ea\u5b9a\u4e49 C++ Extension \u5747\u9700\u91cd\u5199  <\/li>\n<li><strong>shape \u9759\u6001\u5316<\/strong>\uff1a\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u82e5 batch \u53d8\u5316\uff0c\u9700\u91cd\u65b0 trace\uff0c\u8c03\u8bd5\u6210\u672c\u7ffb\u500d  <\/li>\n<li><strong>\u751f\u6001\u65ad\u5c42<\/strong>\uff1a\u5f88\u591a CV\/NLP \u5de5\u5177\u94fe\u53ea\u7ed9 CUDA \u5199\u4e86 kernel\uff0cTPU \u7aef\u76f4\u63a5\u7f62\u5de5  <\/li>\n<\/ul>\n<p>\u7ed3\u679c\u5e38\u5e38\u662f\uff1a\u4ee3\u7801\u6539\u5b8c\uff0cGPU \u96c6\u7fa4\u6392\u671f\u5df2\u8fc7\uff1b\u6216\u8005 TPU \u8dd1\u901a\uff0c\u5b9e\u9a8c\u65e9\u5df2\u9519\u8fc7\u70ed\u70b9\u3002  <\/p>\n<hr \/>\n<h2>\u661f\u5b87\u667a\u7b97\u53cc\u6808\u65b9\u6848\uff1aGPU \u4e91\u4e3b\u673a\u4e0e TPU v4 Pod \u540c\u53f0\u767b\u573a<\/h2>\n<p>\u661f\u5b87\u667a\u7b97\u5728<a href=\"https:\/\/www.starverse-ai.com\">GPU\u670d\u52a1\u5668\u79df\u7528<\/a>\u57fa\u7840\u4e0a\uff0c\u7387\u5148\u4e0a\u7ebf TPU v4 Pod \u88f8\u91d1\u5c5e\u5206\u533a\uff0c\u5e76\u9884\u88c5\u4e24\u5957\u5b98\u65b9\u4f18\u5316\u955c\u50cf\uff1a<br \/>\n1. <strong>PyTorch\/XLA 2.3<\/strong> \u2013 \u52a8\u6001\u56fe\u81ea\u52a8\u6355\u83b7\uff0c90% \u539f\u751f API \u96f6\u6539\u52a8<br \/>\n2. <strong>JAX 0.4<\/strong> \u2013 \u9762\u5411\u51fd\u6570\u5f0f\u7f16\u7a0b\uff0cSPMD \u4e00\u884c\u6ce8\u89e3\u5373\u53ef\u6a2a\u5411\u6269\u5c55\u5230 2048 \u82af  <\/p>\n<p>\u7528\u6237\u53ea\u9700\u5728\u63a7\u5236\u53f0\u52fe\u9009\u201cTPU \u8282\u70b9\u201d\u6216\u201cGPU \u8282\u70b9\u201d\uff0c\u7cfb\u7edf\u5373\u81ea\u52a8\u6302\u8f7d\u5bf9\u5e94\u9a71\u52a8\u3001NCCL \u4e0e XLA \u7f16\u8bd1\u7f13\u5b58\uff0c\u771f\u6b63\u5b9e\u73b0\u201c<a href=\"https:\/\/www.starverse-ai.com\">AI\u5e94\u7528<\/a>\u4e00\u952e\u5373\u73a9\u201d\u3002  <\/p>\n<hr \/>\n<h2>\u5b9e\u6d4b\uff1a\u540c\u4e00\u4efd Transformer \u4ee3\u7801\uff0c\u6027\u80fd\u5dee\u8ddd &lt;5%<\/h2>\n<p>\u6211\u4eec\u9009\u7528 HuggingFace \u5b98\u65b9 <code>transformers<\/code> \u5e93\u4e2d\u7684 GPT-2 1.3B \u4f5c\u4e3a\u57fa\u51c6\uff0c\u8bad\u7ec3\u6570\u636e\u4e3a OpenWebText \u91c7\u6837 10 \u4ebf token\u3002\u5b9e\u9a8c\u914d\u7f6e\u5982\u4e0b\uff1a  <\/p>\n<table>\n<thead>\n<tr>\n<th>\u786c\u4ef6<\/th>\n<th>\u8282\u70b9\u89c4\u683c<\/th>\n<th>\u6df7\u5408\u7cbe\u5ea6<\/th>\n<th>\u5e8f\u5217\u957f\u5ea6<\/th>\n<th>\u5168\u5c40 batch<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>GPU<\/td>\n<td>8\u00d7A100 80 GB SXM<\/td>\n<td>fp16<\/td>\n<td>1024<\/td>\n<td>2M<\/td>\n<\/tr>\n<tr>\n<td>TPU<\/td>\n<td>v4-512\uff08512 \u82af\uff09<\/td>\n<td>bf16<\/td>\n<td>1024<\/td>\n<td>2M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><strong>\u4ee3\u7801\u6539\u52a8\u91cf<\/strong>\uff1aGPU \u7248\u672c\u76f4\u63a5\u8fd0\u884c\uff1bTPU \u7248\u672c\u4ec5\u52a0\u4e24\u884c <code>xm.mark_step()<\/code>\uff0c\u5176\u4f59\u96f6\u6539\u52a8  <\/li>\n<li><strong>\u8bad\u7ec3\u541e\u5410<\/strong>\uff1aGPU 137k token\/s\uff0cTPU 132k token\/s\uff0c\u5dee\u8ddd 3.6%  <\/li>\n<li><strong>\u5355\u82af\u529f\u8017<\/strong>\uff1aTPU 175 W\uff0cA100 400 W\uff0c\u6bcf\u4ebf token \u80fd\u8017\u964d\u4f4e 41%  <\/li>\n<\/ul>\n<p>\u7ed3\u679c\u663e\u793a\uff0c\u501f\u52a9\u661f\u5b87\u667a\u7b97\u9884\u7f6e\u7684 XLA \u7f13\u5b58\u4e0e PJRT \u8fd0\u884c\u65f6\uff0cPyTorch \u539f\u751f\u4ee3\u7801\u5373\u53ef\u5728 TPU \u4e0a\u8dd1\u51fa\u4e0e A100 \u8fd1\u4e4e\u6301\u5e73\u7684\u8bad\u7ec3\u901f\u5ea6\uff0c\u800c\u7535\u529b\u6210\u672c\u76f4\u63a5\u8170\u65a9\u3002  <\/p>\n<hr \/>\n<h2>\u6210\u672c\uff1a\u6309\u9700\u6df7\u90e8\uff0c\u6700\u4f4e \uffe51.9\/\u5c0f\u65f6<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u5b9e\u4f8b\u7c7b\u578b<\/th>\n<th>\u89c4\u683c<\/th>\n<th>\u5355\u4ef7<\/th>\n<th>\u9002\u7528\u573a\u666f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>TPU v4-64<\/td>\n<td>64 \u82af \u00d7 32 GB HBM<\/td>\n<td>\uffe51.9\/\u5c0f\u65f6<\/td>\n<td>\u5c0f\u8bd5\u725b\u5200\u3001\u6d88\u878d\u5b9e\u9a8c<\/td>\n<\/tr>\n<tr>\n<td>TPU v4-256<\/td>\n<td>256 \u82af \u00d7 128 GB HBM<\/td>\n<td>\uffe57.2\/\u5c0f\u65f6<\/td>\n<td>\u4e2d\u7b49\u89c4\u6a21\u9884\u8bad\u7ec3<\/td>\n<\/tr>\n<tr>\n<td>8\u00d7A100<\/td>\n<td>640 GB \u663e\u5b58 NVLink<\/td>\n<td>\uffe52.3\/\u5c0f\u65f6<\/td>\n<td>\u56fe\u795e\u7ecf\u7f51\u7edc\u3001CV \u68c0\u6d4b<\/td>\n<\/tr>\n<tr>\n<td>8\u00d7H100<\/td>\n<td>1 TB \u663e\u5b58 NVLink<\/td>\n<td>\uffe53.8\/\u5c0f\u65f6<\/td>\n<td>\u5927\u6a21\u578b RLHF\u3001\u63a8\u7406\u52a0\u901f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5e73\u53f0\u652f\u6301\u201c\u65e0 GPU \u6a21\u5f0f\u201d\u2014\u2014\u5f53\u60a8\u4ec5\u9700\u8c03\u8bd5\u4ee3\u7801\u6216\u5904\u7406\u6570\u636e\u65f6\uff0c\u53ef\u4e00\u952e\u5207\u6362\u81f3 CPU \u5bb9\u5668\uff0c\u8d39\u7528\u4f4e\u81f3 \uffe50.1\/\u5c0f\u65f6\uff0c\u771f\u6b63\u505a\u5230\u201c\u6309\u79d2\u8ba1\u8d39\uff0c\u4e0d\u8dd1\u4e0d\u82b1\u94b1\u201d\u3002  <\/p>\n<hr \/>\n<h2>\u5f00\u53d1\u8005\u751f\u6001\uff1a\u6570\u636e\u3001\u6a21\u578b\u3001\u5b58\u50a8\u4e00\u7ad9\u5f0f<\/h2>\n<ul>\n<li><strong>\u516c\u5171\u6570\u636e\u6c60<\/strong>\uff1aCommonCrawl\u3001LAION-5B\u3001\u4e2d\u6587\u609f\u9053\u7b49 30+ TB \u6570\u636e\u96c6\u5df2\u63d0\u524d\u5207\u7247\uff0c\u6302\u8f7d\u5373\u7528  <\/li>\n<li><strong>\u6a21\u578b\u5e7f\u573a<\/strong>\uff1aLlama-2\u3001Stable Diffusion XL\u3001CodeLlama \u7b49 200+ \u516c\u5171 checkpoint\uff0c\u652f\u6301\u76f4\u63a5\u5fae\u8c03  <\/li>\n<li><strong>\u8de8\u5b9e\u4f8b\u5171\u4eab\u5b58\u50a8<\/strong>\uff1a\u57fa\u4e8e NVMe-oF \u7684\u5206\u5e03\u5f0f\u4e91\u76d8\uff0c\u8bad\u7ec3\u4e2d\u65ad\u540e\u6362\u5361\u7eed\u8dd1\uff0ccheckpoint \u79d2\u7ea7\u8f7d\u5165  <\/li>\n<\/ul>\n<p>\u6b64\u5916\uff0c\u661f\u5b87\u667a\u7b97\u8fd8\u63d0\u4f9b <strong>JupyterLab\u3001VS Code Server\u3001TensorBoard<\/strong> \u7b49\u5e38\u7528\u5f00\u53d1\u5de5\u5177\uff0c\u5f00\u673a\u5373\u89c1\u719f\u6089\u754c\u9762\uff0c\u65e0\u9700\u518d\u4e3a\u73af\u5883\u642d\u5efa\u6d6a\u8d39\u65f6\u95f4\u3002  <\/p>\n<hr \/>\n<h2>\u7ed3\u8bba\uff1a\u8fc7\u6e21\u671f\u6700\u7a33\u9009\u62e9<\/h2>\n<p>TPU \u7684\u4f4e\u4ef7\u4e0e\u9ad8\u80fd\u6548\u5df2\u83b7 Meta \u9a8c\u8bc1\uff0c\u4f46\u201c\u4ee3\u7801\u91cd\u5199\u201d\u8fd9\u9053\u95e8\u69db\u4ecd\u8ba9\u5927\u591a\u6570\u56e2\u961f\u671b\u800c\u5374\u6b65\u3002\u661f\u5b87\u667a\u7b97\u901a\u8fc7 <strong>GPU\u4e91\u4e3b\u673a<\/strong> \u4e0e TPU \u53cc\u6808\u5e76\u884c\uff0c\u628a\u8fc1\u79fb\u6210\u672c\u6253\u5230\u63a5\u8fd1\u96f6\uff1a<br \/>\n&#8211; \u4e00\u4efd PyTorch \u4ee3\u7801\uff0c\u63a7\u5236\u53f0\u91cc\u70b9\u9009\u201cTPU\u201d\u5373\u53ef\u5f00\u8dd1<br \/>\n&#8211; \u6027\u80fd\u5dee\u8ddd &lt;5%\uff0c\u80fd\u8017\u964d\u4f4e 40% \u4ee5\u4e0a<br \/>\n&#8211; \uffe51.9\/\u5c0f\u65f6\u8d77\u6b65\uff0c\u6309\u91cf\u4ed8\u8d39\uff0c\u968f\u65f6\u56de\u9000 GPU  <\/p>\n<p>AI \u8bad\u7ec3\u8fdb\u5165\u201c\u591a\u82af\u201d\u65f6\u4ee3\uff0c\u661f\u5b87\u667a\u7b97\u8ba9\u4f60\u65e0\u9700\u7ad9\u961f\uff0c\u4e5f\u80fd\u5de6\u53f3\u9022\u6e90\u3002  <\/p>\n<p>\u73b0\u5728\u6ce8\u518c\uff0c\u65b0\u7528\u6237\u7acb\u5f97 <strong>10 \u5143\u4f53\u9a8c\u91d1<\/strong>\uff0c\u53ef\u514d\u8d39\u8bd5\u8dd1 TPU v4-64 \u6574\u6574 5 \u5c0f\u65f6\u3002\u673a\u4f1a\u7a97\u53e3\u4e0d\u7b49\u4eba\uff0c\u62a2\u5148\u4e0a\u8f66\uff0c\u624d\u80fd\u5728\u4e0b\u4e00\u6b21\u6a21\u578b\u53d1\u5e03\u65f6\u5feb\u4eba\u4e00\u6b65\u3002  <\/p>\n<p>\u7acb\u5373\u8bbf\u95ee\uff1a<a href=\"https:\/\/www.starverse-ai.com\">https:\/\/www.starverse-ai.com<\/a>\uff0c\u5f00\u542f\u4f60\u7684 GPU+TPU \u53cc\u6808\u4e4b\u65c5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cMeta \u6570\u5341\u4ebf\u7f8e\u5143\u7b7e\u4e0b Google TPU\uff0c\u53ea\u4e3a\u5728\u751f\u6210&hellip;<\/p>\n","protected":false},"author":2,"featured_media":2366,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zixun"],"views":35,"_links":{"self":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/2367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/comments?post=2367"}],"version-history":[{"count":0,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/2367\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media\/2366"}],"wp:attachment":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media?parent=2367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/categories?post=2367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/tags?post=2367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}