postgresml  by postgresml

Postgres extension for in-database ML/AI

created 3 years ago
6,410 stars

Top 8.1% on sourcepulse

GitHubView on GitHub
Project Summary

PostgresML provides a PostgreSQL extension that integrates machine learning and AI capabilities directly within the database, targeting developers and data scientists who want to process data where it resides. This approach aims to reduce latency, improve security, and simplify infrastructure by eliminating the need for separate ML systems and data transfers, offering significant performance gains over traditional HTTP-based model serving.

How It Works

PostgresML functions as a PostgreSQL extension, allowing ML operations to be executed directly within the database using SQL. It leverages GPU acceleration for faster inference and supports integrating state-of-the-art models from Hugging Face. The system is designed for seamless integration with existing PostgreSQL tools and client libraries, and it includes built-in functions for Retrieval-Augmented Generation (RAG) pipelines, such as text chunking, embedding generation, ranking, and text transformation.

Quick Start & Requirements

  • Install: Self-hosted via Docker: docker run -it -v postgresml_data:/var/lib/postgresql -p 5433:5432 -p 8000:8000 ghcr.io/postgresml/postgresml:2.10.0
  • Prerequisites: PostgreSQL database with pgml extension installed. GPU acceleration is recommended for performance.
  • Resources: PostgresML Cloud offers a serverless option. Self-hosting requires Docker.
  • Docs: Documentation, Quick Start with Docker

Highlighted Details

  • Offers 47+ classification and regression algorithms.
  • Claims 8-40X faster inference compared to HTTP-based model serving.
  • Supports horizontal scaling for millions of transactions per second.
  • Integrates RAG pipeline functions (chunk, embed, rank, transform) directly into SQL.

Maintenance & Community

  • Active development with releases up to v2.10.0.
  • Community channels include Discord and a Blog.

Licensing & Compatibility

  • The project is open-source. Specific license details (e.g., MIT, Apache) are not explicitly stated in the README but are typically found in the repository itself. Compatibility with commercial or closed-source applications would depend on the specific license.

Limitations & Caveats

Currently, PostgresML does not directly support integration with remote LLM providers like OpenAI, requiring users to leverage Hugging Face models or self-hosted alternatives for LLM capabilities.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
174 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems) and Travis Fischer Travis Fischer(Founder of Agentic).

teable by teableio

0.3%
19k
No-code Postgres alternative for database applications
created 2 years ago
updated 15 hours ago
Feedback? Help us improve.