SeanLee97 commited on
Commit
8ef788f
1 Parent(s): 92c4874

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +68 -0
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ license: mit
4
+ datasets:
5
+ - multi_nli
6
+ - snli
7
+ language:
8
+ - en
9
+ metrics:
10
+ - spearmanr
11
+ ---
12
+
13
+
14
+ # AnglE📐: Angle-optimized Text Embeddings
15
+
16
+ > It is Angle 📐, not Angel 👼.
17
+
18
+ 🔥 A New SOTA Model for Semantic Textual Similarity!
19
+
20
+ Github: https://github.com/SeanLee97/AnglE
21
+
22
+ <a href="https://arxiv.org/abs/2309.12871">
23
+ <img src="https://img.shields.io/badge/Arxiv-2306.06843-yellow.svg?style=flat-square" alt="https://arxiv.org/abs/2309.12871" />
24
+ </a>
25
+
26
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sick-r-1)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sick-r-1?p=angle-optimized-text-embeddings)
27
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts16)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts16?p=angle-optimized-text-embeddings)
28
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts15)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts15?p=angle-optimized-text-embeddings)
29
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts14)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts14?p=angle-optimized-text-embeddings)
30
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts13)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts13?p=angle-optimized-text-embeddings)
31
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts12)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts12?p=angle-optimized-text-embeddings)
32
+ [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/angle-optimized-text-embeddings/semantic-textual-similarity-on-sts-benchmark)](https://paperswithcode.com/sota/semantic-textual-similarity-on-sts-benchmark?p=angle-optimized-text-embeddings)
33
+
34
+
35
+ **STS Results**
36
+
37
+
38
+ | Model | STS12 | STS13 | STS14 | STS15 | STS16 | STSBenchmark | SICKRelatedness | Avg. |
39
+ | ------- |-------|-------|-------|-------|-------|--------------|-----------------|-------|
40
+ | [SeanLee97/angle-llama-7b-nli-20231027](https://huggingface.co/SeanLee97/angle-llama-7b-nli-20231027) | 78.68 | 90.58 | 85.49 | 89.56 | 86.91 | 88.92 | 81.18 | 85.90 |
41
+ | [SeanLee97/angle-llama-7b-nli-v2](https://huggingface.co/SeanLee97/angle-llama-7b-nli-v2) | 79.00 | 90.56 | 85.79 | 89.43 | 87.00 | 88.97 | 80.94 | **85.96** |
42
+ | [SeanLee97/angle-bert-base-uncased-nli-en-v1](https://huggingface.co/SeanLee97/angle-bert-base-uncased-nli-en-v1) | 75.09 | 85.56 | 80.66 | 86.44 | 82.47 | 85.16 | 81.23 | 82.37 |
43
+
44
+
45
+ ## Usage
46
+
47
+ ```python
48
+ from angle_emb import AnglE
49
+
50
+ angle = AnglE.from_pretrained('SeanLee97/angle-bert-base-uncased-nli-en-v1', pooling_strategy='cls_avg').cuda()
51
+ vec = angle.encode('hello world', to_numpy=True)
52
+ print(vec)
53
+ vecs = angle.encode(['hello world1', 'hello world2'], to_numpy=True)
54
+ print(vecs)
55
+ ```
56
+
57
+ ## Citation
58
+
59
+ You are welcome to use our code and pre-trained models. If you use our code and pre-trained models, please support us by citing our work as follows:
60
+
61
+ ```bibtex
62
+ @article{li2023angle,
63
+ title={AnglE-Optimized Text Embeddings},
64
+ author={Li, Xianming and Li, Jing},
65
+ journal={arXiv preprint arXiv:2309.12871},
66
+ year={2023}
67
+ }
68
+ ```