Sometimes having large embeddings vectors is a problem.
I initially was trying different embeddings models with different sizes, but actually, to reduce size, one needs to use a dimensions parameter when using openai's embeddings API. The way it works is that the model is used, as is, and then the vectors are reduced.
So how are they reduced? Found the answer here. They use Matryoshka Representation Learning for this. As far as I can tell, they say the reduction (to k size) is performed by taking the first k numbers of the vector, but I can't confirm this with my tests.
Sometimes having large embeddings vectors is a problem.
I initially was trying different embeddings models with different sizes, but actually, to reduce size, one needs to use a
dimensions
parameter when using openai's embeddings API. The way it works is that the model is used, as is, and then the vectors are reduced.So how are they reduced? Found the answer here. They use Matryoshka Representation Learning for this. As far as I can tell, they say the reduction (to
k
size) is performed by taking the firstk
numbers of the vector, but I can't confirm this with my tests.