Open Source

Sorting hat - A cute, lightweight cli to give images and other files good filenames using local VLMs

Open-source tool leverages lightweight vision models like Qwen3.5 to automatically organize messy file collections.

Deep Dive

Developer marksverdhei has released Sorting Hat, an open-source command-line tool designed to solve a common digital clutter problem: poorly named image files. The tool uses locally run Vision Language Models (VLMs) to analyze the content of images and automatically rename them with descriptive, logical filenames. Built in a single day, it specifically leverages lightweight, open-weight models like Qwen3.5, which come in sizes from 0.8 billion to 27 billion parameters, ensuring it can run efficiently on consumer hardware without needing cloud API calls.

A key feature is its support for multiple backends, primarily working through llama.cpp for local inference but also compatible with any OpenAI-compatible API for flexibility. Unlike a simple black-box rename, Sorting Hat can optionally display the model's reasoning trace—the step-by-step logic it uses to describe the image—providing users with insight into how the new filename was generated. This makes the tool both practical for organization and educational for understanding how VLMs interpret visual data. It’s a focused utility that demonstrates the immediate, everyday applicability of running small, capable AI models offline.

Key Points
  • Uses local Vision Language Models (VLMs) like Qwen3.5 (0.8B, 9B, 27B) for offline, private image analysis.
  • Generates descriptive filenames for images by analyzing visual content, turning 'IMG_1234.jpg' into logical names.
  • Shows the model's reasoning trace in real-time and works with llama.cpp or any OpenAI-compatible API.

Why It Matters

It showcases a practical, offline use case for lightweight AI models, turning digital organization into an automated task.