that have pervaded nearly every facet of our daily lives are autoregressive decoder models. These models apply compute-heavy kernel operations to churn out tokens one by one in a manner that, at first glance, seems extremely inefficient. Given the enormous demand for generative AI, it is no surprise that extraordinary engineering effort is being invested into its optimization.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Chaim Rand
Optimizing Data Transfer in Distributed AI/ML Training Workloads
part of a series of posts on optimizing data transfer using NVIDIA Nsight™ Systems (nsys) profiler. Part one focused on CPU-to-GPU data copies, and part two on GPU-to-CPU copies.
Optimizing Data Transfer in Batched AI/ML Inference Workloads
is a to Optimizing Data Transfer in AI/ML Workloads where we demonstrated the use of NVIDIA Nsight™ Systems (nsys) in studying and solving the common data-loading bottleneck — occurrences where the GPU idles while it waits for input data from the CPU. In this post we focus our attention on data travelling in the opposite direction, from the GPU device to the CPU host.
Optimizing Data Transfer in AI/ML Workloads
a , a deep learning model is executed on a dedicated GPU accelerator using input data batches it receives from a CPU host. Ideally, the GPU — the more expensive resource — should be maximally utilized, with minimal periods of idle time. In particular, this means that every time it completes its execution on a batch, the subsequent batch will be “ripe and ready” for processing.
Optimizing PyTorch Model Inference on AWS Graviton
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Optimizing PyTorch Model Inference on CPU
grows, so does the criticality of optimizing their runtime performance. While the degree to which AI models will outperform human intelligence remains a heated topic of debate, their need for powerful and expensive compute resources is unquestionable — and even notorious. In previous posts, we covered the topic of AI model optimization — primarily in the context of model training — and demonstrated how it can have a decisive impact on the cost and speed of AI model development.
On the Challenge of Converting TensorFlow Models to PyTorch
In the interest of managing reader expectations and preventing disappointment, we would like to begin by stating that this post does not provide a fully satisfactory solution to the problem described in the title. We will propose and assess two possible schemes for auto-conversion of TensorFlow models to PyTorch — the first based on the Open Neural Network Exchange (ONNX) format and libraries and the second using the Keras3 API.
Overcoming the Hidden Performance Traps of Variable-Shaped Tensors: Efficient Data Sampling in PyTorch
is the part of a series of posts on the topic of analyzing and optimizing PyTorch models. Throughout the series, we have advocated for using the PyTorch Profiler in AI model development and demonstrated the potential impact of performance optimization on the speed and cost of running AI/ML workloads. One common phenomenon we have seen is how seemingly innocent code can hamper runtime performance.
Optimizing Mobileye’s REM™ with AWS Graviton: A focus on ML inference and Triton integration | Amazon Web Services
This post is written by Chaim Rand, Principal Engineer, Pini Reisman, Software Senior Principal Engineer, and Eliyah Weinberg, Performance and Technology Innovation Engineer, at Mobileye. The Mobileye team would like to thank Sunita Nadampalli and Guy Almog from AWS for their contributions to this solution and this post.
Maximizing AI/ML Model Performance with PyTorch Compilation
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Capturing and Deploying PyTorch Models with torch.export
A Demonstration of PyTorch’s Exciting New Export Feature on a HuggingFace Model Press enter or click to view image in full size When we think of starting a new AI/ML model project, most of our attention tends to focus on the big problems, such as: creating and curating datasets, designing the best ML architecture, acquiring appropriately large GPU clusters for training, and building an inference solution that meets target quality-of-service (QOS) requirements.
The Crucial Role of NUMA Awareness in High-Performance Deep Learning
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Pipelining AI/ML Training Workloads with CUDA Streams
ninth in our series on performance profiling and optimization in PyTorch aimed at emphasizing the critical role of performance analysis and optimization in machine learning development. Throughout the series we have reviewed a wide variety of practical tools and techniques for analyzing and boosting the runtime performance of PyTorch-based AI/ML models. Our goal has been twofold: To emphasize the importance of routine evaluation and optimization of AI/ML workloads.
A Caching Strategy for Identifying Bottlenecks on the Data Input Pipeline
in the data input pipeline of a machine learning model running on a GPU can be particularly frustrating. In most workloads, the host (CPU) and the device (GPU) work in tandem: the CPU is responsible for preparing and feeding data, while the GPU handles the heavy lifting — executing the model, performing backpropagation during training, and updating weights. In an ideal situation, we want the GPU — the most expensive component of our AI/ML infrastructure — to be highly utilized.
The Case for Centralized AI Model Inference Serving
models continue to increase in scope and accuracy, even tasks once dominated by traditional algorithms are gradually being replaced by deep learning models. Algorithmic pipelines — workflows that take an input, process it through a series of algorithms, and produce an output — increasingly rely on one or more AI-based components.
Debugging the Dreaded NaN
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Debugging the Dreaded NaN
Capturing and Reproducing Failures in PyTorch Training with Lightning Chaim Rand · Follow 8 min read · -- Photo by Dan Meyers on Unsplash You are training your latest AI model, anxiously watching as the loss steadily decreases when suddenly — boom! Your logs are flooded with NaNs (Not a Number) — your model is irreparably corrupted and you’re left staring at your screen in despair. To make matters worse, the NaNs don’t appear consistently.
Streaming Data from Cloud Storage with Mountpoint for Amazon S3
A First Look at a New Solution for Mounting Cloud Based Data Chaim Rand · Follow 7 min read · -- Photo by Simon Fitall on Unsplash These days, AI has become pretty much synonymous with collecting and maintaining large amounts of data. This data is typically stored in a central location and accessed at multiple different phases of the AI application development.
Efficient Metric Collection in PyTorch: Avoiding the Performance Pitfalls of TorchMetrics
Metric collection is an essential part of every machine learning project, enabling us to track model performance and monitor training progress. Ideally, Metrics should be collected and computed without introducing any additional overhead to the training process. However, just like other components of the training loop, inefficient metric computation can introduce unnecessary overhead, increase training-step times and inflate training costs.
Efficient Metric Collection in PyTorch: Avoiding the Performance Pitfalls of TorchMetrics
Arm gives up on killing off Qualcomm's vital chip license The British are coming, the British are coming ... to terms with their lossArm has given up on terminating one of its key licenses with Qualcomm, …
Decoding the Hack behind Accurate Weather Forecasting: Variational Data Assimilation
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Optimizing Transformer Models for Variable-Length Input Sequences
How PyTorch NestedTensors, FlashAttention2, and xFormers can Boost Performance and Reduce AI Costs As generative AI (genAI) models grow in both popularity and scale, so do the computational demands and costs associated with their training and deployment. Optimizing these models is crucial for enhancing their runtime performance and reducing their operational expenses.
Optimizing Transformer Models for Variable-Length Input Sequences
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
Increasing Transformer Model Efficiency Through Attention Layer Optimization
How paying “better” attention can drive ML cost savings Introduced in the landmark 2017 paper “Attention Is All You Need” (Vaswani et al., 2017), the Transformer architecture is widely regarded as one of the most influential scientific breakthroughs of the past decade. At the core of the Transformer is the attention mechanism, a novel approach that enables AI models to comprehend complex structures by focusing on different parts of input sequences based on the task at hand.
Increasing Transformer Model Efficiency Through Attention Layer Optimization
Privacy Preference Center When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies.
On the Programmability of AWS Trainium and Inferentia
Accelerating AI/ML Model Training with Custom Operators — Part 4 Photo by Agata Bres on Unsplash In this post we continue our exploration of the opportunities for runtime optimization of machine learning (ML) workloads through custom operator development. This time, we focus on the tools provided by the AWS Neuron SDK for developing and running new kernels on AWS Trainium and AWS Inferentia.
AI Model Optimization on AWS Inferentia and Trainium
Tips for accelerating ML with AWS Neuron SDK Photo by julien Tromeur on Unsplash We are in a golden age of AI, with cutting-edge models disrupting industries and poised to transform life as we know it. Powering these advancements are increasingly powerful AI accelerators, such as NVIDIA H100 GPUs, Google Cloud TPUs, AWS's Trainium and Inferentia chips, and more.
On the Programmability of AWS Trainium and Inferentia
Accelerating AI/ML Model Training with Custom Operators — Part 4 In this post we continue our exploration of the opportunities for runtime optimization of machine learning (ML) workloads through custom operator development. This time, we focus on the tools provided by the AWS Neuron SDK for developing and running new kernels on AWS Trainium and AWS Inferentia.
AI Model Optimization on AWS Inferentia and Trainium
Tips for accelerating ML with AWS Neuron SDK We are in a golden age of AI, with cutting-edge models disrupting industries and poised to transform life as we know it. Powering these advancements are increasingly powerful AI accelerators, such as NVIDIA H100 GPUs, Google Cloud TPUs, AWS’s Trainium and Inferentia chips, and more.
The Rise of Pallas: Unlocking TPU Potential with Custom Kernels
Accelerating AI/ML Model Training with Custom Operators — Part 3 This is the third part of a series of posts on the topic of building custom operators for optimizing AI/ML workloads. In our previous post we demonstrated the simplicity and accessibility of Triton. Named for the Greek god of the sea, Triton empowers Python developers to increase their control over the GPU and optimize its use for the specific workload at hand.
Implementing Sequential Algorithms on TPU
Accelerating AI/ML Model Training with Custom Operators — Part 3.A This is a direct sequel to a previous post on the topic of implementing custom TPU operations with Pallas. Of particular interest are custom kernels that leverage the unique properties of the TPU architecture in a manner that optimizes runtime performance.
Training AI Models on CPU on AWS EC2
Revisiting CPU for ML in an Era of GPU Scarcity Photo by Quino Al on Unsplash The recent successes in AI are often attributed to the emergence and evolutions of the GPU. The GPU's architecture, which typically includes thousands of multi-processors, high-speed memory, dedicated tensor cores, and more, is particularly well-suited to meet the intensive demands of AI/ML workloads.
Training AI Models on CPU
Revisiting CPU for ML in an Era of GPU Scarcity The recent successes in AI are often attributed to the emergence and evolutions of the GPU. The GPU’s architecture, which typically includes thousands of multi-processors, high-speed memory, dedicated tensor cores, and more, is particularly well-suited to meet the intensive demands of AI/ML workloads. Unfortunately, the rapid growth in AI development has led to a surge in the demand for GPUs, making them difficult to obtain.
Training AI Models on CPU
The recent successes in AI are often attributed to the emergence and evolutions of the GPU. The GPU’s architecture, which typically includes thousands of multi-processors, high-speed memory, dedicated tensor cores, and more, is particularly well-suited to meet the intensive demands of AI/ML workloads. Unfortunately, the rapid growth in AI development has led to a surge in the demand for GPUs, making them difficult to obtain.
Unleashing the Power of Triton: Mastering GPU Kernel Optimization in Python
Accelerating AI/ML Model Training with Custom Operators — Part 2 According to Greek mythology, Triton, a god of the sea, would calm or stir the sea waters by using his conch shell to control its tides and waves. In one story, in particular, Triton is depicted as having used his powers to guide the Argonauts through particularly dangerous sea waters.
Accelerating AI/ML Model Training with Custom Operators
On the potential benefits of creating model-specific GPU kernels and their application to optimizing the use of dynamically shaped tensors This post continues a long series of posts on the topic of analyzing and optimizing the runtime performance of training AI/ML models. The post could easily have been titled “PyTorch Model Performance Analysis and Optimization — Part 7”, but due to the weight of the topic at hand, we decided that a dedicated post (or series of posts) was warranted.
Multi-Framework AI/ML Development with Keras 3
All hail the return of Keras Keras is Back!! First released in 2015 as a high-level Python library for training ML models, Keras grew in popularity due to its clean and simple APIs. Contrary to the ML frameworks of the time, with their awkward and clunky APIs, Keras lowered the entry bar for many incumbent ML developers (the author included). But somewhere along the way the use of Keras became virtually synonymous with TensorFlow development.
AI Model Training with JAX
One of the most critical decisions you will need to make in the development of AI models is the choice of a machine learning development framework. Over the years, many libraries have vied for the lucrative title of "AI developer's framework of choice".
AI Model Training with JAX
Hit the road to super-fast AI/ML development One of the most critical decisions you will need to make in the development of AI models is the choice of a machine learning development framework. Over the years, many libraries have vied for the lucrative title of “AI developer’s framework of choice”.
PyTorch Native FP8
Accelerating PyTorch Training Workloads with FP8 — Part 2 As the presence of AI-based applications becomes more and more ubiquitous in our daily lives, the challenge of optimizing their runtime performance increases. Reducing the number of bits that are used to represent floating-point types is a common technique that can accelerate AI applications and reduce their memory footprint.
PyTorch Native FP8
As the presence of AI-based applications becomes more and more ubiquitous in our daily lives, the challenge of optimizing their runtime performance increases. Reducing the number of bits that are used to represent floating-point types is a common technique that can accelerate AI applications and reduce their memory footprint. And indeed, many modern-day AI hardware accelerators include dedicated support for 8-bit floating point representations.
A Priority Based Scheduler for Amazon SageMaker Training Jobs Original
Optimizing the use of limited AI training accelerators — Part 2 This post was created in collaboration with Max Rabin. This is the second part of a series of posts on the topic of maximizing the utility of scarce AI resources.
Maximizing the Utility of Scarce AI Resources: A Kubernetes Approach Original
Optimizing the use of limited AI training accelerators In the ever-evolving landscape of AI development, nothing rings truer than the old saying (attributed to Heraclitus), “the only constant in life is change”. In the case of AI, it seems that change is indeed constant, but the pace of change is forever increasing. Staying relevant in these unique and exciting times amounts to an unprecedented test of the capacity of AI teams to consistently adapt and adjust their development processes.
How to Implement a Custom Training Solution Based on Amazon EC2 Original
A Simple Solution for Managing Cloud-Based ML-Training — Part 2 This is a sequel to a recent post on the topic of building custom, cloud-based solutions for machine learning (ML) model development using low-level instance provisioning services. Our focus in this post will be on Amazon EC2. Cloud service providers (CSPs) typically offer fully managed solutions for training ML models in the cloud.
How to Implement a Custom Training Solution Based on Amazon EC2
A Simple Solution for Managing Cloud-Based ML-Training — Part 2 This is a sequel to a recent post on the topic of building custom, cloud-based solutions for machine learning (ML) model development using low-level instance provisioning services. Our focus in this post will be on Amazon EC2. Cloud service providers (CSPs) typically offer fully managed solutions for training ML models in the cloud.
Optimizing Instance Type Selection for AI Development in Cloud Spot Markets Original
Instance Selection for Deep Learning — Part 2 This post was written in collaboration with Tomer Berkovich, Yitzhak Levi, and Max Rabin. Appropriate instance selection for machine learning (ML) workloads is an important decision with potentially significant implications on the speed and cost of development. In a previous post we expanded on this process, proposed a metric for making this important decision, and highlighted some of the many factors you should take into consideration.
Debugging and Tuning Amazon SageMaker Training Jobs with SageMaker SSH Helper Original
A new tool that increases the debuggability of managed training workloads Considering all the new Amazon SageMaker features announced over the past year (2023), including at the most recent AWS re:invent, it would have been easy to have overlooked SageMaker SSH Helper — a new utility for connecting to remote SageMaker training environments. But sometimes it is the quiet enhancements that have the potential to make the greatest impact on your daily development.
A Simple Solution for Managing Cloud-Based ML-Training Original
How to Implement a Custom Training Solution Using Basic (Unmanaged) Cloud Service APIs In previous posts (e.g., here) we have expanded on the benefits of developing AI models in the cloud. Machine Learning projects, especially large ones, typically require access to specialized machinery (e.g., training accelerators), the ability to scale at will, an appropriate infrastructure for maintaining large amounts of data, and tools for managing large-scale experimentation.
Using Server-less Functions to Govern and Monitor Cloud-Based Training Experiments Original
A simple routine that can save you loads of money This blog post was co-authored with my colleague Shay Margalit. It summarizes his research into how AWS Lambda functions can be used to increase the control over the usage and costs of the Amazon SageMaker training service. Interested? Please read on :). We are fortunate (or very unfortunate — depending on who you ask) to be sharing a front row seat to an AI revolution that is expected by many to change the world as we know it.
Managing Your Cloud-Based Data Storage with Rclone Original
How to optimize data transfer across multiple object storage systems As companies become more and more dependent on cloud-based storage solutions, it is imperative that they have the appropriate tools and techniques for effective management of their big data. In previous posts (e.g., here and here) we have explored several different methods for retrieving data from cloud storage and demonstrated their effectiveness at different types of tasks.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Chaim
Contact Chaim, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack