Rendered at 13:02:08 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
keyle 1 days ago [-]
The most interesting part to me is this mention of the Bitter Lesson [1]
"The results are interesting and the project was a pleasure to work on. And yet there was no clever architectural idea behind it. About 80% of my effort went into building the biggest, cleanest datasets possible and doing lots of quality control on them."
I spend way too much time on trying to out-clever existing solutions, when a clean application of known approaches would serve best.
As the saying goes, “more data beats clever algorithms, but better data beats more data”.
vintermann 1 days ago [-]
I think it's maybe more accurate to say more data beats clever heuristics. Because if you have a well-defined problem and an algorithm that just solves it, well, you don't need training data anymore.
A whole lot of old ML algorithms (e.g. line detection algorithms in OCR) were really just clever heuristics.
TeMPOraL 1 days ago [-]
Except here we went from a pile of hacks (er, "clever heuristics") to... no algorithms at all? The transformer models really "just solve it", and the problem itself isn't even all that well-defined, at least not in a formal way.
vintermann 1 days ago [-]
It's true. I think the big, big problem with OCR, and HTR in particular, is that people don't agree what a good solution is, and most of the answers have obvious "featherless biped" issues. There is for instance a relatively common opinion in HTR circles, which I can't for the life of me understand, that if the writer forgot to dot his i's and cross his t's, then that should be transcribed as (Turkish dotless i) and l. This is so ingrained that even the large general purpose multimodal LLM which are best at HTR (Gemini), a lot of the time ignore explicit instructions to not do that.
JALTU 18 hours ago [-]
I once wanted an image of a person up on people's shoulders with a large crowd around them and a cityscape in the background. Think: political gathering w/ people holding up the "winner." Well, yes this is what I wanted but I did not want any flags or signs. Despite many repeated attempts telling the model "no flags, no signs, of any kind", every image had an American flag in it.
Maybe they're better now... lol
Melatonic 1 days ago [-]
Garbage in garbage out !
eli_gottlieb 1 days ago [-]
So I'm guessing it's gonna take another major stock-market crash before anyone gives half a damn about learning from small data again?
samgreydanus 1 days ago [-]
Author here! Given that I only trained these on an 8xH100 it's not exactly the most spectacular illustration of the Bitter Lesson. All I can say is that historically I always wanted to impress people with better model architectures or training techniques.
This time I just put all my energy into data. Agentic workflows + good open weight vision models + cheap multimodal AI APIs make data quality filtering / caption generation really smooth
joefourier 1 days ago [-]
While I agree with you about the importance of data, ironically, it seems you forgot to apply the bitter lesson to where it was more critical. As others brought up (see the thread with @NitpickLawyer) there's an obvious tell from the wobbliness of the slanted lines, most likely due to the grid quantisation (you can see it in the wobbly sketches too). This is in fact injected human knowledge, as opposed to working with raw pixels or raw vectors from hand strokes, and no amount of data could work around that bottleneck.
This is something that I've seen happen very often with machine learning practitioners. You cannot add more data to fix bad pre-processing. LLMs are limited by the BPE tokenisation (hence why early models couldn't count r-s in strawberry), diffusion models will produce illegible small text if their VAE isn't good enough, and audio classifiers will be bottlenecked no matter how much data you feed them if everything gets turned into a low resolution, single STFT window mel spectrogram.
Short of training a model on subatomic particles, you will always be injecting human knowledge into the model simply by choosing how you are preparing your data.
Love it. Too bad it doesn't handle non-Latin chars (tried the standard Polish "Pchńąć w tę łódź jeża lub ośm skrzyń fig" and it failed miserable).
I think it'd be neat to have personal GPT learned on own handwriting. How much effort/training would be needed for that?
disperso 18 hours ago [-]
Congratulations on the results. I find this much, much cooler than the usual flashy influencer videos of late with the trite "Opus built this", "I asked two models to create the same video game", etc.
I'm no ML researcher, but this kind of things is what I would love learning to make. I took a brief ML course a couple years ago, and best I did was a lame GAN that generated ugly "A"s from a bunch of fonts found in Google Fonts, and it was painful to build due to just using a CPU in a laptop.
jlarks32 1 days ago [-]
Sam is a ripper. Lovely blog post. Good to see his name float back up.
When I was a senior in college working on my eng thesis [1], some of his earlier posts (Scribe: Generating Realistic Handwriting with TensorFlow [2]) were helpful and inspiring to read.
Looks very creative! It feels like there are lots of uses for transformers to be explored beyond text and images. Are we at the point yet where the average programmer Joe can play around with this stuff and make a small task-specific model with some python libraries? Or do you need to understand all the math? Still need to read the white paper so maybe it’s covered.
Tadpole9181 1 days ago [-]
The project is impressive, but I've really wondered why so many of these types of blogs are Claudish. Just running it through another SOTA model or two, then reading yourself can clean things up. Compared to the work of the project itself, this seems comparatively painless, but is so often neglected.
samgreydanus 1 days ago [-]
Author here.
The post text (except the conclusion) was written entirely by Claude.
All my other posts are handwritten. I wish I had written it by hand, and I apologize for doing it this way. I did put a lot of effort into the code/dataset/ablations/figures.
All I can say is that I HAD to get this post up in time. Won't do it that way in the future (and might go back and rewrite in my style over Christmas break) :)
gfaure 1 days ago [-]
The post text, yes, but the paper was almost entirely Claudish, which I found particularly hard to read in my search for implementation details.
pickledish 1 days ago [-]
I appreciate your transparency about it!
Using Claude + being honest >>> using Claude + pretending you didn't at least (and FWIW I didn't find it too offensive here either)
Tadpole9181 20 hours ago [-]
There's no need to apologize! It's a free blog and you don't owe us anything. I'm appreciative you shared your project.
I've just noticed this phenomenon and thought it's be a good point of conversation.
Hope you have a wonderful winter!
samgreydanus 19 hours ago [-]
Thanks! Well people have limited attention and I think an author should generally earn the trust of their audience so that in the future they trust them enough to invest in doing a full read. That's why I'm trying to avoid Claudish in my posts.
Another part of me thinks: everything is moving so fast right now, one just has to get one's projects OUT in time, and also - pessimistically - 90% of readers of the post will be other people's AI's looking to help them reproduce the results XD
Maybe I should start a blog with methods/technical details written by Claude and a (much shorter) human written section only with the most engaging prose - but much shorter.
mwillis 1 days ago [-]
Huh. It read 100% human to me.
gyomu 1 days ago [-]
Then you’re heavily miscalibrated, the whole page is replete with Claudisms (except for the conclusion)
“Here are the rows I found most interesting; the paper has the rest.”
“The drawing model blends but doesn’t bind.”
“Cut the data and everything gets worse. Drop augmentation and the drawing model stops following its prompts entirely”
mk12 1 days ago [-]
"Everything else is a plain decoder that cross-attends to what it's told."
(In Claudeland abstract concepts constantly "say" and "tell" things.)
dofm 1 days ago [-]
I recently went looking for linguistics terminology that describes this and found that it is often described as something like: pairing animating verbs with inanimate subjects.
grey-area 1 days ago [-]
It’s personification. Sometimes used as a literary technique but heavily overused by Claude.
dofm 21 hours ago [-]
It falls short of achieving personification, usually, simply because it still sounds so deadened and transient (though the above example does achieve it).
Claude does it without selectivity or logic, just as a way to the end of a sentence.
Also I think it’s reasonable to say that personification is not in the gift of a machine; it’s our choice.
grey-area 19 hours ago [-]
Yes it's just not very good at it, and uses it in the oddest places. How Claude came to value personification so much I have no idea! Perhaps they did some training on it to try to make it sound more human or have a warmer tone or something, but the end result is strangely machine-like in that it imputes agency to things like abstract nouns without reason. Almost like it's trying to persuade you that machines can be human too!
mwillis 1 days ago [-]
must be. It seemed less flowery and more clipped than I’d have expected. But I get the occasional captcha wrong too.
cootsnuck 1 days ago [-]
The second sentence is "The effort was 80% data, 15% speed and 5% architecture:"... My eyes glaze over the second I hit the AI-isms.
I don't get how other people can stand it.
gyomu 1 days ago [-]
Because people who make these things understand only a fraction of it, and are incapable of describing the details of what they did in their own words; so they resort to Claude for the write up too.
It truly is cringe inducing but a majority of people seem to not care much, given how widespread this is in blog posts/marketing copy/etc.
samgreydanus 1 days ago [-]
Author here. This is the first time I wrote the body text with Claude. It was a misjudgement and I apologize. Won't do it that way in the future (and might go back and rewrite in my style over Christmas break)
I did put a lot of effort into the code/dataset/ablations/figures. And for what it's worth, if you look at the rest of the work on my blog (including work from before LLMs existed) you will see that I have been competent at building these kinds of models for years.
leobg 1 days ago [-]
I don’t get the complaints.
Yes, LLM text may indicate that an author who didn’t take the time to do the writing also didnt put much effort into the project itself. But that is, if anything, a rule of thumb, and it is proven wrong here by the results.
In my view, it’s much better that you spent your limited time on the building rather than on the writing. If yiu had waited for Christmas, who knows if you had posted it at all, with life and new ideas getting in the way. It’s better that it exists than it be certified Claude free, in my view.
Thank you for the post!
lukan 1 days ago [-]
"Because people who make these things understand only a fraction of it ... It truly is cringe inducing"
Cringe to me are rather shallow dismissals of whole projects, while I never see anything amazingly humanly hand crafted from them (and given away for free).
abound 1 days ago [-]
[dead]
NitpickLawyer 1 days ago [-]
It's cool, and on the face of it looks impressive (there's a lot of diversity in styles) but I noticed a "tell" that once you see it, is really obvious. Lots of straight lines (Is, Ls, Fs, As, Ms, etc) have wobbles in them that look artificial. There's something about lines that this didn't capture correctly (or oversampled from someone with wobbly lines).
samgreydanus 19 hours ago [-]
Author here.
Using a less fine grid was huge for getting the compute time down (and thus the iteration / debugging time down - ultimately to about 5 minutes). This helped me try a lot of different things.
Finer grid -> quite a lot more tokens per stroke -> more longer context -> more compute (increasing nonlinearly).
So I pushed it to the coarsest grid I could get away with. Light post-processing can actually remove the grid artifacts pretty easily, so that can be added if needed. In the future I'll probably just train my FINAL model on a slightly finer grid.
I think at least some of the wobbles are aliasing due to quantizing to a grid.
nextaccountic 1 days ago [-]
Yeah. Vertical lines like on h or d is fine, but slanted lines like in f is wobbly (all lowercase)
tencentshill 21 hours ago [-]
Unfortunate you leaned so heavily on AI for the writeup.
>Color is the source the pages came from.
No color key is provided
andai 1 days ago [-]
Wow. Don't forget to try the Draw mode, artificial doodles!
It can do penguins, pelicans (kinda), and bicycles, but pelican on bike makes it generate bizarre semi-abstract art. Looks like it doesn't know how to combine things together.
That's so cool, and a lot of fun to play with.
nxtfari 20 hours ago [-]
I missed these types of early-model silliness, making it draw hybrid things and getting the old “salmon in river” type hallucinations, nostalgic.
SebastianSosa 1 days ago [-]
This is amazing. I've been building a presentation model and will definitely be digging deep into this.
I feel like graphical real-time presentation is an essential part of learning and transferring knowledge and it's completely missed by existing models.
vegadw 22 hours ago [-]
Doing "Detailed field guide drawing of a lion's mane mushroom" and getting a horrifying mix of a lion and a mushroom was rather entertaining.
moffkalast 21 hours ago [-]
Tried the ole "pelican riding a bike" and got a bunch of pelican-bike hybrid creatures lol.
eptcyka 22 hours ago [-]
I'd love a good local model that does the reverse - takes my scribbles and transcribes into legible text. Preferrably maintaining the intent.
macNchz 22 hours ago [-]
Not absolutely perfect, but the Gemma 4 series models do a pretty good job turning a page of disorganized scrawl and marginalia into structured notes, and are smart enough to correct words that transcribe badly based on context clues. Can also convert hand-drawn flowcharts into Mermaid syntax pretty effectively.
eptcyka 19 hours ago [-]
How well do they run locally?
serf 19 hours ago [-]
there are gemma4 models that run on-phone all the way up to big stuff.
dominotw 22 hours ago [-]
apple has one i belive
revolvingthrow 16 hours ago [-]
Apple’s is horrible. Not only is it liable to turn my bad handwriting into even worse handwriting, it also likes rewriting things like 20k into 206.
LytraX 1 days ago [-]
How would this made posible to write in other languages? Would it have to re-trained on real hadwritten papers on other languages or it could adopt to other languages glyph shapes?
komali2 1 days ago [-]
For other latin alphabet languages I'd bet it would be mostly fine, at worst need a little bit of extra umlaut juice. But there's no way that latin cursive or print maps to Chinese characters, the strokes of which are distinct and named and any similarity with any of the strokes needed to form latin characters is incidental.
That said I bet you could train on handwriting that only includes like 10,000 characters and it could extrapolate from there to all characters because of the stroke > radical > character chain.
alanwreath 1 days ago [-]
Interesting, it doesn’t handle Spanish well at all (try Spanish “teach me”: enséñame), that said would be interesting to contribute to other languages.
gouterz 1 days ago [-]
i really love this. i think there's something fun and refreshing in seeing human writing and drawing for some reason
seantang001 1 days ago [-]
Seems like for some input it stops prematurely.
For example, `!2/23\4/5.4;3;5l=3asfa913k391aslkf9a'a;s.":>"}+-=;.a`
jimbobbam 1 days ago [-]
Oh this is great! I’ve been working an app to teach handwriting with Rokid glasses. I’ll give it a shot
lastdong 1 days ago [-]
Really neat. Also makes it easy to add your own handwriting and drawings.
vlark 14 hours ago [-]
"The text of this post (except the conclusion) was written by Claude."
Thank you for putting this first so I can close the browser tab and move on.
wat555 1 days ago [-]
Very cool! Not so good at drawing a pelican riding a bicycle
fredley 22 hours ago [-]
With the phrase "minimum aluminium" it's encouraging to see the model's output descend into illegibility in the same way my own handwriting does.
phkahler 19 hours ago [-]
Great, a forgery tool.
Yes I find it technically cool. I also find it horrifying that someone that smart just posts the code online.
1 days ago [-]
yasindce1998 1 days ago [-]
When I first heard the name. I thought it's for penteration testing.
Aeroi 1 days ago [-]
this is so cool! the drawing feature is so fun for some reason, although I wish it was just ever so marginally better or smarter. its right there.
k2xl 1 days ago [-]
Amazing this fits in 50MB.
tarpitt 1 days ago [-]
Imagine sending this program back in time to 2006 or something. It could probably run on a computer from back then. It's amazing how all of these advances are just software advances that could have been realized decades ago if we poked around the right places.
I don't know how I should feel about the fact that pushing the "neat/loose" cursor all the way to "loose" still outputs something prettier than my own handwriting.
fraywing 1 days ago [-]
"Stroke tokens" stood out to me
ex1fm3ta 1 days ago [-]
Very nice congratulations. Long road since the first MNIST dataset. This project is useful for me since I am building an OCR model to properly parse hand written posologies. I already have all the data I needed, I could use this to generate synthetic data to strenghten my model.
charcircuit 1 days ago [-]
It bothers me how it doesn't know the proper strokes for cursive characters.
muqsitnawaz 1 days ago [-]
[flagged]
asa123 1 days ago [-]
Neat!
mindmaster098 1 days ago [-]
very impressive
Alex5758 1 days ago [-]
[flagged]
RemingtonDavies 19 hours ago [-]
[dead]
Xinti 1 days ago [-]
[flagged]
cush 1 days ago [-]
I wonder if this model would have performed better if it wasn’t trained on awful 2000’s handwriting.
"The results are interesting and the project was a pleasure to work on. And yet there was no clever architectural idea behind it. About 80% of my effort went into building the biggest, cleanest datasets possible and doing lots of quality control on them."
I spend way too much time on trying to out-clever existing solutions, when a clean application of known approaches would serve best.
[1] http://www.incompleteideas.net/IncIdeas/BitterLesson.html
A whole lot of old ML algorithms (e.g. line detection algorithms in OCR) were really just clever heuristics.
Maybe they're better now... lol
This time I just put all my energy into data. Agentic workflows + good open weight vision models + cheap multimodal AI APIs make data quality filtering / caption generation really smooth
This is something that I've seen happen very often with machine learning practitioners. You cannot add more data to fix bad pre-processing. LLMs are limited by the BPE tokenisation (hence why early models couldn't count r-s in strawberry), diffusion models will produce illegible small text if their VAE isn't good enough, and audio classifiers will be bottlenecked no matter how much data you feed them if everything gets turned into a low resolution, single STFT window mel spectrogram.
Short of training a model on subatomic particles, you will always be injecting human knowledge into the model simply by choosing how you are preparing your data.
I think it'd be neat to have personal GPT learned on own handwriting. How much effort/training would be needed for that?
I'm no ML researcher, but this kind of things is what I would love learning to make. I took a brief ML course a couple years ago, and best I did was a lame GAN that generated ugly "A"s from a bunch of fonts found in Google Fonts, and it was painful to build due to just using a CPU in a laptop.
When I was a senior in college working on my eng thesis [1], some of his earlier posts (Scribe: Generating Realistic Handwriting with TensorFlow [2]) were helpful and inspiring to read.
[1]: https://johnlarkin1.github.io/pdfs/Handwriting-Synthesis-E90...
[2]: https://greydanus.github.io/2016/08/21/handwriting/
Looks a little bit like this: https://i.ibb.co/21Z4mWV7/AI-doodles.png (coffee-cup, "emai deliverabiliti was ..." etc.) Very fun! Thanks OP!
The post text (except the conclusion) was written entirely by Claude.
All my other posts are handwritten. I wish I had written it by hand, and I apologize for doing it this way. I did put a lot of effort into the code/dataset/ablations/figures.
All I can say is that I HAD to get this post up in time. Won't do it that way in the future (and might go back and rewrite in my style over Christmas break) :)
Using Claude + being honest >>> using Claude + pretending you didn't at least (and FWIW I didn't find it too offensive here either)
I've just noticed this phenomenon and thought it's be a good point of conversation.
Hope you have a wonderful winter!
Another part of me thinks: everything is moving so fast right now, one just has to get one's projects OUT in time, and also - pessimistically - 90% of readers of the post will be other people's AI's looking to help them reproduce the results XD
Maybe I should start a blog with methods/technical details written by Claude and a (much shorter) human written section only with the most engaging prose - but much shorter.
“Here are the rows I found most interesting; the paper has the rest.”
“The drawing model blends but doesn’t bind.”
“Cut the data and everything gets worse. Drop augmentation and the drawing model stops following its prompts entirely”
(In Claudeland abstract concepts constantly "say" and "tell" things.)
Claude does it without selectivity or logic, just as a way to the end of a sentence.
Also I think it’s reasonable to say that personification is not in the gift of a machine; it’s our choice.
I don't get how other people can stand it.
It truly is cringe inducing but a majority of people seem to not care much, given how widespread this is in blog posts/marketing copy/etc.
I did put a lot of effort into the code/dataset/ablations/figures. And for what it's worth, if you look at the rest of the work on my blog (including work from before LLMs existed) you will see that I have been competent at building these kinds of models for years.
Yes, LLM text may indicate that an author who didn’t take the time to do the writing also didnt put much effort into the project itself. But that is, if anything, a rule of thumb, and it is proven wrong here by the results.
In my view, it’s much better that you spent your limited time on the building rather than on the writing. If yiu had waited for Christmas, who knows if you had posted it at all, with life and new ideas getting in the way. It’s better that it exists than it be certified Claude free, in my view.
Thank you for the post!
Cringe to me are rather shallow dismissals of whole projects, while I never see anything amazingly humanly hand crafted from them (and given away for free).
Using a less fine grid was huge for getting the compute time down (and thus the iteration / debugging time down - ultimately to about 5 minutes). This helped me try a lot of different things.
Finer grid -> quite a lot more tokens per stroke -> more longer context -> more compute (increasing nonlinearly).
So I pushed it to the coarsest grid I could get away with. Light post-processing can actually remove the grid artifacts pretty easily, so that can be added if needed. In the future I'll probably just train my FINAL model on a slightly finer grid.
Thanks for the feedback
>Color is the source the pages came from.
No color key is provided
It can do penguins, pelicans (kinda), and bicycles, but pelican on bike makes it generate bizarre semi-abstract art. Looks like it doesn't know how to combine things together.
That's so cool, and a lot of fun to play with.
That said I bet you could train on handwriting that only includes like 10,000 characters and it could extrapolate from there to all characters because of the stroke > radical > character chain.
For example, `!2/23\4/5.4;3;5l=3asfa913k391aslkf9a'a;s.":>"}+-=;.a`
Thank you for putting this first so I can close the browser tab and move on.
Yes I find it technically cool. I also find it horrifying that someone that smart just posts the code online.
Why didn't we get GPT-2 in 2005?
https://news.ycombinator.com/item?id=49937571