/AI5h ago

Trask Releases AbcGPT Repo For Neuron-Gated LLM Voice Control

--0--
Original posts
Comments
Original post
⿻ Andrew Trask@iamtrask#361inAI

Excited to release a new repo: abcGPT!

It can be hard to "dial in" the voice you want from an LLM, because an LLM is a tangled superposition of millions of voices from millions of different authors around the world. Instead, frontier LLMs tend to give that slop-ish / generic / corporate tone that's hard to avoid, even with aggressive prompting and an informative context window.

Lately I've been experimenting with some ideas on the fringes of attribution/unlearning, trying to make it so an AI user can "dial in" the specific voice/style/sources they want to use in a way that's more rigorous than prompting/context-engineering. and I'm starting to get pretty good results.

the model below uses the following technique: - Take nanoGPT as written by @karpathy - Assign each neuron a random "specialty score" m between 0 and 1, sampled from a U-shape so most neurons land near 0 or near 1 with some in the middle. - Freeze this "m" for the lifetime of the network (it's the neuron's permanent corpus assignment) - Extend the forward() code with an α parameter, a kind of vibe-fader from 0 to 1. Think of each neuron's m as its position on that same slider. The slider acts like a spotlight: it lights up neurons whose m is near its current position, and silences those far away. Slide all the way to 0, and only TinyStories specialists fire. Slide all the way to 1, and only Shakespeare specialists fire. - Train this new nanoGPT on two datasets (in this case, TinyStories and Shakespeare) - During training, sample α from Beta(0.5, 0.5) AND draw the corpus from Bernoulli(α), so a Shakespeare batch tends to come with a high-α (Shakespeare-favoring) gate, and a TinyStories batch tends to come with low-α. - train until golden brown 🧑‍🍳

Perhaps surprisingly... it works! ¯\_(ツ)_/¯ The neurons we pre-assigned to Shakespeare learn to behave as Shakespeare specialists. the neurons we pre-assigned to TinyStories become children's-story specialists. the halfsies learn to bridge between them.

After training, you can play with the kindof... vibe dial... you can "dial in" the voice you want during inference, by choosing whether to lean on Shakespeare or TinyStories neurons more or less. 📀💿

When you fully dial in Shakespeare neurons, the model only outputs tokens which look like Shakespeare, and when you fully dial in TinyStories, the model only outputs tokens which look like children's stories, and... (honestly this was the hard part)... everywhere inbetween!

In a way, it's partitioning statistical signal into fuzzy segments, and then the end user can choose which pre-training data sources they want to lean upon for generation... and how much.

My goal was to get a version of this working at scale, with clear intuition for why it works, and I'd like to explore ways to scale up this effect to large numbers of sources and larger models, and study the interplay between individuality/generality as scale increases.

Link to repo and a detailed walkthrough of the abcGPT methodology in the reply.

8:29 PM · May 31, 2026 · 56.5K Views
Sentiment
Sentiment unavailable for this story.
Cluster Engagement
-
Views
-
Comments
-
Reposts
-
Bookmarks
Expand data
Posts from X
Most Activity
Most ActivityTimeline
VIEWS358BOOKMARKS1LIKES2REPLIES1

The other thing that made the "middle" breakdown (like in the chart above) was when I didn't allow enough shared neurons... which honestly is probably more of a special case of not allowing enough neurons overall... the model learned the pure signal from each without trying to work out the complex mixture between the two... more tuning might lead to a different conclusion though.

I also tried shuffling the training data between Shakespeare and TinyStories... and while this also greatly increased the complexity of the code... it also didn't seem to make things better. I don't fully know why to be honest... room for exploration (maybe there was a bug). I tried lots of little variants because I assumed that blending sources during training would improve things but it didn't. ¯\_(ツ)_/¯

All of this makes tuning a little tricky because now we need to plan for how much *neural capacity* to set aside for each data source... but I think it also implies that something interesting is going on... there really is some feature mixing from the two datasets that's helpful... and some neurons that are pure/unique to each dataset.

Basically I think of these neural nets has having kindof... intelligence budgets... for different things: - shakespeare budget: number of neurons used to store information unique to shakespeare - common knowledge budget: number of neurons used to set aside knowledge which is common across datasets - tinystories budget: number of neurons used to store information unique to tinystories.

And I think this sortof is an interesting thread to think about w.r.t. things like agent marketplaces... buying and selling intelligence etc... it also seems like there's a strong case to be made that "common knowledge" neurons could be like... fair use... whereas author-specific neurons might be up for more debate / interesting market making dynamics... dunno.

But of course common knowledge isn't common to everyone... i imagine there would be various sub-groups with knowledge which is "common" to them... so some neurons are common to "Everyone" some to these subgroups... i dunno... maybe like trade associations or collectives or something can negotiate w.r.t. the group neurons. ¯\_(ツ)_/¯

At least for now it all fits within the same size as Karpathy's original nanoGPT (with a slight increase in validation score... but maybe some more capacity would fix this). You can train it on Google Colab if you want (I paid like $50 for premium just so i could do a little more testing in parallel, but it probably works on the free tier GPU too)

Hope you find this interesting. I like to imagine a world where someday when I use ChatGPT or Claude I can have a view at the millions (billions?) of sources/authors/textures/styles hiding in the neurons.... groups with common knowledge neurons unique to the group... and be able to dial in exactly what flavor/style I'd like... which hopefully can help reduce that generic/bland/slop-ish vibe that AI models tend to have.

attribution and unlearning ftw!

Side note: this inverts the conventional wisdom about validation metrics. Normally you want val loss to go down on everything. Here I want TinyStories val loss to go UP when α=1, because that proves the model has actually specialized on something else (e.g. shakespeare). If TinyStories val loss stays low at α=1, the slider isn't working.

5hViews 358Likes 2Bookmarks 1