Chapter audiobook
हम यहाँ तक कैसे पहुँचे
Listen to the complete teaching text, with spoken descriptions of diagrams. The lesson activities remain available below.
35:10 remaining at 1×
Press play to listen and follow the words here.
With this player focused: Space plays or pauses; arrow keys skip fifteen seconds.
Chapter sections and transcript
Download the transcriptHindi synthetic narration using Resemble AI Chatterbox-Multilingual-hi, MIT. Original Addaly teaching text adapted for listening.
Two ways to be fast
A laptop CPU typically has a relatively small number of versatile cores, suited to varied instructions and tasks with dependencies. A word processor, for example, must react to input, manage documents and perform many different operations. Actual designs differ; core count and clock speed alone do not determine performance.
A GPU devotes substantial hardware to running arithmetic across many data elements in parallel. This developed from graphics workloads, including operations on large numbers of pixels. The cores execute organised groups of instructions, with limits and overheads; thousands of cores do not mean every operation in a programme runs simultaneously.
Why that is the shape of training
Large matrix multiplications are a major part of many dense neural networks’ training work. They multiply arrays of activations and weights and combine the results. Many products can be computed in parallel, while additions, layers, communication and updates introduce dependencies. Other model architectures and operations have different performance profiles.
That substantial parallel arithmetic made GPUs useful for neural networks. AlexNet was an influential demonstration, not the first use: a 2009 ICML paper, for example, studied large-scale deep unsupervised learning with graphics processors. The history includes both earlier experiments and later improvements in software and hardware.
Nvidia introduced CUDA in 2007 to make general-purpose programming on its GPUs more accessible. Researchers used GPUs for machine learning before 2012 as well as for scientific simulation. A mature programming ecosystem helped adoption; it is not evidence that one decision alone caused a particular present-day market share.
The numbers
Peak arithmetic figures need their formats attached. A GTX 580 provided roughly 1.5 trillion FP32 floating-point operations per second. The 2020 A100 lists 312 trillion dense BF16 tensor operations per second; an H100 SXM lists about 990 trillion in that reduced-precision format. These are not like-for-like FP32 figures or guaranteed application-speed ratios. The H100 SXM’s maximum configurable power is up to 700 watts, rather than every H100 constantly drawing that amount.
Large training runs use many accelerators connected by fast networks. Meta’s Llama 3 report describes training on up to 16,384 H100 GPUs. OpenAI’s GPT-4 report did not disclose its hardware or training compute, so widely repeated cluster estimates should not be treated as official specifications. At large scale, arithmetic, memory, communication, reliability, power and cooling can all constrain progress.
Memory is another constraint
Arithmetic throughput is only part of the story. Memory capacity and bandwidth can constrain a workload. Seventy billion parameters stored at sixteen bits each require about 140 gigabytes in decimal units for the weights alone, before caches, activations and other overheads. That exceeds an 80-gigabyte H100’s memory. Lower precision, offloading or several devices can change what fits, each with trade-offs. “Fits” should refer to the complete chosen workload, not just the weights.
Who else makes them
Other accelerators include Google’s TPUs and chips from other suppliers. Google’s first TPU targeted inference and was operating in its data centres in 2015; its second generation, announced in 2017, supported training as well. Many phones also contain specialised machine-learning hardware. Export rules affect some advanced-chip sales, but a specific model’s hardware and performance should be read from its report rather than inferred from its country.
The free path
You do not need to buy an accelerator to begin learning. Hosted notebooks such as Google Colab offer free tiers, but GPU availability, time limits and quotas vary and are not guaranteed. Small examples may run on an ordinary CPU. Whether a notebook can train or adapt a particular model depends on its memory, data, settings and current resource allowance.
What a graphics chip is bad at
Dependencies limit parallelism. Ordinary autoregressive text generation produces successive tokens in order, but each token still involves parallel numerical work, and servers can batch requests. Processing a known prompt differs from decoding new tokens; caches and speculative methods can also change efficiency. More generated steps generally add work and latency, but it is not true that most GPU capacity must always sit idle or that training is invariably fast.
Check your understanding
Why are GPUs useful for training many large neural networks?
Pick the one you would defend. Your answer stays private.
Your place and first choices stay on this browser. Classroom credit is recorded separately.
Stuck on something?Ask Meenal, your AI tutor