TXT Lookup Language Model
Connecting to the nameserver…
Language models over DNS

The GPU is
a nameserver.

DNS can store model weights. It can also supply the multiplication and addition tables to use them. This demo asks stock BIND to do both.

Horrible idea by Laura de Vesine.

Connecting…
01 / DOWNLOAD

Weights over DNS

Download the weights as TXT records, then compute locally.

—
DNS queries on the wire
— seconds— cache hits
—
02 / COMPUTE

Math through DNS

Look up every multiplication and addition in DNS.

—
DNS queries on the wire
— seconds— cache hits
—
03 / CACHE

Cache the answers

Keep each DNS answer and reuse it.

—
DNS queries on the wire
— seconds— cache hits
—
Results

Each run uses the same weights and random seed. We compare every score and generated word.

Download trace (JSON) ↗
Download replay (HTML) ↗
3721549
×
5211
=
??
6 multiplications and 24 additions take 30 DNS queries.
Run the demo, then step through the queries.—

The slider shows each recorded query and the answer BIND returned.

No packets yet.
Showing selected responses. The JSON download contains the full trace.

How it works

The model has a vocabulary of 15 words and 225 weights. It predicts the next word from the previous one. BIND serves the arithmetic tables as TXT records; Python connects the operations and picks a word from the resulting scores.

Hosted DNS

The 789 TXT records could live in Route 53 or a Cloudflare zone with enough record capacity. This site uses BIND on the same host as the client. Moving the records off-host would add a network round trip to every operation.