Landmark Scaling Paper

PaLM: Scaling Language Modeling with Pathways

How 540 billion parameters trained across 6,144 TPU v4 chips demonstrated discontinuous scaling improvements and surpassed human performance on complex reasoning tasks.

540B params x 6,144 TPU v4 = Emergent Abilities
↓ Architecture Innovations ↓
y = x + Attn(LN(x)) + SwiGLU(LN(x))
2022 — Chowdhery, Narang, et al. (Google Research)

By 2022, the AI community had a critical question: does scaling continue to deliver? GPT-3 showed impressive results at 175B parameters, but was this a dead end or just the beginning? PaLM answered definitively: scaling to 540B parameters produces qualitatively new capabilities that smaller models simply cannot exhibit.

Think of it like heating water. From 0 to 99 degrees Celsius, water just gets warmer — a smooth, predictable change. But at 100 degrees, something qualitatively different happens: it boils. PaLM showed that language models have similar phase transitions. Tasks where a 62-billion-parameter model scores literally zero suddenly become solvable at 540 billion parameters. Not slightly better — suddenly possible. This was the strongest evidence yet that intelligence-like capabilities can emerge from scale alone.

PaLM's contribution was threefold. First, it demonstrated the Pathways system could efficiently train across 6,144 TPU v4 chips spanning two separate pods — a feat of distributed systems engineering as impressive as the model itself. Second, it introduced architectural innovations (parallel layers, multi-query attention, SwiGLU) that maximized quality per FLOP, squeezing every drop of capability from each computation. Third, it revealed discontinuous scaling improvements — capabilities that appear suddenly at 540B that are absent at 62B, challenging the assumption that progress is always gradual.

Why PaLM Matters Historically

Before PaLM, there were two competing views of scaling. The scaling optimists believed bigger models would keep getting better in surprising ways. The scaling skeptics argued we were hitting diminishing returns, pointing to Chinchilla's finding that GPT-3 was actually under-trained for its size. PaLM settled the debate by showing that both sides were partly right: scaling does hit diminishing returns on many tasks, but it also unlocks entirely new capabilities that smaller models fundamentally cannot perform, no matter how much data they see.

Infrastructure

First model to train across two TPU v4 Pods using Pathways, achieving 57.8% hardware utilization — a systems engineering landmark.

Architecture

Parallel layers, multi-query attention, SwiGLU, and RoPE — each optimizing quality per compute, compounding into significant gains at scale.

Emergence

Discontinuous improvements on BIG-Bench, reasoning, and code — phase transitions where abilities appear only at extreme scale.

Training a 540B parameter model requires enormous compute. PaLM was trained on 6,144 TPU v4 chips organized across two separate TPU Pods, connected through the datacenter network. The Pathways system orchestrated this distributed training, achieving record hardware utilization.

Imagine trying to coordinate an orchestra of 6,144 musicians spread across two concert halls connected only by a phone line. Every musician needs to play in perfect sync, and if even one falls behind, the entire performance suffers. That is the challenge Pathways solved. The chips within each pod communicate via ultra-fast inter-chip interconnect (ICI) at ~1.6 Tbps per chip, but the two pods communicate through the much slower datacenter network (DCN). PaLM's parallelism strategy was designed to minimize cross-pod traffic — sending only what absolutely must be shared, while keeping the heavy computation local.

The result: 57.8% hardware FLOPs utilization, meaning over half of the theoretical peak compute was used productively. For context, most large-scale training runs at the time achieved 30-50%. Every percentage point matters when you are burning through millions of dollars of compute — going from 35% to 57.8% means getting 65% more useful work per dollar. The training took approximately 46 days and consumed roughly 2.5 x 10^24 FLOPs.

Pathways: Training Across 6,144 TPU v4 Chips

Pathways is Google's ML infrastructure system that enables training across multiple TPU Pods. PaLM was the first model to demonstrate Pathways at scale: 6,144 TPU v4 chips spanning two separate Pods, connected through the datacenter network.

PaLM Training Infrastructure
Pod 1
3,072 TPU v4
768 hosts
DCN
Pod 2
3,072 TPU v4
768 hosts
6,144 TPU v4 total
= 1,536 hosts across 2 pods
57.8%
Hardware FLOPs Utilization
~46
Days of Training
2.5x1024
Total FLOPs
First-of-its-Kind Training

