pub fn expected_embeddings_size(
dtype: &str,
n: usize,
dim: usize,
) -> Option<usize>Expand description
Expected size of the embeddings section for a given dtype. None for an
unknown dtype AND when n * dim overflows: both come from an untrusted
header, and a wrapped product would let a hostile file claim a huge
corpus behind a tiny section (mutation-fuzz finding).