60% Fable cost cut by converting code to images and having the model OCR it

dimitropoulos 252 points 89 comments July 03, 2026
github.com · View on Hacker News

Discussion Highlights (19 comments)

dimitropoulos

there's also a DeepSeek whitepaper on this technique https://www.seangoedecke.com/text-tokens-as-image-tokens

genxy

This seems like a pricing hack that burns resources, that when the loophole gets closed the price of OCR will have to rise?

aabhay

Ahhh my eyes the vibe coded readme

lpellis

I tried the same thing last year (with openai models), back then it worked to reduce prompt tokens, but you needed way more completion tokens, ultimately more expensive (and slower) https://pagewatch.ai/blog/post/llm-text-as-image-tokens/

aabhay

In Gemini at least, if you look at how they process PDFs, they do an OCR and then feed the text + image to the model, without charging you for the text tokens (I believe). So my guess is that Claude’s backend is doing the same — so this hack is probably more of a loophole in token accounting that might get closed if Claude is doing what Gemini does

dippogriff

I want to see more text-free foundation models

puppycodes

That is hilarious and an amazing find.

__hugues

seems really dumb and like it would need to violate basic information theory to work? input tokens are cheaper than output tokens. seems like it would maybe reduce input tokens at the expense of many more output tokens if you're actually triggering OCR via thinking?

himata4113

Related: https://blog.can.ac/2026/06/10/snapcompact/

AIorNot

I cant get past that LLM intense slop text in the Github repo

yogthos

Isn't this basically what DeepSeek came up with https://github.com/deepseek-ai/DeepSeek-OCR

anigbrowl

I'm sorry, but this is retarded. It works, and it's clever, but but it's clearly a workaround for a pricing failure. Much like the bounty on poisonous snakes leading to people taking up snake-breeding, this just exploits and promotes waste. I think ultimately blame falls on Anthropic for the poor pricing system the enables such arbitrage. But I'm also disgusted by the inevitable tide of people exploiting this until its fixed, and creating an entirely unnecessary extra tide of digital junk.

electrotype

What about: "Read this document online : [URL]" and you add your text/context to an online document? Would that reduce the number of tokens used too?

cs702

Reminds me of caveman: https://news.ycombinator.com/item?id=47647455

nickpeterson

a pictures worth a thousand tokens

tru3_power

This probably works with PDF parsing as well I’m sure, even if it’s just from not having to parse pdf format alone.

OSaMaBiNLoGiN

Saw a Tweet a while ago from someone (maybe Carmack, maybe Geohot, maybe Karpathy?) wondering if images were just the better option. Since then I've been using images with very simply worded prompts whenever I'm informing an agent of what is happening. Sometimes no text in the prompt at all. It has been very very effective. That being said, this isn't really what Karpathy was talking about. But it got me thinking a bit, and that got me to a much nicer workflow.

chickensong

Binary compression unpacked by OCR? This is the stuff of nightmares. So cursed, and yet...

wigster

a picture paints a thousand words

Semantic search powered by Rivestack pgvector
14,015 stories · 131,331 chunks indexed