How norsaje/celerity works
Celerity is a C++ multimodal search tool. Its main workflow accepts text, images, video, or audio; converts inputs to CLIP embeddings (audio first passes through transcription); then searches or updates an IVF-PQ index. CSV-based index building and search are also supported. The graph includes the documented model/runtime and ingestion capabilities, plus the declared gateway, metadata, cache, and generation components. Gateway internals are only declared in the excerpts, so those relationships are marked unverified rather than treated as confirmed calls.
Main entry points: main.cpp Command router · Gateway.cpp Gateway · ClipEncoder.cpp CLIP encoder · SearchEngine.cpp Search engine
Components 17
CLI workflow
- Command router
src/main.cpp
Ingestion and embeddings
- Video sampling
src/ingest/VideoIngestor.cpp - Audio transcription
src/ingest/AudioTranscriber.cpp - CLIP encoder
src/dl/encoders/ClipEncoder.cpp - ONNX runner
src/dl/onnx/OnnxRunner.cpp - Python tokenizer
tools/clip_tokenize.py - Whisper tool
tools/transcribe.py
Vector search
- Search engine
src/ann/SearchEngine.cpp - IVF-PQ index
src/ann/IndexIVFPQ.cpp - K-means
src/ann/KMeans.cpp - Product quantizer
src/ann/ProductQuantizer.cpp - FAISS provider
src/ann/faiss/FaissIndex.cpp
Service components
- Gateway
src/server/Gateway.cpp - Metadata store
src/storage/MetadataDB.cpp - KV cache pager
src/gen/KVCachePager.cpp - Generator
src/gen/Generator.cpp
Other components
- CLI user
Connections 19
- CLI user → Command router: runs commands
src/main.cpp - Command router → CLIP encoder: encodes image/text
src/main.cpp - Command router → Video sampling: ingests video
src/main.cpp - Video sampling → CLIP encoder: encodes frames
src/ingest/VideoIngestor.cpp - Command router → Audio transcription: transcribes audio
src/main.cpp - Command router → CLIP encoder: encodes transcript
src/main.cpp - Audio transcription → Whisper tool: invokes tool
README.md - CLIP encoder → ONNX runner: runs models
- CLIP encoder → Python tokenizer: tokenizes text
README.md - Command router → Search engine: trains, loads, updates
src/main.cpp - Command router → Search engine: searches vectors
src/main.cpp - Search engine → IVF-PQ index: delegates index work
src/ann/SearchEngine.cpp - IVF-PQ index → K-means: uses clustering
- IVF-PQ index → Product quantizer: uses quantizer
- Gateway → Search engine: declares dependency
- Gateway → Video sampling: declares dependency
- Gateway → Metadata store: declares dependency
- Gateway → KV cache pager: declares dependency
- Gateway → Generator: declares dependency