SuperDuperDB / superduperdb

šŸ”® SuperDuperDB: Bring AI to your database! Build, deploy and manage any AI application directly with your existing data infrastructure, without moving your data. Including streaming inference, scalable model training and vector search.
https://superduperdb.com
Apache License 2.0
4.53k stars 443 forks source link
ai chatbot data database distributed-ml inference llm-inference llm-serving llmops ml mlops mongodb pretrained-models python pytorch rag semantic-search torch transformers vector-search

# Bring AI to your favorite database!
## Docs | Blog | Use-Cases | Installation | Community Apps | Slack | Youtube
Package version Supported Python versions License - Apache 2.0

:mega: We are thrilled to announce the release of v0.2, packed with a variety of exciting new features and integrations. Updated docs and use-cases are also available now. Have a glimpse here in the changelog! Additionally, we are launching our enterprise solution. Sign-up for the preview waiting list here.


What is SuperDuperDB? šŸ”®

SuperDuperDB is a Python framework for integrating AI models, APIs, and vector search engines directly with your existing databases, including hosting of your own models, streaming inference and scalable model training/fine-tuning.

Key Features:

How to get Started

What's new in v0.2?

We've been working hard improving the quality of the project and bringing new features at the intersection of AI and databasing.

New features

New integrations

Developer contract

Optional Method Description
False Model.predict Predict on one datapoint
False Model.predict_batches Predict on batches of datapoints
True Model.fit Fit the model on datasets
Method Description
Query.documents Documents referred to by a query
Query.type "insert"
"delete"
"select"
"update"
Query._create_table_if_not_exists Create table in databackend if it doesn't exist
Query.primary_id Get primary-id of base table in query
Query.model_update Construct a model-update query
Query.add_fold Add a fold to a select query
Query.select_using_ids Select data using only ids
Query.select_ids Select the ids of some data
Query.select_ids_of_missing_outputs Select the ids of rows which haven't got outputs yet

Better quality

Type Description Command
Unit Unittest - isolated code unit functionality make unit_testing
AI integration Test the installation together with external AI provider works make ext_testing
Databackend integration Test the installation with a fully functioning database backend make databackend_testing
Smoke Test the full integration with ray, vector-search service, data-backend, change-data capture make smoke_testing
Rest Test the Rest-ful server implementation integrates with the rest of the project make rest_testing

Better documentation

Example use-cases and apps (notebooks)

The notebooks below are examples how to make use of different frameworks, model providers, vector databases, retrieval techniques and so on.

To learn more about how to use SuperDuperDB with your database, please check our Docs and official Tutorials.

Also find use-cases and apps built by the community in the superduper-community-apps repository.

| Name | Link | |--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Multimodal vector-search with a range of models and datatypes | Open In Colab | | RAG with self-hosted LLM | Open In Colab | | Fine-tune an LLM on your database | Open In Colab | | Featurization and fransfer learning | Open In Colab |
For more information about SuperDuperDB and why we believe it is much needed, [read this blog post](https://blog.superduperdb.com/superduperdb-the-open-source-framework-for-bringing-ai-to-your-datastore/). ## Supported Datastores (*more coming soon*):
**Transform your existing database into a Python-only AI development and deployment stack with one command:** ``` db = superduper('mongodb|postgres|mysql|sqlite|duckdb|snowflake://') ``` ## Supported AI Frameworks and Models (*more coming soon*):
**Integrate, train and manage any AI model (whether from open-source, commercial models or self-developed) directly with your datastore to automatically compute outputs with a single Python command:** ## Pre-Integrated AI APIs (*more coming soon*):
**Integrate externally hosted models accessible via API to work together with your other models with a simple Python command:** ## Infrastructure Diagram

## Installation #### # Option 1. SuperDuperDB Library Ideal for building new AI applications. ```shell pip install superduperdb ``` #### # Option 2. SuperDuperDB Container Ideal for learning basic SuperDuperDB functionalities and testing notebooks. ```shell docker pull superduperdb/superduperdb docker run -p 8888:8888 superduperdb/superduperdb ``` #### # Option 3. SuperDuperDB Testenv Ideal for learning advanced SuperDuperDB functionalities and testing whole AI stacks. ```shell make build_sandbox make testenv_init ``` ## Preview [Browse the re-usable snippets](https://docs.superduperdb.com/docs/category/reusable-snippets) to understand how to accomplish difficult AI end-functionality with few lines of code using SuperDuperDB. ## Community & Getting Help #### If you have any problems, questions, comments, or ideas: - Join our Slack (we look forward to seeing you there). - Search through our GitHub Discussions, or add a new question. - Comment an existing issue or create a new one. - Help us to improve SuperDuperDB by providing your valuable feedback here! - Email us at `gethelp@superduperdb.com`. - Feel free to contact a maintainer or community volunteer directly! ## Contributing #### There are many ways to contribute, and they are not limited to writing code. We welcome all contributions such as: - Bug reports - Documentation improvements - Enhancement suggestions - Feature requests - Expanding the tutorials and use case examples Please see our [Contributing Guide](CONTRIBUTING.md) for details. ## Contributors #### Thanks goes to these wonderful people: ## License SuperDuperDB is open-source and intended to be a community effort, and it wouldn't be possible without your support and enthusiasm. It is distributed under the terms of the Apache 2.0 license. Any contribution made to this project will be subject to the same provisions. ## Join Us We are looking for nice people who are invested in the problem we are trying to solve to join us full-time. Find roles that we are trying to fill here!