No project description provided
Project description
Voyage Python Library
Voyage AI provides cutting-edge embedding and rerankers.
Embedding models are neural net models (e.g., transformers) that convert unstructured and complex data, such as documents, images, audios, videos, or tabular data, into dense numerical vectors (i.e. embeddings) that capture their semantic meanings. These vectors serve as representations/indices for datapoints and are essential building blocks for semantic search and retrieval-augmented generation (RAG), which is the predominant approach for domain-specific or company-specific chatbots and other AI applications.
Rerankers are neural nets that output relevance scores between a query and multiple documents. It is common practice to use the relevance scores to rerank the documents initially retrieved with embedding-based methods (or with lexical search algorithms such as BM25 and TF-IDF). Selecting the highest-scored documents refines the retrieval results into a more relevant subset.
Voyage AI provides API endpoints for embedding and reranking models that take in your data (e.g., documents, queries, or query-document pairs) and return their embeddings or relevance scores. Embedding models and rerankers, as modular components, seamlessly integrate with other parts of a RAG stack, including vector stores and generative Large Language Models (LLMs).
Voyage AI’s embedding models and rerankers are state-of-the-art in retrieval accuracy. Please read our announcing blog post for details. Please also check out a high-level introduction of embedding models, semantic search, and RAG, and our step-by-step quickstart tutorial on implementing a minimalist RAG chatbot using Voyage model endpoints.
Local models (voyage-4-nano)
voyage-4-nano can run locally, without an API key, via
sentence-transformers. Install the optional extra:
pip install "voyageai[local]"
Requirements:
- Python 3.10+ (the local model's code uses 3.10+ typing syntax). On older Python the extra is skipped and local models are unavailable.
- The extra pulls in
torchandsentence-transformers; a pure-API install ofvoyageainever imports them, so API-only users pay no import cost.
Usage is identical to the hosted API — just pass the local model name; no API key is required:
import voyageai
vo = voyageai.Client() # no API key needed for local models
result = vo.embed(["Hello, world!"], model="voyage-4-nano", input_type="document")
print(result.embeddings[0])
The local path mirrors the hosted API's behavior (input validation, unit-norm
Matryoshka embeddings at every dimension, token accounting, and the 1000-input
batch limit). int8/uint8 output dtypes are the one exception — they require
fixed calibration ranges we don't ship locally yet and raise NotImplementedError;
use float/float32 or binary/ubinary instead.
Voyage AI Official Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file voyageai-0.5.0.tar.gz.
File metadata
- Download URL: voyageai-0.5.0.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.13 Linux/6.8.0-1059-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed2775fe9faeb96cc2b3931edc35d76185d19f34f1523d1f70535f0451126ae9
|
|
| MD5 |
c780e7d99c533c16b896d0f77ae50503
|
|
| BLAKE2b-256 |
aed3b96ecab961692dd55fc5b54fef916c2bc37a942ef33fcc937779d2aaa161
|
File details
Details for the file voyageai-0.5.0-py3-none-any.whl.
File metadata
- Download URL: voyageai-0.5.0-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.13 Linux/6.8.0-1059-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d7e8dc3b74cac4646d4a835a65cf8c9764070c90353e322d84a91a16207e78b
|
|
| MD5 |
34bf3a87182dabc6ecb9f47298f4c8ab
|
|
| BLAKE2b-256 |
0dc4732038d97a0ac02d690f295a9ee28f4d0553894478ca6944411428e544f7
|