Anush008 / fastembed-rs

Library for generating vector embeddings, reranking in Rust
https://docs.rs/fastembed
Apache License 2.0
240 stars 32 forks source link

How to change the dimensionality for nomic-ai/nomic-embed-text-v1.5 ? #83

Closed cgisky1980 closed 1 month ago

cgisky1980 commented 1 month ago

nomic-embed-text-v1.5 is an improvement upon Nomic Embed that utilizes Matryoshka Representation Learning which gives developers the flexibility to trade off the embedding size for a negligible reduction in performance.

from nomic import embed

output = embed.text(
    texts=['Nomic Embedding API', '#keepAIOpen'],
    model='nomic-embed-text-v1.5',
    task_type='search_document',
    dimensionality=256,
)

print(output)
Anush008 commented 1 month ago

Not supported yet.