An ultra-fast CLI tool to pipe text into embeddings.
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
This tool is able to generate 100k text-embedding-ada-002
embeddings in under 2 minutes with <100MB RAM usage and <20% CPU usage.