← Back to list

Hardware, GPUs, and Distributed Training: AI Infrastructure Explained

From the outside, training a modern AI model can seem almost magical. You enter a prompt, run a script, watch the progress bar, and soon…

QuarkAndCode · 2026-05-15 18:51 · 0 claps · 13.0 min read paywalled
#ai-hardware #gpu #distributed-training #machine-learning #ai-infrastructure
Open on Medium ↗
Wiki topics: OPS · LLMOps & Inference ML · Machine Learning EDU · Education & Learning

Hardware, GPUs, and Distributed Training: AI Infrastructure Explained

From the outside, training a modern AI model can seem almost magical. You enter a prompt, run a script, watch the progress bar, and soon the model can recognize images, translate text, generate code, or answer questions. But behind this smooth operation is a very physical reality: racks of accelerators, high-bandwidth memory, fiber cables, storage systems, power supplies, cooling systems, and software that synchronizes thousands of devices into a single system.

Put simply, artificial intelligence is not just about new algorithms. It is also about advances in hardware. The impressive models we see today exist because engineers figured out how to organize huge amounts of computation in a reliable and efficient way. Research on scaling laws showed that as model size, data, and training compute grow, performance improves in a predictable way. Later studies on compute-optimal training found that bigger models also need more training tokens, not just more parameters. This led to a shift in AI from training on a single machine to building entire computer systems for training.

Why Hardware Matters So Much

A neural network learns by doing a massive number of mathematical operations, mostly with tensors — arrays of numbers organized as vectors, matrices, or higher-dimensional shapes. During training, the model predicts, checks its answers, calculates gradients, and updates its parameters. This cycle repeats billions or trillions of times. While the basics are covered in deep learning textbooks, the real challenge today is scale: modern models are so large that managing them becomes a systems problem.

This is where hardware becomes crucial. A strong model needs more than just a fast computer — it needs a balanced system. Computing should be quick, memory should be large and close to the processor, storage should deliver data quickly, and the network should move gradients and activations between devices efficiently. If any part is slow, the whole process suffers. Even with lots of raw FLOPs, if GPUs are waiting for data or gradients, the hardware is not being used effectively.

A simple way to picture AI hardware is to think of a restaurant kitchen. GPUs are like the chefs. High-bandwidth memory is the counter space where ingredients are kept close by. Storage acts as the pantry. The network is the team that moves dishes between stations. Power and cooling are the building services that keep everything running. Distributed training is the head chef’s plan to make sure everyone works on the same meal smoothly.

CPUs, GPUs, TPUs, and AI Accelerators

For many years, CPUs were the main part of computers. They are flexible, general-purpose chips that run operating systems, handle complex logic, manage workloads, and do many different tasks. However, deep learning training relies heavily on dense linear algebra, especially matrix multiplication. This type of work is highly parallel, making GPUs a better fit.

A GPU has many smaller compute units that can handle large batches of similar tasks simultaneously. This is why GPUs are so important for deep learning. Rather than doing one operation at a time, a GPU can process big chunks of tensor math all at once. NVIDIA’s Tensor Cores, for example, are built for mixed-precision computing, and newer models support formats like FP16, BF16, FP8, and, in Blackwell systems, FP4 workflows with Transformer Engine support.

GPUs are not the only choice. Google’s Tensor Processing Units (TPUs) are custom accelerators designed for tensor computation. According to Google Cloud’s TPU v5p documentation, a v5p pod has 8,960 chips, each with 459 TFLOPs of BF16 or FP8 peak compute, 95 GiB of HBM, and a 3D torus interconnect. This design highlights a key trend: accelerators are now part of complete system architectures, not just single chips.

AMD is another key company in AI acceleration. Its Instinct MI355X GPU, based on AMD’s CDNA 4 architecture, offers 288 GB of HBM3E memory, 8 TB/s memory bandwidth, and supports formats like MXFP6 and MXFP4. The MI325X line focuses on high memory capacity, with 256 GB of HBM3E and 6 TB/s of bandwidth. These features are important because AI training is often limited by memory capacity and bandwidth, not just compute power.

The GPU Is Only Part of the Machine

When discussing AI hardware, people often focus only on the GPU model — like A100, H100, H200, B200, MI300X, MI355X, or TPU v5p. This is common, but it misses the bigger picture. A GPU is just one part of a training system. The rest of the system’s architecture determines how well the GPU performs.

For example, NVIDIA’s H100 brought in fourth-generation Tensor Cores and a Transformer Engine with FP8 precision. NVIDIA says it can train GPT-3-scale workloads up to four times faster than the previous generation, under certain conditions. The same documentation also highlights the importance of the 900 GB/s fourth-generation NVLink GPU-to-GPU interconnect and InfiniBand networking. The main point is that while the chip matters, the connections between chips are just as crucial.

