微软机器学习最新进展

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文是微软VB实验室\/英伟达GTC洞察力系列文章的一部分。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"随着人工智能和机器学习技术的飞速发展,微软在今年"},{"type":"link","attrs":{"href":"https:\/\/www.nvidia.com\/en-us\/gtc\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"英伟达GTC活动"}]},{"type":"text","text":"中的存在感一如既往地强势,这并不是什么稀奇事。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"微软的公司代表在多场会议上分享了他们最新的机器学习成果,包括规模推理、在混合环境中训练机器学习模型的新能力,以及首次亮相的、可以帮助数据科学家们更高效地分析和排除ML性能问题的新型PyTorch Profiler。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"微软的这三项创新成果均结合了微软自己的科技(如Azure),开源工具与英伟达GPU硬件科技。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"机器推理规模化"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"关于数据收集和机器学习模型训练的成本,人们的讨论很热烈。的确,这些计算的开销不是小数目,尤其是对于一些大型项目来说,高达数百万美元的计算花费并不少见。但在这些关于AI花销的讨论中,机器推理,一个基本可以算作是训练后ML模型的应用,却甚少被提及。随着深度学习模型越来越复杂,即使是在机器进行推理时,也涉及大量的数学表达式和浮点运算。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"机器推理是人工智能中非常有趣的分支之一,因为它是微软Azure等团队为用户提供切实体验的阶梯。其中一个例子便是,Azure团队与英伟达合作,优化改进微软Word中由"},{"type":"link","attrs":{"href":"https:\/\/blogs.nvidia.com\/blog\/2020\/10\/05\/microsoft-triton-ai-grammar-word\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"AI助力"}]},{"type":"link","attrs":{"href":"https:\/\/blogs.nvidia.com\/blog\/2020\/10\/05\/microsoft-triton-ai-grammar-word\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"的语法检查器"}]},{"type":"text","text":"。这项任务的目的不是为了训练模型以提供更优秀的语法检查,而是为了增强实际执行语法检查的推理引擎。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"考虑到Word庞大的用户群体,该语法检查器需要进行数十亿次的推理,是属于计算密集型的任务。这就带来了两个互相关联的难题:一是技术问题,二则是财务问题。如果想要降低成本,我们就需要更加强大且高效的技术。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"英伟达开发的"},{"type":"link","attrs":{"href":"https:\/\/developer.nvidia.com\/nvidia-triton-inference-server?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"Triton推理服务器"}]},{"type":"text","text":",可以充分利用其GPU的运算能力,供给"},{"type":"link","attrs":{"href":"https:\/\/azure.microsoft.com\/en-us\/services\/machine-learning\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"Azure"}]},{"type":"link","attrs":{"href":"https:\/\/azure.microsoft.com\/en-us\/services\/machine-learning\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"的"}]},{"type":"link","attrs":{"href":"https:\/\/azure.microsoft.com\/en-us\/services\/machine-learning\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"机器学习"}]},{"type":"text","text":"模型进行推理。在二者的结合下,工作负载得到了优化,运行也更加流畅。该推理服务器支持所有常用框架,包括PyTorch、TensorFlow、MXNet以及"},{"type":"link","attrs":{"href":"https:\/\/onnx.ai\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"ONNX"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/microsoft\/onnxruntime?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"ONNX Runtime"}]},{"type":"text","text":"作为一款高性能推理引擎,利用多种硬件加速器以达到在不同硬件配置上的最佳性能表现。在微软与英伟达的紧密合作下,ONNX Runtime集成了用于在英伟达GPU上进行模型加速的TensorRT加速器。ONNX Runtime也被用做Triton服务器的后端之一。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Azure机器学习是一个托管的平台即服务平台,为用户做大部分的管理工作。这涉及到规模问题,这也是许多人工智能项目陷入困境甚至失败的关键所在,也是技术问题有时会与财务问题发生冲突的地方,而Triton和Azure机器学习就是为了解决这一痛点而建立的。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Kubernetes:让跨企业内部\/混合与多云训练ML模型变得更容易"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"混合训练环境的搭建并非易事,而扩展资源密集型的ML模型训练规模的需求则会使问题变得更加棘手。灵活、敏捷以及治理都是至关重要的需求。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/azure.microsoft.com\/en-us\/services\/azure-arc\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"Azure Arc"}]},{"type":"text","text":"基础设施允许拥有Kubernetes资源的客户在“单一虚拟管理平台”上应用策略,执行安全监控等一系列操作。Azure机器学习与Kubernetes的集成通过扩展Kubernetes API的形式,搭建在Azure Arc的基础设施上。除此之外,通过原生Kubernetes代码概念(如操作符和CI\/CDs)以及运行在集群之上的“代理”,客户得以使用Azuer机器学习进行ML模型训练。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"无论用户混合使用了什么集群,Azure机器学习都让他们可以轻松地切换目标。Azure机器学习的Kubernetes本地代理支持的框架包括SciKit、TensorFlow、PyTorch和MPI。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本地代理也让这套系统的运行更加顺滑。它免去了数据科学家们学习Kubernetes的需要,也让了解Kubernetes的IT操作员免去了学习机器学习的功夫。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"PyTorch Profiler"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"全新的PyTorch Profiler是一款由微软与Facebook合作开发的开源工具,为常用ML框架PyTorch提供GPU的性能调试功能。这款故障排除工具有望帮助数据科学家们和开发者们以更高效的方式分析和排查大规模深度学习模型的性能问题,最大限度地提高昂贵的计算资源(硬件)的使用率。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在机器学习中,分析(profiling)负责检查模型的性能。这与模型预测的准确性不同,性能在这里指的是模型对计算机硬件资源的使用效率与使用率。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新型的Profiler以PyTorch原有的autograd分析器为基础构建,通过高保真的GPU分析引擎的加强,使用户能够捕捉并关联有关PyTorch操作的信息和GPU硬件级的详细信息。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PyTorch Profiler的配置和使用都不需要花费太多精力。它完完全全是集成的产物,结合了全新Profiler的profile模块、全新libkineto库,以及PyTorch Tensorboard Profiler的插件。你在Visual StudioCode将这一切全部可视化。它不仅适合初学者,也适合经验丰富的从业者,它的应用横跨研究到生产的各种用例,它是对英伟达更先进的"},{"type":"link","attrs":{"href":"https:\/\/developer.nvidia.com\/nsight-visual-studio-edition?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"NSight"}]},{"type":"text","text":"的补充。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PyTorch Profiler的主要功能之一是它的时间线追踪。简单来说,它可以显示CPU与GPU的活动,让用户可以放大并观察每个活动的具体情况。在这里,你可以看到所有典型的PyTorch操作符,以及更高级的Python模型和GPU时间线。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用户在PyTorch Profiler的可视化窗口中观察GPU利用率的情况时,可能会注意到一些小的“缺口”。这些小缺口代表着GPU可能会有约40毫秒的空闲,而用户会希望优化这些空闲时间,让GPU有事可做。PyTorch Profiler可以让用户更深入地了解GPU的运作,看看有哪些依赖关系,以及在这个空闲间隙之前有哪些事件。如果将问题追溯到CPU,用户可能会发现它才是瓶颈所在,而GPU则干坐在那里等待系统的另一部分读取完它需要的数据。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在这样微观的层面上检测GPU效率或许看起来微不足道,但如果一个步骤只需要150毫秒,那么此时GPU中的40毫秒空闲将会占据相当大的比例。再考虑一下,如果一个项目一次运行需要数小时,甚至是数周时,那么斤斤计较每一步中的损失就变得必要了,因为那意味着你在计算周期中付出的金钱变得低效了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PyTorch Profiler同时还提供建议功能,用于指导模型构建者们解决常见的问题和可能遇见的情况。在本文关于GPU利用率的例子中,你要做的可能只是调整DataLoader的worker数量,以确保GPU能够保持忙碌状态。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文链接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/venturebeat.com\/2021\/04\/22\/microsoft-details-the-latest-developments-in-machine-learning-at-gtc-21\/?fileGuid=VcGCRKtKhTDdrRpp","title":"","type":null},"content":[{"type":"text","text":"https:\/\/venturebeat.com\/2021\/04\/22\/microsoft-details-the-latest-developments-in-machine-learning-at-gtc-21\/"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章