StarSpace
Learning embeddings for classification, retrieval and ranking
...The training objective is contrastive: for a given query embedding, positive and negative examples are sampled and the model is optimized to score positive higher than negatives. The library supports a variety of tasks (text classification, nearest-neighbor search, recommendation, entity linking) with simple configuration. It includes efficient batching, negative sampling strategies, and on-the-fly embedding updates.