This message was deleted.
# community-help
s
This message was deleted.
d
I'm thinking i'd use the openai embedding
k
You can generate via python code before importing then.
Only inference can use auto embedding
If the embedding value is already present, we won't run embedding generation for import records. Only will be used for generating embedding for query for actual search.
d
Ok, so i'm generating the embeddings and saving them to a file locally and using that file to populate a field on my search index. the schema for this field looks like this (is that correct?)
Copy code
{
  name: 'embedding',
  type: 'float[]',
  num_dim: embeddingsData[0].embedding.length,
  optional: true,
},
embeddingsData
is an array like this
{ sku: string, embedding: number[] }[]
so my problem is that I'm running out of memory on typesense cloud now. sure these embedding fields are quite large (the generated .json file with my embeddings are 25.5 MB). any tricks to lower memory usage?
@Jason Bosco @Kishore Nallan
k
The index for enabling search on the embeddings requires 2x-3x additional memory. You could try using a model that generates lower dimensions. For e.g. OpenAI produces pretty large number of embedding dimensions
d
@Kishore Nallan Any model recommendation? :)
k
e5-small
is good. There are some newer models which claim to be better but getting hard to believe the benchmarks because some models are suspected of training on benchmark data. E5 family is from Microsoft so it's reliable.
👍 1
d
Thanks!