PaLM was the first model to successfully train at this scale across multiple TPU Pods. This proved that the Pathways system could efficiently orchestrate distributed training at unprecedented scale, opening the door for even larger models.

A Systems Achievement as Important as the Model

PaLM's training infrastructure was as much an achievement as the model itself. The Pathways system had to solve fault tolerance (what happens when one of 6,144 chips fails mid-training?), gradient synchronization across pods with different network speeds, and load balancing to ensure no chip sits idle. This infrastructure became the foundation for Google's subsequent models, including Gemini — proving that the systems investment paid compound returns.

PaLM uses a decoder-only Transformer with key modifications designed to squeeze maximum capability from every computation. Each innovation is a bet that pays off more at larger scale: parallel attention and FFN layers (15% training speedup), multi-query attention (faster inference), SwiGLU activation (better quality per FLOP), and RoPE embeddings (relative position encoding).

The most counterintuitive choice is parallel layers. In a standard Transformer, each layer first computes attention, then feeds the result through the FFN — sequentially, like a factory assembly line. PaLM computes both at the same time from the same input. This sounds like it should lose information (the FFN never sees what attention found), and indeed at 8B scale it slightly hurts quality. But at 62B and 540B, the degradation vanishes — suggesting the model has enough capacity to compensate, while the 15% speed gain compounds into weeks of saved training time.

Multi-query attention is equally clever. In standard multi-head attention, each of the 48 heads maintains its own Key and Value projections, which all need to be cached during text generation. PaLM shares a single K and V across all heads, keeping only the Query head-specific. This shrinks the KV cache by 48x during inference, making generation dramatically faster and cheaper with virtually no quality loss. This technique, first proposed in 2019, proved its worth at PaLM's scale and has since become standard in most large language models.

PaLM Architecture: Optimized for Scale

PaLM uses a decoder-only Transformer with several key modifications: parallel attention/FFN layers, multi-query attention, SwiGLU activation, RoPE embeddings, and shared input-output embeddings. No biases are used anywhere.

ModelLayersd_modelHeadsHead Dimd_ff
PaLM 8B324,0961625616,384
PaLM 62B648,1923225632,768
PaLM 540B11818,4324825673,728
SwiGLU Activation

Better than GELU/ReLU for same compute

Parallel Layers

Attention + FFN computed simultaneously

Multi-Query Attention

Shared K/V across heads for fast inference

RoPE Embeddings

Rotary positional embeddings for relative positions

No Biases

All bias terms removed for training stability

Shared Embeddings

Input and output embedding matrices tied

Engineering for Scale

PaLM's architecture choices are all about maximizing quality per FLOP. Every modification — parallel layers, multi-query attention, SwiGLU — trades a bit of simplicity for better performance at fixed compute. At 540B parameters, these small improvements compound into significant gains.

The Engineering Philosophy

Every architectural choice in PaLM follows the same principle: maximize quality per FLOP. SwiGLU costs more per layer (three matrix multiplications instead of two) but produces better representations. RoPE handles relative positions without learned embeddings. No bias terms anywhere — removing them improves training stability at large scale. Each choice sacrifices a bit of simplicity for better performance at fixed compute, and at 540B these small improvements compound into significant gains.

PaLM was trained on a carefully curated mixture of 780 billion tokens spanning web pages, books, Wikipedia, news, code, and social media conversations in over 100 languages. The diversity of this corpus is key to PaLM's versatility — a model can only be as capable as the knowledge it has been exposed to.

The data mix tells a story about design priorities. The largest single component is social media conversations at 50% — this is where the model learns dialogue patterns, informal reasoning, and the messy, contextual way humans actually communicate. Filtered web pages at 27% provide broad world knowledge. Books (13%) supply long-form coherent reasoning. And code (5%) is deliberately included not just for programming ability, but because code training has been shown to improve logical reasoning across all tasks — structured thinking in one domain transfers to structured thinking generally.

An important context: Chinchilla (published around the same time) showed that GPT-3 was undertrained relative to its size, suggesting 175B parameters should see ~3.5T tokens to be compute-optimal. PaLM at 780B tokens for 540B parameters is similarly undertrained by Chinchilla scaling laws. This means PaLM could have been even better with more data — the results we see are a lower bound on what 540B parameters can achieve.

