stanfordnlp/snli
Viewer โข Updated โข 570k โข 48.1k โข 101
How to use karimepachecog/simcse-sup-snli100k with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("karimepachecog/simcse-sup-snli100k")
sentences = [
"That is a happy person",
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]Sentence embedding model trained with SimCSE (Gao, Yao and Chen, 2021) from bert-base-uncased for U2T02.
A shared 100k-record subset of SNLI (snli_train_100k.jsonl), not the paper's Wikipedia or SNLI+MNLI training set.
supervised| pooling at train | CLS + BERT pooler MLP |
| pooling at test | cls |
| batch size | 128 |
| learning rate | 5e-05 |
| temperature | 0.05 |
| epochs | 3 |
| max length | 32 |
| dropout | 0.1 |
| seed | 42 |
| hard negatives | True |
| hardware | cuda:Tesla T4 (14.6 GB) |
Optimizer: AdamW, weight decay 0.0, warmup ratio 0.0, linear decay.
STS-B Spearman x100, cosine similarity, no regressor.
| split | Spearman |
|---|---|
| dev | 78.03973124609854 |
| test | 74.73372610133005 |
Alignment (STS-B test, gold >= 4): 0.13581092655658722
Uniformity (STS-B test, t=2): -2.472869873046875
Base model
google-bert/bert-base-uncased