TranformerLens is a Python library for Mechanistic Interpretability. It’s got some great tutorials… but they are all kinda verbose. Here’s a cheatsheet of all the common things you’ll want from the library. Click the links for more details.
Continue readingComputational Superposition in a Toy Model of the U-AND Problem
I’ve been working on some AI Safety research. It’s kinda dense for a blog, so I’m hosting elsewhere.
It’s investigation into how ML models do boolean at the most fundamental level. Under an assumption of feature sparsity, which is common for large models, certain patterns appear.
Running Tracery bots with LLMs
Tracery bots were a fun, simple, way of making generative texts. They are basically an easy way to specify generative grammars via a simple JSON file format. There used to be a horde of fun little tracery bots on twitter until API changes shut them all down.



Nowadays, you can prompt a chatbot to get whatever you want. But that lacks the same charm, and it doesn’t give you the control you’d want for something unleashed on the internet. Let’s do something about that.
Continue readingOuter Wilds Mission Graph
I recently played Outer Wilds and absolutely loved it. But after playing it I realised how little of the game was really on the critical path – most locations fill in lore and deepen your curiosity but don’t actually help you reach any location you couldn’t before. To analyse this, I made a mission graph for the game. Spoilers ahead.
SPOILERS IN FULL ARTICLEWraparound Hex Grids
A user requested adding wrapping hex grids to Sylves. That is, a grid that is a collection of hexagons, and the collection itself is also hexagonal shaped. When you exit from one side, you re-enter on the opposite side.
The maths for this turned out to be surprisingly fiddly, and not listed by RedBlobGames, so I thought I’d share it here.
Continue readingOzymandias²
I met a scholar from an English class
Who said: In dusty archives, seldom passed,
There lies a sonnet, once of mighty fame.
Near it, on yellowed pages, time-worn, lame,
The dedication reads: “Percy Bysshe Shelley,
Who spoke to power through his burning hymns,
Few now recall, save students, grudgingly.
He wrote of Ozymandias, King of Kings;
Look on his verse, ye readers, and despair!”
Round the decay of that poetic feat,
Bare margins stretch, and in the desert there
His words drift forgotten, like windblown heat.
Campaign Lab Hackathon
I did a short hackathon “Building Tools for Community Organisers with Matrix” sponsored by Campaign Lab, working in a team with Ben Dunn Flores.
Our tool is a prototype for summarizing a chat log, and publishing the result to Matrix (an instant message platform) and gitbooks.
Becoming Cracked
Recently, I’ve quit my job, and have been trying to learn a new field, with plans towards a bit of a lateral career shift after 16 years as a Financial Software Engineer.
This has caused a fair bit of soul searching, because as it turns out, learning new things is hard.
The first things to conquer were the fear of looking stupid, and persevering without that feeling of mastery. It’s frustrating, but not unexpected, when it comes to learning something new.
Today, I wanted to talk about another roadblock that I’m coming to grips with. I remember when I was much younger, I would absorb new material with ease. Now that I’m doing it as a mini-mid-life crisis, it feels like I’m forcing it, and it takes much more effort. There was a time when I thought I’d lost my “spark”, or at least had replaced fluid intelligence with crystalized intelligence. I eventually realized though that’s not true. I’m basically as sharp as ever, but instead I have a differe a mental roadblock to deal with:
The thing is, I’m more complete a person right now. As a youngster, I was far more willing to obsess over something or make it a core part of my identity. Then work on it far more than is healthy or sensible. Now, I feel I have ties to a dozen different areas – my career, my hobbies, my relationships. Each of these demands time and focus.
I see the same pattern when it comes to learning languages. Children learn languages very well, even outside of the critical period. There have been studies showing this is is because they simply sink ungodly amounts of time into learning. I’ve been revising German as an adult via Duo Lingo for 3 years. But 5 minutes a day for that period adds up to a term or two of school lessons, excluding any homework. It’s no surprise that I’ve made no progress with that sort of dedication.
I’ll probably never be cracked at something new, same as how I’ll never reach native level fluency at German.
So am I essentially arguing for a form of agism, then applying it against myself? That I’m saying that even if you have the same energy, intellect and time as a youth, you are unlikely to be as devoted to something new? That I’ve become cynical, instead of passionate?
I think not. Instead, my mental model is that of a super-tanker. Now that I am a bit older (though not that old!), my hull is stocked with precious resources. I’m used to spending on time on things, and that gives a certain momentum to winding down one thing and doing another. Turning is not something to be taken lightly when you’ve spent so much fuel getting up to speed in one direction. But perhaps it is more valuable to arrive with goods at the right destination, but late, than it is to arrive elsewhere, or arrive empty handed.
Generating Tilesets with Stable Diffusion
Recently I’ve been playing around more with gen AI techniques. I thought I’d try to generate a set of tiles that all connect together. It’s harder than it sounds – Stable Diffusion is hard to control, so there’s no easy way to get a set of images that are fully consistent with one another.
I’ve developed a technique for doing it that I’ll call Non-Manifold Diffusion as it involves doing diffusion over a set of patches that interlock to form a non-manifold surface.
Continue readingBooks That Changed My Life
For many years, I always gifted people books for birthdays. It took a long time to realize that most people see them more as obligations than anything. I guess I was trying to recapture some of the magic they have always brought me.
The following books are not necessarily the best ones I’ve read or even the ones that have absorbed deepest into my personality. But they’ve had a distinct impact. Let’s begin.
Continue reading