There's a second half of a two hour video on YouTube which talks about creating embeddings using some pre transforms followed by SVD with some distance shenanigans,
I know, I mentioned his name in a post last week, Figured doing so again might seem a bit fanboy-ish. I am kind-of a fan but mostly a fan of good explanations. He's just self-selecting for the group.
https://www.youtube.com/watch?v=Z6s7PrfJlQ0&t=3084s
It's 4 years old and seems to be a bit of a hidden gem. Someone even pipes up at 1:26 to say "This is really cool. Is this written up somewhere?"
[snapshot of the code shown]
CPU times: user 3min 5s, sys: 20.2 s, total: 3min 25sWall time: 1min 26s