among the issues we face in implementing AI algorithms, we normally deal with the processors’ potential to deal with them.
However now, NVIDIA’s GPUs energy the newest massive language fashions, and firms compete to construct sooner AI accelerators. These new chips promise extra computational energy, extra cores, and extra operations per second.
So, one would assume that the way forward for AI relies on constructing more and more highly effective processors! However there’s a drawback. A lot of right now’s AI programs are usually not restricted by how rapidly they’ll carry out calculations. They’re restricted by how rapidly they’ll entry information. Knowledge that’s important for them to carry out their calculations.
In different phrases, the way forward for AI could rely much less on computation and extra on reminiscence.
I do know that won’t appear very intuitive, however let’s take a step again and picture one thing: think about hiring the world’s best and quickest chef.
This chef can put together meals at unimaginable velocity. Nevertheless, each ingredient is saved in a warehouse a number of miles away. Earlier than the chef can cook dinner, somebody must seize the elements and ship them to the kitchen.
Regardless of how gifted the chef is, there can be durations once they merely stand round, ready for the elements they should begin cooking to reach.
Trendy AI programs face an analogous problem. The processors they use can carry out calculations, however they can not function on information that has not but arrived. If the processor can compute sooner than reminiscence can ship info, efficiency turns into restricted by information motion slightly than computation.
That is what is understood in pc science because the reminiscence bottleneck. It is among the most essential and least mentioned challenges in fashionable AI.
The Scale of Trendy Fashions
To raised perceive why reminiscence has turn out to be such a major challenge, we have to contemplate the dimensions of right now’s AI fashions. Early machine studying fashions may need contained hundreds or tens of millions of parameters, whereas fashionable basis fashions include billions and even trillions.
Every one in every of these parameters represents a numerical worth that have to be saved in reminiscence and repeatedly accessed throughout coaching and inference.
Okay, that sounds logical, however let’s solidify it with some numbers! Suppose now we have a mannequin that incorporates 70 billion parameters. Earlier than even performing a single calculation, the system wants a spot to retailer all these parameters.
Now, I would like you to think about hundreds of customers interacting with the mannequin concurrently. The {hardware} should repeatedly transfer monumental quantities of knowledge between reminiscence and processors.
As you could conclude, the problem is not merely performing calculations; slightly, it’s feeding information to the {hardware} rapidly sufficient.

Shifting information may be costlier than computing on it, which is among the most counterintuitive realities in computing. Over the a long time, processor efficiency has improved dramatically, as engineers have turn out to be exceptionally good at designing chips that may carry out calculations sooner and sooner. Alternatively, although, enhancements of the reminiscence system moved at a slower tempo.
This created a rising imbalance that grew to become extra obvious as AI programs grew greater. Trendy processors can execute trillions of operations per second, however they typically spend lots of time ready for information to reach.
This information bottleneck seems in several methods inside AI programs. We will see it whereas shifting information between reminiscence and processors, between GPUs, throughout servers, or between information facilities.
These fashions will solely proceed to develop, and as they do, the information motion challenge will play a significant position within the system’s general efficiency!
Understanding AI Reminiscence
To date, I feel I’ve written the phrase “reminiscence” over 20 occasions (I didn’t depend!). You may need questioned, what sort of reminiscence is she speaking about? Most individuals are accustomed to RAM, the reminiscence put in in laptops and desktop computer systems. AI programs use various kinds of reminiscence for various functions.
1- RAM: Random Entry Reminiscence shops information utilized by the CPU. It’s comparatively massive however not notably quick in comparison with specialised AI reminiscence.
2- VRAM: Graphics Processing Models include devoted reminiscence referred to as Video Random Entry Reminiscence (VRAM). Which is used throughout coaching and inference to retailer mannequin parameters, coaching batches, activations, and intermediate calculations. The quantity of accessible VRAM typically determines whether or not a mannequin can match on a GPU.
3- Excessive-Bandwidth Reminiscence (HBM): Trendy AI accelerators more and more depend on Excessive-Bandwidth Reminiscence (HBM). HBM is designed particularly to maneuver massive quantities of information extraordinarily rapidly. Somewhat than merely growing reminiscence capability, HBM focuses on growing reminiscence bandwidth, which is the speed at which info may be transferred.

Although the dimensions of the reminiscence (its capability) is essential, its bandwidth performs an even bigger position. A technique to consider these two ideas is a freeway (stick with me right here for a second). Capability is the variety of automobiles that may exist on the freeway, whereas bandwidth is the variety of lanes obtainable.
You’ll be able to have an enormous parking zone, but when all autos should go away by a single lane, site visitors turns into the limiting issue.
Now, as we mentioned earlier than, AI programs use various kinds of reminiscence in several methods. The reminiscence problem seems in another way throughout coaching and inference.
Coaching: Coaching requires storing mannequin parameters, gradients, activations, and optimizer states. So, in consequence, reminiscence necessities turn out to be monumental. This could require distributing reminiscence throughout many GPUs.
Inference: Inference typically requires much less reminiscence than coaching, but it surely introduces a distinct problem. The mannequin should repeatedly serve requests whereas retrieving parameters and producing outputs rapidly. For interactive programs resembling chatbots, latency is now a significant challenge!
The sooner reminiscence can ship info, the sooner the mannequin can reply. That is one motive why reminiscence applied sciences stay important even after coaching is full.
Some Closing Ideas
Most discussions about AI efficiency optimizations deal with bigger fashions and sooner processors. But, {hardware} engineers more and more acknowledge a distinct actuality.
Constructing smarter AI programs is just not merely a matter of including extra computational energy. It additionally requires fixing the information motion drawback. Fortunately, many researchers are specializing in enhancing the information motion drawback. Doing so, they’re exploring totally different approaches:
- Improved reminiscence architectures.
- Quicker interconnects.
- Reminiscence-efficient algorithms.
- Mannequin compression strategies.
- Close to-memory computing.
- Optical and photonic communication applied sciences.
Every of those approaches makes an attempt to reply the identical query: How can we transfer massive quantities of knowledge effectively?
The reply could decide the long run trajectory of AI.
Trendy AI programs rely upon each computation and communication. Whereas processors carry out calculations, reminiscence programs decide how rapidly information can attain them. As fashions proceed to develop in measurement and complexity, reminiscence capability and bandwidth have gotten more and more essential elements in general efficiency.
The subsequent main breakthrough in AI {hardware} could not come from a processor with extra cores or larger clock speeds. It could come from a greater manner of shifting information.
So, which one in every of these approaches (if any) is the reply? Nicely, in the intervening time, we don’t know, however we’re slowly getting there.
Some references
- Brown, T. B., et al. (2020). Language Fashions are Few-Shot Learners.
- Chowdhery, A., et al. (2022). PaLM: Scaling Language Modeling with Pathways.
- Dao, T., Fu, D. Y., Ermon, S., Rudra, A., & Ré, C. (2022). FlashAttention: Quick and Reminiscence-Environment friendly Actual Consideration with IO-Consciousness.
- Kwon, W., et al. (2023). Environment friendly Reminiscence Administration for Massive Language Mannequin Serving with PagedAttention.
- Zhao, W. X., et al. (2023). A Survey of Massive Language Fashions.















