{"version":1,"type":"story","url":"https://digestai.news/story/developer-shares-python-script-using-llm-logprobs-for-vision-tasks","json":"https://digestai.news/story/developer-shares-python-script-using-llm-logprobs-for-vision-tasks.json","markdown":"https://digestai.news/story/developer-shares-python-script-using-llm-logprobs-for-vision-tasks.md","slug":"developer-shares-python-script-using-llm-logprobs-for-vision-tasks","headline":"Developer shares Python script using LLM logprobs for vision tasks","summary":"A developer has published a standalone Python script that leverages Large Language Model (LLM) token probabilities to perform simple vision tasks. The tool, inspired by the Jev framework and projects like OpenJev, uses the `logprobs` parameter in API requests to force models to answer single-token questions about images. By analyzing the probability distribution of the output tokens, the script can determine attributes such as whether a person is visible, the lighting conditions, or the setting (indoors/outdoors) without requiring specialized computer vision libraries.\n\nThe author tested the approach using Gemma 4 12B running locally via llama.cpp on an RTX 3090, achieving approximately 1 frame per second. They also tested it against OpenAI's gpt-6-luna, which ran at about 0.2 frames per second due to connection overhead. The script handles API differences between local servers and OpenAI, normalizing the returned log probabilities into usable scores. While specialized computer vision models are more efficient, this method offers flexibility by allowing users to define conditions in plain text rather than training new models.","keyPoints":["Script uses LLM logprobs to answer single-token vision questions like brightness or presence.","Gemma 4 12B on RTX 3090 achieved 1 FPS; OpenAI gpt-6-luna achieved 0.2 FPS.","Method requires no specialized CV libraries, using only standard Python and OpenCV for capture."],"whyItMatters":"This technique demonstrates a low-cost, flexible way to use general-purpose LLMs for basic visual classification, potentially reducing the need for specialized vision models in simple monitoring or automation tasks.","category":{"slug":"research","name":"Research","url":"https://digestai.news/category/research"},"entities":{"companies":["OpenAI","Google"],"models":["Gemma 4 12B","gpt-6-luna"],"people":[]},"firstPublishedAt":"2026-09-26T04:20:58Z","updatedAt":"2026-09-26T04:20:58Z","sourceCount":1,"hasPrimarySource":false,"sources":[{"outlet":"allanrbo.blogspot.com","title":"A single function Jev-like wrapper for LLMs, including vision models","url":"http://allanrbo.blogspot.com/2026/09/a-jev-like-wrapper-for-llms-including.html","publishedAt":"2026-09-26T04:20:58Z","type":"press","primary":false,"lead":true}],"sourceNotes":null,"discussions":[{"site":"Hacker News","url":"https://news.ycombinator.com/item?id=49853175","points":43}],"thread":null,"cite":{"text":"Digest AI, \"Developer shares Python script using LLM logprobs for vision tasks\", 26 September 2026, https://digestai.news/story/developer-shares-python-script-using-llm-logprobs-for-vision-tasks","publisher":"Digest AI","title":"Developer shares Python script using LLM logprobs for vision tasks","datePublished":"2026-09-26T04:20:58Z","url":"https://digestai.news/story/developer-shares-python-script-using-llm-logprobs-for-vision-tasks"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}