← Asher Feldman

How many cosmic rays can GPT-2 survive?

November 11, 2026

In 2003, voting machines in Schaerbeek, Belgium, counted 4,096 more votes than there were voters. 4,096 is 212, exactly what one flipped bit adds, and the error was caught only because the total was impossible. The likely culprit was a cosmic ray, a particle from outer space that occasionally strikes memory and flips a bit.

On the ground, flips like that are rare. In orbit, where several companies now want to put AI data centers, they're hundreds of times more common. So I wanted to know how many flipped bits a language model can take before it breaks. In each run, I took a fresh copy of GPT-2, flipped a fixed number of uniformly random bits in its 124 million parametersToken and position embeddings, weights, biases and LayerNorm gains: about 2 billion bits in fp16., anywhere from 1 to a million, and checked whether it still worked.

Each parameter is a 16-bit float (fp16)bf16, the other common 16-bit format, moves three bits from the mantissa to the exponent: 8 exponent bits and 7 mantissa.: scientific notation in base 2. One sign bit, five exponent bits that set the power of two, and ten mantissa bits that hold the significant digits. A mantissa flip nudges the digits; an exponent flip changes the scale.

GPT-2 has a vocabulary of 50,257 tokens, and the token embedding table itself makes up about a third of the model's parameters. Each run records exactly which number every flip changed, so when a flip lands in this table we know which token it hit. Here is one run:

GPT-2 output perplexity 28.2

The Eiffel Tower is located in

One real run: GPT-2's completion and perplexity after each of three random flips.

What counts as broken?

Each run is scored by perplexity on the first 4,096 tokens of the WikiText-2 test set:

PPL = exp( −1⁄N ∑i log p(xi | x<i) )

Perplexity can be thought of as the number of equally likely tokens the model is choosing between.It's also the exponential of the average cross-entropy loss, the quantity GPT-2 was trained to minimize. Guessing uniformly over the vocabulary scores 50,257; always being right scores 1. Clean GPT-2 scores 28.2.

I define a run here as broken if its perplexity more than doubles or its logits contain NaN or Inf.fp16 tops out at 65,504; anything larger becomes Inf. NaN, “not a number,” comes from operations with no answer, like Inf − Inf, and spreads through every calculation it touches. The threshold barely matters, because the damage is all or nothing: 98.6% of runs ended within 10% of clean or more than 10× above it. The run above is typical: two harmless flips, then one that destroys it.

Share of runs still working against number of random bit flips, for fp32, fp16 and bf16. Half of runs are broken at roughly 22, 12 and 16 flips respectively; every run with 300 or more flips is broken.
Share of runs still working, by number of random bit flips. 20 runs per point for each number format; point at the chart for 95% confidence intervals.

Out of about 2 billion bits, 12 random flips break GPT-2 half the time, and 300 broke every run. fp32 holds out somewhat longer; bf16 is no different from fp16 at this sample size.

It's one bit

Share of runs broken when 100 parameters are flipped at the same bit position, for each of the 16 bits of fp16. Mantissa bits break nothing; the top exponent bit breaks every run.
Share of runs broken when 100 random parameters all have the same bit flipped, for each bit of an fp16 number. 10 runs per bar; point at a bar for its 95% confidence interval.

A mantissa flip changes a parameter by at most 50%, and the model isn't sensitive to it. A sign flip rarely matters either. But flipping the top exponent bit multiplies the value by 216, turning a typical 0.02 into 1,311, and that outlier propagates through every later layer. A single such flip broke GPT-2 in 41 of 50 runs. Since a random flip hits it with probability 1/16, about a dozen flips is the typical breaking point. fp32 has the same one deadly bit among 32 instead of 16, which is why it lasts longer.At 30 flips, 8 of 20 fp32 runs still worked against 2 of 20 for fp16 (p = 0.07; p = 0.04 pooling 3, 10 and 30 flips). Half of fp32 runs broke by about 22 flips against 12 for fp16, so it appears to last roughly twice as long, which is what one deadly bit in 32 instead of 16 predicts.

That's what happened in the example at the beginning: the lethal flip hit the embedding row for “ heated”. GPT-2 scores every candidate next token against that same matrix, so with one number in that row at 1,287 instead of 0.02, “ heated” wins every time.

Which parameter the flip lands in barely matters. Flips confined to LayerNorm, just 0.03% of the parameters, break the model about as fast as flips confined to attention, the MLPs or the embeddings. A newer model isn't tougher either: Qwen2.5-0.5B, four times the size, breaks after about 8 flips.

