96abhishekarora
commited on
Commit
•
78b8875
1
Parent(s):
efb35e9
Modified validation and training for linktransformer model
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +3 -1
- LT_training_config.json +4 -2
- README.md +17 -7
- config.json +2 -2
- model.safetensors +3 -0
- special_tokens_map.json +42 -6
- tokenizer.json +2 -2
- tokenizer_config.json +50 -8
.gitattributes
CHANGED
@@ -37,3 +37,5 @@ pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
|
37 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
38 |
.git/lfs/objects/80/18/8018cddb99fc674116c8835ecc920783419b8d0b27e5b9e49fd2485b8bd18c51 filter=lfs diff=lfs merge=lfs -text
|
39 |
.git/lfs/objects/b6/0b/b60b6b43406a48bf3638526314f3d232d97058bc93472ff2de930d43686fa441 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
37 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
38 |
.git/lfs/objects/80/18/8018cddb99fc674116c8835ecc920783419b8d0b27e5b9e49fd2485b8bd18c51 filter=lfs diff=lfs merge=lfs -text
|
39 |
.git/lfs/objects/b6/0b/b60b6b43406a48bf3638526314f3d232d97058bc93472ff2de930d43686fa441 filter=lfs diff=lfs merge=lfs -text
|
40 |
+
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
41 |
+
.git/lfs/objects/b1/49/b1494d821f2da2f2c8b180679b67368c3183b141af49d838de9e62877a59f4f4 filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
CHANGED
@@ -3,5 +3,7 @@
|
|
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 |
}
|
|
|
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 |
}
|
LT_training_config.json
CHANGED
@@ -10,7 +10,8 @@
|
|
10 |
"train_batch_size": 64,
|
11 |
"num_epochs": 100,
|
12 |
"warm_up_perc": 1,
|
13 |
-
"learning_rate": 2e-
|
|
|
14 |
"val_perc": 0.2,
|
15 |
"wandb_names": {
|
16 |
"project": "linkage",
|
@@ -20,10 +21,11 @@
|
|
20 |
},
|
21 |
"add_pooling_layer": false,
|
22 |
"large_val": true,
|
23 |
-
"eval_steps_perc": 0.
|
24 |
"test_at_end": true,
|
25 |
"save_val_test_pickles": true,
|
26 |
"val_query_prop": 0.2,
|
|
|
27 |
"batch_size": 128,
|
28 |
"eval_type": "retrieval",
|
29 |
"training_dataset": "dataframe",
|
|
|
10 |
"train_batch_size": 64,
|
11 |
"num_epochs": 100,
|
12 |
"warm_up_perc": 1,
|
13 |
+
"learning_rate": 2e-05,
|
14 |
+
"loss_type": "supcon",
|
15 |
"val_perc": 0.2,
|
16 |
"wandb_names": {
|
17 |
"project": "linkage",
|
|
|
21 |
},
|
22 |
"add_pooling_layer": false,
|
23 |
"large_val": true,
|
24 |
+
"eval_steps_perc": 0.5,
|
25 |
"test_at_end": true,
|
26 |
"save_val_test_pickles": true,
|
27 |
"val_query_prop": 0.2,
|
28 |
+
"loss_params": {},
|
29 |
"batch_size": 128,
|
30 |
"eval_type": "retrieval",
|
31 |
"training_dataset": "dataframe",
|
README.md
CHANGED
@@ -14,7 +14,7 @@ tags:
|
|
14 |
|
15 |
# dell-research-harvard/lt-un-data-fine-fine-multi
|
16 |
|
17 |
-
This is a [LinkTransformer](https://github.
|
18 |
It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more.
|
19 |
Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well.
|
20 |
It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
@@ -101,7 +101,7 @@ The model was trained with the parameters:
|
|
101 |
|
102 |
**DataLoader**:
|
103 |
|
104 |
-
`torch.utils.data.dataloader.DataLoader` of length
|
105 |
```
|
106 |
{'batch_size': 64, 'sampler': 'torch.utils.data.dataloader._InfiniteConstantSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
107 |
```
|
@@ -114,16 +114,16 @@ Parameters of the fit()-Method:
|
|
114 |
```
|
115 |
{
|
116 |
"epochs": 100,
|
117 |
-
"evaluation_steps":
|
118 |
"evaluator": "sentence_transformers.evaluation.SequentialEvaluator.SequentialEvaluator",
|
119 |
"max_grad_norm": 1,
|
120 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
121 |
"optimizer_params": {
|
122 |
-
"lr": 2e-
|
123 |
},
|
124 |
"scheduler": "WarmupLinear",
|
125 |
"steps_per_epoch": null,
|
126 |
-
"warmup_steps":
|
127 |
"weight_decay": 0.01
|
128 |
}
|
129 |
```
|
@@ -133,10 +133,20 @@ Parameters of the fit()-Method:
|
|
133 |
|
134 |
LinkTransformer(
|
135 |
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
136 |
-
(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})
|
137 |
)
|
138 |
```
|
139 |
|
140 |
## Citing & Authors
|
141 |
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
# dell-research-harvard/lt-un-data-fine-fine-multi
|
16 |
|
17 |
+
This is a [LinkTransformer](https://linktransformer.github.io/) model. At its core this model this is a sentence transformer model [sentence-transformers](https://www.SBERT.net) model- it just wraps around the class.
|
18 |
It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more.
|
19 |
Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well.
|
20 |
It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
|
|
101 |
|
102 |
**DataLoader**:
|
103 |
|
104 |
+
`torch.utils.data.dataloader.DataLoader` of length 304 with parameters:
|
105 |
```
|
106 |
{'batch_size': 64, 'sampler': 'torch.utils.data.dataloader._InfiniteConstantSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
107 |
```
|
|
|
114 |
```
|
115 |
{
|
116 |
"epochs": 100,
|
117 |
+
"evaluation_steps": 152,
|
118 |
"evaluator": "sentence_transformers.evaluation.SequentialEvaluator.SequentialEvaluator",
|
119 |
"max_grad_norm": 1,
|
120 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
121 |
"optimizer_params": {
|
122 |
+
"lr": 2e-05
|
123 |
},
|
124 |
"scheduler": "WarmupLinear",
|
125 |
"steps_per_epoch": null,
|
126 |
+
"warmup_steps": 30400,
|
127 |
"weight_decay": 0.01
|
128 |
}
|
129 |
```
|
|
|
133 |
|
134 |
LinkTransformer(
|
135 |
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
136 |
+
(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})
|
137 |
)
|
138 |
```
|
139 |
|
140 |
## Citing & Authors
|
141 |
|
142 |
+
```
|
143 |
+
@misc{arora2023linktransformer,
|
144 |
+
title={LinkTransformer: A Unified Package for Record Linkage with Transformer Language Models},
|
145 |
+
author={Abhishek Arora and Melissa Dell},
|
146 |
+
year={2023},
|
147 |
+
eprint={2309.00789},
|
148 |
+
archivePrefix={arXiv},
|
149 |
+
primaryClass={cs.CL}
|
150 |
+
}
|
151 |
+
|
152 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "models/linkage_un_data_multi_fine_fine
|
3 |
"architectures": [
|
4 |
"XLMRobertaModel"
|
5 |
],
|
@@ -22,7 +22,7 @@
|
|
22 |
"pad_token_id": 1,
|
23 |
"position_embedding_type": "absolute",
|
24 |
"torch_dtype": "float32",
|
25 |
-
"transformers_version": "4.
|
26 |
"type_vocab_size": 1,
|
27 |
"use_cache": true,
|
28 |
"vocab_size": 250002
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "models/linkage_un_data_multi_fine_fine",
|
3 |
"architectures": [
|
4 |
"XLMRobertaModel"
|
5 |
],
|
|
|
22 |
"pad_token_id": 1,
|
23 |
"position_embedding_type": "absolute",
|
24 |
"torch_dtype": "float32",
|
25 |
+
"transformers_version": "4.35.1",
|
26 |
"type_vocab_size": 1,
|
27 |
"use_cache": true,
|
28 |
"vocab_size": 250002
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b25adbe0cc1d3562f119227c502ec230a66b896affc1217e742ebf1827a123f8
|
3 |
+
size 1112197096
|
special_tokens_map.json
CHANGED
@@ -1,7 +1,25 @@
|
|
1 |
{
|
2 |
-
"bos_token":
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
"mask_token": {
|
6 |
"content": "<mask>",
|
7 |
"lstrip": true,
|
@@ -9,7 +27,25 @@
|
|
9 |
"rstrip": false,
|
10 |
"single_word": false
|
11 |
},
|
12 |
-
"pad_token":
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
|
|
1 |
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
"mask_token": {
|
24 |
"content": "<mask>",
|
25 |
"lstrip": true,
|
|
|
27 |
"rstrip": false,
|
28 |
"single_word": false
|
29 |
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
}
|
tokenizer.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c835b069d7b8cd02b400e6247b83bc1840ab12bb1628d5b2e03c8d728de75558
|
3 |
+
size 17082941
|
tokenizer_config.json
CHANGED
@@ -1,19 +1,61 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"bos_token": "<s>",
|
3 |
"clean_up_tokenization_spaces": true,
|
4 |
"cls_token": "<s>",
|
5 |
"eos_token": "</s>",
|
6 |
-
"mask_token":
|
7 |
-
|
8 |
-
"content": "<mask>",
|
9 |
-
"lstrip": true,
|
10 |
-
"normalized": true,
|
11 |
-
"rstrip": false,
|
12 |
-
"single_word": false
|
13 |
-
},
|
14 |
"model_max_length": 512,
|
|
|
15 |
"pad_token": "<pad>",
|
|
|
|
|
16 |
"sep_token": "</s>",
|
|
|
17 |
"tokenizer_class": "XLMRobertaTokenizer",
|
|
|
|
|
18 |
"unk_token": "<unk>"
|
19 |
}
|
|
|
1 |
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
"bos_token": "<s>",
|
45 |
"clean_up_tokenization_spaces": true,
|
46 |
"cls_token": "<s>",
|
47 |
"eos_token": "</s>",
|
48 |
+
"mask_token": "<mask>",
|
49 |
+
"max_length": 128,
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
"model_max_length": 512,
|
51 |
+
"pad_to_multiple_of": null,
|
52 |
"pad_token": "<pad>",
|
53 |
+
"pad_token_type_id": 0,
|
54 |
+
"padding_side": "right",
|
55 |
"sep_token": "</s>",
|
56 |
+
"stride": 0,
|
57 |
"tokenizer_class": "XLMRobertaTokenizer",
|
58 |
+
"truncation_side": "right",
|
59 |
+
"truncation_strategy": "longest_first",
|
60 |
"unk_token": "<unk>"
|
61 |
}
|