kwang2049 commited on
Commit
0f45643
β€’
1 Parent(s): deb6bf7
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. {qgen-tasb/1_Pooling β†’ 1_Pooling}/config.json +0 -0
  2. qgen-tasb/README.md β†’ README.md +5 -10
  3. qgen-tasb/config.json β†’ config.json +1 -1
  4. qgen-tasb/config_sentence_transformers.json β†’ config_sentence_transformers.json +0 -0
  5. gpl +0 -1
  6. gpl-tasb/1_Pooling/config.json +0 -7
  7. gpl-tasb/README.md +0 -122
  8. gpl-tasb/config.json +0 -24
  9. gpl-tasb/config_sentence_transformers.json +0 -7
  10. gpl-tasb/tokenizer_config.json +0 -1
  11. gpl-tsdae +0 -1
  12. gpl-tasb/modules.json β†’ modules.json +0 -0
  13. gpl-tasb/pytorch_model.bin β†’ pytorch_model.bin +1 -1
  14. qgen-tasb/modules.json +0 -14
  15. qgen-tasb/pytorch_model.bin +0 -3
  16. qgen-tasb/sentence_bert_config.json +0 -4
  17. qgen-tasb/special_tokens_map.json +0 -1
  18. qgen-tasb/tokenizer.json +0 -0
  19. qgen-tasb/tokenizer_config.json +0 -1
  20. qgen-tasb/vocab.txt +0 -0
  21. qgen-tsdae/1_Pooling/config.json +0 -7
  22. qgen-tsdae/README.md +0 -130
  23. qgen-tsdae/config.json +0 -24
  24. qgen-tsdae/config_sentence_transformers.json +0 -7
  25. qgen-tsdae/modules.json +0 -14
  26. qgen-tsdae/pytorch_model.bin +0 -3
  27. qgen-tsdae/sentence_bert_config.json +0 -4
  28. qgen-tsdae/special_tokens_map.json +0 -1
  29. qgen-tsdae/tokenizer.json +0 -0
  30. qgen-tsdae/tokenizer_config.json +0 -1
  31. qgen-tsdae/vocab.txt +0 -0
  32. qgen/1_Pooling/config.json +0 -7
  33. qgen/README.md +0 -130
  34. qgen/config.json +0 -24
  35. qgen/config_sentence_transformers.json +0 -7
  36. qgen/modules.json +0 -14
  37. qgen/pytorch_model.bin +0 -3
  38. qgen/sentence_bert_config.json +0 -4
  39. qgen/special_tokens_map.json +0 -1
  40. qgen/tokenizer.json +0 -0
  41. qgen/tokenizer_config.json +0 -1
  42. qgen/vocab.txt +0 -0
  43. gpl-tasb/sentence_bert_config.json β†’ sentence_bert_config.json +0 -0
  44. gpl-tasb/special_tokens_map.json β†’ special_tokens_map.json +0 -0
  45. gpl-tasb/tokenizer.json β†’ tokenizer.json +0 -0
  46. tsdae/tokenizer_config.json β†’ tokenizer_config.json +1 -1
  47. tsdae/config.json +0 -24
  48. tsdae/pytorch_model.bin +0 -3
  49. tsdae/sentence_bert_config.json +0 -4
  50. tsdae/special_tokens_map.json +0 -1
{qgen-tasb/1_Pooling β†’ 1_Pooling}/config.json RENAMED
File without changes
qgen-tasb/README.md β†’ README.md RENAMED
@@ -84,17 +84,14 @@ The model was trained with the parameters:
84
 
85
  **DataLoader**:
86
 
87
- `torch.utils.data.dataloader.DataLoader` of length 3296 with parameters:
88
  ```
89
- {'batch_size': 75, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
90
  ```
91
 
92
  **Loss**:
93
 
94
- `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
95
- ```
96
- {'scale': 20.0, 'similarity_fct': 'cos_sim'}
97
- ```
98
 
99
  Parameters of the fit()-Method:
100
  ```