A cheap fix

Share of runs still working against number of flips, with and without clamping. Half of runs break at about 12 flips without the fix and about 1,400 with it.
Share of fp16 runs still working, with and without clamping. Both lines use exactly the same flips; 20 runs per point; point at the chart for 95% confidence intervals.

Since the damage comes from parameters becoming huge,Li et al. (SC 2017) found the same thing in image-recognition networks running on accelerator chips: only high-order exponent bits cause errors, by making values huge. the fix is to store each tensor's clean minimum and maximum and clamp back into that range, with NaNs set to 0.The fix needs only a minimum and maximum for each of GPT-2's 148 weight tensors: 296 numbers, few enough to keep in error-corrected memory so the bounds can't be flipped themselves. On the same flips, the median breaking point moves from about 12 flips to about 1,400.

Where the flips come from

The cosmic rays are mostly protons, accelerated by supernova shock waves elsewhere in the galaxy. They technically never reach the ground: 15 to 20 km up, one shatters a nitrogen or oxygen nucleus, and the fragments shatter more, making an air shower of pions, muons, protons and neutrons. The neutrons are what reach memory. Uncharged, they don't lose energy ionizing the air, and they pass straight through a laptop. At sea level about 13 per square centimeter per hour are energetic enough to matter.

Occasionally one hits a silicon nucleus in the chip and breaks it apart. The charged fragments tear through the crystal and free electrons along the way; a 5 MeV alpha particle (helium nucleus) frees over a million. A DRAM cell stores its bit as a few tens of thousands of electrons on a tiny capacitor. If a fragment passes close enough, the electrons it frees can swamp that charge, emptying a full cell or filling an empty one, and the bit flips. Nothing is damaged, hence “soft” errors. The event itself is called a single-event upset.First traced in 1978 at Intel, to alpha particles from uranium and thorium in chip packaging (May and Woods). A year later IBM's Ziegler and Yale's Lanford predicted cosmic rays would cause them too (Science, 1979).

So how long would GPT-2 last? At the error rate measured on modern servers, its memory would see a flip about once a century, so 12 flips take about 1,300 years. Older memory was far worse: at rates from lab studies of earlier chips, GPT-2 would have lasted about nine months.

Those are sea-level numbers. Higher up there's less air to absorb the shower: the flux is about 3.5× in Denver and 300× at cruising altitude. Move across the sky to see how long GPT-2 lasts in memory without error correction.The modern rate was measured on production servers (Li et al., 2007). The altitude multipliers come from Actel (2002) and NASA (2014), and the orbit rate, about 10−11 flips per bit per day, from DRAM flown in space (NASA, 2013; CARMEN-2, 2011).

Low Earth orbit

Sea level

 

GPT-2 lasts

on modern memory

12 flips to break, measured above, divided by the flip rate at this altitude.

Data centers in space

The draw of orbit for compute is constant sunlight, and the cold of space to radiate heat into. Starcloud flew an Nvidia H100 in late 2025 and trained the first model in space, a small nanoGPT. Google's Project Suncatcher put its TPUs in a proton beam. The hardware itself outlasted five years' worth of orbital radiation, but bits flipped steadily the whole time.Wear to the actual hardware set in only after about three times a five-year orbital dose; bit flips happened throughout the test (Google, 2025).

In orbit, GPT-2's memory takes a flip about every 50 days. Unprotected, it breaks in about a year and a half; with the clamp from earlier, it lasts about 190 years. A 70B model would take about 11 flips a day.At 10−11 flips per bit per day. The DRAM chips in the flight data range from 10−12 to 10−10, which puts unprotected GPT-2 anywhere from two months to 17 years.

Memory in orbit relies on ECC (error-correcting code), which fixes one flipped bit per word, and on scrubbing: reading every word back on a schedule and rewriting the corrected value. At these rates, two separate flips landing in the same word almost never happens: for a 70B model scrubbed daily, about once in 600,000 years.Assumes 72-bit words (64 data bits, 8 check bits), independent flips, and 10−11 flips per bit per day. The real danger is a particle hitting a chip's control logic instead of a single cell, which can corrupt hundreds to thousands of bits at once. On NASA's Lunar Reconnaissance Orbiter, 14 such events caused 90% of the corrupted data in its first three years. So space-grade memory spreads each word's bits across separate chips, with codes strong enough to rebuild everything one chip held.

All 2,840 runs, with every flip they made, are on GitHub along with the code and rate sources.