Skip to content

flame

PGRX proof-of-concept extension that generates text embeddings with fastembed/MiniLM.

flame · PGRX proof-of-concept extension that generates text embeddings with fastembed/MiniLM.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100848flameflame0.0.1RAGAGPL-3.0Rust

PostgreSQL · 11, 12, 13, 14, 15, 16

Usage

Sources:

flame version 0.0.1 is a proof-of-concept Rust/pgrx text-embedding function. fast_embed(text) uses fastembed’s AllMiniLML6V2 model and returns the embedding as a PostgreSQL real array.

Example

CREATE EXTENSION flame;
SELECT array_length(fast_embed('hello world'), 1);
SELECT fast_embed('PostgreSQL text embedding');

The model is initialized once per backend process and may need to download/cache model artifacts under the PostgreSQL OS account. This can add cold-start latency, network supply-chain exposure, memory use per connection, and nondeterministic operational failure. The README calls the release a proof of concept, lists missing tests, and disagrees with the selected model about expected dimensions; initialization failure can panic and embedding failure returns an empty array. Pin and pre-stage model files, restrict execution, cap input/concurrency, and validate output length/version before storing vectors.

Table reader