Better HN
topnewbestaskshowjobs
Log inSign up

robertnishihara

464 karma · joined Oct 16, 2017 (9y ago) · 102 submissions

Submissions

1.

High Performance Distributed Inference with Ray Serve LLM(anyscale.com ↗)

3 points · by robertnishihara · 5mo ago · discuss

2.

Data Processing Is Becoming a GPU Workload(anyscale.com ↗)

2 points · by robertnishihara · 5mo ago · discuss

3.

67% Cost Savings with PD Disaggregation Using Ray and vLLM on AMD MI325X(anyscale.com ↗)

4 points · by robertnishihara · 5mo ago · discuss

4.

Major upgrades to Ray Serve: 88% lower latency and 11.1x higher throughput(anyscale.com ↗)

2 points · by robertnishihara · 8mo ago · 1 comment

5.

SkyRL brings Tinker to your GPUs (2025)(novasky-ai.notion.site ↗)

24 points · by robertnishihara · 9mo ago · 5 comments

6.

vLLM large scale serving: DeepSeek 2.2k tok/s/h200 with wide-ep(blog.vllm.ai ↗)

147 points · by robertnishihara · 10mo ago · 54 comments

7.

Massively Parallel Agentic Simulations with Ray(anyscale.com ↗)

2 points · by robertnishihara · 1y ago · discuss

8.

Deploy DeepSeek‑R1 with VLLM and Ray Serve on Kubernetes(anyscale.com ↗)

1 points · by robertnishihara · 1y ago · discuss

9.

An Open Source Stack for AI Compute: Kubernetes and Ray and PyTorch and VLLM(anyscale.com ↗)

1 points · by robertnishihara · 1y ago · discuss

10.

Native LLM APIs in Ray Data and Ray Serve(anyscale.com ↗)

2 points · by robertnishihara · 1y ago · discuss

11.

Joins and Hash-Shuffle in Ray Data(anyscale.com ↗)

3 points · by robertnishihara · 1y ago · discuss

12.

AsyncFlow: An Asynchronous Streaming RL Framework for LLM Post-Training(arxiv.org ↗)

4 points · by robertnishihara · 1y ago · discuss

13.

Open Source RL Libraries for LLMs(anyscale.com ↗)

1 points · by robertnishihara · 1y ago · discuss

14.

Large-Scale Deployment of Ray in Tencent's Weixin AI Infrastructure(anyscale.com ↗)

2 points · by robertnishihara · 1y ago · discuss

15.

Uv and Ray: Pain-Free Python Dependencies in Clusters(anyscale.com ↗)

44 points · by robertnishihara · 1y ago · 10 comments

16.

Roll: Reinforcement Learning Optimization for Large-Scale Learning(github.com ↗)

1 points · by robertnishihara · 1y ago · discuss

17.

An Open Source Stack for AI Compute: Kubernetes and Ray and PyTorch and VLLM(anyscale.com ↗)

1 points · by robertnishihara · 1y ago · discuss

18.

Uv and Ray: Pain-Free Python Dependencies in Clusters(anyscale.com ↗)

1 points · by robertnishihara · 1y ago · discuss

19.

Ray Batch Inference at Pinterest (Part 3)(medium.com ↗)

1 points · by robertnishihara · 2y ago · discuss

20.

Direct Preference Optimization with Synthetic Data on Anyscale(anyscale.com ↗)

1 points · by robertnishihara · 2y ago · discuss

comment 2y ago · link · parent

To clarify, what I mean is that working with "exabytes" is atypical. Most use cases are at a slightly smaller scale :)

Data processing workloads are quite common on Ray, especially with unstructured data.

Also, I work on Ray, which is the underlying framework used here, but all the work in the post was done by the Amazon team.

comment 2y ago · link · parent

Other folks have built data processing libraries on top of Ray: Modin and Daft come to mind.

But I'm not aware of anything exactly like what you're referring to!

comment 2y ago · link · parent

Multi-threaded libraries (e.g., numpy and PyTorch on CPUs come to mind) are well supported. In scenarios where many processes are each running heavily multi-threaded computations, it can help to pin specific processes to specific cores (e.g., using tools like psutil) to avoid contention.

The scenario where a Ray task forks is probably not very well supported. You can certainly start a subprocess from within a Ray task, but I think forking could easily cause issues.

You can definitely use Ray + Jax, but you probably need to avoid forking a process within a Ray worker.

