git404hub

what is mojovec fr?

bewaffnete/mojovec — explained in plain English

Analysis updated 2026-05-18

4MojoAudience · developerComplexity · 3/5LicenseSetup · moderate

tl;dr

A vector database written entirely in the Mojo language for fast similarity search over AI embeddings, aiming to match C++ performance without any C++ code.

vibe map

mindmap
  root((MojoVec))
    What it does
      Stores vector embeddings
      Fast similarity search
      HNSW IVF and PQ indexes
    Tech stack
      Mojo language
      SIMD acceleration
      Python bindings
    Use cases
      Power a chatbot's document search
      Build a recommendation engine
      Benchmark against FAISS
    Audience
      AI infrastructure engineers
      Mojo language developers
      Python ML developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Add fast similarity search for embeddings to an AI or chatbot application

VIBE 2

Replace a C++ vector database like FAISS with a pure Mojo alternative

VIBE 3

Benchmark HNSW, IVF, and Product Quantization search algorithms against each other

VIBE 4

Use vector search from Python via the included native bindings without writing Mojo

what's the stack?

MojoPythonSIMD

how do i run it?

Difficulty · moderate time til it works · 30min

Requires the Mojo toolchain (via Pixi/Magic) for native use, though the pip-installable Python bindings avoid that requirement.

Free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.

in plain english

MojoVec is a vector database built entirely in the Mojo programming language, with no C or C++ code underneath it. A vector database stores lists of numbers, called embeddings, that represent things like text or images, and lets you quickly find the entries most similar to a given query. This kind of search is a core piece of many AI applications, such as chatbots that need to pull relevant facts from a document collection. Most existing vector databases, like FAISS and hnswlib, are written in C++ and exposed to other languages through Python. MojoVec's goal is to test whether a pure Mojo implementation can match hand tuned C++ performance using only what the Mojo language provides, including its built in SIMD support for fast numeric operations. It implements three different search algorithms: HNSW, IVF, and Product Quantization, each offering different tradeoffs between speed, accuracy, and memory use. The README includes benchmark results on a standard one million vector test dataset called SIFT1M. On Apple Silicon hardware, MojoVec reportedly searches at over two and a half times the queries per second of FAISS, and builds its index about twice as fast, while achieving similar (though slightly lower) recall accuracy. Similar relative gains are shown on a four core x86 virtual machine. To use MojoVec directly in Mojo code, you download a compiled file and import it in your project, then create a collection with a chosen vector dimension and tuning parameters, add vector embeddings with their ids, and run similarity searches. Collections can be saved to and loaded from disk. The project also ships native Python bindings, installable with pip on Linux x86_64 and Apple Silicon Mac systems, so Python developers can use the same functionality without writing any Mojo code themselves. Running the test suite and benchmarks requires a working Mojo installation, typically set up through the Pixi or Magic tools mentioned in the README. The project is released under the MIT license.

prompts (copy fr)

prompt 1
Help me install MojoVec and create my first vector collection in Mojo
prompt 2
Show me how to use MojoVec's Python bindings to search a set of embeddings
prompt 3
Explain the difference between HNSW, IVF, and Product Quantization in MojoVec
prompt 4
Walk me through saving and reloading a MojoVec collection from disk

Frequently asked questions

what is mojovec fr?

A vector database written entirely in the Mojo language for fast similarity search over AI embeddings, aiming to match C++ performance without any C++ code.

What language is mojovec written in?

Mainly Mojo. The stack also includes Mojo, Python, SIMD.

What license does mojovec use?

Free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is mojovec to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mojovec for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.