AnglE 📐
📢 Train/Infer Powerful Sentence Embeddings with AnglE.
This library is from the paper Angle-optimized Text Embeddings . It allows you to train state-of-the-art BERT/LLM-based sentence embeddings with just a few lines of code. AnglE is also a general sentence embedding inference framework, allowing for infering a variety of transformer-based sentence embeddings.
✨ Features
Loss:
📐 AnglE loss
⚖ Contrastive loss
📏 CoSENT loss
☕️ Espresso loss (previously known as 2DMSE)
Backbones:
BERT-based models (BERT, RoBERTa, ELECTRA, ALBERT, etc.)
LLM-based models (LLaMA, Mistral, Qwen, etc.)
Bi-directional LLM-based models (LLaMA, Mistral, Qwen, OpenELMo, etc.. refer to: https://github.com/WhereIsAI/BiLLM)
Training:
Single-GPU training
Multi-GPU training
Contents:
APIs: