A Picture is Worth 170 Tokens: How Does GPT-4o Encode Images? - OranLooney.com
Here’s a fact: GPT-4o charges 170 tokens to process each 512x512 tile used in high-res mode. At ~0.75 tokens/word, this suggests a picture is worth about 227 words—only a factor of four off from the traditional saying. (There’s also an 85 tokens charge for a low-res ‘master thumbnail’ of each picture and higher resolution images are broken into many such 512x512 tiles, but let’s just focus on a single high-res tile.) OK, but why 170? It’s an oddly specific number, isn’t it? OpenAI uses round numbers like “$20” or “$0.50” in their pricing, or powers of 2 and 3 for their internal dimensions. Why choose a numbers like 170 in this instance? Numbers that are just dropped into a codebase without explanation are called “magic numbers” in programming, and 170 is a pretty glaring magic number. And why are image costs even being converted to token counts anyway? If it were just for billing purposes, wouldn’t it be less confusing to simply list the cost per tile? What if OpenAI chose 170, not as
A Picture is Worth 170 Tokens: How Does GPT-4o Encode Images? by Oran Looney June 5, 2024 Machine Learning LLM Here's a fact : GPT-4o charges 170 tokens to process each 512x512 tile used in high-res mode. At ~0.75 tokens/word, this suggests a picture is worth about 227 words-only a factor of four off from the traditional saying. (There's also an 85 tokens charge for a low-res 'master thumbnail' of each picture and higher resolution images are broken into many such 512x512 tiles, but let's just focus on a single high-res tile.) OK, but why 170? It's an oddly specific number, isn't it? OpenAI us
Explore this link on the map →saved by
related reading
- GPT-4openai.com
- gpt-4.pdfcdn.openai.com
- What Is ChatGPT Doing … and Why Does It Work?-Stephen Wolfram Writingswritings.stephenwolfram.com
- ChatGPT Is a Blurry JPEG of the Web | The New Yorkernewyorker.com
- GPT-4 Architecture, Infrastructure, Training Dataset, Costs, Vision, MoEsemianalysis.com
- GitHub - teamchong/pxpipe: cut Fable 5 token usage by rendering text context as images · GitHubgithub.com
- Transformer Explainer: LLM Transformer Model Visually Explainedpoloclub.github.io
- I. From GPT-4 to AGI: Counting the OOMs - SITUATIONAL AWARENESSsituational-awareness.ai
- microgptkarpathy.github.io
- GPT in 60 Lines of NumPy | Jay Modyjaykmody.com
- GitHub - karpathy/nanochat: The best ChatGPT that $100 can buy. · GitHubgithub.com
- SolidGoldMagikarp (plus, prompt generation) — AI Alignment Forumalignmentforum.org