• The Breakdown
  • Posts
  • đŸŸȘ How LLMs might make crypto mining useful

đŸŸȘ How LLMs might make crypto mining useful

There will be a little math, sorry.

“When you are experienced, you ought to be useful to others.”
— Goethe

How LLMs might make crypto mining useful

Your location on a map can be precisely described with a vector of just two coordinates: [longitude, latitude].

Your location in life is more difficult to pin down: Are you established? Striving? Content? Ambitious?

These terms are imprecise. Subjective, even. 

But they can be represented by a vector, too!

That’s how an LLM would do it, at least. When you type a word like “established” into a chatbot, the LLM it runs on creates a vector of coordinates that locates the word in a spatial representation of meaning: “established” will be close to "successful" and “settled,” and far from “unproven” and “itinerant.”

This will require many more than two coordinates, however. Language is imprecise and subjective, so every vectorized word will live at the intersection of thousands of overlapping concepts and associations.

The vector representing “established,” for example, will be a long string of numbers: [0.0030, -0.0105, 0.0742, 0.0000, 0.0765
.]

Conceptually, we can imagine each number as capturing some attribute — representing its grammatical function, tone, or a physical descriptor, say — that helps position the word in a “map of meaning” the LLM developed in its training.

A standard map has two dimensions. A topographical map has three. 

A map of meaning — as imagined above — has thousands. 

(Note: this is a highly conceptualized and overly simplified view of LLMs, because that’s the only chance my Liberal Arts brain has of understanding them.)

When prompting an LLM, the vector for each word is stacked into a two-dimensional matrix of “Word Representations,” where rows are words and columns are coordinates.

Then, to begin formulating a response to your question or request, this Word Representation Matrix is multiplied by the model's weight matrices — the billions of connections (or parameters) learned during training.

As part of this process, the model generates an “Attention Matrix” — a grid of coordinates that determines how much the representation of a word should be influenced by the words around it.

When the Attention Matrix is applied to these word representations, each word in the prompt is metaphorically dragged toward its relevant neighbors, updating its coordinates to reflect the context of the prompt in the process.

Roughly speaking: [Attention Matrix ] * [Word Representation Matrix] = [ Updated and contextualized Word Representation Matrix]

For example, if you ask Claude whether Apple is a buy, a first pass of matrix multiplication will shift the vector numbers for “Apple” away from words like “orange” and “banana” and toward words like “Nasdaq” and “technology.”

This process is repeated through dozens of layers of attention and weight matrices until the model calculates its final output: its next-word prediction.

This predicted word is then appended to the original prompt (forming the beginning of an answer), and the expanded matrix goes back to the beginning and does it all again to predict the word after that.

LLMs are often called prediction machines, because that's what they do: predict the next word in a sentence (or snippet of code, or song lyric).

But “matrix machines” might be more instructive, because that's mostly how they do it: the predictions are primarily made by multiplying matrices over and over.

Weirdly, this can make them blockchain machines, too.

Proof of Useful Work

Bitcoin is famously secured by its “proof of work” mechanism: miners win the right to add a block to the Bitcoin blockchain by proving they’ve expended costly electricity while guessing at numbers.

The numbers serve no other purpose, which has long been the primary criticism of Bitcoin. If you don’t think non-sovereign money is important, the electricity spent to secure it is entirely wasted. Bitcoin miners currently expend about 200 terawatt-hours of energy per year — approximately the same as Thailand. 

But what if that energy could be spent on something useful?

“If we can find some other useful computation which is easy to verify, then cryptocurrency mining could actually become a huge boon to society,” Vitalik said way back in 2017, “not only removing the objection that Bitcoin wastes ‘energy’, but even being socially beneficial by providing a public good.”

Nearly a decade later, we may finally have discovered a public good to provide: matrix multiplication!

That is the value proposition of Pearl, a blockchain that’s secured by a novel “proof of useful work” mechanism involving the same matrix multiplication that LLMs are constantly doing.

Each prospective block on the Pearl blockchain contains a cryptographic challenge that can only be solved in the process of multiplying matrices together. Miners take the numbers from that challenge, blend it into their own matrix data, and multiply them.

This creates a hash that the miner sends back to the blockchain. If the hash meets the network's target difficulty, the answer is accepted, and the miner wins a block reward paid in PRL, the blockchain’s native token.

The big idea here is that an LLM that’s doing a lot of matrix multiplication anyway could bundle Pearl's puzzle directly into its existing workload.

In theory, this would solve the problem of electricity being wasted on crypto mining: the power used to secure the Pearl blockchain would simultaneously be doing highly useful things like curing cancer and writing newsletters.

Even better, this would lower the cost of curing cancer and autonomously writing newsletters. An LLM that’s earning valuable cryptocurrency could charge less for the inference that cancer researchers and newsletter writers need to do their incredibly important work.

In theory.

In practice, there’s no requirement that the matrices being multiplied have to be doing anything useful. Instead, miners can solve the puzzles by multiplying arbitrary sets of numbers, unrelated to AI or anything else. 

A recent study found that this is mostly what they’ve been doing so far, 

But perhaps not for long?

Economic incentives should lead to usefulness: a miner running arbitrary matrix multiplications has to pay for their GPU time entirely with the PRL they earn. A miner already running those GPUs for inference, by contrast, can spread the cost across both activities.

For LLMs to be interested in mining, the PRL it earns solving puzzles only has to be above the small additional cost they incur for adding the puzzle to the multiplication they’d be doing anyway.

Which raises an obvious question: why should PRL be worth anything at all?

This is where the crypto community will have to do some work. There’s no reason why PRL should be intrinsically valuable.

But if enough people decide that it is, then it will be — just like bitcoin.

I don’t know why it would happen again with Pearl.

But if it does, it will be provably useful.