Skip to main content

Available models

Fireworks provide a larger variety of models, here are two of them. You can use any of the models supported by Fireworks in the examples below:

Usage

Note that Fireworks doesn’t have an SDK. Their documentation shows the use of the REST API directly with a client library in your language of choice, or you can use OpenAI’s SDK - Fireworks is compatible with OpenAI’s API. In the examples below, we use OpenAI’s SDK with Fireworks URL, API key and models.

Installing dependencies

Generating embeddings with Fireworks

Storing and retrieving the embeddings

Additional information

Reducing dimensions

Using larger embeddings generally costs more and consumes more compute, memory and storage than using smaller embeddings. This is especially true for embeddings stored with pg_vector. When storing embeddings in Postgres, it is important that each vector will be stored in a row that fits in a single PG block (typically 8K). If this size is exceeded, the vector will be stored in TOAST storage which can slow down queries. In addition vectors that are “TOASTed” are not indexed, which means you can’t reliably use vector indexes. Fireworks supports multiple models. gte-large and nomic-embed-text-v1.5 are two of the models available. The gte-large model has 1024 dimensions and does not support scaling down. The nomic-embed-text-v1.5 model has 768 dimensions and can scale down to 512, 256, 128 and 64.