The DGX B200 system shows how dense AI hardware is today. NVIDIA lists it with eight Blackwell GPUs, 1,440 GB of total GPU memory, 64 TB/s of HBM3e bandwidth, 14.4 TB/s of total NVLink bandwidth, and a maximum power use of about 14.3 kW. This is not a typical office server — it is more like a compact AI supercomputer.

At rack scale, the architecture becomes even more dramatic. NVIDIA’s GB200 NVL72 connects 36 Grace CPUs and 72 Blackwell GPUs in a liquid-cooled rack-scale design. NVIDIA says the system creates a 72-GPU NVLink domain with 130 TB/s of low-latency GPU communication, positioning it for trillion-parameter model inference and training. This is the direction frontier AI hardware is moving: not just faster chips, but tightly integrated racks that behave more like one giant accelerator than a pile of separate servers.

Memory: The Hidden Limiter

If the computer is like an engine, memory is the fuel line. Many training failures are not due to a lack of computing power, but because the model, optimizer states, gradients, and activations do not fit into GPU memory.

A model’s parameters are just the start. During training, the system also needs to store gradients, optimizer states, temporary activations from the forward pass, communication buffers, and sometimes full-precision master weights. Optimizers like Adam use even more memory by keeping extra moving averages for each parameter. This is why a model that seems manageable at first can end up being too large to train on a single GPU.

High-bandwidth memory (HBM) helps by putting very fast memory close to the accelerator. Even large HBM pools still fill up fast. This challenge has led to many memory-saving methods, like activation checkpointing, ZeRO, and Fully Sharded Data Parallelism. The main trade-off is simple: save less, recompute more, or split the training state across many devices. Chen and colleagues’ work on sublinear-memory training explained that you can use less memory by doing more computation.

Mixed Precision: Doing Less Work Without Losing the Plot

One of the most useful advances in AI training is mixed precision. Instead of doing every operation in 32-bit floating point, modern training often uses lower-precision formats like FP16, BF16, FP8, or FP4 for some tasks, while keeping important parts in higher precision for stability. According to TensorFlow’s documentation, mixed precision uses both 16-bit and 32-bit floating-point types to speed up training and save memory, while keeping model quality when used correctly.

This works because neural networks can handle some numerical approximation. Not every value needs 32 bits of precision. Using lower precision cuts down on memory use, boosts speed, and lets special hardware run faster. Still, mixed precision is not a magic fix. It needs careful management of scaling, stability, and data types. When used properly, it helps modern accelerators train models that would have been impossible just a few years ago.

Transformer Engine goes even further for transformer models. NVIDIA’s documentation says the H100 added FP8 support for faster matrix multiplies and convolutions, while Blackwell supports new low-precision formats like NVFP4 and MXFP8. The key idea is that hardware and model architecture now develop together: accelerators are built for the main operations in transformers, and transformer training software is made to take full advantage of the hardware.

Distributed Training: One GPU Is Not Enough

At a small scale, training is straightforward: put the model on one GPU, feed it batches of data, update the weights, repeat. At a large scale, that approach breaks down. The model may not fit on one device. The dataset may take too long to process. The training run may need to finish in days instead of months. Distributed training solves this by spreading the work across many GPUs or accelerators.

The simplest and most common method is data parallelism. Each GPU has a copy of the model and trains on a different mini-batch of data. After each step, the GPUs synchronize their gradients to keep all model copies identical. PyTorch’s FSDP tutorial explains Distributed Data Parallel training like this: each rank has a model copy, processes data, and uses all-reduce to sync gradients.

Data parallelism is simple, but it has a drawback: every GPU still needs a full copy of the model and its training state. This works for smaller models, but not for very large ones. If the model and optimizer states do not fit on one GPU, adding more data-parallel replicas does not fix the memory issue.

Model parallelism takes a different approach. Instead of copying the whole model to every device, it splits the model across multiple devices. Tensor parallelism divides weight matrices or tensor operations among GPUs. Pipeline parallelism assigns different layers or groups of layers to separate GPUs, like stations on an assembly line. Expert parallelism distributes experts across mixture-of-experts models. Sequence and context parallelism split long input sequences or activations across devices. NVIDIA’s Megatron Bridge documentation says these methods can be combined to get the best training performance and memory use.

In real frontier-scale training, teams often combine several forms of parallelism. A single run may use tensor parallelism within a node, pipeline parallelism across layers, data parallelism across multiple replicas, and sharding to reduce optimizer memory usage. The art is not choosing one technique; it is choosing the right combination for the model, hardware topology, batch size, and network.

Sharding: Stop Copying Everything Everywhere

