Can pi replace a language model's weights? I tried it

By Ali Raza ·

I had a strange idea. A language model is just a huge list of numbers, and training is how you find the right ones. But we already know some enormous numbers by heart: pi, e, the golden ratio. What if one of them, or something built from one of them, could stand in for the weights? I wasn’t expecting a genius. I was hoping for something with no world knowledge but some foundation, a model that could at least string a few words together without being trained.

So over two days in November I took a real model apart and found out.

The setup

The model was Qwen3.5 4B, an open model with about 4.33 billion weights spread across 441 grids. It has 32 working blocks in a repeating pattern: three “memory” blocks, then one attention block, eight times over. Each block has two halves: a mixing half that shares information between words, and a feed-forward half.

I ran the first experiments on my laptop (an M4 Mac) and the heavy ones on my desktop PC’s RTX 3060 over SSH. Everything used greedy decoding, so the same input always gives the same reply. The original model file was never touched. Every variant was a copy, and I checked the original’s fingerprint after each batch.

The test that mattered was simple. Fill part of the model with a number, then compare it with the same part switched off (set to zero). If pi can’t beat “off”, pi isn’t contributing anything.

Experiment 1: replace everything

First, the big swing. I replaced every single weight with digits of pi, with random numbers, and with the output of a simulated 20-qubit quantum circuit, then said “hello”.

Weights Reply to “hello”
original Hello! How can I help you today?
random 8888888888888888…
pi schließlich8888888888…
quantum 8888888888888888…

Three different sources, and all three settled on the number 8. The pi version said “schließlich” first, which is German for “finally”. I thought that was funny.

The 8 turned out to be a red herring. The model’s maths had broken down completely and every output was NaN (not a number), so the program just printed a fallback character. On the PC the same broken model printed “G” instead. No word was winning. There were no usable numbers at all.

Experiment 2: one block at a time

Replacing everything was never going to work, so I went block by block. Fill one block with pi, test, put it back, try the next.

Switching a block off broke far less than filling it with pi. With a block switched off, 25 of 33 blocks still gave the exact original reply. With pi, only 10 did. Some of the pi replies were wonderful nonsense, like “Yes! I have super been to the internet!”

A proper test

“Hello” is too easy to notice small damage, so I wrote a 40-question test with checkable answers: capitals, sums, plurals, number sequences, a bit of Python, and simple logic puzzles. The untouched model scored 40 out of 40, twice.

Then I ran the block map again with every block filled with pi, filled with random numbers, and switched off. Average scores across the 32 blocks:

Block filled with Average score
nothing (switched off) 95%
pi 53%
random 39%

Pi looked better than random here, so I checked whether that was luck. I tried three more stretches of pi from deeper in the digits and four more random seeds. Pi ranged from 38 to 53. Random ranged from 39 to 55. They overlap completely. Pi is not special. Neither is e (47), the golden ratio (52) or the square root of 2 (52).

Patterned sequences did worse. A Fibonacci sequence wrapped at 256 scored 6.

And the main result: across all 32 blocks, pi never once beat the same block switched off.

Trying to save the idea

I tried a few gentler versions.

  • Keep the trained skeleton, fill the gaps with pi. I kept the largest trained weights in each grid and replaced the rest with pi or with zeros. Over 21 cases, pi filler was never better than zeros. Seven times it was worse.
  • Blend. Mixing 10% pi into every trained weight cost nothing. At 20% the score dropped to 68. At 30% it was zero.
  • Feed pi in as input instead of using it as weights. The model read the numbers as a garbled message. In chat mode, 11 of 12 replies politely told me my message looked incomplete or mistyped.

What I learned about the model instead

The hypothesis failed, but taking the model apart was fascinating. Some things I didn’t expect:

  • Block 0 is essential. It’s the only single block whose removal drops the score to zero.
  • Arithmetic lives in two places. Switching off attention blocks 19 or 23 wrecked the sums but barely touched facts or language.
  • Facts don’t have one home. No single block switched off lost more than one of the nine fact questions.
  • A whole chunk is spare. I removed blocks 12 to 15 entirely, four of the 32, and the model still scored 100% on my test.
  • The biggest weights carry the knowledge. Zeroing the largest 1% of weights in every grid dropped the score to 2%. Zeroing the smallest 25% changed nothing.
  • Precision barely matters. Rounding every weight down to 17 possible values kept a perfect score. Five values was too few.
  • Skills fade in an order. Switching off late blocks one after another, number sequences went first, then arithmetic and code. Facts held on longest.
  • Some blocks can swap places. Swapping memory blocks 13 and 17 cost nothing. Swapping attention blocks 3 and 31 destroyed the model.

The verdict

A known number can’t stand in for training, at least not like this. Pi, e and the golden ratio all behave like random noise to a language model. They’re not even as good as leaving a part empty. The knowledge in a trained model lives in which weights are big and which way they point, and the digits of pi carry none of that.

Two ideas are still open, and both need real training runs. One is to use pi as the starting point for training instead of random numbers and see whether it learns faster. The other is to keep fixed weights made from a number and only learn which ones to switch on, which some published research has explored with random weights. I also never worked out how the quantum side fits in.

I didn’t prove what I set out to prove. But I now know more about how a language model is put together than I did from any article, and that was the point. More experiments soon.

Spotted a mistake or have an idea? Send feedback.

More posts