postgresml
postgresml/postgresml
Postgres with GPUs for ML/AI applications.
Overview
PostgresML is a powerful PostgreSQL extension that allows machine learning operations to be run directly within the database, combining data storage and inference. It supports GPU acceleration, integration of large language models from Hugging Face, and includes RAG pipeline functions for text processing.
Categories
Tags
Similar tools
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
transformers
huggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models
open-webui
open-webui/open-webui
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
awesome-llm-apps
Shubhamsaboo/awesome-llm-apps
100+ AI Agent & RAG apps you can actually run — clone, customize, ship.
LLMs-from-scratch
rasbt/LLMs-from-scratch
Implement a ChatGPT-like LLM in PyTorch from scratch
Install
cargo add postgresmlREADME
Postgres + GPUs for ML/AI applications.
| Documentation | Blog | Discord |
Why do ML/AI in Postgres?
Data for ML & AI systems is inherently larger and more dynamic than the models. It's more efficient, manageable and reliable to move models to the database, rather than constantly moving data to the models.
- Getting started
- PostgresML Cloud
- Self-hosted
- Ecosystem
- Large Language Models
- Hugging Face
- OpenAI and Other Providers
- RAG
- Chunk
- Embed
- Rank
- Transform
- Machine Learning
Architecture
Features at a glance
- In-Database ML/AI: Run machine learning and AI operations directly within PostgreSQL
- GPU Acceleration: Leverage GPU power for faster computations and model inference
- Large Language Models: Integrate and use state-of-the-art LLMs from Hugging Face
- RAG Pipeline: Built-in functions for chunking, embedding, ranking, and transforming text
- Vector Search: Efficient similarity search using pgvector integration
- Diverse ML Algorithms: 47+ classification and regression algorithms available
- High Performance: 8-40X faster inference compared to HTTP-based model serving
- Scalability: Support for millions of transactions per second and horizontal scaling
- NLP Tasks: Wide range of natural language processing capabilities
- Security: Enhanced data privacy by keeping models and data together
- Seamless Integration: Works with existing PostgreSQL tools and client libraries
Getting started
The only prerequisites for using PostgresML is a Postgres database with our open-source pgml extension installed.
PostgresML Cloud
Our serverless cloud is the easiest and recommend way to get started.
Sign up for a free PostgresML account. You'll get a free database in seconds, with access to GPUs and state of the art LLMs.
Self-hosted
If you don't want to use our cloud you can self host it.
docker run \
-it \
-v postgresml_data:/var/lib/postgresql \
-p 5433:5432 \
-p 8000:8000 \
ghcr.io/postgresml/postgresml:2.10.0 \
sudo -u postgresml psql -d postgresml
For more details, take a look at our Quick Start with Docker documentation.
Ecosystem
We have a number of other tools and libraries that are specifically designed to work with Postgre