Mazda CX5
Як зробити цифрову копію себе. Ось відео —>

How to save 60% on tokens: an IT guy came up with the idea of ​​converting AI context into PNG files

AI expert Robert Youssef shared a revolutionary life hack that allowed him to reduce token consumption when working with the Fable 5 model by almost 60%. Thanks to a non-standard approach to context engineering, Youssef was able to reduce the cost of one work session from $42 to just $6, while maintaining identical quality and accuracy of results.

Leave a comment
How to save 60% on tokens: an IT guy came up with the idea of ​​converting AI context into PNG files

AI expert Robert Youssef shared a revolutionary life hack that allowed him to reduce token consumption when working with the Fable 5 model by almost 60%. Thanks to a non-standard approach to context engineering, Youssef was able to reduce the cost of one work session from $42 to just $6, while maintaining identical quality and accuracy of results.

Fable 5 is eliminating the usual subscription plans on July 7. After that, users will have to buy credits for actual use, which will make working with the model significantly more expensive.

How the life hack works

Robert Youssef's method, which he shared in X, is to not send heavy context as text, but to transmit it as an image.

The whole point is in the specifics of how modern multimodal AI models are priced through APIs. Typically, developers pay for each token, that is, for each individual word or syllable in the text, which is why sending huge system prompts, tool instructions, and a long history of correspondence quickly burns through the balance.

However, when a model accepts images, the fee is not charged for the content, but solely for the physical size of the image in pixels.

To exploit this loophole, Youssef runs a special proxy utility called pxpipe on his computer. This tool automatically intercepts heavy blocks of text with context before they go to the neural network and renders this data set into a single compact PNG file.

The model easily reads all the text directly from the image thanks to its multimodal vision recognition capabilities, but it costs the developer many times less.

At the same time, to prevent AI from making mistakes and fabricating data, information that requires absolute accuracy, such as the latest dialogue lines, API keys, or unique identifiers, continues to be sent in text form, while the image takes on the role of cheap storage for basic and static information.

Result

By converting text arrays into images, Robert Youssef was able to get almost 2.5 times more working time for the same money.

You can learn more about pxpipe on GitHub .

The end of "unlimited" in Copilot forced Ukrainian developers to calculate the real benefit of AI agents: the results are surprising
The end of "unlimited" in Copilot forced Ukrainian developers to calculate the real benefit of AI agents: the results are surprising
On the topic
The end of "unlimited" in Copilot forced Ukrainian developers to calculate the real benefit of AI agents: the results are surprising
Microsoft updates VS Code: adds chat cost tracking and multi-agent chats
Microsoft updates VS Code: adds chat cost tracking and multi-agent chats
On the topic
Microsoft updates VS Code: adds chat cost tracking and multi-agent chats
Experts predict that by 2028, AI coding costs will exceed developer salaries
Experts predict that by 2028, AI coding costs will exceed developer salaries
On the topic
Experts predict that by 2028, AI coding costs will exceed developer salaries
Read the country's main IT news in our Telegram
Read the country's main IT news in our Telegram
On the topic
Read the country's main IT news in our Telegram
Also Read
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Нейронні мережі для генерації зображень бачать світ по-своєму, їхню логіку зрозуміти часом зовсім неможливо. Але таки хочеться. На честь Дня Незалежності України редакція dev.ua вирішила провести невеликий експеримент. Ми задали чотирьом різним нейронним мережам п’ять однакових запитів: «прапор України», «День Незалежності України», «український Крим», «перемога України» та «українці». Отриманими результатами ми ділимося з вами нижче.
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok з’явилася нова функція «Розумний фон». З її допомогою як фон для тіктоків можна підставляти згенеровані нейромережею зображення. Редакція dev.ua протестувала цю технологію і ділиться своїми враженнями.
1 comment
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака

Have important news to share? Message our Telegram bot

Key events and useful links in our Telegram channel

Discussion
No comments yet.