@@ -105,13 +102,11 @@ Parameters of the fit()-Method:
105
  "max_grad_norm": 1,
106
  "optimizer_class": "<class 'transformers.optimization.AdamW'>",
107
  "optimizer_params": {
108
- "correct_bias": false,
109
- "eps": 1e-06,
110
  "lr": 2e-05
111
  },
112
  "scheduler": "WarmupLinear",
113
- "steps_per_epoch": null,
114
- "warmup_steps": 329,
115
  "weight_decay": 0.01
116
  }
117
  ```
 
84
 
85
  **DataLoader**:
86
 
87
+ `torch.utils.data.dataloader.DataLoader` of length 140000 with parameters:
88
  ```
89
+ {'batch_size': 32, 'sampler': 'torch.utils.data.sampler.SequentialSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
90
  ```
91
 
92
  **Loss**:
93
 
94
+ `gpl.toolkit.loss.MarginDistillationLoss`
 
 
 
95
 
96
  Parameters of the fit()-Method:
97
  ```
 
102
  "max_grad_norm": 1,
103
  "optimizer_class": "<class 'transformers.optimization.AdamW'>",
104
  "optimizer_params": {
 
 
105
  "lr": 2e-05
106
  },
107
  "scheduler": "WarmupLinear",
108
+ "steps_per_epoch": 140000,
109
+ "warmup_steps": 1000,
110
  "weight_decay": 0.01
111
  }
