VecturaKit  by rryam

Swift vector database for on-device RAG

Created 1 year ago
280 stars

Top 92.8% on SourcePulse

GitHubView on GitHub
Project Summary

A Swift-based vector database, VecturaKit enables on-device RAG (Retrieval Augmented Generation) for Apple platforms. It targets iOS, macOS, and other Apple OS developers seeking to integrate local vector storage and retrieval capabilities, offering enhanced privacy and offline functionality by processing embeddings and data directly on the user's device.

How It Works

VecturaKit employs a pluggable architecture for embedding generation and data storage. It leverages swift-embeddings for core embedding tasks, supporting various models like Model2Vec (default), NomicBERT, and RoBERTa. The framework offers distinct embedder integrations: SwiftEmbedder for local models, OpenAICompatibleEmbedder for external APIs, NLContextualEmbedder using Apple's native NaturalLanguage framework, and MLXEmbedder for GPU acceleration via Apple's MLX framework. It features hybrid search, combining vector similarity with BM25 text search for improved relevance, and supports custom storage providers and search engines for deep customization.

Quick Start & Requirements

  • Installation: Via Swift Package Manager:
    .package(url: "https://github.com/rryam/VecturaKit.git", from: "3.0.0")
    
    For MLX support, also add:
    .package(url: "https://github.com/rryam/VecturaMLXKit.git", from: "1.0.0")
    
  • Prerequisites:
    • macOS 14.0+, iOS 17.0+, tvOS 17.0+, visionOS 1.0+, watchOS 10.0+.
    • Swift 6.0+ features recommended.
    • MLX integration requires Apple Silicon for GPU acceleration.
  • Dependencies: swift-embeddings, swift-argument-parser. VecturaNLKit and VecturaOAIKit are included.
  • Links: GitHub Repository

Highlighted Details

  • Supports multiple embedding models including Model2Vec (default), NomicBERT, ModernBERT, RoBERTa, and XLM-RoBERTa.
  • Features hybrid search combining vector similarity with BM25 text search.
  • Offers pluggable storage providers (e.g., SQLite, Core Data) and search engines for custom implementations.
  • Provides dedicated integrations for MLX (GPU acceleration), OpenAI-compatible APIs, and Apple's NaturalLanguage framework.
  • Includes command-line interface tools (vectura-cli, vectura-oai-cli) for database management and testing.
  • Supports various memory management strategies for datasets ranging from thousands to millions of documents.

Maintenance & Community

The project is copyright 2025 by Rudrank Riyam. Community interaction is primarily directed towards Twitter. No specific details on active contributors, sponsorships, or dedicated community platforms like Discord/Slack are provided in the README.

Licensing & Compatibility

VecturaKit is released under the permissive MIT License. This license allows for commercial use, modification, and distribution, making it compatible with closed-source applications and linking.

Limitations & Caveats

The framework is exclusively designed for Apple's ecosystem, requiring specific minimum OS versions (macOS 14+, iOS 17+, etc.). MLX integration's GPU acceleration is limited to Apple Silicon hardware. While flexible through pluggable components, the core Swift implementation restricts direct use on non-Apple platforms.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
2
Star History
16 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.