Unlocking the Power of Fireworks AI with Nomic-Embed-Text-V1.5
Fireworks AI has integrated the advanced Nomic-Embed-Text-V1.5 model to offer users unparalleled text embedding capabilities. This integration brings a host of benefits, including superior performance in embedding tasks and flexible cost options.
Nomic-Embed-Text-V1.5 Model
The Nomic-Embed-Text-V1.5 model stands out as the first text embedding model with a context length of 8192. It outperforms OpenAI's Ada-002 and text-embedding-3-small models on both short and long context tasks. The model leverages a Transformer architecture and is trained using a self-supervised MLM objective, followed by contrastive training on web-scale unsupervised data and fine-tuning on a curated corpus of paired data.
Released under an Apache-2 license, this model ensures full auditability, providing access to both model weights and training code.
Integration with Fireworks AI
Fireworks AI now supports the Nomic-Embed-Text-V1.5 model, allowing users to generate embeddings from text inputs. Notably, the model features a variable embedding size, which can be adjusted based on cost sensitivity.
To get started, create a Fireworks account, obtain an API key, and install the necessary integration packages, such as langchain-fireworks
for LangChain integration.
Usage
Generating embeddings with Fireworks AI is straightforward. Use the FireworksEmbeddings
class from the langchain-fireworks
package. Initialize the model with the nomic-ai/nomic-embed-text-v1.5
model name and use it to embed documents or queries.
from langchain_fireworks import FireworksEmbeddings
embeddings = FireworksEmbeddings(model="nomic-ai/nomic-embed-text-v1.5")
You can then use the embed_documents
or embed_query
methods to create embeddings for your texts.
Benefits and Features
The Nomic-Embed-Text-V1.5 model is optimized for retrieval-augmented generation (RAG) and semantic search. It encodes semantic information into low-dimensional vectors and is compatible with various vector databases like Chroma, enabling efficient indexing and retrieval of documents.
Setup and Credentials
To use Fireworks AI with the Nomic-Embed-Text-V1.5 model, set your Fireworks API key as an environment variable:
import os
os.environ["FIREWORKS_API_KEY"] = getpass.getpass("Enter your Fireworks API key: ")
Then, install the necessary packages and initialize the model as described above.