Re:Embeddings: What they are and why they matter
by jamessb on Wednesday October 25, 2023 @06:28AM
(#38011285)
Yes - it uses the implementation of MiniBatchKMeans provided by the scikit-learn library.
(I'd call this an "algorithm" rather than a "model" - it doesn't have any model weights learnt from a training dataset)
For more details, see the pages in its user guide describing:
* the K-Means algorithm: https://scikit-learn.org/stable/modules/clustering.html#k-me...
* the Mini Batch variant of k-means: https://scikit-learn.org/stable/modules/clustering.html#mini...
https://github.com/simonw/llm-cluster/blob/main/llm_cluster....
So does this take each row from the DB, convert to a numpy array (?), then uses an existing model called MiniBatchKMeans (?) to go over that array and generate a bunch of labels. Then add it to a dictionary and print to console.