112
  ```
qgen-tasb/config.json β†’ config.json RENAMED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "sentence-transformers/msmarco-distilbert-base-tas-b",
3
  "activation": "gelu",
4
  "architectures": [
5
  "DistilBertModel"
 
1
  {
2
+ "_name_or_path": "/home/ukp/.cache/torch/sentence_transformers/GPL_robust04-tsdae-msmarco-distilbert-margin-mse",
3
  "activation": "gelu",
4
  "architectures": [
5
  "DistilBertModel"
qgen-tasb/config_sentence_transformers.json β†’ config_sentence_transformers.json RENAMED
File without changes
gpl DELETED
@@ -1 +0,0 @@
1
- Subproject commit 6d12956e518a1c997e282b3254b5a668a737e63f
 
 
gpl-tasb/1_Pooling/config.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "word_embedding_dimension": 768,
3
- "pooling_mode_cls_token": true,
4
- "pooling_mode_mean_tokens": false,
5
- "pooling_mode_max_tokens": false,
6
- "pooling_mode_mean_sqrt_len_tokens": false
7
- }
 
 
 
 
 
 
 
 
gpl-tasb/README.md DELETED
@@ -1,122 +0,0 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- tags:
4
- - sentence-transformers
5
- - feature-extraction
6
- - sentence-similarity
7
- - transformers
8
- ---
9
-
10
- # {MODEL_NAME}
11
-
12
- 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.
13
-
14
- <!--- Describe your model here -->
15
-
16
- ## Usage (Sentence-Transformers)
17
-
18
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
-
20
- ```
21
- pip install -U sentence-transformers
22
- ```
23
-
24
- Then you can use the model like this:
25
-
26
- ```python
27
- from sentence_transformers import SentenceTransformer
28
- sentences = ["This is an example sentence", "Each sentence is converted"]
29
-
30
- model = SentenceTransformer('{MODEL_NAME}')
31
- embeddings = model.encode(sentences)
32
- print(embeddings)
33
- ```
34
-
35
-
36
-
37
- ## Usage (HuggingFace Transformers)
38
- Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
39
-
40
- ```python
41
- from transformers import AutoTokenizer, AutoModel
42
- import torch
43
-
44
-
45
- def cls_pooling(model_output, attention_mask):
46
- return model_output[0][:,0]
47
-
48
-
49
- # Sentences we want sentence embeddings for
50
- sentences = ['This is an example sentence', 'Each sentence is converted']
51
-
52
- # Load model from HuggingFace Hub
53
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
54
- model = AutoModel.from_pretrained('{MODEL_NAME}')
55
-
56
- # Tokenize sentences
57
- encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
58
-
59
- # Compute token embeddings
60
- with torch.no_grad():
61
- model_output = model(**encoded_input)
62
-
63
- # Perform pooling. In this case, cls pooling.
64
- sentence_embeddings = cls_pooling(model_output, encoded_input['attention_mask'])
65
-
66
- print("Sentence embeddings:")
67
- print(sentence_embeddings)
68
- ```
69
-
70
-
71
-
72
- ## Evaluation Results
73
-
74
- <!--- Describe how your model was evaluated -->
75
-
76
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
77
-
78
-
79
- ## Training
80
- The model was trained with the parameters:
81
-
82
- **DataLoader**:
83
-
84
- `torch.utils.data.dataloader.DataLoader` of length 140000 with parameters:
85
- ```
86
- {'batch_size': 32, 'sampler': 'torch.utils.data.sampler.SequentialSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
87
- ```
88
-
89
- **Loss**:
90
-
91
- `gpl.toolkit.loss.MarginDistillationLoss`
92
-
93
- Parameters of the fit()-Method:
94
- ```
95
- {
96
- "epochs": 1,
97
- "evaluation_steps": 0,
98
- "evaluator": "NoneType",
99
- "max_grad_norm": 1,
100
- "optimizer_class": "<class 'transformers.optimization.AdamW'>",
101
- "optimizer_params": {
102
- "lr": 2e-05
103
- },
104
- "scheduler": "WarmupLinear",
105
- "steps_per_epoch": 140000,
106
- "warmup_steps": 1000,
107
- "weight_decay": 0.01
108
- }
109
- ```
110
-
111
-
112
- ## Full Model Architecture
113
- ```
114
- SentenceTransformer(
115
- (0): Transformer({'max_seq_length': 350, 'do_lower_case': False}) with Transformer model: DistilBertModel
116
- (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
117
- )
118
- ```
119
-
120
- ## Citing & Authors
121
-
122
- <!--- Describe where people can find more information -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gpl-tasb/config.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "_name_or_path": "/ukp-storage-1/kwang/.cache/torch/sentence_transformers/sentence-transformers_msmarco-distilbert-base-tas-b/",
3
- "activation": "gelu",
4
- "architectures": [
5
- "DistilBertModel"
6
- ],
7
- "attention_dropout": 0.1,
8
- "dim": 768,
9
- "dropout": 0.1,
10
- "hidden_dim": 3072,
11
- "initializer_range": 0.02,
12
- "max_position_embeddings": 512,
13
- "model_type": "distilbert",
14
- "n_heads": 12,
15
- "n_layers": 6,
16
- "pad_token_id": 0,
17
- "qa_dropout": 0.1,
18
- "seq_classif_dropout": 0.2,
19
- "sinusoidal_pos_embds": false,
20
- "tie_weights_": true,
21
- "torch_dtype": "float32",
22
- "transformers_version": "4.15.0",
23
- "vocab_size": 30522
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gpl-tasb/config_sentence_transformers.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "__version__": {
3
- "sentence_transformers": "2.0.0",
4
- "transformers": "4.7.0",
5
- "pytorch": "1.9.0+cu102"
6
- }
7
- }
 
 
 
 
 
 
 
 
gpl-tasb/tokenizer_config.json DELETED
@@ -1 +0,0 @@
1
- {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "do_basic_tokenize": true, "never_split": null, "model_max_length": 512, "name_or_path": "/ukp-storage-1/kwang/.cache/torch/sentence_transformers/sentence-transformers_msmarco-distilbert-base-tas-b/", "special_tokens_map_file": "/home/ukp-reimers/.cache/huggingface/transformers/ba1a276969ccad7ea2344196e7b8561b36292db74bff940ee316dadc05d005d3.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d", "tokenizer_class": "DistilBertTokenizer"}
 
 
gpl-tsdae DELETED
@@ -1 +0,0 @@
1
- Subproject commit 41146c3835ea43fa9eead473b834ba93fe367ca4
 
 
gpl-tasb/modules.json β†’ modules.json RENAMED
File without changes
gpl-tasb/pytorch_model.bin β†’ pytorch_model.bin RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9511e2e8a279eae442dcc9b2801297d009b7a19d0ed12cd0c186a0dd9f22c462
3
  size 265488185
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d7476331c7bbda508a39ddc4840c7cf4581fb08c615330c92cfcf2b07412a8c
3
  size 265488185
qgen-tasb/modules.json DELETED
@@ -1,14 +0,0 @@
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
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen-tasb/pytorch_model.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8016cbcad86780455da003a107b9996004a8e3adb1cdf9899174e6d0d3927f7e
3
- size 265488185
 
 
 
 
qgen-tasb/sentence_bert_config.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "max_seq_length": 350,
3
- "do_lower_case": false
4
- }
 
 
 
 
 
qgen-tasb/special_tokens_map.json DELETED
@@ -1 +0,0 @@
1
- {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
 
 
qgen-tasb/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
qgen-tasb/tokenizer_config.json DELETED
@@ -1 +0,0 @@
1
- {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "do_basic_tokenize": true, "never_split": null, "model_max_length": 512, "name_or_path": "sentence-transformers/msmarco-distilbert-base-tas-b", "special_tokens_map_file": "/home/ukp-reimers/.cache/huggingface/transformers/ba1a276969ccad7ea2344196e7b8561b36292db74bff940ee316dadc05d005d3.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d", "tokenizer_class": "DistilBertTokenizer"}
 
 
qgen-tasb/vocab.txt DELETED
The diff for this file is too large to render. See raw diff
 
qgen-tsdae/1_Pooling/config.json DELETED
@@ -1,7 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
qgen-tsdae/README.md DELETED
@@ -1,130 +0,0 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- tags:
4
- - sentence-transformers
5
- - feature-extraction
6
- - sentence-similarity
7
- - transformers
8
- ---
9
-
10
- # {MODEL_NAME}
11
-
12
- 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.
13
-
14
- <!--- Describe your model here -->
15
-
16
- ## Usage (Sentence-Transformers)
17
-
18
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
-
20
- ```
21
- pip install -U sentence-transformers
22
- ```
23
-
24
- Then you can use the model like this:
25
-
26
- ```python
27
- from sentence_transformers import SentenceTransformer
28
- sentences = ["This is an example sentence", "Each sentence is converted"]
29
-
30
- model = SentenceTransformer('{MODEL_NAME}')
31
- embeddings = model.encode(sentences)
32
- print(embeddings)
33
- ```
34
-
35
-
36
-
37
- ## Usage (HuggingFace Transformers)
38
- Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
39
-
40
- ```python
41
- from transformers import AutoTokenizer, AutoModel
42
- import torch
43
-
44
-
45
- #Mean Pooling - Take attention mask into account for correct averaging
46
- def mean_pooling(model_output, attention_mask):
47
- token_embeddings = model_output[0] #First element of model_output contains all token embeddings
48
- input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
49
- return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
50
-
51
-
52
- # Sentences we want sentence embeddings for
53
- sentences = ['This is an example sentence', 'Each sentence is converted']
54
-
55
- # Load model from HuggingFace Hub
56
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
57
- model = AutoModel.from_pretrained('{MODEL_NAME}')
58
-
59
- # Tokenize sentences
60
- encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
61
-
62
- # Compute token embeddings
63
- with torch.no_grad():
64
- model_output = model(**encoded_input)
65
-
66
- # Perform pooling. In this case, mean pooling.
67
- sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
68
-
69
- print("Sentence embeddings:")
70
- print(sentence_embeddings)
71
- ```
72
-
73
-
74
-
75
- ## Evaluation Results
76
-
77
- <!--- Describe how your model was evaluated -->
78
-
79
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
80
-
81
-
82
- ## Training
83
- The model was trained with the parameters:
84
-
85
- **DataLoader**:
86
-
87
- `torch.utils.data.dataloader.DataLoader` of length 3296 with parameters:
88
- ```
89
- {'batch_size': 75, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
90
- ```
91
-
92
- **Loss**:
93
-
94
- `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
95
- ```
96
- {'scale': 20.0, 'similarity_fct': 'cos_sim'}
97
- ```
98
-
99
- Parameters of the fit()-Method:
100
- ```
101
- {
102
- "epochs": 1,
103
- "evaluation_steps": 0,
104
- "evaluator": "NoneType",
105
- "max_grad_norm": 1,
106
- "optimizer_class": "<class 'transformers.optimization.AdamW'>",
107
- "optimizer_params": {
108
- "correct_bias": false,
109
- "eps": 1e-06,
110
- "lr": 2e-05
111
- },
112
- "scheduler": "WarmupLinear",
113
- "steps_per_epoch": null,
114
- "warmup_steps": 329,
115
- "weight_decay": 0.01
116
- }
117
- ```
118
-
119
-
120
- ## Full Model Architecture
121
- ```
122
- SentenceTransformer(
123
- (0): Transformer({'max_seq_length': 350, 'do_lower_case': False}) with Transformer model: DistilBertModel
124
- (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})
125
- )
126
- ```
127
-
128
- ## Citing & Authors
129
-
130
- <!--- Describe where people can find more information -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen-tsdae/config.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "_name_or_path": "GPL/cqadupstack-tsdae-msmarco-distilbert-margin-mse",
3
- "activation": "gelu",
4
- "architectures": [
5
- "DistilBertModel"
6
- ],
7
- "attention_dropout": 0.1,
8
- "dim": 768,
9
- "dropout": 0.1,
10
- "hidden_dim": 3072,
11
- "initializer_range": 0.02,
12
- "max_position_embeddings": 512,
13
- "model_type": "distilbert",
14
- "n_heads": 12,
15
- "n_layers": 6,
16
- "pad_token_id": 0,
17
- "qa_dropout": 0.1,
18
- "seq_classif_dropout": 0.2,
19
- "sinusoidal_pos_embds": false,
20
- "tie_weights_": true,
21
- "torch_dtype": "float32",
22
- "transformers_version": "4.15.0",
23
- "vocab_size": 30522
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen-tsdae/config_sentence_transformers.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "__version__": {
3
- "sentence_transformers": "2.1.0",
4
- "transformers": "4.15.0",
5
- "pytorch": "1.10.1+cu102"
6
- }
7
- }
 
 
 
 
 
 
 
 
qgen-tsdae/modules.json DELETED
@@ -1,14 +0,0 @@
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
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen-tsdae/pytorch_model.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bc2643eb083b5a62dbe11f95103c368cf4220dd447349ef7d3bdf5e80e89763b
3
- size 265488185
 
 
 
 
qgen-tsdae/sentence_bert_config.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "max_seq_length": 350,
3
- "do_lower_case": false
4
- }
 
 
 
 
 
qgen-tsdae/special_tokens_map.json DELETED
@@ -1 +0,0 @@
1
- {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
 
 
qgen-tsdae/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
qgen-tsdae/tokenizer_config.json DELETED
@@ -1 +0,0 @@
1
- {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "GPL/cqadupstack-tsdae-msmarco-distilbert-margin-mse", "tokenizer_class": "DistilBertTokenizer"}
 
 
qgen-tsdae/vocab.txt DELETED
The diff for this file is too large to render. See raw diff
 
qgen/1_Pooling/config.json DELETED
@@ -1,7 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
qgen/README.md DELETED
@@ -1,130 +0,0 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- tags:
4
- - sentence-transformers
5
- - feature-extraction
6
- - sentence-similarity
7
- - transformers
8
- ---
9
-
10
- # {MODEL_NAME}
11
-
12
- 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.
13
-
14
- <!--- Describe your model here -->
15
-
16
- ## Usage (Sentence-Transformers)
17
-
18
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
-
20
- ```
21
- pip install -U sentence-transformers
22
- ```
23
-
24
- Then you can use the model like this:
25
-
26
- ```python
27
- from sentence_transformers import SentenceTransformer
28
- sentences = ["This is an example sentence", "Each sentence is converted"]
29
-
30
- model = SentenceTransformer('{MODEL_NAME}')
31
- embeddings = model.encode(sentences)
32
- print(embeddings)
33
- ```
34
-
35
-
36
-
37
- ## Usage (HuggingFace Transformers)
38
- Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
39
-
40
- ```python
41
- from transformers import AutoTokenizer, AutoModel
42
- import torch
43
-
44
-
45
- #Mean Pooling - Take attention mask into account for correct averaging
46
- def mean_pooling(model_output, attention_mask):
47
- token_embeddings = model_output[0] #First element of model_output contains all token embeddings
48
- input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
49
- return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
50
-
51
-
52
- # Sentences we want sentence embeddings for
53
- sentences = ['This is an example sentence', 'Each sentence is converted']
54
-
55
- # Load model from HuggingFace Hub
56
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
57
- model = AutoModel.from_pretrained('{MODEL_NAME}')
58
-
59
- # Tokenize sentences
60
- encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
61
-
62
- # Compute token embeddings
63
- with torch.no_grad():
64
- model_output = model(**encoded_input)
65
-
66
- # Perform pooling. In this case, mean pooling.
67
- sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
68
-
69
- print("Sentence embeddings:")
70
- print(sentence_embeddings)
71
- ```
72
-
73
-
74
-
75
- ## Evaluation Results
76
-
77
- <!--- Describe how your model was evaluated -->
78
-
79
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
80
-
81
-
82
- ## Training
83
- The model was trained with the parameters:
84
-
85
- **DataLoader**:
86
-
87
- `torch.utils.data.dataloader.DataLoader` of length 3296 with parameters:
88
- ```
89
- {'batch_size': 75, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
90
- ```
91
-
92
- **Loss**:
93
-
94
- `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
95
- ```
96
- {'scale': 20.0, 'similarity_fct': 'cos_sim'}
97
- ```
98
-
99
- Parameters of the fit()-Method:
100
- ```
101
- {
102
- "epochs": 1,
103
- "evaluation_steps": 0,
104
- "evaluator": "NoneType",
105
- "max_grad_norm": 1,
106
- "optimizer_class": "<class 'transformers.optimization.AdamW'>",
107
- "optimizer_params": {
108
- "correct_bias": false,
109
- "eps": 1e-06,
110
- "lr": 2e-05
111
- },
112
- "scheduler": "WarmupLinear",
113
- "steps_per_epoch": null,
114
- "warmup_steps": 329,
115
- "weight_decay": 0.01
116
- }
117
- ```
118
-
119
-
120
- ## Full Model Architecture
121
- ```
122
- SentenceTransformer(
123
- (0): Transformer({'max_seq_length': 350, 'do_lower_case': False}) with Transformer model: DistilBertModel
124
- (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})
125
- )
126
- ```
127
-
128
- ## Citing & Authors
129
-
130
- <!--- Describe where people can find more information -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen/config.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "_name_or_path": "GPL/msmarco-distilbert-margin-mse",
3
- "activation": "gelu",
4
- "architectures": [
5
- "DistilBertModel"
6
- ],
7
- "attention_dropout": 0.1,
8
- "dim": 768,
9
- "dropout": 0.1,
10
- "hidden_dim": 3072,
11
- "initializer_range": 0.02,
12
- "max_position_embeddings": 512,
13
- "model_type": "distilbert",
14
- "n_heads": 12,
15
- "n_layers": 6,
16
- "pad_token_id": 0,
17
- "qa_dropout": 0.1,
18
- "seq_classif_dropout": 0.2,
19
- "sinusoidal_pos_embds": false,
20
- "tie_weights_": true,
21
- "torch_dtype": "float32",
22
- "transformers_version": "4.15.0",
23
- "vocab_size": 30522
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen/config_sentence_transformers.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "__version__": {
3
- "sentence_transformers": "2.1.0",
4
- "transformers": "4.15.0",
5
- "pytorch": "1.10.1+cu102"
6
- }
7
- }
 
 
 
 
 
 
 
 
qgen/modules.json DELETED
@@ -1,14 +0,0 @@
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
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qgen/pytorch_model.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:92b5fe0f7ba6c938ef6699f389fce8e97faf14d2093b9dea700ad345dea4c46f
3
- size 265488185
 
 
 
 
qgen/sentence_bert_config.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "max_seq_length": 350,
3
- "do_lower_case": false
4
- }
 
 
 
 
 
qgen/special_tokens_map.json DELETED
@@ -1 +0,0 @@
1
- {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
 
 
qgen/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
qgen/tokenizer_config.json DELETED
@@ -1 +0,0 @@
1
- {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "GPL/msmarco-distilbert-margin-mse", "tokenizer_class": "DistilBertTokenizer"}
 
 
qgen/vocab.txt DELETED
The diff for this file is too large to render. See raw diff
 
gpl-tasb/sentence_bert_config.json β†’ sentence_bert_config.json RENAMED
File without changes
gpl-tasb/special_tokens_map.json β†’ special_tokens_map.json RENAMED
File without changes
gpl-tasb/tokenizer.json β†’ tokenizer.json RENAMED
File without changes
tsdae/tokenizer_config.json β†’ tokenizer_config.json RENAMED
@@ -1 +1 @@
1
- {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "results/unsupervised/distilbert-base-uncased/arguana/tsdae/seed1/100000/0_Transformer", "tokenizer_class": "DistilBertTokenizer"}
 
1
+ {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "/home/ukp/.cache/torch/sentence_transformers/GPL_robust04-tsdae-msmarco-distilbert-margin-mse", "tokenizer_class": "DistilBertTokenizer"}
tsdae/config.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "_name_or_path": "results/unsupervised/distilbert-base-uncased/arguana/tsdae/seed1/100000/0_Transformer",
3
- "activation": "gelu",
4
- "architectures": [
5
- "DistilBertModel"
6
- ],
7
- "attention_dropout": 0.1,
8
- "dim": 768,
9
- "dropout": 0.1,
10
- "hidden_dim": 3072,
11
- "initializer_range": 0.02,
12
- "max_position_embeddings": 512,
13
- "model_type": "distilbert",
14
- "n_heads": 12,
15
- "n_layers": 6,
16
- "pad_token_id": 0,
17
- "qa_dropout": 0.1,
18
- "seq_classif_dropout": 0.2,
19
- "sinusoidal_pos_embds": false,
20
- "tie_weights_": true,
21
- "torch_dtype": "float32",
22
- "transformers_version": "4.9.1",
23
- "vocab_size": 30522
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tsdae/pytorch_model.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0a1be8988781c49706c1b7847f25080f1beb505b79eb41f6adb448129279ba0b
3
- size 265491187
 
 
 
 
tsdae/sentence_bert_config.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "max_seq_length": 350,
3
- "do_lower_case": false
4
- }
 
 
 
 
 
tsdae/special_tokens_map.json DELETED
@@ -1 +0,0 @@
1
- {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}