Muennighoff
commited on
Commit
·
f67a619
1
Parent(s):
6ca60fe
Add SGPT-125M-mean-nli-linear5
Browse files- 1_Pooling/config.json +9 -0
- 2_Dense/config.json +1 -0
- 2_Dense/pytorch_model.bin +3 -0
- 3_Dense/config.json +1 -0
- 3_Dense/pytorch_model.bin +3 -0
- 4_Dense/config.json +1 -0
- 4_Dense/pytorch_model.bin +3 -0
- 5_Dense/config.json +1 -0
- 5_Dense/pytorch_model.bin +3 -0
- 6_Dense/config.json +1 -0
- 6_Dense/pytorch_model.bin +3 -0
- README.md +94 -0
- config.json +54 -0
- config_sentence_transformers.json +7 -0
- eval/similarity_evaluation_sts-dev_results.csv +12 -0
- merges.txt +0 -0
- modules.json +44 -0
- pytorch_model.bin +3 -0
- sentence_bert_config.json +4 -0
- similarity_evaluation_sts-test_results.csv +2 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false
|
9 |
+
}
|
2_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.GELU"}
|
2_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab58ee7c0bf4ebb6a6c66b3907aef60dcc3662952df1393b01723c4dd0fb50ea
|
3 |
+
size 2363431
|
3_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.GELU"}
|
3_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bdcc7e501da47fb2ee1297506d5cd1a96d3bce3b91589461b3349b5cfb62f80d
|
3 |
+
size 2363431
|
4_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.GELU"}
|
4_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:611bfb930f316f7517bcef08cb7df35d2062feb5890533c41b0464732f979abb
|
3 |
+
size 2363431
|
5_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.GELU"}
|
5_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc11027db566a4d3dc2ccf9f55e68d1930be618e219bc6e090bff3532644663a
|
3 |
+
size 2363431
|
6_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.GELU"}
|
6_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:649980f85e7cc80814d98cdf98494cfd69dddf05b102e4e519a2c4efe12e1f4e
|
3 |
+
size 2363431
|
README.md
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: sentence-similarity
|
3 |
+
tags:
|
4 |
+
- sentence-transformers
|
5 |
+
- feature-extraction
|
6 |
+
- sentence-similarity
|
7 |
+
---
|
8 |
+
|
9 |
+
# {MODEL_NAME}
|
10 |
+
|
11 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
12 |
+
|
13 |
+
<!--- Describe your model here -->
|
14 |
+
|
15 |
+
## Usage (Sentence-Transformers)
|
16 |
+
|
17 |
+
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
18 |
+
|
19 |
+
```
|
20 |
+
pip install -U sentence-transformers
|
21 |
+
```
|
22 |
+
|
23 |
+
Then you can use the model like this:
|
24 |
+
|
25 |
+
```python
|
26 |
+
from sentence_transformers import SentenceTransformer
|
27 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
28 |
+
|
29 |
+
model = SentenceTransformer('{MODEL_NAME}')
|
30 |
+
embeddings = model.encode(sentences)
|
31 |
+
print(embeddings)
|
32 |
+
```
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
## Evaluation Results
|
37 |
+
|
38 |
+
<!--- Describe how your model was evaluated -->
|
39 |
+
|
40 |
+
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
|
41 |
+
|
42 |
+
|
43 |
+
## Training
|
44 |
+
The model was trained with the parameters:
|
45 |
+
|
46 |
+
**DataLoader**:
|
47 |
+
|
48 |
+
`sentence_transformers.datasets.NoDuplicatesDataLoader.NoDuplicatesDataLoader` of length 8807 with parameters:
|
49 |
+
```
|
50 |
+
{'batch_size': 64}
|
51 |
+
```
|
52 |
+
|
53 |
+
**Loss**:
|
54 |
+
|
55 |
+
`sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
|
56 |
+
```
|
57 |
+
{'scale': 20.0, 'similarity_fct': 'cos_sim'}
|
58 |
+
```
|
59 |
+
|
60 |
+
Parameters of the fit()-Method:
|
61 |
+
```
|
62 |
+
{
|
63 |
+
"epochs": 1,
|
64 |
+
"evaluation_steps": 880,
|
65 |
+
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
66 |
+
"max_grad_norm": 1,
|
67 |
+
"optimizer_class": "<class 'transformers.optimization.AdamW'>",
|
68 |
+
"optimizer_params": {
|
69 |
+
"lr": 2e-05
|
70 |
+
},
|
71 |
+
"scheduler": "WarmupLinear",
|
72 |
+
"steps_per_epoch": null,
|
73 |
+
"warmup_steps": 881,
|
74 |
+
"weight_decay": 0.01
|
75 |
+
}
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
## Full Model Architecture
|
80 |
+
```
|
81 |
+
SentenceTransformer(
|
82 |
+
(0): Transformer({'max_seq_length': 75, 'do_lower_case': False}) with Transformer model: GPTNeoModel
|
83 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False})
|
84 |
+
(2): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU'})
|
85 |
+
(3): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU'})
|
86 |
+
(4): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU'})
|
87 |
+
(5): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU'})
|
88 |
+
(6): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU'})
|
89 |
+
)
|
90 |
+
```
|
91 |
+
|
92 |
+
## Citing & Authors
|
93 |
+
|
94 |
+
<!--- Describe where people can find more information -->
|
config.json
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "EleutherAI/gpt-neo-125M",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPTNeoModel"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0,
|
8 |
+
"attention_layers": [
|
9 |
+
"global",
|
10 |
+
"local",
|
11 |
+
"global",
|
12 |
+
"local",
|
13 |
+
"global",
|
14 |
+
"local",
|
15 |
+
"global",
|
16 |
+
"local",
|
17 |
+
"global",
|
18 |
+
"local",
|
19 |
+
"global",
|
20 |
+
"local"
|
21 |
+
],
|
22 |
+
"attention_types": [
|
23 |
+
[
|
24 |
+
[
|
25 |
+
"global",
|
26 |
+
"local"
|
27 |
+
],
|
28 |
+
6
|
29 |
+
]
|
30 |
+
],
|
31 |
+
"bos_token_id": 50256,
|
32 |
+
"embed_dropout": 0,
|
33 |
+
"eos_token_id": 50256,
|
34 |
+
"gradient_checkpointing": false,
|
35 |
+
"hidden_size": 768,
|
36 |
+
"initializer_range": 0.02,
|
37 |
+
"intermediate_size": null,
|
38 |
+
"layer_norm_epsilon": 1e-05,
|
39 |
+
"max_position_embeddings": 2048,
|
40 |
+
"model_type": "gpt_neo",
|
41 |
+
"num_heads": 12,
|
42 |
+
"num_layers": 12,
|
43 |
+
"resid_dropout": 0,
|
44 |
+
"summary_activation": null,
|
45 |
+
"summary_first_dropout": 0.1,
|
46 |
+
"summary_proj_to_labels": true,
|
47 |
+
"summary_type": "cls_index",
|
48 |
+
"summary_use_proj": true,
|
49 |
+
"torch_dtype": "float32",
|
50 |
+
"transformers_version": "4.11.3",
|
51 |
+
"use_cache": true,
|
52 |
+
"vocab_size": 50257,
|
53 |
+
"window_size": 256
|
54 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.1.0",
|
4 |
+
"transformers": "4.11.3",
|
5 |
+
"pytorch": "1.10.1"
|
6 |
+
}
|
7 |
+
}
|
eval/similarity_evaluation_sts-dev_results.csv
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman
|
2 |
+
0,880,0.6793242897830243,0.6800051116275396,0.6526675304698322,0.6598914874266282,0.6523759012817913,0.6596549908221383,0.37758613161811344,0.44107892538971527
|
3 |
+
0,1760,0.7093062659759418,0.7043392262855407,0.6799424742385566,0.6871311628086488,0.679709965760185,0.686909064790608,0.4244807707330064,0.489454058418039
|
4 |
+
0,2640,0.7162510204173811,0.7108099478329052,0.6844751159621512,0.6902131311277189,0.6843642132691589,0.6900856150254838,0.4430006769070316,0.49415192642877115
|
5 |
+
0,3520,0.7210577333102874,0.7159412485270954,0.6874901591743661,0.693434015639469,0.6875126171641188,0.6936410018207312,0.45731448945063213,0.5199390563243889
|
6 |
+
0,4400,0.7279170676663442,0.7217689927624069,0.6918732703073953,0.6971102070618418,0.6917278226947479,0.6970824988576667,0.45420687165035545,0.5189615022689855
|
7 |
+
0,5280,0.7260344818186505,0.720721312324089,0.6921883942481113,0.6972724171381975,0.6921449258154431,0.6971027942453383,0.43819063915065287,0.5029727634769791
|
8 |
+
0,6160,0.7286999102843462,0.7228504098788112,0.6939166076911062,0.6994848783615378,0.6937150393058567,0.6991998971160589,0.445240349764503,0.5095797004208383
|
9 |
+
0,7040,0.7302858437234605,0.725494459746203,0.694175642980331,0.6995536927338825,0.6937733393621677,0.6991565696840228,0.439262522665688,0.5065563833877958
|
10 |
+
0,7920,0.7314337586011384,0.7268544909338852,0.6942073318019882,0.6996691145217213,0.6938620780761877,0.6992384398472841,0.44088081789557454,0.5113894614562506
|
11 |
+
0,8800,0.7316399822010149,0.7275473603861525,0.6938081719844009,0.699432422187559,0.6934701320652052,0.698900686945158,0.43536164213762274,0.5046829247995284
|
12 |
+
0,-1,0.7316436973142261,0.7275333401568148,0.6938119379020147,0.6994414880301143,0.6934733474552642,0.6989065292074504,0.4353497873382448,0.5046755102036641
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
modules.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Dense",
|
18 |
+
"type": "sentence_transformers.models.Dense"
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"idx": 3,
|
22 |
+
"name": "3",
|
23 |
+
"path": "3_Dense",
|
24 |
+
"type": "sentence_transformers.models.Dense"
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"idx": 4,
|
28 |
+
"name": "4",
|
29 |
+
"path": "4_Dense",
|
30 |
+
"type": "sentence_transformers.models.Dense"
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"idx": 5,
|
34 |
+
"name": "5",
|
35 |
+
"path": "5_Dense",
|
36 |
+
"type": "sentence_transformers.models.Dense"
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"idx": 6,
|
40 |
+
"name": "6",
|
41 |
+
"path": "6_Dense",
|
42 |
+
"type": "sentence_transformers.models.Dense"
|
43 |
+
}
|
44 |
+
]
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e4119de5997c833c7566dc4766cfd1ce0fcafab88f327adf0dbd85e41f03e3c
|
3 |
+
size 551190545
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 75,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
similarity_evaluation_sts-test_results.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman
|
2 |
+
-1,-1,0.67010540977066,0.6281656744516964,0.6151881660970145,0.5880977577692394,0.6156838702005203,0.5883481650395049,0.3694855758671593,0.4361936325224468
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": "<|endoftext|>"}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "errors": "replace", "model_max_length": 2048, "special_tokens_map_file": null, "name_or_path": "EleutherAI/gpt-neo-125M", "tokenizer_class": "GPT2Tokenizer"}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|