Sharding is a key concept in modern distributed training. The idea is simple: instead of having every GPU carry a full set of model states, split the load among the group.

DeepSpeed’s ZeRO is a landmark example. The ZeRO paper proposed eliminating memory redundancy in data- and model-parallel training while keeping communication manageable. The authors reported that ZeRO could train models with over 100 billion parameters on 400 GPUs and argued that it could scale beyond one trillion parameters on contemporary hardware.

In practical terms, ZeRO has stages. DeepSpeed’s documentation describes Stage 1 as partitioning optimizer states, Stage 2 as partitioning optimizer and gradient states, and Stage 3 as partitioning optimizer states, gradients, and parameters. Each stage saves more memory, but the trade-off is more communication and complexity.

PyTorch’s Fully Sharded Data Parallel, or FSDP, follows a similar spirit. Its tutorial explains that FSDP reduces GPU memory footprint by sharding model parameters, gradients, and optimizer states. Before computation, parameters are gathered; during backward, gradients are reduced and scattered; after computation, the system returns to a sharded state. This makes it possible to train models that would not fit on a single GPU, while still writing code that feels relatively close to normal PyTorch.

Communication: The Real Boss Battle

Distributed training seems simple until the GPUs need to communicate. That is when things get tricky.

When 8, 64, 1,024, or even 10,000 GPUs train together, they have to exchange gradients, parameters, activations, or expert-routing data. These communication steps happen in every training cycle, not just once in a while. If communication is slow, GPUs sit idle. When that happens, utilization drops and costs go up while the model makes little progress.

This is why collective communication libraries are important. NVIDIA’s NCCL provides routines such as all-reduce, all-gather, broadcast, reduce-scatter, and point-to-point communication, all optimized for PCIe, NVLink, NVSwitch, InfiniBand, RoCE, and other high-speed networks. These operations are the backbone of distributed training.

Interconnects matter because not all GPU-to-GPU paths are equal. Inside a server, GPUs may communicate over PCIe, NVLink, or NVSwitch. Across servers, they may use InfiniBand or high-performance Ethernet. NVIDIA describes Quantum InfiniBand as a platform for high-performance AI and HPC networking, with SHARP in-network computing that offloads collective communication operations to the switch.

Ethernet is also being updated for AI-scale workloads. NVIDIA describes Spectrum-X Ethernet as a platform for GPU-to-GPU communication that offers high bandwidth and performance isolation for AI training and distributed inference. This shows a bigger trend: AI networking is now a specialized part of the training stack, not just regular data-center networking with pricier cables.

Storage and Data Pipelines: Keep the GPUs Fed

A training cluster can have top accelerators and still fall short if the data pipeline is too slow. Large training jobs are always reading, preprocessing, shuffling data, saving checkpoints, and sometimes restarting after failures. Storage may not be exciting, but it is essential.

NVIDIA has developed GPUDirect Storage to help address this bottleneck. Its documentation describes GPUDirect Storage as “a direct path for DMA transfers directly between GPU memory and storage, without a CPU bounce buffer.” This can reduce latency, ease bandwidth bottlenecks, and reduce CPU load when the workload is appropriate.

GPUDirect RDMA plays a similar role for networking. It provides a direct path for data exchange between a GPU and a third-party peer device over PCI Express, such as a network interface or storage adapter, according to NVIDIA. The practical goal is to reduce the number of copies and CPU involvement, so data can move more directly to where it’s needed.

Checkpointing is another storage challenge. Large models can create huge checkpoints, and training jobs need them because failures are bound to happen at scale. A single-node experiment might run for hours without issues, but a job using thousands of GPUs over weeks must expect something to fail — a GPU, network link, node, storage device, or scheduler. Good distributed training systems are designed for recovery, not just hoping for the best.

The Software Stack: Where Hardware Becomes Usable

Hardware alone cannot train a model. The software stack makes the hardware useful for researchers and engineers.

The core programming model at the framework level is provided by PyTorch, JAX, and TensorFlow. They are surrounded by distributed training tools such as PyTorch DDP and FSDP, DeepSpeed, Megatron-LM, Hugging Face Accelerate, Ray, Kubernetes operators, Slurm, NCCL, MPI, ROCm, CUDA, XLA, and many more. Each tool addresses a different layer of the problem: model definition, compilation, kernel execution, communication, memory sharding, scheduling, monitoring, checkpointing, or cluster orchestration.

Megatron-LM is a good example of how research and systems engineering meet. The Megatron-LM paper on large-scale GPU clusters argues that training large language models is difficult because GPU memory is limited and the required compute can make training times unrealistic. It shows how tensor, pipeline, and data parallelism can be composed to scale to thousands of GPUs and trillion-parameter models.

