a few of the issues we face in implementing AI algorithms, we often give attention to the processors’ potential to deal with them.
However now, NVIDIA’s GPUs energy the newest giant language fashions, and corporations 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 immediately’s AI techniques should not restricted by how shortly they will carry out calculations. They’re restricted by how shortly they will entry knowledge. 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 will not appear very intuitive, however let’s take a step again and picture one thing: think about hiring the world’s most effective and quickest chef.
This chef can put together meals at unbelievable pace. Nonetheless, each ingredient is saved in a warehouse a number of miles away. Earlier than the chef can prepare dinner, somebody must seize the components and ship them to the kitchen.
Regardless of how proficient the chef is, there might be intervals once they merely stand round, ready for the components they should begin cooking to reach.
Trendy AI techniques face an analogous problem. The processors they use can carry out calculations, however they can not function on knowledge that has not but arrived. If the processor can compute sooner than reminiscence can ship data, efficiency turns into restricted by knowledge motion somewhat than computation.
That is what is thought in laptop science because the reminiscence bottleneck. It is among the most vital and least mentioned challenges in trendy AI.
The Scale of Trendy Fashions
To higher perceive why reminiscence has turn out to be such a big problem, we have to think about the dimensions of immediately’s AI fashions. Early machine studying fashions might need contained 1000’s or hundreds of thousands of parameters, whereas trendy basis fashions include billions and even trillions.
Every one among these parameters represents a numerical worth that should be saved in reminiscence and repeatedly accessed throughout coaching and inference.
Okay, that sounds logical, however let’s solidify it with some numbers! Suppose we now have a mannequin that accommodates 70 billion parameters. Earlier than even performing a single calculation, the system wants a spot to retailer all these parameters.
Now, I need you to think about 1000’s of customers interacting with the mannequin concurrently. The {hardware} should repeatedly transfer monumental quantities of data between reminiscence and processors.
As you could conclude, the problem is not merely performing calculations; somewhat, it’s feeding knowledge to the {hardware} shortly sufficient.

Shifting knowledge will be dearer than computing on it, which is among the most counterintuitive realities in computing. Over the many years, 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. However, although, enhancements of the reminiscence system moved at a slower tempo.
This created a rising imbalance that grew to become extra obvious as AI techniques grew greater. Trendy processors can execute trillions of operations per second, however they usually spend a number of time ready for knowledge to reach.
This knowledge bottleneck seems in numerous methods inside AI techniques. We will see it whereas shifting knowledge between reminiscence and processors, between GPUs, throughout servers, or between knowledge facilities.
These fashions will solely proceed to develop, and as they do, the information motion problem will play a serious position within the system’s general efficiency!
Understanding AI Reminiscence
Up to now, I feel I’ve written the phrase “reminiscence” over 20 instances (I didn’t rely!). You might need puzzled, what sort of reminiscence is she speaking about? Most individuals are aware of RAM, the reminiscence put in in laptops and desktop computer systems. AI techniques use several types of reminiscence for various functions.
1- RAM: Random Entry Reminiscence shops knowledge utilized by the CPU. It’s comparatively giant however not significantly quick in comparison with specialised AI reminiscence.
2- VRAM: Graphics Processing Items include devoted reminiscence often known 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 obtainable VRAM usually 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 giant quantities of knowledge extraordinarily shortly. Slightly than merely rising reminiscence capability, HBM focuses on rising reminiscence bandwidth, which is the speed at which data will be transferred.

Although the dimensions of the reminiscence (its capability) is vital, its bandwidth performs an even bigger position. A method to consider these two ideas is a freeway (stick with me right here for a second). Capability is the variety of vehicles that may exist on the freeway, whereas bandwidth is the variety of lanes obtainable.
You possibly can have an enormous parking zone, but when all autos should go away via a single lane, site visitors turns into the limiting issue.
Now, as we stated earlier than, AI techniques use several types of reminiscence in numerous methods. The reminiscence problem seems in another way throughout coaching and inference.
Coaching: Coaching requires storing mannequin parameters, gradients, activations, and optimizer states. So, because of this, reminiscence necessities turn out to be monumental. This might require distributing reminiscence throughout many GPUs.
Inference: Inference typically requires much less reminiscence than coaching, nevertheless it introduces a special problem. The mannequin should repeatedly serve requests whereas retrieving parameters and producing outputs shortly. For interactive techniques resembling chatbots, latency is now a serious problem!
The sooner reminiscence can ship data, the sooner the mannequin can reply. That is one purpose why reminiscence applied sciences stay important even after coaching is full.
Some Closing Ideas
Most discussions about AI efficiency optimizations give attention to bigger fashions and sooner processors. But, {hardware} engineers more and more acknowledge a special actuality.
Constructing smarter AI techniques isn’t 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 completely 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 will we transfer giant quantities of data effectively?
The reply could decide the longer term trajectory of AI.
Trendy AI techniques rely on each computation and communication. Whereas processors carry out calculations, reminiscence techniques decide how shortly knowledge can attain them. As fashions proceed to develop in dimension and complexity, reminiscence capability and bandwidth have gotten more and more vital elements in general efficiency.
The following main breakthrough in AI {hardware} could not come from a processor with extra cores or greater clock speeds. It could come from a greater manner of shifting knowledge.
So, which one among these approaches (if any) is the reply? Effectively, in the meanwhile, 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 Precise Consideration with IO-Consciousness.
- Kwon, W., et al. (2023). Environment friendly Reminiscence Administration for Giant Language Mannequin Serving with PagedAttention.
- Zhao, W. X., et al. (2023). A Survey of Giant Language Fashions.