PaLM Training Data: 780 Billion Tokens

Click on any data source to see example content and why it matters. The mix was carefully designed: social conversations for dialogue ability, code for logical reasoning, books for long-range coherence.

Training Data Composition (click to explore)
50%
27%
13%
780B
Total Tokens
100+
Languages
256K
Vocab Size
The Data Recipe

PaLM's data mix was carefully designed to balance breadth and quality. The high proportion of social media conversations helps with dialogue abilities, while code and books support reasoning. This multi-domain mixture is key to PaLM's versatility across diverse tasks.

PaLM's most striking finding: certain capabilities appear discontinuously with scale. Tasks where 8B and 62B models score near zero suddenly become solvable at 540B. This provides the strongest evidence yet that scale unlocks qualitatively new abilities.

Consider word unscrambling as an example. Given "uehaotgrs" and asked to rearrange the letters into an English word, the 8B model scores 2% and the 62B model scores 8% — essentially random guessing. The 540B model scores 68%. It did not get slightly better at unscrambling; it went from unable to able. Something in the internal representations crossed a threshold where the model suddenly "understood" letter manipulation. Similar jumps appeared for ASCII art recognition, emoji movie interpretation, and navigate-maze tasks.

On BIG-Bench, a suite of 150+ diverse tasks designed by 450+ researchers to probe capabilities beyond standard benchmarks, PaLM 540B achieved a 5-shot aggregate score of 69.3% — surpassing average human performance of 65.0%. This was the first time any LLM crossed the human baseline on this diverse benchmark, and it happened not through fine-tuning or specialized training, but purely through scale and few-shot prompting.

Scaling Breakthroughs: When Bigger = Qualitatively Different

Select a model size below to see how performance jumps discontinuously. Watch how tasks go from near-zero to high accuracy at the 540B threshold — this is emergence in action.

Select Model Size
Word UnscramblingRearrange letters into English words
68%Emerged!
ASCII Art RecognitionIdentify objects drawn in text characters
50%Emerged!
Navigate MazeFollow directions through a described maze
72%Emerged!
Conceptual CombosUnderstand unusual concept combinations
75%Emerged!
Emoji MovieIdentify movies from emoji sequences
65%Emerged!
At 540B, capabilities suddenly emerge. This is not gradual improvement — it is a phase transition.
The Emergence Phenomenon

These are not gradual improvements — they are phase transitions. At some critical model size, the model suddenly acquires the ability to solve a type of problem it previously could not. This suggests that capabilities emerge from internal representations reaching a complexity threshold, like water suddenly boiling at 100 degrees.

The Scale Dividend

PaLM demonstrated that scaling to 540B parameters does not just give you more of the same — it gives you qualitatively new capabilities. Tasks that seemed impossible at smaller scales become solvable. This is the strongest evidence yet for the scaling hypothesis, and it reshaped the entire field's approach to model development.

