[{"data":1,"prerenderedAt":385},["ShallowReactive",2],{"content-query-3Yw5CwBXio":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":379,"_id":380,"_source":381,"_file":382,"_stem":383,"_extension":384},"/news/zh/3766","zh",false,"","Day0迁移、一键部署，华为开源的昇思MindSpore成为大模型开发的“万能钥匙”","没有一个大模型可以一统天下。","2025-06-18","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/8292143a60504dae8b41a4c1e79461f9.png","news",{"type":14,"children":15,"toc":373},"root",[16,24,33,38,50,55,60,80,88,110,115,132,137,144,151,156,166,178,183,188,193,218,225,231,236,249,256,281,288,297,302,309,315,320,338,350,355,363],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"day0迁移一键部署华为开源的昇思mindspore成为大模型开发的万能钥匙",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":17,"tag":29,"props":30,"children":31},"strong",{},[32],{"type":23,"value":9},{"type":17,"tag":25,"props":34,"children":35},{},[36],{"type":23,"value":37},"这，或许已经成为了AI大模型时代行业里的一个共识。",{"type":17,"tag":25,"props":39,"children":40},{},[41,43,48],{"type":23,"value":42},"在如此背景之下，面对众多且日新月异的主流大模型和AI技术，如何能",{"type":17,"tag":29,"props":44,"children":45},{},[46],{"type":23,"value":47},"在一个框架、生态下去体验",{"type":23,"value":49},"，却成了开发者们“老大难”的问题。",{"type":17,"tag":25,"props":51,"children":52},{},[53],{"type":23,"value":54},"难道就没有一个又快又好又方便的解决办法吗？",{"type":17,"tag":25,"props":56,"children":57},{},[58],{"type":23,"value":59},"有的——",{"type":17,"tag":25,"props":61,"children":62},{},[63,78],{"type":17,"tag":29,"props":64,"children":65},{},[66,68,76],{"type":23,"value":67},"华为开",{"type":17,"tag":29,"props":69,"children":70},{},[71],{"type":17,"tag":29,"props":72,"children":73},{},[74],{"type":23,"value":75},"源的昇",{"type":23,"value":77},"思MindSpore",{"type":23,"value":79},"，了解一下。",{"type":17,"tag":25,"props":81,"children":82},{},[83],{"type":17,"tag":84,"props":85,"children":87},"img",{"alt":7,"src":86},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/212699aa8dc643a69924e1419ddc6c0b.png",[],{"type":17,"tag":25,"props":89,"children":90},{},[91,93,108],{"type":23,"value":92},"在这里，主流SOTA大模型的“搬家”是这样的——",{"type":17,"tag":29,"props":94,"children":95},{},[96,98,106],{"type":23,"value":97},"训练D",{"type":17,"tag":29,"props":99,"children":100},{},[101],{"type":17,"tag":29,"props":102,"children":103},{},[104],{"type":23,"value":105},"a",{"type":23,"value":107},"y0迁****移",{"type":23,"value":109},"：",{"type":17,"tag":25,"props":111,"children":112},{},[113],{"type":23,"value":114},"只需改动极少极少的代码就OK，并且精度和性能都在线。",{"type":17,"tag":25,"props":116,"children":117},{},[118,123,125,130],{"type":17,"tag":29,"props":119,"children":120},{},[121],{"type":23,"value":122},"推理",{"type":23,"value":124},"是",{"type":17,"tag":29,"props":126,"children":127},{},[128],{"type":23,"value":129},"一键部署",{"type":23,"value":131},"的：",{"type":17,"tag":25,"props":133,"children":134},{},[135],{"type":23,"value":136},"训练转推理全流程自动化，20多个主流大模型开箱即用，百亿参数模型加载只需不到30秒。",{"type":17,"tag":25,"props":138,"children":139},{},[140],{"type":17,"tag":84,"props":141,"children":143},{"alt":7,"src":142},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/0987d6696b0d47a2b769caedcf3c760c.png",[],{"type":17,"tag":145,"props":146,"children":148},"h6",{"id":147},"mindspore生态快速迁移解决方案的技术架构",[149],{"type":23,"value":150},"****△****MindSpore生态快速迁移解决方案的技术架构",{"type":17,"tag":25,"props":152,"children":153},{},[154],{"type":23,"value":155},"那么昇思MindSpore是如何做到，我们继续往下看。",{"type":17,"tag":157,"props":158,"children":160},"h3",{"id":159},"改4行代码搬家deepseek-v3",[161],{"type":17,"tag":29,"props":162,"children":163},{},[164],{"type":23,"value":165},"改4行代码，“搬家”DeepSeek-V3",{"type":17,"tag":25,"props":167,"children":168},{},[169,171,176],{"type":23,"value":170},"为了让迁移大模型这件事变得无感知，昇思MindSpore“翻译神器”——",{"type":17,"tag":29,"props":172,"children":173},{},[174],{"type":23,"value":175},"MSAdapter",{"type":23,"value":177},"。",{"type":17,"tag":25,"props":179,"children":180},{},[181],{"type":23,"value":182},"简单来说，这个工具可以把其他框架的代码转换成MindSpore能看懂的语言，从而实现 “零损耗” 迁移。",{"type":17,"tag":25,"props":184,"children":185},{},[186],{"type":23,"value":187},"比如PyTorch写的训练脚本，直接在MindSpore里运行，动态图体验和原来一样顺手，95%以上的接口都能自动转换，迁移损耗几乎为零。",{"type":17,"tag":25,"props":189,"children":190},{},[191],{"type":23,"value":192},"在此背后还有其他的“独家秘笈”，加速训练调试调优，具体技术如下：",{"type":17,"tag":194,"props":195,"children":196},"ul",{},[197,203,208,213],{"type":17,"tag":198,"props":199,"children":200},"li",{},[201],{"type":23,"value":202},"动态图多级流水：把算子（模型的基本计算单元）的处理拆成4个阶段（如Python 转换、形状推导等），用多核并行处理，速度提升3-4倍。",{"type":17,"tag":198,"props":204,"children":205},{},[206],{"type":23,"value":207},"JIT 编译：把常用代码 “打包” 成高效执行的模块，像把重复工作做成模板，用的时候直接拿出来用，兼顾灵活编程和高性能。",{"type":17,"tag":198,"props":209,"children":210},{},[211],{"type":23,"value":212},"自动策略寻优：大模型训练需要选最佳并行策略（比如数据并行、张量并行等），传统靠专家经验，现在MindSpore能自动搜索最优方案，比如在DeepSeek-V3训练中，性能提升了9.5%。",{"type":17,"tag":198,"props":214,"children":215},{},[216],{"type":23,"value":217},"执行序比对：大模型训练可能因算子执行顺序不同导致精度问题，MindSpore能自动比对执行顺序，快速找到差异，避免人工排查几十万算子的麻烦。",{"type":17,"tag":25,"props":219,"children":220},{},[221],{"type":17,"tag":84,"props":222,"children":224},{"alt":7,"src":223},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/e69d335a4bff4a40861b25c51beb8652.png",[],{"type":17,"tag":145,"props":226,"children":228},{"id":227},"mindspore训练day0迁移方案",[229],{"type":23,"value":230},"****△****MindSpore训练Day0迁移方案",{"type":17,"tag":25,"props":232,"children":233},{},[234],{"type":23,"value":235},"以DeepSeek-V3为例，代码改动量如下：",{"type":17,"tag":194,"props":237,"children":238},{},[239,244],{"type":17,"tag":198,"props":240,"children":241},{},[242],{"type":23,"value":243},"Shell脚本：修改分布式任务启动相关参数，共涉及4行代码调整。",{"type":17,"tag":198,"props":245,"children":246},{},[247],{"type":23,"value":248},"Python脚本：变更量占比\u003C1%，已通过代码补丁工具自动完成修改。",{"type":17,"tag":25,"props":250,"children":251},{},[252],{"type":17,"tag":84,"props":253,"children":255},{"alt":7,"src":254},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/932559b31f9247d39ad32864d1cbc92e.png",[],{"type":17,"tag":25,"props":257,"children":258},{},[259,261,266,268,273,275,280],{"type":23,"value":260},"不仅",{"type":17,"tag":29,"props":262,"children":263},{},[264],{"type":23,"value":265},"精度",{"type":23,"value":267},"上可以实现",{"type":17,"tag":29,"props":269,"children":270},{},[271],{"type":23,"value":272},"Day0对齐",{"type":23,"value":274},"，而且在保持并行策略一致的情况下叠加MindSpore自研增量特性，",{"type":17,"tag":29,"props":276,"children":277},{},[278],{"type":23,"value":279},"性能还能提升5%",{"type":23,"value":177},{"type":17,"tag":25,"props":282,"children":283},{},[284],{"type":17,"tag":84,"props":285,"children":287},{"alt":7,"src":286},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/cd6acdd6cb6e45ef81056f3ace10b993.png",[],{"type":17,"tag":157,"props":289,"children":291},{"id":290},"huggingface模型们推理一键部署",[292],{"type":17,"tag":29,"props":293,"children":294},{},[295],{"type":23,"value":296},"HuggingFace模型们，推理一键部署",{"type":17,"tag":25,"props":298,"children":299},{},[300],{"type":23,"value":301},"在推理部署这块儿，昇思则是用vLLM-MindSpore插件能让HuggingFace模型在半小时内完成部署并上线。",{"type":17,"tag":25,"props":303,"children":304},{},[305],{"type":17,"tag":84,"props":306,"children":308},{"alt":7,"src":307},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/06/20/a8ca2db5784d41f38a65a6cadfcf5ba4.png",[],{"type":17,"tag":145,"props":310,"children":312},{"id":311},"vllm-x-mindspore-框架图",[313],{"type":23,"value":314},"vLLM x MindSpore 框架图",{"type":17,"tag":25,"props":316,"children":317},{},[318],{"type":23,"value":319},"要是碰到千亿参数的大模型，MindSpore用三层部署模式重新打造了推理流程：",{"type":17,"tag":194,"props":321,"children":322},{},[323,328,333],{"type":17,"tag":198,"props":324,"children":325},{},[326],{"type":23,"value":327},"直接用HuggingFace的权重：能直接加载HuggingFace的模型权重，不用转换格式；通过vLLM - MindSpore插件，短短几分钟就能把模型变成可提供服务的状态。",{"type":17,"tag":198,"props":329,"children":330},{},[331],{"type":23,"value":332},"模型拿来就能用：支持很多业内常用的模型，拿来就能直接用，像DeepSeek、Pangu、Qwen这些，已经有20多个模型上线了。",{"type":17,"tag":198,"props":334,"children":335},{},[336],{"type":23,"value":337},"减少启动时的延迟：权重加载花费的时间减少了80%（百亿参数的模型加载时间不到30秒）；图编译的延迟也压缩到了毫秒级别。",{"type":17,"tag":25,"props":339,"children":340},{},[341,343,348],{"type":23,"value":342},"从实测效果来看，以",{"type":17,"tag":29,"props":344,"children":345},{},[346],{"type":23,"value":347},"Pangu Pro MoE 72B",{"type":23,"value":349},"为例，使用vLLM和MindSpore在Atlas 800I A2上部署推理服务，当前在时延小于100ms的情况下单卡增量吞吐可达每秒1020tokens，在Atlas 300I Pro上可达每秒130tokens。",{"type":17,"tag":25,"props":351,"children":352},{},[353],{"type":23,"value":354},"以上便是关于昇思MindSpore“训练Day0迁移、推理一键部署”的大致内容了，了解更多详情可戳。",{"type":17,"tag":25,"props":356,"children":357},{},[358],{"type":17,"tag":29,"props":359,"children":360},{},[361],{"type":23,"value":362},"技术报告地址：",{"type":17,"tag":25,"props":364,"children":365},{},[366],{"type":17,"tag":105,"props":367,"children":371},{"href":368,"rel":369},"https://gitcode.com/ascend-tribe/ascend-cluster-infra/blob/main/MindSpore/ascend-cluster-infra-mindspore.md",[370],"nofollow",[372],{"type":23,"value":368},{"title":7,"searchDepth":374,"depth":374,"links":375},4,[376,378],{"id":159,"depth":377,"text":165},3,{"id":290,"depth":377,"text":296},"markdown","content:news:zh:3766.md","content","news/zh/3766.md","news/zh/3766","md",1776506089162]