comment 2y ago · link · parent

I'm glad you find it exciting!

Our intention from the start was for Ray to be general purpose. And the core Ray APIs are quite general (basically just scheduling a Python function somewhere in a cluster or instantiating a Python class as a process somewhere in the cluster).

We had AI use cases in mind from the start, since we were grad students in AI. But the generality has really been important since AI workloads encompass a huge variety of computational patterns (allreduce style communication patterns on GPUs for training, embarrassingly parallel data processing workloads on spot instances, and so on).

comment 2y ago · link · parent

Yeah, mmap, I think this is the relevant line [1].

Fun fact, very early on, we used to create one mmapped file per serialized object, but that very quickly broke down.

Then we switched to mmapping one large file at the start and storing all of the serialized objects in that file. But then as objects get allocated and deallocated, you need to manage the memory inside of that mmapped file, and we just repurposed a malloc implementation to handle that.

[1] https://github.com/ray-project/ray/blob/21202f6ddc3ceaf74fbc...

comment 2y ago · link · parent

Your right that the serialization / deserialization overhead can quickly exceed the compute time. To avoid this you have to get a lot of small things right. And given our focus on ML workloads, this is particularly important when sharing large numerical arrays between processes (especially processes running on the same node).

One of the key things is to make sure the serialized object is stored in a data format where the serialized object does not need to be "transformed" in order to access it. For example, a numpy array can be created in O(1) time from a serialized blob by initializing a Python object with the right shape and dtype and a pointer to the right offset in the serialized blob. We also use projects like Apache Arrow that put a lot of care into this.

Example in more detail:

Imagine the object you are passing from process A to process B is a 1GB numpy array of floats. In the serialization step, process A produces a serialized blob of bytes that is basically just the 1GB numpy array plus a little bit of metadata. Process A writes that serialized blob into shared memory. This step of "writing into shared memory" still involves O(N) work, where N is the size of the array (though you can have multiple threads do the memcpy in parallel and be limited just by memory bandwidth).

In the deserialization step, process B accesses the same shared memory blob (process A and B are on the same machine). It reads a tiny bit of metadata to figure out the type of the serialized object and shape and so on. Then it constructs a numpy array with the correct shape and type and with a pointer to the actual data in shared memory at the right offset. Therefore it doesn't need to touch all of the bytes of data, it just does O(1) work instead of O(N).

That's the basic idea. You can imagine generalizing this beyond numpy arrays, but it's most effective for objects that include large numerical data (e.g., objects that include numpy arrays).

There are a bunch of little details to get right, e.g., serializing directly into shared memory instead of creating a serialized copy in process A and then copying it into shared memory. Doing the write into shared memory in parallel with a bunch of threads. Getting the deserialization right. You also have to make sure that the starting addresses of the numpy arrays are 64-byte aligned (if memory serves) so that you don't accidentally trigger a copy later on.

EDIT: I edited the above to add more detail.

comment 2y ago · link · parent

I'm one of the creators of Ray. A few thoughts :)

1. This is truly impressive work from AWS. Patrick Ames began speaking about this a couple years ago, though at this point the blog post is probably the best reference. https://www.youtube.com/watch?v=h7svj_oAY14

2. This is not a "typical" Ray use case. I'm not aware of any other exabyte scale data processing workloads. Our bread and butter is ML workloads: training, inference, and unstructured data processing.

3. We have a data processing library called Ray Data for ingesting and processing data, often done in conjunction with training and inference. However, I believe in this particular use case, the heavy lifting is largely done with Ray's core APIs (tasks & actors), which are lower level and more flexible, which makes sense for highly custom use cases. Most Ray users use the Ray libraries (train, data, serve), but power users often use the Ray core APIs.

4. Since people often ask about data processing with Ray and Spark, Spark use cases tend to be more geared toward structured data and CPU processing. If you are joining a bunch of tables together or running SQL queries, Spark is going to be way better. If you're working with unstructured data (images, text, video, audio, etc), need mixed CPU & GPU compute, are doing deep learning and running inference, etc, then Ray is going to be much better.

28.

Building an LLM Router for High-Quality and Cost-Effective Responses(anyscale.com ↗)

1 points · by robertnishihara · 2y ago · discuss

29.

Ray Infrastructure at Pinterest(medium.com ↗)

1 points · by robertnishihara · 2y ago · discuss

1234