voyage-lite-02-instruct
Use the voyage-lite-02-instruct embedding or reranking model with Pinecone: specs and index setup. The base-size text embedding model from the second.
voyage-lite-02-instruct
Section titled “voyage-lite-02-instruct”Overview
Section titled “Overview”The base-size text embedding model from the second generation of Voyage AI models. Access to models is through Python API. You must register for Voyage API keys to access.
Voyage-02 is optimized for latency and quality and is part of the second-gen Voyage family. It includes a very reasonable context length of 4K tokens.
Using the model
Section titled “Using the model”Installation:
Section titled “Installation:”
pip install -qU voyageai==0.2.1
Creating Embeddings:
Section titled “Creating Embeddings:”
import voyageai
voyageai.api_key = "YOUR_VOYAGE_API_KEY"
model_id = "voyage-02-lite-instruct"
def embed(docs: list[str]) -> list[list[float]]:
if len(docs) > 8:
raise ValueError('List of documents cannot be longer than 8')
doc_embeds = voyageai.get_embeddings(docs, model=model_id)
return doc_embeds
doc_embeds = embed(docs)
Lorem Ipsum