Giving Language Models LSD
How to make your model more creative
While at work this week, I had a conversation with a colleague about creative coding. There are multiple interpretations of what creative coding precisely is, but my main point of reference is Daniel Shiffman’s videos on The Coding Train. Specifically his generation of the Mandelbrot set, fractal trees, and of course Git for Poets.1 During my studies I had to create fractals and the Mandelbrot set as well, and I always found it fascinating how these simple algorithms can produce what I think is a form of natural art.
However, that’s kind of where my ‘creative coding’ career ended (if it ever really began). I’ve had Nature of Code and Generative Art on my wishlist for years, but never really had the urge to work with any of their frameworks.2 If anything, I would love to understand and use Strudel, but this too is too much of a time investment at the moment. Luckily, my domain of choice can be used for creative coding as well, as you can in theory generate stories, poems and entire books with LLMs (whether they are any good, and whether we even want this, is of course another question).
Creative Models
Anyway, you’re probably wondering what I am on about, and why I want to give LSD to these models. As I explained in last week’s note, an LLM generates text by predicting the most likely next word (or part of a word) over and over again. Now if it would always pick the most likely word, it could repeat itself, fall into loops and in general be overly predictable. If you asked it to “Write a story”, it would always produce the same story, and it would probably be a shitty one at that.
To combat this, these models don’t just pick the most likely word, but rather use other picking strategies over the range of probabilities for the next word. These often come with a knob (you might have heard of changing the temperature of a model) that you can turn to increase or decrease the randomness of the generation.3 While this is not great if you want a deterministic output, it is very useful, especially in creative writing, as it makes your story less predictable.
While looking at the garden path sentences, I saw that the chance of the word accumulates being generated after fat people eat was 1 in 16 million. Now here was my, most likely incredibly stupid, idea. What if instead of always picking the most likely next word, you always pick the least likely one? That might have created this very strange but technically grammatical sentence. I call this decoding strategy Least-likely Sampling Decoding, or LSD for short.
I’m not trying to sound like a broken record, but of course I found out this has been tried before. This time though, it is not just the idea that was tried (although in a different way than I imagined), they even used the same idea for the name. Their XTC (Exclude Top Choices) every so often removes all the most likely words except the least likely of them, which is probably the better idea, as it makes sure your sentences are still comprehensible. However, them forcing the X in the acronym gives them minus points, so I think we’re tied again.
What’s the idea
The method is simple. We give a model the beginning of a text and let it complete the rest. Now, to stick with creative writing (and because I miss playing it), I forced the model to complete my favourite D&D moment from my old campaign, in which I (Ghurkem, a self-absorbed orc) destroyed the most beloved item of Leto (an even more self-absorbed elf). I also thought of asking for some final PhD advice, as I am in my final year right now and could use every piece of help I can get.



The model then takes these texts and generates its completion word for word. We can compare the normal way of generating to its LSD counterpart to see what effect it has on the model. I honestly have no idea if it will work, but that’s what these notes are all about in the end.
Where did the banjo go?
Let’s start with poor Leto, and his rebuttal to my actions.
While Leto was asleep, Ghurkem took his banjo and threw it in the river. Once Leto woke up, and saw his banjo was missing, he screamed:
"Ghurkem! Where is my banjo?!" Ghurkem replied: "I threw it in the river." Leto said: "I know you threw it in the river, but I don't know where you threw it in the river. I know you threw it in the river, but I don't know where you threw it in the river. I know you threw it in the river, but I don't know where you threw it in the river. I know you threw it in the river, but I don't know where …
Every ZAAAHT comes from the same roll of the dice
| Text | Sampling | Opening | Rank of ‘Z’ |
|---|---|---|---|
| Banjo | Temperature 1 | ZAAAHTTTTTTTT!!!! | 643 |
| Banjo | Temperature 1.5 | ZAAAHT why did they deform ships | 643 |
| Banjo | XTC | ZAAAHTTTT! Throwing | 646 |
| PhD advice | Temperature 1.5 | ZAAAHT why dopamine consumption deform ships | 1,397 |
Can it save my PhD?
I’m feeling very confident in its capabilities, so it must therefore be a great advisor, and provide me with the much-needed help for my PhD.
I'm in my final year of my PhD in Computer Science, here is the best advice I could give someone:
1. Don't be afraid to ask for help. 2. Don't be afraid to ask for advice. 3. Don't be afraid to ask for criticism. 4. Don't be afraid to ask for feedback. 5. Don't be afraid to ask for guidance. 6. Don't be afraid to ask for support. 7. Don't be afraid to ask for encouragement. 8. Don't be afraid to ask for motivation. 9. Don't be afraid to ask for inspiration. 10. Don't be afraid to ask for …
Don’t do drugs kids
While it was interesting to dive a bit into tokenisation, a step whose importance I think is often underrated, it turned out LSD ain’t good for a model this size. At least not for practical use cases, although I could’ve probably guessed that doing the opposite of what makes these models so good would make them this bad.
Still, I think it would probably work a lot better if tested on larger models, but I don’t think it’s worth the time and effort (or energy consumption) to test it out. I’ll leave this to the next person to come up with the same idea, which most likely will never happen.
For now it’s mostly a reminder that most good things have already been done, and that I love reminiscing about my old campaign. Don’t do LSD, play D&D.
Technical report
- Data: two openings of my own (the banjo story and the PhD advice), each completed for 150 tokens with three seeds per sampling strategy
- Model: Qwen3 1.7B, base version, run locally
- Sampling: normal sampling is temperature 1 with top-p 0.95; LSD picks the 1000th (or 5th) most likely token, at every token, at every 10th token, or with a 5% chance at each token; XTC with threshold 0.1 and probability 0.5. Highlighted words in the scrollies were picked by LSD or XTC
- References: Weidmann et al. (2026) for XTC
- Code: Python (
transformers), Astro and GSAP (the scrambling text) - Coding agent: Claude Opus 5.5 (in Claude Code), which also wrote this technical report