#community-help

Estimating Memory Space for Embedding Records

TLDR Jerry wanted help estimating memory space for embedding. Jason provided the formula to calculate this using Typesense.

Powered by Struct AI

1

Jul 31, 2023 (4 months ago)
Jerry
Photo of md5-0a4d173d9c5cc191a35246376a30dd1a
Jerry
06:11 PM
QQ, how much how much memory space does 1 record of embedding (eg. dim 1536) need? I'm trying to do some memory capacity estimation. I think it largely depends on how much space each element of the embedding needs, are they 32bit float or 64bit double?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:13 PM
Each record with vector data takes: 7 bytes * number of dimensions to index in Typesense.

So for 1M records with vector data, you’d need 7 bytes * 1536 * 1M = ~10.8GB of RAM

1