What Emergence Means (and Doesn't)

The term "emergence" has sparked debate. Some researchers argue these jumps are measurement artifacts — if you used a continuous metric instead of accuracy, the improvement might look smooth. Others counter that the practical reality matters: a model that goes from 2% to 68% on a task has crossed from useless to useful, regardless of whether the underlying capability grew smoothly. PaLM's results don't resolve this debate, but they make it impossible to ignore.

At 540B parameters, PaLM's few-shot in-context learning matches or exceeds fine-tuned models on many benchmarks. On 28 of 29 evaluated tasks, PaLM surpassed all prior large language models. This is remarkable: you can steer one model to do almost anything just by changing the prompt, without touching a single weight.

Think about what few-shot learning really means. Traditional ML requires you to collect thousands of labeled examples, train a specialized model, tune hyperparameters, and deploy — a process that takes weeks and produces a model that does exactly one thing. With PaLM, you write a prompt with 5 examples, and the model figures out the pattern. It is pattern recognition at its most general: the model has seen so many patterns during training that it can recognize a new one from just a handful of demonstrations. This makes AI accessible — you do not need ML expertise, you just need to explain what you want through examples.

Few-Shot Learning: In-Context Task Specification

Few-shot learning teaches the model a new task just by putting examples in the prompt. Adjust the slider to see how the number of examples changes what the model "sees." Select different tasks to explore different use cases.

Examples in prompt:5many-shot
// Examples:
What is 2+2? 4
The capital of France? Paris
Water's chemical formula? H2O
Who wrote Hamlet? Shakespeare
Largest planet? Jupiter
How many continents are there?
|
Prompt size: ~95 tokens
0-shot
No examples, just the question
1-5 shot
Few examples to set the pattern
5-64 shot
Many examples for complex tasks
The Power of In-Context Learning

PaLM showed that at sufficient scale, few-shot in-context learning becomes a viable alternative to fine-tuning. This means one model can handle thousands of tasks without any parameter updates — just by changing the prompt. This insight reshaped how AI products are built and deployed.

The Implication for AI Deployment

Few-shot learning changes the economics of AI. Instead of training and deploying thousands of specialized models, you serve one large model and let the prompt define the task. This is why PaLM's success directly led to Google making large models available through APIs — the business model shifted from "sell model training" to "sell model inference."

When combined with chain-of-thought prompting, PaLM achieves breakthrough results on reasoning tasks. It solved 58.1% of GSM8K math problems with just 8-shot prompting, outperforming fine-tuned GPT-3 (55%). The combination of scale + reasoning prompts proved to be more powerful than fine-tuning smaller models.

Here is why this matters. Fine-tuning GPT-3 on GSM8K required 7,500 hand-labeled examples of step-by-step math solutions, plus the compute cost of fine-tuning. PaLM achieved a higher score with just 8 examples in the prompt. The difference in effort is three orders of magnitude. What changed? Scale gave the model the internal capacity to reason step-by-step, and chain-of-thought prompting gave it permission to show its work rather than jump to the answer.

Without chain-of-thought, PaLM 540B scored only 17.9% on GSM8K — forcing the model to answer in one step wastes its reasoning capacity. With CoT, the same model scores 58.1%. The reasoning ability was always there; it just needed to be elicited through the right prompting strategy. This insight — that capabilities can be latent until activated by the right interface — became a central theme of post-PaLM research.

Math Reasoning

58.1% on GSM8K (grade-school math) with 8-shot CoT, beating fine-tuned GPT-3's 55%. Standard prompting: only 17.9%. The gap proves that CoT unlocks latent capability.

Commonsense Reasoning

PaLM can distinguish cause and effect, understand conceptual combinations ("a penguin that can fly" = impossible), and perform multi-step logical reasoning — abilities that emerge at the 540B scale and are absent at 62B.

Scale + Reasoning = Breakthrough

Neither scale alone nor chain-of-thought alone produces these results. PaLM 62B with CoT only scores 33% on GSM8K — the model isn't large enough to reason reliably. And PaLM 540B without CoT scores 17.9% — it has the capacity but not the prompt to use it. The magic is in the combination: large enough models develop the internal representations needed for step-by-step reasoning, and CoT prompting activates this latent capability. This finding launched an entire subfield of prompt engineering research.

PaLM's training data includes source code from GitHub, giving it strong code generation abilities. PaLM-Coder 540B (fine-tuned on additional code) achieved 36% pass@1 on HumanEval, surpassing specialized models like Codex 12B (28.8%). This was notable because PaLM is a general-purpose model that was not specifically designed for code.

The relationship between code and reasoning is bidirectional. Code in the training data improves logical reasoning on non-code tasks (structured thinking transfers), while the model's broad language understanding helps it generate code that matches natural language descriptions. PaLM demonstrated that you don't need a specialized code model — a large enough general model with code in its training mix can outperform purpose-built tools. This finding influenced the field's move toward general-purpose foundation models rather than task-specific ones.

Code Generation: PaLM as a Programmer

PaLM's training data includes a significant amount of source code. PaLM-Coder 540B (fine-tuned on code) achieves 36% pass@1 on HumanEval, outperforming specialized code models like Codex 12B.

HumanEval pass@1 (%)
PaLM-Coder 540B
36%
Codex 12B
28.8%
PaLM 540B
26.2%
LaMDA 137B
14%
GPT-3 175B
0%
Function Generation

Write functions from descriptions

Bug Detection & Fixing

Find and fix errors in code

Code Translation

Convert between programming languages

Code as Language

PaLM treats code as a natural extension of language. By training on both text and code, the model develops a unified understanding that enables translation between natural language descriptions and code, and vice versa.

Trained on data in over 100 languages, PaLM demonstrates strong multilingual capabilities. It can translate, answer questions, and reason in many non-English languages, showing that scale benefits transfer across linguistic boundaries.

Perhaps the most surprising multilingual result is cross-lingual transfer. PaLM can sometimes solve tasks in languages with very limited training data by leveraging knowledge learned from high-resource languages like English. Teach it a reasoning pattern in English, and it can apply that same pattern in Bengali or Swahili — even though it saw far less text in those languages. This suggests the model builds language-agnostic internal representations that capture meaning independently of surface form, which becomes more robust at larger scale.

The tokenizer uses a 256K SentencePiece vocabulary with full Unicode coverage, ensuring every language can be represented without falling back to byte-level encoding. This large vocabulary reduces the "token tax" for non-English languages — where each word requires multiple tokens — improving both efficiency and quality for multilingual tasks.

Translation Quality

PaLM achieves competitive translation quality across many language pairs without being specifically trained as a translation model. On some pairs (especially high-resource languages), few-shot PaLM matches dedicated translation systems.

Cross-Lingual Transfer

Knowledge transfers across languages: reasoning patterns learned from English text apply to non-English tasks. At 540B, this transfer is strong enough to enable useful performance even in languages with minimal training data.

The Multilingual Scaling Hypothesis

PaLM supports a powerful idea: at sufficient scale, language models build internal representations that are partially language-independent. Concepts like "cause and effect" or "mathematical reasoning" get encoded in a shared space, and the model learns to map between this space and any surface language. The larger the model, the richer and more transferable these shared representations become.

PaLM established that scale continues to unlock new capabilities far beyond what smaller models achieve. It set the template for Google's subsequent AI efforts, leading directly to PaLM 2 (which powers Gemini/Bard) and influencing the entire field.

The paper's influence extends beyond Google. PaLM's architectural choices — parallel layers, multi-query attention, SwiGLU, RoPE, no biases — became a checklist that nearly every subsequent large model adopted. Meta's LLaMA, for instance, uses SwiGLU and RoPE directly from PaLM's playbook. The emergence findings influenced how the entire field thinks about scaling — not just as getting more of the same, but as potentially crossing capability thresholds that enable entirely new applications.

Proved Emergence

First clear evidence of discontinuous scaling improvements across diverse task types.

Pathways at Scale

Demonstrated multi-pod training infrastructure that became the foundation for future models.

Architecture Blueprint

Parallel layers, MQA, SwiGLU, RoPE became standard choices adopted by LLaMA, Falcon, and others.

Scale + CoT

Showed that combining scale with chain-of-thought unlocks reasoning that fine-tuning cannot match.

Beat Human Average

First LLM to surpass average human performance on BIG-Bench (69.3% vs 65.0%).

Led to Gemini

PaLM's lessons on scale, architecture, and training directly informed Google's Gemini model family.

The Bigger Picture

PaLM landed at a pivotal moment in AI history. It was published in April 2022, just months before ChatGPT would make LLMs a household topic. The lessons PaLM taught — that scale unlocks emergence, that architecture details compound at scale, that prompting strategies matter as much as training — became the foundation on which the current era of AI was built. Understanding PaLM is understanding why today's AI systems work the way they do.

PaLM Deep-Dive Quiz

Question 1 of 10

How many parameters does the largest PaLM model have?

Congratulations! You now understand PaLM and the power of extreme-scale language modeling.

From the Pathways infrastructure to discontinuous scaling improvements, from parallel layers to chain-of-thought reasoning — you've explored the system that proved bigger models don't just do more, they do different things entirely.

540B
Parameters
6,144
TPU v4 Chips
28/29
SOTA Benchmarks
57.8%
HW Utilization
Key Takeaways: Scale unlocks emergent capabilities. Pathways enables multi-pod training. Architectural innovations maximize quality per FLOP. Chain-of-thought + scale beats fine-tuning. PaLM paved the way for Gemini.