gitmyhub

VEC

C++ ★ 13 updated 20d ago

GPU-resident vector database in single exe

VEC is a vector database that runs entirely in GPU memory for very fast similarity search on embeddings.

C++CUDAPythonNode.jssetup: moderatecomplexity 4/5

VEC is a vector database — a database designed for storing and searching AI-generated numerical representations called embeddings — that runs entirely on your GPU's video memory (VRAM). By keeping all data in VRAM rather than on disk, it achieves very fast similarity searches: finding the nearest matching vectors in a set of one million takes around 14 milliseconds on an RTX 3060.

You launch it with a single executable, give it a name and a dimension count, and it starts listening on a network port. No separate database server, no configuration files. A CPU-only version called vec-cpu is also included for systems without a compatible GPU. Supported GPUs are NVIDIA RTX 2000 series and newer; AMD and Intel GPUs are not supported.

Each stored record holds a vector, an optional label, and an optional data payload of up to 100 kilobytes. The database supports 16 commands including storing vectors, nearest-neighbor search by either L2 (Euclidean distance) or cosine similarity, exact-match lookup, clustering via a DBSCAN algorithm, and farthest-point sampling. All communication uses a binary protocol over TCP, named pipe, or Unix socket — there is no text interface. Client libraries are provided for C++, Python, Node.js, and Delphi.

Every query is a brute-force scan of all stored vectors, which guarantees exact results with no approximation. Duplicate vectors are rejected at write time using a hash comparison. Data lives entirely in memory; disk is only used on startup and when you explicitly save. The fp16 storage option halves VRAM usage at the cost of some precision, effectively doubling capacity.

Where it fits