Home / use case

Death Diary: switching off a local Gemma 3 1B's neurons night by night on a plain CPU

At a glance
Models & engines
Gemma 3 1B instruction-tuned, loaded from the open unsloth/gemma-3-1b-it copy
PyTorch and Hugging Face Transformers on a plain CPU, no GPU, no API, no internet after download
Key gotcha
Killing attention heads along with neurons was a cliff (lucid at 10% damage, multilingual soup at 20%), so heads were moved to the last two nights.

What they built

Death Diary of an AI is a recorded experiment with Gemma 3 1B running locally. Every "night" the model gets the same request (write tonight's diary entry) and the same random seed; the only change is that more of its neurons are switched off first, from 8% up to all of them.

Each night it also answers 16 fill-in-the-blank probes such as "The capital of France is ___", and the author records how uncertain it is about each word it writes. A website replays the six recorded deaths with a brain scan of all 179,712 MLP neurons and 104 attention heads, a heartbeat driven by the model's uncertainty, and a death certificate.

Pressing Revive restores every weight exactly, and the healthy model reads its whole diary and writes one more entry.

Setup

  • Gemma 3 1B instruction-tuned, loaded from the open unsloth/gemma-3-1b-it copy
  • PyTorch and Hugging Face Transformers on a plain CPU, no GPU, no API, no internet after download
  • wordfreq word list for judging when output stops being real English

How it works

  1. Gemma has 26 layers with 6,912 MLP neurons each; setting column j of a layer's down_proj matrix to zero stops neuron j from passing anything on. Attention heads are silenced through their slice of o_proj.
  2. A seeded random order decides which neurons die first in each layer, and each night a longer slice is zeroed across all 26 layers; a 15-night schedule moves fast while healthy and slows where language starts to crack, with heads only dying on the last two nights.
  3. Entropy of each next-word choice measures confusion; a probe counts as known while the right answer stays in the top 10 guesses.
  4. Output counts as real English with at least 20 words, 90% of them dictionary words, and at least 15 distinct words; decoding is limited to Latin-alphabet tokens on every night.

Results & numbers

  • One full death plus revival takes about 3 to 4 minutes on CPU.
  • Across six recorded deaths, the model lost real English somewhere between 70% and 51% of its neurons left.
  • In the demo death it forgot its own name at 76% before forgetting its mother at 70%, and the last thing to go in all six deaths was the sum 3 + 4 = 7.
  • Re-recording all six deaths with the added measurements produced identical text, character for character.

Gotchas

  • Killing attention heads along with neurons was a cliff (lucid at 10% damage, multilingual soup at 20%), so heads were moved to the last two nights.
  • Without restricting output to Latin-alphabet tokens, the dying multilingual model melted into many scripts.
  • Asked afterwards what it remembered of those nights, the revived model gave a vivid but entirely made-up account; its weights were identical to before, so nothing could have been stored.
  • Google's own Gemma repo needs a sign-in, so he used the identical unsloth copy.
“It doesn't remember dying. It confabulates a memory of dying”— Toyyib Olamilekan

Do it yourself

  1. Install PyTorch and Hugging Face Transformers and download unsloth/gemma-3-1b-it.
  2. Keep a copy of each layer's original mlp.down_proj weights.
  3. Pick a seeded random order of neurons per layer, and for each step zero a longer slice of those columns across all layers.
  4. Generate with the same prompt and seed each step, and log entropy and simple fill-in probes.
  5. Restore the original weights at the end to revive the model, or clone the death-diary repo to replay the recorded runs.
w = original_down_proj[layer].clone()
w[:, death_order[layer][:n_dead]] = 0
model.model.layers[layer].mlp.down_proj.weight.copy_(w)
Source: Toyyib Olamilekan (DEV Community) · Published 2026-10-31 · Added 2026-10-31. This write-up summarizes the original source; see it for full details.

Similar setups

PatchPal TinyAgent: a coding agent on a 4B model and a 6GB laptop GPU

WiseProbe adapted its PatchPal coding agent to run Gemma 4 E4B or Qwen3.5 4B through Ollama on a 6GB RTX A1000, using handoff-note compaction and capped file reads to work inside a 16K or 32K window.

WiseProbe Blog · 2026-11-25

All of Hacker News in 5.3 GB, searched by meaning on a laptop CPU with EmbeddingGemma 2

DavidMC packed all 49.3M Hacker News stories and comments into one 5.34 GB file that runs semantic and keyword search offline on a laptop, embedded entirely on the laptop's integrated GPU.

DavidMC (Google AI Developers Forum) · 2026-11-02

Link Séance: a local Gemma 3 writes grounded epitaphs for the dead links in your bookmarks

Abdul AmberNeel built a command-line tool that checks every link in a bookmarks file, finds the last living Wayback Machine snapshot of dead ones, and has a local Gemma 3 write a two-sentence epitaph only from what the archive kept.

Abdul AmberNeel (DEV Community) · 2026-10-31

Breaking re-ranker ties with Gemma's own token probabilities on a Mac mini

A developer testing a local retrieval setup on an M4 Mac mini fixed tied re-ranker scores from gemma3:12b by reading the model's digit probabilities from Ollama, getting the right article first on 11 of 12 questions.

DEV Community (Nerav Doshi) · 2026-11-22