LibreAI / Dev Tools / postgresml
// devtools · postgresml/postgresml

postgresml

postgresml is an open-source dev tools project by postgresml (postgresml/postgresml on GitHub). It has 6,821 GitHub stars and 364 forks, is released under the MIT license, and was last updated on GitHub on 1 July 2025.

PostgresML — machine learning inside PostgreSQL with GPU acceleration: train, embed and run LLMs in SQL.

★ 6.8k stars⑂ 364 forksMITupdated 2025-07
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

GitHub stars
6,821
Forks
364
License
MIT
Last updated on GitHub
1 July 2025
Category
Dev Tools
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Clarify your goal

    Decide cloud versus self-hosted, and pick a first workload: in-database training, embeddings/RAG, or LLM calls from SQL.

  2. Get the project

    Clone postgresml/postgresml from GitHub (or use the install path in the run steps below) and skim its README for the parts relevant to your goal.

  3. Install and configure

    The fastest self-hosted path is the documented Docker image with a persistent volume; PostgresML Cloud skips installation entirely.

  4. Run your first task

    Connect with psql, run one in-database ML or embedding query on a sample table, and compare it with your current HTTP-serving approach.

// features

Why people love it

In-database ML and AI

Run machine learning and AI operations directly within PostgreSQL, keeping models and data together for privacy and simplicity.

GPU acceleration

Leverage GPU power for faster training computations and model inference inside the database.

LLMs from Hugging Face

Integrate and use state-of-the-art LLMs from Hugging Face in your SQL workflows.

Built-in RAG pipeline

Functions for chunking, embedding, ranking and transforming text, with vector search via pgvector integration.

47+ algorithms

A diverse set of classification and regression algorithms available in-database for classic ML tasks.

Performance and scale

Positions inference as 8–40x faster than HTTP-based serving in its benchmarks, with horizontal scaling support.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Get the source from the official GitHub repository for postgresml.

    git clone https://github.com/postgresml/postgresml.git
    cd postgresml
  2. Run PostgresML with Docker

    Start the published image with its data volume and ports exactly as the README's self-hosted section shows.

    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
  3. Try an in-database query

    Once connected, follow the README/docs examples to run an embedding, RAG or training query in SQL.

    # Connect to the postgresml database and run a documented example query — see README
// use cases

What you can build

  • Scoring churn or fraud with a model trained and served inside the existing Postgres database
  • Building RAG over support tickets already stored in Postgres, without a separate vector service
  • Calling an LLM from SQL to classify or summarise rows in bulk
  • Removing the HTTP model-serving hop for latency-sensitive inference in a data app
Advertisement
// faq

Questions, answered

Who maintains postgresml?

The PostgresML project, through the postgresml/postgresml repository, with the site and cloud at postgresml.org.

Is postgresml free to use?

Yes — the project is open source under the MIT license as recorded for this listing. You can use, modify and distribute it under the MIT terms.

Does postgresml need a paid API key?

Self-hosting is free under MIT with no API key; PostgresML Cloud is the paid managed option. GPU features need GPU hardware you provide.

How does PostgresML compare to serving models behind a separate inference API?

A separate API means network hops, duplicated data pipelines and another service to secure. PostgresML moves training and inference into Postgres itself — simpler data flow and lower latency in its benchmarks, in exchange for running ML inside your database tier.

How do I get started with postgresml?

Clone the repository (or use the documented installer), follow the install and configure steps on this page, and run the smallest real task first — connect with psql, run one in-database ML or embedding query on a sample table, and compare it with your current HTTP-serving approach.

// keep exploring

Similar tools

Dev Tools

Gradio

Build machine-learning web demos in Python within minutes — the fastest way to share a model with the world.

★ 43.7k starsApache-2.0
View guide →
Dev Tools

DeepSpeed

DeepSpeed — the deep learning optimisation library behind ZeRO: train and serve huge models efficiently, Apache-2.0

★ 43.3k starsApache-2.0
View guide →
Dev Tools

runtime

The sandbox runtime behind E2B — run AI-generated code safely anywhere.

★ 1.7k starsApache-2.0
View guide →
Dev Tools

no_human

From ticket to reviewed pull request — an autonomous coding pipeline on your machine.

★ 329 starsMIT
View guide →
Dev Tools

WrenAI

GenBI for AI agents - governed text-to-SQL and dashboards through an open context layer

★ 17.8k starsNOASSERTION
View guide →
Dev Tools

atlas

Source control for agents — run coding agents side by side, track changes and query their history.

★ 9.4k starsApache-2.0
View guide →
// alternatives

Alternatives in Dev Tools

The most-starred other Dev Tools projects in the LibreAI catalogue — the realistic shortlist if postgresml is not the right fit.

  • OpenCode★ 211.6k

    The open source coding agent

  • Transformers★ 166.9k

    The model-definition framework behind modern AI — thousands of pretrained transformers for text, vision, and audio.

  • claude-code★ 149.7k

    Anthropic's agentic coding tool that lives in your terminal and works across your whole codebase

  • cc-switch★ 141.3k

    Cross-platform desktop all-in-one manager for Claude Code, Codex, OpenCode and other coding agents

  • codex★ 128.2k

    OpenAI's lightweight coding agent that runs locally in your terminal

// more in devtools

More in Dev Tools

Nearby Dev Tools projects in the catalogue, closest in stars to postgresml — keep exploring the shelf either side of it.

  • trafilatura★ 6.9k

    Trafilatura — a Python and CLI tool to crawl the web and extract clean text and metadata for corpora and RAG.

  • yn★ 6.8k

    A highly extensible Markdown editor featuring version control, AI Copilot, document annotations, mind maps, document encryption, executable code snippets, ch…

  • repowise★ 7.2k

    Repowise — codebase intelligence: health scores, auto-docs, git analytics and dead-code detection via MCP.

  • CopilotForXcode★ 6.3k

    AI coding assistant for Xcode

  • gentle-ai★ 7.5k

    Gentle-AI configures the AI coding agents you already use: Claude Code, Cursor, OpenCode, Codex, Pi, and more. Choose persistent memory, Organic-Driven Devel…

  • mission-control★ 6.3k

    Self-hosted control plane for AI agents: dispatch tasks, review runs, track spend, and operate OpenClaw, Claude Code, Codex, and other runtimes.

Get postgresml

Free and open — grab the source, star the repo, and start creating.