页面简介
Multimodal AI workloads are pushing the boundaries of today’s infrastructure, demanding systems that can handle multimodal data (text, images, audio, video), high-volume throughput pipelines, and CPU and GPU scheduling at scale. Ray Data is the fastest and most efficient way to process these workloads at scale.
正文摘录
HomeBlogBlog DetailBenchmarking Multimodal AI Workloads on Ray DataBy Richard Liaw, Alexey Kudinkin, Justin Hsu, Matthew Owen, Balaji Veeramani, Praveen Gorthy and Julian Forero | October 3, 2025Multimodal AI workloads are pushing the boundaries of today’s infrastructure, demanding systems that can handle multimodal data (text, images, audio, video), high-volume throughput pipelines, and CPU and GPU scheduling at scale.Ray Data is a data processing engine targeted towards these workloads. It has the following key features:A streaming batch execution model, which effectively pipelines execution across heterogeneous CPU and GPU resources, maximizing resource utilization and reducing costs for multimodal AI workloads.Ecosystem Integrations: performant, first-class integration with key AI projects such as vLLM, SGLang, Lance, and PyArrow to efficiently process multimodal data - whether that’s preprocessing data for training or running batch inference with cutting edge AI modelsBuilt for scale: Ray Data can independently scale CPU and GPU workers with no code changes while offering first-class support for fault tolerance and autoscaling. Code runs unchanged from one machine to hundreds of nodes processing hundreds of TB of data.Recently, we’ve seen interest in the community for performance benchmarks comparing Ray Data with alternative solutions in the Ray ecosystem such as Daft, a distributed DataFrame library. Daft’s choice to build on Ray underscores the strength of the ecosystem, and we’re excited to see their innovations expand it.The Daft team recently published benchmarks comparing their new Flotilla execution engine with Ray Data and EMR Spark. In reproducing these results, we’ve observed that compared to Daft, Ray Data is:30% faster, on average, multimodal AI workloads processing. 3x faster when increasing GPU utilization with reduced CPU starvation e.g. image batch inference.7x more efficient large production-scale workloads.More details on each of these below. LinkReproducing the Ray Data vs. Daft benchmarksTo test and better understand the limitations of the systems ourselves, we ran similar workloads under comparable settings to those run by the Daft team.Here’s a quick summary of the workloads that we ran:Image Classification: Processing 800k ImageNet images using ResNet18. The pipeline downloads images, deserializes them, applies transformations, runs ResNet18 inference on GPU, and outputs predicted labels.Document Embedding: Processing 10k PDF documents from Digital Corpora. The pipeline reads PDF documents, extracts text page-by-page, splits into chunks with overlap, embeds using a all-MiniLM-L6-v2 model on GPU, and outputs embeddings with metadata.Audio Transcription: Transcribing 113,800 audio files from Mozilla Common Voice 17 dataset using a Whisper-tiny model. The pipeline loads FLAC audio files, resamples to 16kHz, extracts features using Whisper’s processor, runs GPU-accelerated batch inference with the model, and outputs transcriptions with metadata.Video Object Detection: Processing 10k video frames from Hollywood2 action videos dataset using YOLOv11n for object detection. The pipeline loads video frames, resizes them to 640x640, runs batch inference with YOLO to detect objects, extracts individual object crops, and outputs object metadata and cropped images in Parquet format.Across these multimodal AI workloads, we observed an overall average speedup of roughly 30% comparing Daft 0.6.2 and Ray Data 2.50 (release candidate).Figure 1. Daft vs. Ray Data Processing Timesfig1-daft-ray-data-ai-workloads-benchmarkIn general, we were unable to access the provided datasets from the original Daft benchmarks, so we followed the published methodology and made best-effort reproductions of the datasets available. Below, we share our findings from the process of reproducing each of these workloads.LinkAudio TranscriptionThe audio transcription workload used a small Whisper model to generate audio transcriptions from a voice dataset. In this workload, we were unable to access the provided Daft dataset, so we followed the published methodology -- taking the Mozilla Common Voice dataset from HuggingFace and uploading a subset of files onto S3.Code hereData: Mozilla Common Voice 17 en (113,800 files) Path: s3://air-example-data/common_voice_17/parquet/Model: openai/whisper-tinyCluster: g6.xlarge head / 8 g6.xlarge workersWe made no changes to the Daft benchmark script provided by the Daft team. For the Ray Data script, we made a change to drop unused data after they were used. Again, similarly to above, this puts more burden on the user to keep track of which columns to drop and manage, but in Ray 2.51, this will be automatically handled by Ray Data. The numbers below are taken from an average across 4 runs. We also ran 1 warmup run to download the model and remove any startup overheads that would affect the result.DaftRay Data(code from Daft)Ray Data(with changes)Audio Transcription510.5 sec499.9 sec312.6 sec (39% faster)LinkDocument EmbeddingThe next benchmark was a PDF embedding generation workload on a subset of the Digital Corpora dataset. On this workload, similarly, we couldn’t access the provided datasets from the Daft team. In a best effort reproduction, we followed their published methodology -- we took the first 10k PDFs from Digital Corpora, uploaded them onto S3, and wrote a metadata file that pointed to the URIs of the PDFs. Code hereData: 10k PDFs from Digital CorporaPath: "s3://ray-example-data/digitalcorpora/metadata"Model: sentence-transformers/all-MiniLM-L6-v2Cluster: g6.xlarge head / 8 g6.xlarge workersWe made no changes to the Daft benchmark script. For the Ray Data script, we added a change to drop the raw bytes column after parsing it into the PDF parser. This puts more burden on the user to keep track of which columns to drop and hold onto, but in Ray 2.51, this will be automatically handled by Ray Data. Daft already has such a feature as part of its library.The numbers below are taken from an average across 4 runs. We also ran 1 warmup run to download the model and remove any startup overheads that would affect the result.DaftRay Data(code from Daft)Ray Data(with changes)Document Embedding51.3 sec148.8 sec (290% slower)29.4 sec (43% faster)LinkImage ClassificationThe image classification benchmark uses a ResNet model to do image classification on a subset of the ImageNet dataset. Unfortunately, we couldn’t access the provided datasets from the Daft team. In a best effort reproduction, we followed their published methodology -- we took an 800k file subset of ImageNet, uploaded them onto S3, and wrote a metadata file that pointed to the URIs of the images.Code hereData: 800k images from ImageNetPath: “s3://ray-example-data/imagenet/metadata_file”Model: Resnet-18Cluster: g6.xlarge head8 workers of various types:g6.xlarge (4 CPUs/1 GPU)g6.2xlarge (8 CPUs/1 GPU)g6.4xlarge (16 CPUs/1 GPU)g6.8xlarge (32 CPUs/1 GPU)For Daft, we used their published script and made two minor modifications:We added an extra repartition step in the pipeline logic to achieve better performance. This code isn't in Daft's benchmark, possibly because their Parquet metadata is pre-partitioned. Without this, we saw a 20-25% increase in execution time for Daft. We also added a df = df.where(df["decoded_image"].not_null()) line to filter out images with null values, which would otherwise break the pipeline.For Ray:We made a change to the provided script to drop columns that are no longer used. This puts more burden on the user to keep track of which columns to drop and hold onto, but in a later version of Ray, this will be automatically handled by Ray Data.On Ray Data 2.50 release candidate (RC), we also leverage Ray Data’s new download expression, which provides an optimized way to load images from provided URIs. 2.50 also features optimized parquet footer sampling which reduces the time to first output.In the first test, we compared Ray Data to Daft on g6.xlarge instances.DaftRay Data(2.49.2)Ray Data(2.50)Document Embedding314.97 sec989.81 sec456.23 secTo the Daft team’s credit, Daft was still able to run faster in this particular configuration. However, in the reproduction process, we noticed that:The GPU utilization of both systems was very low -- less than 20% for both systems, and was fundamentally starved by not having enough CPUs. We tested multiple CPU–GPU configurations to evaluate performance, and we noticed that Ray Data began to outperform Daft across all other instance types.g6.xlarge(4 CPUs)g6.2xlarge(8 CPUs)g6.4xlarge(16 CPUs)g6.8xlarge(32 CPUs)Ray Data(2.50 RC)456.2 +/- 39.9 sec195.5 +/- 7.6 sec144.8 +/- 1.9 sec111.2 +/- 1.2Daft315.0 +/- 31.2 sec202.0 +/- 2.2 sec195.0 +/- 6.6 sec195.3 +/- 2.5 secCompared on g6.8xlarge instances, Ray Data is 1.7x faster than Daft. More details in the below section on maximizing GPU efficiency.LinkVideo Object DetectionThe video object detection workload takes a collection of videos stored on S3, downloads and decodes them, and then sends the images through a YOLO11n model to create bounding boxes to extract key objects. The cropped object images are then written to S3, inlined in parquet files.On the video object detection benchmark, we leveraged the same dataset as provided from Daft.Code hereData: 1,000 videos from Hollywood-2 Human Actions datasetPath: s3://daft-public-data/videos/Hollywood2-actions-videos/Hollywood2/AVIClips/Model: YOLO11nCluster: g6.xlarge head8 workers of various types:g6.xlarge (4 CPUs/1 GPU)g6.2xlarge (8 CPUs/1 GPU)g6.4xlarge (16 CPUs/1 GPU)g6.8xlarge (32 CPUs/1 GPU)In this situation, we were able to reproduce Daft’s benchmark numbers for both Ray Data and Daft. Naturally, we were curious about the performance delta.What we noticed was a hidden detail in the script -- PNG encoding. Daft has a default image encoder expression, which leverages the underlying rust native image encoding library. However, Ray Data doesn’t have a default encoding ex