Benchmarking is important because raw specs don’t tell the whole story. The MLPerf Training benchmark measures how quickly systems can train models to a target quality, which is more useful than comparing peak FLOPs. The real question in AI infrastructure isn’t “How fast is the chip in theory?” but “How quickly can the whole system achieve the goal?”

Power, Cooling, and the New Economics of Compute

As AI grows, it becomes more physical. Building a serious training cluster is not just about machine learning — it also means investing in energy, real estate, cooling, networking, and operations.

The power numbers are striking. NVIDIA lists the DGX B200 at about 14.3 kW maximum system power. At rack scale, liquid cooling becomes increasingly important because dense accelerators generate heat that must be removed efficiently. NVIDIA describes the GB200 NVL72 as a liquid-cooled rack-scale design, and this kind of architecture is becoming normal for high-density AI systems.

Globally, the International Energy Agency predicts that data-center electricity use could nearly double to about 945 TWh by 2030, making up just under 3% of worldwide electricity use. The IEA also expects server electricity use, mainly from AI, to grow much faster than traditional server use.

That doesn’t mean AI training is always wasteful, but it does mean efficiency is now a necessity. Better kernels. Better utilization. Better cooling. Better scheduling. Better data pipelines. Better model design. It all adds up. 5% more efficiency on a laptop is nice, but on a big GPU cluster, 5% can save a lot of money.

How Teams Choose the Right Hardware

AI hardware selection begins with the workload, not the accelerator’s brand. The big questions are practical: What size is the model? What is the length of the sequences? How much data will it use? The job: pretraining, fine-tuning, reinforcement learning, inference, or scientific simulation? Is the workload memory-intensive, bandwidth-intensive, connectivity-intensive, or low-precision performance-intensive?

For smaller models and fine-tuning, a few GPUs with enough memory might be better than a huge cluster. Strong interconnects and distributed software are critical to pretraining large language models. The key for long-context models is managing memory and activations. In recommender systems, raw compute might be less important than embedding tables and memory bandwidth. The data pipeline for multimodal models can be complex, as text, images, audio, and video have different requirements for storing and processing.

A good hardware plan usually begins with memory calculations. First, estimate the memory requirements for parameters, optimizers, gradients, activations, and the batch size. Then decide if the model fits with regular data parallelism, needs FSDP or ZeRO, or requires tensor and pipeline parallelism. Only after that should the team choose the number of GPUs, the interconnect, and the storage system.

Another big decision is whether to go cloud or on-premises. The cloud gives flexibility, quick access, and less operational hassle. On-prem clusters might be better for stable, predictable, large-scale workloads, but they require deep expertise in facilities, networking, security, scheduling, monitoring, and maintenance. The bigger the cluster, the more it behaves like a living system that needs constant attention.

The Future: More Than Bigger GPUs

The future of AI hardware is not bigger GPUs or faster models. It will be more difficult. More rack-scale systems, more liquid cooling, new numeric formats, better memory setups, faster interconnects, and closer ties between software and hardware. More competition is coming for NVIDIA GPUs, AMD accelerators, Google TPUs, custom cloud chips, and dedicated AI processors, too.

Training methods will keep changing as well. More efficient optimizers, sparsity, mixture-of-experts routing, quantization-aware training, activation recomputation, memory compression, and better parallelism can all help reduce the hardware required to achieve a given result. The Chinchilla-style lesson still matters: just adding more compute is not enough — the compute must be used wisely across model size, data, and training time.

The most successful AI teams will treat hardware and software as a single design challenge. Instead of asking, “What is the fastest GPU?” they will ask, “What system keeps every accelerator working efficiently, all the time, at the lowest cost and risk?”

Conclusion

Hardware is the foundation of modern AI. GPUs and accelerators are the muscle. High-bandwidth memory gives models space to work. Interconnects let thousands of devices work together. Storage supplies the data. Cooling and power, and it all works. Distributed training software ties it all together so researchers don’t have to do every detail by hand.

The magic of AI lies in the math, but today’s AI operates at an industrial scale. Training a cutting-edge model is less like running a simple program and more like leading an orchestra: every part must play at the right time and work in harmony. When the hardware, software, data, and engineering all come together, distributed training turns a warehouse of silicon into a learning machine.


메타데이터
post_id
5e8045d374b1
slug
hardware-gpus-and-distributed-training-ai-infrastructure-explained-5e8045d374b1
url
https://medium.com/@QuarkAndCode/hardware-gpus-and-distributed-training-ai-infrastructure-explained-5e8045d374b1
canonical_url
https://medium.com/@QuarkAndCode/hardware-gpus-and-distributed-training-ai-infrastructure-explained-5e8045d374b1
author_url
https://medium.com/@QuarkAndCode
status
ok
fetched_at
2026-06-09 15:37:30