Skip to Content
Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署
book

Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署

by Max Pumperla, Edward Oakes, Richard Liaw
May 2024
Intermediate
252 pages
5h 31m
Chinese
China Machine Press
Content preview from Ray 分布式机器学习:利用Ray 进行大模型的数据处理、训练、推理和部署
Ray AIR
入门
|
215
相应的文档。
10.3.1 AIR
任务执行
下面介绍
AIR
的执行模型。
无状态计算
Ray
数据集使用
Ray
任务或者执行器执行转换操作。任务更受欢迎,因为任务
可以更容易地进行调度并且灵活性高。数据集库使用一种调度策略,可在集群
中均衡任务及其输出。
如果一个转换操作具有状态或者需要昂贵的设置(例如,加载大型模型检查
点),则可以使用执行器。在这种情况下,可以先在执行器中加载一次大型模
型,然后在推理任务中重复使用执行器,从而提高整体性能。当
Ray Dataset
使
用执行器时,首先创建执行器,并且在执行相关的转换操作之前将必要的数据
(例如,加载的模型)传输给执行器。
通常情况下,数据集存储在
Ray
对象存储内存中,而大型数据集则溢出到磁盘
上。但是对于无状态转换操作,通常不需要将中间结果保留在内存中。就像第
6
章展示的,使用数据集的管道方式,数据可以从存储中流式传输,这样可以提
高性能
8
。操作的宗旨是只加载当前执行转换所需的一部分数据,这可以大大
减少转换操作的内存占用,并且加快整体执行速度。
1
有状态计算
Ray Train
RLlib
为它们的分布式训练
worker
生成执行器。正如示例演示的,
这两个库也与
Tune
无缝集成。在第
5
章中,我们详细介绍了
Tune
如何启动
Trial
Trial
本质上是执行特定任务的一组执行器。如果你在
Train
RLlib
中使
Tune
,则意味着创建一个执行器树结构,即为每个
Tune Trial
创建一个执行
器,以及为
Train
RLlib
请求的并行训练 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

通过可观测性确保数据与AI的可靠性

通过可观测性确保数据与AI的可靠性

Barr Moses, Michael Segner

Publisher Resources

ISBN: 9787111753384