VOOZH about

URL: https://thenewstack.io/how-ray-a-distributed-ai-framework-helps-power-chatgpt/

⇱ How Ray, a Distributed AI Framework, Helps Power ChatGPT - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-01-17 07:40:32
How Ray, a Distributed AI Framework, Helps Power ChatGPT
Data / Software Development

How Ray, a Distributed AI Framework, Helps Power ChatGPT

Anyscale co-founder Ion Stoica explains the open source platform Ray, and how it scales Machine Learning in this new era of generative AI.
Jan 17th, 2023 7:40am by Richard MacManus
👁 Featued image for: How Ray, a Distributed AI Framework, Helps Power ChatGPT
Image via Shutterstock 

According to Ion Stoica, co-founder of Databricks and Anyscale, and also a senior professor of computer science at Berkeley, 2023 will be the year of “distributed AI frameworks.” Needless to say, he has already had a hand in creating such a tool, in the form of Anyscale’s open source Ray platform. Among other uses, Ray helps power OpenAI’s groundbreaking ChatGPT.

I interviewed Stoica to find out what Ray does exactly and, more generally, what is needed to scale AI software in this new era of generative AI. We also discuss the latest in “sky computing,” a term Stoica and his Berkeley team introduced in 2021, in a paper that proposed a new form of cloud computing based around interoperability and distributed computing.

What Is Ray?

According to Stoica, Ray is a “distributed computing ecosystem as a service,” which for the past couple of years has been focused on “supporting machine learning workloads.” He says it began development in 2016 as a class project at Berkeley, with the goal of achieving “distributed training” (meaning training of data for machine learning). Berkeley was also where Apache Spark, a data processing engine, was built. But Stoica said they quickly learned that Spark wasn’t the best fit for deep learning workloads.

“Spark was very good for data processing and for classical machine learning,” he explained. “But at that time [2016] […] deep learning was surging and deep learning needed GPUs. Without going into much detail of Spark, since it is Java-based it doesn’t support GPUs very well.”

As the product development continued, the Berkeley team — which included Stoica’s Anyscale co-founders, and his grad students Robert Nishihara and Philipp Moritz — got more ambitious. After distributed training, they added support for reinforcement learning.

“Reinforcement learning is a pretty complex beast, so to speak,” said Stoica, “because it requires you to do many things — it requires you to train an agent, to interact with the simulator or the environment, to get the state of the environment, and then to make decisions based on that. […] And then many of these reinforcement learning applications also use simulators, like games or manufacturing simulators. And so you have to run the simulation, and all of this at scale.”

One of the first use cases for Ray was helping Team New Zealand retain the America’s Cup, the most prestigious yachting prize in the world. Similar to Formula One with cars, champions in the America’s Cup rely on state-of-the-art technology to prevail. To win in 2022, Team NZ used Anyscale’s RLlib, a reinforcement learning Python framework built on Ray, to run sailing simulations “around the clock.”

👁 America's Cup tech

Graphic via Anyscale

On its website, Anyscale positions Ray as the “simplest path to scaling Python.” According to Stoica, Ray is “like an extension of Python” and — like Python — there are a set of Ray libraries that are targeted towards different use cases. The awkwardly named RLlib is for reinforcement learning, but there are similar libraries for training, serving, data pre-processing, and more.

Why OpenAI Is Using Ray

In its case studies paper, Anyscale lists companies like Uber, Shopify and Instacart as users of Ray. But of course, the most interesting use case currently is how OpenAI is using it for ChatGPT. I asked Stoica for more details about that.

“I wish I knew a lot more… OpenAI is very secretive,” he chuckled. However, he did put into context the reason why OpenAI relies on Ray’s distributed scaling technology. If you plot compute demands for training state-of-the-art machine learning models, he said, that graph is “growing at least 10 times every 18 months.” This growth rate has been happening since 2010, he added.

If that formula sounds familiar, you’ll remember that Moore’s Law states that the number of transistors in a dense integrated circuit (IC) doubles about every two years. Stoica is saying that ML training requirements is increasing tenfold every 18 months, which implies that personal computers alone aren’t powerful enough to meet demand for training ML models.

“Moore’s law is slowing down,” said Stoica, “and so you’ll see this growing gap between the demand of these machine learning workloads and the capabilities of a single node or single processor. And it’s obvious that the only way you can support these workloads, eventually, is to distribute these workloads.”

He thinks that accelerators, like GPUs, will help close the gap a little bit, “but they are not going to solve the problem.” Likewise, he says that the issue isn’t just about compute power, but the ability of computer memory to deal with ML loads.

Managing the Data and Using with Kubernetes

As a way to help deal with these ML demands, Ray helps orchestrate the process of ingesting and processing data.

“It’s a very generic, easy-to-use, Python-native, distributed compute platform,” said Stoica, adding that it serves as a “substrate to do training, data ingestion, reprocessing — all of these things.”

👁 Ray architecture

Image via Anyscale, via Google; click here to see full view.

This ability to manage a complex compute process sounds a little bit like what Kubernetes does for cloud computing infrastructure (i.e. orchestrate it at scale in order to deploy applications).

“Ray, it’s one level above,” Stoica said in response, referring to the computing stack. “Because Ray is for the programmer. […] it’s also doing some management of the resources and so forth, but it’s on top of Kubernetes.”

He noted that Google recently built a machine learning platform on GCP, using a combination of Ray, Kubernetes and Kubeflow.

Sky Computing Update

Finally, I asked Stoica for an update on our August 2021 conversation about “sky computing,” a term he and his Berkeley colleagues termed to refer to a proposed new era of interoperable cloud computing. In November, his Berkeley lab announced SkyPilot, an open source “intercloud broker for Sky Computing,” as a first step towards this vision.

“Given a job and its resource requirements (CPU/GPU/TPU),” Berkeley’s Zongheng Yang explained, “SkyPilot automatically figures out which locations (zone/region/cloud) have the compute to run the job, then sends it to the cheapest one to execute.

👁 SkyPilot

Graphic via Berkeley

SkyPilot operates just above the cloud computing layer, so (as with Kubernetes) there is no direct relation to what Ray is doing. However, it’s interesting that the early use cases for SkyPilot are to run ML training on the cloud. So it seems that SkyPilot is being positioned as a complementary piece to Ray in a modern ML-reliant tech stack.

Solving Increasing Compute Demands

If there is a throughput to Ion Stoica’s work — from the massive data companies he helps build, to the sky computing work he does with his students — it’s that he wants to find solutions for what he terms “the compute demands of this world.” With ML becoming increasingly important to enterprises and to society in general, compute will need to be distributed. Ray is the platform for that, says Stoica (Anyscale also runs a managed service version of Ray). As for his sky computing concept, that’s about distributing the load — and cost — of cloud computing, a layer below Ray.

Finally, Stoica expects to see a lot of more open source ML models come out, since many businesses will be uncomfortable relying on one company for ML — such as OpenAI, especially now that Microsoft is about to own 49% of it. More ML models will, of course, raise the demand for distributed compute solutions. But don’t worry, Ion Stoica has you covered.

TRENDING STORIES
Richard MacManus is a Senior Editor at The New Stack and writes about web and application development trends. Previously he founded ReadWriteWeb in 2003 and built it into one of the world’s most influential technology news sites. From the early...
Read more from Richard MacManus
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: OpenAI, Databricks.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.