WhoBuilt

Moondream: how does a tiny vision model slap so hard?

Nov 14, 2024· 19 min· 18K views·Watch on YouTube

Speaker

Vikhyat Korrapati, creator of the open-source Moondream vision-language model, explains how he built and improved it for developers at AI Engineer.

A small model for practical vision tasks

Moondream has fewer than two billion parameters and uses the Apache 2.0 license. It can answer questions about images, caption them, detect objects, and return coordinates. Korrapati says its benchmark scores improved over three months to become comparable to LLaVA 1.5, a model about four times larger.

From a QA tool to an open-source model

Korrapati first wanted a model to inspect browser screens for QA automation, after GPT-4V was too slow, costly, and prone to refusing images that included people. He trained a small version at home on a pair of 3090 GPUs and shared it online. Interest from developers and testing companies led him to focus on Moondream.

Focus the model and invest in data

Moondream is designed as a developer tool for accurate image understanding, rather than broad world knowledge or tasks such as solving calculus. It combines Google’s SigLIP vision encoder with Microsoft’s pretrained Phi-1.5 text model. Korrapati says training data matters more than training from scratch, and the latest release used around 35 million images.

Build synthetic data with care

Internet image descriptions can be noisy, and direct prompting of a powerful model can introduce unsupported details. Korrapati describes processing datasets such as COCO and Localized Narratives, including spatial descriptions, to create more useful training examples. One pipeline used 20 Mixtral 8x7B calls per image, with data generation consuming perhaps 10 to 100 times more compute than model training; he also added typos and varied questions to better match real queries and reduce synthetic-data bias.

Make vision accessible to developers

Korrapati credits community feedback and open source with helping Moondream find users and reach more platforms. He argues that developers should be able to choose application-level safety guardrails, and that small models suit deployments where cost, privacy, or latency matter. Prompting in plain English can also make vision tasks approachable without collecting data and training a custom model.

Takeaways

  • Define the tasks a model should handle before choosing data and benchmarks.
  • For a small model, invest heavily in cleaning and shaping training data.
  • Use synthetic data carefully: powerful-model outputs can add details a small model cannot support.
  • Match training examples to real user behavior, including typos and varied questions.
  • Consider small local models when inference cost, privacy, or latency is a constraint.

Mentioned in this talk

Search inside this talk

What was claimed 11

Show all 11 facts

Related talks