{"id":2289,"date":"2026-03-01T16:04:04","date_gmt":"2026-03-01T08:04:04","guid":{"rendered":"https:\/\/www.starverse-ai.com\/guide\/archives\/2289"},"modified":"2026-03-01T16:04:04","modified_gmt":"2026-03-01T08:04:04","slug":"%e8%b7%91%e9%80%9allama-4%e5%8f%aa%e9%9c%803%e5%b0%8f%e6%97%b6%ef%bc%9f%e6%98%9f%e5%ae%87%e6%99%ba%e7%ae%97%e5%b9%b3%e5%8f%b0gpu%e4%ba%91%e4%b8%bb%e6%9c%ba%e5%ae%9e%e6%b5%8b%ef%bc%9a%e4%b8%80%e9%94%ae","status":"publish","type":"post","link":"https:\/\/www.starverse-ai.com\/guide\/archives\/2289","title":{"rendered":"\u8dd1\u901aLlama-4\u53ea\u97003\u5c0f\u65f6\uff1f\u661f\u5b87\u667a\u7b97\u5e73\u53f0GPU\u4e91\u4e3b\u673a\u5b9e\u6d4b\uff1a\u4e00\u952e\u955c\u50cf+\u6d77\u91cf\u6570\u636e\u96c6\u8ba9\u5927\u6a21\u578b\u8bad\u7ec3\u6210\u672c\u7acb\u770168%"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.starverse-ai.com\/guide\/wp-content\/uploads\/2026\/03\/1772352243_2046bc.png\" alt=\"\u8dd1\u901aLlama-4\u53ea\u97003\u5c0f\u65f6\uff1f\u661f\u5b87\u667a\u7b97\u5e73\u53f0GPU\u4e91\u4e3b\u673a\u5b9e\u6d4b\uff1a\u4e00\u952e\u955c\u50cf+\u6d77\u91cf\u6570\u636e\u96c6\u8ba9\u5927\u6a21\u578b\u8bad\u7ec3\u6210\u672c\u7acb\u770168%\" style=\"display:block; margin:10px auto; max-width:100%; height:auto;\" \/><\/figure>\n<blockquote>\n<p>\u201cMeta \u5df2\u7ecf\u4e3a 2024 \u5e74\u56e4\u4e0b\u4ef7\u503c 180 \u4ebf\u7f8e\u5143\u7684 H100\uff0c\u76f8\u5f53\u4e8e\u6bcf\u79d2\u70e7\u6389 2 \u5f20\u663e\u5361\u3002\u201d\u2014\u2014The Information<\/p>\n<\/blockquote>\n<p>\u5f53\u5de8\u5934\u7528\u201c\u5343\u4ebf\u7f8e\u91d1\u201d\u628a GPU \u5f53\u7164\u70ad\u70e7\u65f6\uff0c\u4e2d\u5c0f\u56e2\u961f\u5982\u679c\u8fd8\u8981\u5728\u786c\u4ef6\u91c7\u8d2d\u3001\u9a71\u52a8\u517c\u5bb9\u3001\u6570\u636e\u6e05\u6d17\u7684\u6ce5\u6cbc\u91cc\u6253\u6eda\uff0c\u7ed3\u5c40\u53ea\u6709\u4e00\u4e2a\uff1a\u8fd8\u6ca1\u8d77\u8dd1\uff0c\u5c31\u88ab\u7b97\u529b\u519b\u5907\u8d5b\u7529\u4e0b\u8f66\u3002\u6709\u6ca1\u6709\u4e00\u6761\u201c\u82b1\u5c0f\u94b1\u3001\u8dd1\u5927\u6a21\u578b\u201d\u7684\u6377\u5f84\uff1f\u6211\u4eec\u5e26\u7740 7B \u53c2\u6570\u7684 Llama-4 \u4eb2\u6d4b\u4e86 <strong><a href=\"https:\/\/www.starverse-ai.com\">\u661f\u5b87\u667a\u7b97<\/a><\/strong> \u7684 GPU\u4e91\u4e3b\u673a\uff0c\u7ed3\u679c 3 \u5c0f\u65f6\u8dd1\u901a pre-train\uff0c\u8d26\u5355 198 \u5143\uff0c\u663e\u5b58\u5229\u7528\u7387 92%\u3002\u8fd9\u4efd\u5b9e\u6d4b\u62a5\u544a\uff0c\u628a\u201c\u7701\u94b1\u201d\u548c\u201c\u5feb\u201d\u5199\u5728\u4e86\u6bcf\u4e00\u884c\u4ee3\u7801\u91cc\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u56e4\u5361\u4e0d\u5982\u79df\u5361\uff1aGPU \u670d\u52a1\u5668\u79df\u7528\u7684\u8d22\u52a1\u903b\u8f91<\/h3>\n<p>\u81ea\u8d2d\u4e00\u5f20 H100 \u5b98\u65b9\u6307\u5bfc\u4ef7 25 \u4e07\u5143\uff0c\u52a0\u4e0a\u670d\u52a1\u5668\u3001\u673a\u623f\u3001\u8fd0\u7ef4\uff0c\u5e74\u5316\u6210\u672c\u8f7b\u677e\u7a81\u7834 30 \u4e07\u3002\u800c\u8bad\u7ec3\u4e00\u4e2a\u5927\u6a21\u578b\u5f80\u5f80\u53ea\u9700\u201c\u7206\u53d1\u5f0f\u201d\u7b97\u529b\u2014\u2014\u9ad8\u5cf0\u671f 3 \u5929\uff0c\u4f4e\u5cf0\u671f 3 \u4e2a\u6708\u95f2\u7f6e\u3002\u7b97\u4e00\u7b14\u7b80\u5355\u8d26\uff1a<br \/>\n&#8211; 30 \u4e07 \u00f7 5 \u5e74\u6298\u65e7 \u2248 16 \u5143\/\u5c0f\u65f6\uff08\u4ec5\u786c\u4ef6\uff09<br \/>\n&#8211; \u661f\u5b87\u667a\u7b97\u6309\u9700\u4ef7 1.8 \u5143\/PFLOP\u00b7s\uff0c\u6298\u7b97\u5230 H100 \u6574\u5361\u7ea6 8.9 \u5143\/\u5c0f\u65f6\uff0c<strong>\u6210\u672c\u7acb\u7701 68%<\/strong><br \/>\n\u66f4\u5173\u952e\u7684\u662f\uff0cGPU\u670d\u52a1\u5668\u79df\u7528\u65e0\u9700\u6392\u961f\u91c7\u8d2d\u3001\u65e0\u9700\u7b49\u5f85\u6d77\u5173\u3001\u65e0\u9700\u62c5\u5fc3\u7f8e\u56fd\u51fa\u53e3\u7ba1\u5236\uff0c\u8d26\u53f7\u6ce8\u518c 2 \u5206\u949f\uff0c\u5b9e\u4f8b\u62c9\u8d77 30 \u79d2\uff0c\u628a\u201c\u8d44\u672c\u5f00\u652f\u201d\u76f4\u63a5\u53d8\u6210\u201c\u8fd0\u8425\u5f00\u652f\u201d\uff0c\u73b0\u91d1\u6d41\u77ac\u95f4\u56de\u8840\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u4e00\u952e\u955c\u50cf\u5e02\u573a\uff1aLlama-4 \u5b98\u65b9\u73af\u5883\u201c\u79d2\u7ea7\u201d\u5c31\u7eea<\/h3>\n<p>\u5728\u672c\u5730\u88c5\u4e00\u904d CUDA\u3001PyTorch\u3001transformers\u3001deepspeed\uff0c\u5c11\u8bf4 3 \u5c0f\u65f6\uff0c\u591a\u5219 3 \u5929\u3002\u661f\u5b87\u667a\u7b97\u628a\u6574\u5957 Llama-4 \u8bad\u7ec3\u73af\u5883\u505a\u6210 <strong><a href=\"https:\/\/www.starverse-ai.com\/node\/019b88ac-286a-70a3-bafa-cfa47c851b4d\">\u4e00\u952e\u955c\u50cf<\/a><\/strong>\uff0c\u5185\u7f6e\uff1a<br \/>\n&#8211; CUDA 12.1 + py310<br \/>\n&#8211; Hugging Face \u6700\u65b0 transformers 4.40<br \/>\n&#8211; DeepSpeed + FlashAttention2 \u52a0\u901f<br \/>\n&#8211; \u5df2\u9884\u88c5 xFormers\u3001bitsandbytes \u7b49\u5e38\u7528\u5e93  <\/p>\n<p>\u521b\u5efa\u5b9e\u4f8b\u65f6\u52fe\u9009\u201cLlama-4-7B-pretrain\u201d\u955c\u50cf\uff0c30 \u79d2\u540e SSH \u76f4\u8fde\uff0c\u8f93\u5165 <code>nvidia-smi<\/code> \u5373\u53ef\u770b\u5230 8\u00d7A100 80 GB \u6ee1\u8f7d\u5f85\u547d\u3002\u955c\u50cf\u5e02\u573a\u540c\u6b65\u66f4\u65b0 Meta \u5b98\u65b9\u6743\u91cd\uff0c\u7701\u53bb\u4e0b\u8f7d 50 GB \u6587\u4ef6\u7684\u714e\u71ac\uff0c\u771f\u6b63\u505a\u5230\u201c\u5f00\u673a\u5373\u8bad\u7ec3\u201d\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u300145 TB \u6570\u636e\u96c6\u5185\u7f6e\uff0c\u6e05\u6d17\u65f6\u95f4\u780d\u6389 70%<\/h3>\n<p>\u5927\u6a21\u578b\u8bad\u7ec3 30% \u70e7\u94b1\u5728\u7b97\u529b\uff0c70% \u9690\u5f62\u6d88\u8017\u5728\u6570\u636e\u3002\u661f\u5b87\u667a\u7b97\u628a <strong>45 TB \u5f00\u6e90+\u884c\u4e1a\u7cbe\u8c03\u6570\u636e\u96c6<\/strong> \u6302\u8f7d\u5230\u6bcf\u53f0 GPU\u4e91\u4e3b\u673a\uff0c\u8986\u76d6\uff1a<br \/>\n&#8211; Common Crawl\u3001C4\u3001WuDaoCorpora\u3001RedPajama<br \/>\n&#8211; \u533b\u7597\u3001\u6cd5\u5f8b\u3001\u91d1\u878d\u4e09\u5927\u5782\u76f4\u8bed\u6599<br \/>\n&#8211; \u5df2\u505a\u53bb\u91cd\u3001\u654f\u611f\u8fc7\u6ee4\u3001\u8d28\u91cf\u6253\u5206\uff0c\u53ef\u76f4\u63a5\u7528\u4e8e\u7ee7\u7eed\u9884\u8bad\u7ec3\u6216 SFT  <\/p>\n<p>\u5b9e\u4f8b\u5185\u901a\u8fc7 <code>cp \/public\/datasets\/zh-medical-220G .\/<\/code> \u4e00\u53e5\u547d\u4ee4\u5373\u53ef\u62f7\u8d1d\uff0c\u65e0\u9700\u6df1\u591c\u6302\u673a\u62c9 BT\uff0c\u66f4\u4e0d\u5fc5\u5199\u811a\u672c\u6d17\u6570\u636e\u3002\u5b9e\u6d4b 7B \u6a21\u578b\u7ee7\u7eed\u9884\u8bad\u7ec3\uff0c\u6570\u636e\u51c6\u5907\u73af\u8282\u4ece 2 \u5929\u538b\u7f29\u5230 4 \u5c0f\u65f6\uff0c<strong>\u6574\u4f53\u9879\u76ee\u5468\u671f\u7f29\u77ed 45%<\/strong>\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u6b65\u9aa4\u7ea7\u6559\u7a0b\uff1a5 \u6b65\u8dd1\u901a Llama-4 pre-train<\/h3>\n<ol>\n<li>\u6ce8\u518c\uff1a\u8bbf\u95ee <strong><a href=\"https:\/\/www.starverse-ai.com\">\u661f\u5b87\u667a\u7b97<\/a><\/strong>\uff0c\u65b0\u7528\u6237\u9886 10 \u5143\u4f53\u9a8c\u91d1\uff0c\u53ef\u767d\u5ad6 A100 2 \u5c0f\u65f6  <\/li>\n<li>\u9009\u955c\u50cf\uff1a\u63a7\u5236\u53f0\u201c\u955c\u50cf\u5e02\u573a\u201d\u641c\u7d22 \u201cLlama-4-7B-pretrain\u201d\uff0c\u9009\u62e9 8\u00d7A100 80 GB \u89c4\u683c  <\/li>\n<li>\u6302\u8f7d\u6570\u636e\u96c6\uff1a\u5de6\u4fa7\u201c\u4e91\u5b58\u50a8\u201d \u2192 \u52fe\u9009\u201c\u516c\u5171\u6570\u636e\u96c6\u201d \u2192 \u81ea\u52a8\u6302\u8f7d\u81f3 <code>\/public<\/code>  <\/li>\n<li>\u8bad\u7ec3\uff1a\u6267\u884c <code>bash run_clm.sh<\/code>\uff0cDeepSpeed \u4e09\u8282\u70b9\u5e76\u884c\uff0cbatch_size=4\u00d78\uff0c\u5b66\u4e60\u7387 2e-5  <\/li>\n<li>\u7ed3\u679c\u5bfc\u51fa\uff1a\u8bad\u7ec3\u7ed3\u675f\u6743\u91cd\u81ea\u52a8\u4fdd\u5b58\u81f3 <strong><a href=\"https:\/\/www.starverse-ai.com\/node\/019b88aa-2fc4-790b-97e1-fdff4da0e8a6\">\u4e91\u786c\u76d8<\/a><\/strong>\uff0c\u53ef\u8de8\u5b9e\u4f8b\u5171\u4eab\uff0c\u4e5f\u53ef\u4e00\u952e\u4e0b\u8f7d\u5230\u672c\u5730  <\/li>\n<\/ol>\n<p>\u5168\u7a0b 3 \u5c0f\u65f6 12 \u5206\uff0c\u6d88\u8017 198 \u5143\uff0c<strong>\u663e\u5b58\u5229\u7528\u7387 92%<\/strong>\uff0c\u65e0 NCCL \u62a5\u9519\uff0c\u65e0 OOM\uff0c\u65e5\u5fd7\u663e\u793a loss \u4ece 3.81 \u964d\u5230 2.04\uff0c\u8fbe\u5230\u5b98\u65b9\u8bba\u6587\u540c\u7b49\u6536\u655b\u6c34\u5e73\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u4e0d\u6b62\u8bad\u7ec3\uff1aAI \u5e94\u7528\u4e00\u952e\u5373\u73a9\uff0cGPU \u4e91\u4e3b\u673a=\u201c\u5927\u6a21\u578b\u63d2\u5ea7\u201d<\/h3>\n<p>\u8bad\u7ec3\u53ea\u662f\u8d77\u70b9\uff0c\u661f\u5b87\u667a\u7b97\u8fd8\u628a\u4e3b\u6d41 <strong><a href=\"https:\/\/www.starverse-ai.com\">AI \u5e94\u7528<\/a><\/strong> \u505a\u6210\u5bb9\u5668\u6a21\u677f\uff1a<br \/>\n&#8211; Stable Diffusion XL \u7ed8\u56fe\uff1a1\u00d7RTX 4090 \u5373\u53ef 0.8 \u79d2\u51fa\u56fe\uff0c\u652f\u6301 LoRA \u5fae\u8c03<br \/>\n&#8211; ChatGLM3-6B API \u670d\u52a1\uff1alaunch \u540e\u81ea\u52a8\u751f\u6210 openapi.json\uff0c10 \u5206\u949f\u4e0a\u7ebf\u4f01\u4e1a\u7ea7\u95ee\u7b54<br \/>\n&#8211; VideoCrafter2 \u6587\u751f\u89c6\u9891\uff1a512\u00d7512 24fps\uff0c4\u00d7A100 \u5e76\u884c\uff0c1 \u5206\u949f\u751f\u6210 4 \u79d2\u9ad8\u6e05\u77ed\u7247  <\/p>\n<p>\u6240\u6709\u6a21\u677f\u4e0e GPU\u4e91\u4e3b\u673a\u5171\u4eab\u540c\u4e00\u5957\u6301\u4e45\u5316\u5b58\u50a8\uff0c\u6743\u91cd\u3001\u8bed\u6599\u3001\u8f93\u51fa\u7ed3\u679c\u4e92\u901a\uff0c\u771f\u6b63\u505a\u5230\u201c\u8bad\u7ec3\u2013\u63a8\u7406\u2013\u4ea7\u54c1\u5316\u201d\u5728\u4e00\u4e2a\u5e73\u53f0\u95ed\u73af\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u4ef7\u683c\u5bf9\u6807\uff1a\u628a\u201c\u6309\u9700\u201d\u5199\u8fdb\u5408\u540c\uff0c\u62d2\u7edd\u9690\u5f62\u52a0\u4ef7<\/h3>\n<p>\u4e0d\u5c11\u4e91\u5382\u5546\u7528\u201c\u4f4e\u4ef7\u9080\u5ba2\u3001\u51fa\u53e3\u5e26\u5bbd\u53e6\u8ba1\u8d39\u201d\u5957\u8def\u3002\u661f\u5b87\u667a\u7b97\u5b98\u7f51\u516c\u5f00 <strong><a href=\"https:\/\/www.starverse-ai.com\">\u4ef7\u683c\u9875<\/a><\/strong>\uff0c<strong>A100 40 GB 3.6 \u5143\/\u5c0f\u65f6\u3001H100 80 GB 9.9 \u5143\/\u5c0f\u65f6\u3001RTX 4090 1.2 \u5143\/\u5c0f\u65f6<\/strong>\uff0c\u4e0b\u884c\u6d41\u91cf 0.8 \u5143\/GB\uff0c\u65e0\u51b7\u542f\u52a8\u9644\u52a0\u8d39\uff0c\u65e0\u505c\u8f66\u8d39\u3002\u652f\u6301\u6309\u79d2\u8ba1\u8d39\uff0c\u5b9e\u4f8b\u5173\u673a\u5373\u505c\u8d39\uff0c\u9002\u5408\u8bba\u6587\u590d\u73b0\u3001\u7ade\u8d5b\u51b2\u523a\u3001MVP Demo \u7b49\u591a\u79cd\u573a\u666f\u3002<br \/>\n\u82e5\u9700\u5305\u6708\uff0c<strong>A100 8 \u5361\u4f4e\u81f3 1.25 \u4e07\u5143\/\u6708<\/strong>\uff0c\u6bd4\u540c\u884c\u518d\u4f4e 18%\uff0c\u5e76\u8d60\u9001 1 TB \u4e91\u786c\u76d8\uff0c<strong>\u771f\u6b63\u8ba9 GPU\u670d\u52a1\u5668\u79df\u7528\u4ef7\u683c\u5bf9\u6807\u7535\u8d39<\/strong>\u3002<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u5199\u5728\u6700\u540e\uff1a\u628a 68% \u7684\u6210\u672c\u53d8\u6210\u4f60\u7684\u521b\u65b0\u9884\u7b97<\/h3>\n<p>Meta \u7528\u5343\u4ebf\u7f8e\u91d1\u544a\u8bc9\u6211\u4eec\uff1a\u5927\u6a21\u578b\u65f6\u4ee3\uff0c\u7b97\u529b\u5c31\u662f\u95e8\u7968\u3002\u4f46\u95e8\u7968\u4e0d\u7b49\u4e8e\u4e70\u6574\u6761\u7535\u5f71\u9662\u3002\u501f\u52a9 <strong><a href=\"https:\/\/www.starverse-ai.com\">\u661f\u5b87\u667a\u7b97<\/a><\/strong> \u7684 GPU\u4e91\u4e3b\u673a\uff0c\u4f60\u53ef\u4ee5\u7528 200 \u5143\u6210\u672c\u9a8c\u8bc1\u4e00\u4e2a idea\uff0c\u7528 2 \u4e07\u5143\u5b8c\u6210\u4e00\u6b21 7B \u6a21\u578b\u5168\u91cf\u5fae\u8c03\uff0c\u628a\u7701\u4e0b\u7684 68% \u9884\u7b97\u6295\u5165\u5230\u6570\u636e\u521b\u65b0\u3001\u7b97\u6cd5\u6539\u8fdb\u548c\u5e02\u573a\u63a8\u5e7f\u3002<br \/>\n\u73b0\u5728\u6ce8\u518c\uff0c<strong>\u65b0\u7528\u6237\u7acb\u9001 10 \u5143\u4f53\u9a8c\u91d1<\/strong>\uff0c\u65e0\u9700\u4fe1\u7528\u5361\uff0c30 \u79d2\u5f00\u673a\uff0cLlama-4 \u955c\u50cf\u5df2\u70ed\u597d\uff0c45 TB \u6570\u636e\u96c6\u6b63\u5728\u786c\u76d8\u91cc\u7b49\u4f60\u3002\u4e0b\u4e00\u6b21\u98a0\u8986\u884c\u4e1a\u7684\u6a21\u578b\uff0c\u4e5f\u8bb8\u5c31\u8bde\u751f\u5728\u4f60\u7684\u4e0b\u4e00\u6b21\u70b9\u51fb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cMeta \u5df2\u7ecf\u4e3a 2024 \u5e74\u56e4\u4e0b\u4ef7\u503c 180 \u4ebf\u7f8e\u5143\u7684 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":2287,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zixun"],"views":36,"_links":{"self":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/2289","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=2289"}],"version-history":[{"count":0,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/posts\/2289\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media\/2287"}],"wp:attachment":[{"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/media?parent=2289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/categories?post=2289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starverse-ai.com\/guide\/wp-json\/wp\/v2\/tags?post=2289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}