Theo Dixon
04/10/2024, 3:35 PMdimensions
setting lower than the default for the model?
my understanding from the documentation and OpenAI’s announcement for the text-embedding-3
models is that you can use both the large and small ones with dimensions other than the default 3072 and 1536, respectively.
however, when i try setting the num_dim
to my desired value (1024
for text-embedding-3-large
) in my collection, i get a failure response with an error for Vector size mismatch
{
"created_at": 1712762528,
"default_sorting_field": "",
"enable_nested_fields": false,
"fields": [
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "embedding_source",
"optional": true,
"sort": false,
"stem": false,
"type": "string"
},
{
"embed": {
"from": [
"embedding_source"
],
"model_config": {
"api_key": "sk-tb**********************************************",
"model_name": "openai/text-embedding-3-large"
}
},
"facet": false,
"hnsw_params": {
"M": 16,
"ef_construction": 200
},
"index": true,
"infix": false,
"locale": "",
"name": "embedding",
"num_dim": 1024,
"optional": false,
"sort": false,
"stem": false,
"type": "float[]",
"vec_dist": "cosine"
}
],
"name": "xxx",
"num_documents": 0,
"symbols_to_index": [
"."
],
"token_separators": []
}
{
"code": 400,
"document": "{...}",
"error": "Vector size mismatch.",
"success": false
},
the documents still get created in the collection, but their unsearchable.