maxdumas / fast-embeddings

An ultra-fast CLI tool to pipe text into embeddings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fast-embeddings

An ultra-fast CLI tool to pipe text into embeddings.

Installation & Usage

To install dependencies:

bun install

To run:

bun run index.ts

A pre-built *nix-compatible binary is available at bin/embed.

Example usage:

# Generate embeddings for the first 100k lines of data.txt and output results to output.ndjson.
cat data.txt | head -n100000 | ./bin/embed > output.ndjson

Benchmarks

This tool is able to generate 100k text-embedding-ada-002 embeddings in under 2 minutes with <100MB RAM usage and <20% CPU usage.

About

An ultra-fast CLI tool to pipe text into embeddings.


Languages

Language:TypeScript 100.0%