sxtforreal
commited on
Commit
•
f6436b2
1
Parent(s):
16251f0
Update README.md
Browse files
README.md
CHANGED
@@ -8,7 +8,8 @@ pipeline_tag: feature-extraction
|
|
8 |
---
|
9 |
|
10 |
# Usage
|
11 |
-
|
|
|
12 |
from model import (
|
13 |
BERTContrastiveLearning_simcse,
|
14 |
BERTContrastiveLearning_simcse_w,
|
@@ -29,4 +30,5 @@ model2 = BERTContrastiveLearning_simcse_w.load_from_checkpoint(ckpt2).eval()
|
|
29 |
model3 = BERTContrastiveLearning_samp.load_from_checkpoint(ckpt3).eval()
|
30 |
model4 = BERTContrastiveLearning_samp_w.load_from_checkpoint(ckpt4).eval()
|
31 |
|
32 |
-
cls, _ = model(input_ids, attention_mask) # embeddings
|
|
|
|
8 |
---
|
9 |
|
10 |
# Usage
|
11 |
+
```python
|
12 |
+
from transformers import AutoTokenizer
|
13 |
from model import (
|
14 |
BERTContrastiveLearning_simcse,
|
15 |
BERTContrastiveLearning_simcse_w,
|
|
|
30 |
model3 = BERTContrastiveLearning_samp.load_from_checkpoint(ckpt3).eval()
|
31 |
model4 = BERTContrastiveLearning_samp_w.load_from_checkpoint(ckpt4).eval()
|
32 |
|
33 |
+
cls, _ = model(input_ids, attention_mask) # embeddings
|
34 |
+
```
|