Voyage 4 Large
General-purpose multilingual text embedding model with 32K context, approaching voyage-3-large's retrieval quality at mid-sized model efficiency.
Model details
Example usage
Voyage 4 is a general-purpose, multilingual text embedding model built for retrieval and search applications. It approaches the retrieval quality of voyage-3-large while maintaining the efficiency of a mid-sized model, making it a strong default choice when you need high-quality embeddings without the cost of the larger voyage-4-large flagship.
It supports a 32,000-token context length and flexible output dimensions along with multiple output data types for different storage and performance tradeoffs.
1from openai import OpenAI
2
3client = OpenAI(
4 base_url=os.environ["MODEL_API_URL"],
5 api_key=os.environ['MODEL_API_KEY'],
6)
7
8response = client.embeddings.create(
9 model="voyage-4",
10 input=["The quick brown fox jumps over the lazy dog"],
11 dimensions=1024, # optional: 256, 512, 1024 (default), or 2048
12)
13
14print(response.data[0].embedding)1{
2 "object": "list",
3 "data": [
4 {
5 "object": "embedding",
6 "index": 0,
7 "embedding": [
8 0.00821,
9 0.00821,
10 0.00821
11 ]
12 }
13 ],
14 "model": "voyage-4",
15 "usage": {
16 "total_tokens": 10
17 }
18}