96abhishekarora
commited on
Commit
•
5196430
1
Parent(s):
b33b65a
Add new LinkTransformer model.
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +3 -1
- LT_training_config.json +6 -3
- README.md +18 -8
- config.json +2 -2
- model.safetensors +3 -0
- special_tokens_map.json +35 -5
- tokenizer_config.json +49 -0
.gitattributes
CHANGED
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
37 |
.git/lfs/objects/90/bd/90bdce77eae35f764bb3a93efd2fefe20ecc09f5df9a10d2233a4f5389e3370c filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
37 |
.git/lfs/objects/90/bd/90bdce77eae35f764bb3a93efd2fefe20ecc09f5df9a10d2233a4f5389e3370c filter=lfs diff=lfs merge=lfs -text
|
38 |
+
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
39 |
+
.git/lfs/objects/88/5c/885c5c02114e5648a4ede851d2f307c0f52e2e9e4c6a5dc258f805a8853be456 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
@@ -4,9 +4,10 @@
|
|
4 |
"opt_model_description": null,
|
5 |
"opt_model_lang": null,
|
6 |
"train_batch_size": 64,
|
7 |
-
"num_epochs":
|
8 |
"warm_up_perc": 1,
|
9 |
-
"learning_rate": 2e-
|
|
|
10 |
"val_perc": 0.2,
|
11 |
"wandb_names": {
|
12 |
"id": "econabhishek",
|
@@ -16,9 +17,11 @@
|
|
16 |
},
|
17 |
"add_pooling_layer": false,
|
18 |
"large_val": true,
|
19 |
-
"eval_steps_perc": 0.
|
20 |
"test_at_end": true,
|
21 |
"save_val_test_pickles": true,
|
|
|
|
|
22 |
"eval_type": "retrieval",
|
23 |
"training_dataset": "dataframe",
|
24 |
"base_model_path": "hiiamsid/sentence_similarity_spanish_es",
|
|
|
4 |
"opt_model_description": null,
|
5 |
"opt_model_lang": null,
|
6 |
"train_batch_size": 64,
|
7 |
+
"num_epochs": 200,
|
8 |
"warm_up_perc": 1,
|
9 |
+
"learning_rate": 2e-05,
|
10 |
+
"loss_type": "supcon",
|
11 |
"val_perc": 0.2,
|
12 |
"wandb_names": {
|
13 |
"id": "econabhishek",
|
|
|
17 |
},
|
18 |
"add_pooling_layer": false,
|
19 |
"large_val": true,
|
20 |
+
"eval_steps_perc": 0.5,
|
21 |
"test_at_end": true,
|
22 |
"save_val_test_pickles": true,
|
23 |
+
"val_query_prop": 0.5,
|
24 |
+
"loss_params": {},
|
25 |
"eval_type": "retrieval",
|
26 |
"training_dataset": "dataframe",
|
27 |
"base_model_path": "hiiamsid/sentence_similarity_spanish_es",
|
README.md
CHANGED
@@ -11,7 +11,7 @@ tags:
|
|
11 |
|
12 |
# dell-research-harvard/lt-mexicantrade4748
|
13 |
|
14 |
-
This is a [LinkTransformer](https://github.
|
15 |
It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more.
|
16 |
Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well.
|
17 |
It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
@@ -94,7 +94,7 @@ The model was trained with the parameters:
|
|
94 |
|
95 |
**DataLoader**:
|
96 |
|
97 |
-
`torch.utils.data.dataloader.DataLoader` of length
|
98 |
```
|
99 |
{'batch_size': 64, 'sampler': 'torch.utils.data.dataloader._InfiniteConstantSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
100 |
```
|
@@ -106,17 +106,17 @@ The model was trained with the parameters:
|
|
106 |
Parameters of the fit()-Method:
|
107 |
```
|
108 |
{
|
109 |
-
"epochs":
|
110 |
-
"evaluation_steps":
|
111 |
"evaluator": "sentence_transformers.evaluation.SequentialEvaluator.SequentialEvaluator",
|
112 |
"max_grad_norm": 1,
|
113 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
114 |
"optimizer_params": {
|
115 |
-
"lr": 2e-
|
116 |
},
|
117 |
"scheduler": "WarmupLinear",
|
118 |
"steps_per_epoch": null,
|
119 |
-
"warmup_steps":
|
120 |
"weight_decay": 0.01
|
121 |
}
|
122 |
```
|
@@ -126,10 +126,20 @@ Parameters of the fit()-Method:
|
|
126 |
|
127 |
LinkTransformer(
|
128 |
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
129 |
-
(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})
|
130 |
)
|
131 |
```
|
132 |
|
133 |
## Citing & Authors
|
134 |
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
# dell-research-harvard/lt-mexicantrade4748
|
13 |
|
14 |
+
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.
|
15 |
It is designed for quick and easy record linkage (entity-matching) through the LinkTransformer package. The tasks include clustering, deduplication, linking, aggregation and more.
|
16 |
Notwithstanding that, it can be used for any sentence similarity task within the sentence-transformers framework as well.
|
17 |
It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
|
|
94 |
|
95 |
**DataLoader**:
|
96 |
|
97 |
+
`torch.utils.data.dataloader.DataLoader` of length 67 with parameters:
|
98 |
```
|
99 |
{'batch_size': 64, 'sampler': 'torch.utils.data.dataloader._InfiniteConstantSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
100 |
```
|
|
|
106 |
Parameters of the fit()-Method:
|
107 |
```
|
108 |
{
|
109 |
+
"epochs": 200,
|
110 |
+
"evaluation_steps": 34,
|
111 |
"evaluator": "sentence_transformers.evaluation.SequentialEvaluator.SequentialEvaluator",
|
112 |
"max_grad_norm": 1,
|
113 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
114 |
"optimizer_params": {
|
115 |
+
"lr": 2e-05
|
116 |
},
|
117 |
"scheduler": "WarmupLinear",
|
118 |
"steps_per_epoch": null,
|
119 |
+
"warmup_steps": 13400,
|
120 |
"weight_decay": 0.01
|
121 |
}
|
122 |
```
|
|
|
126 |
|
127 |
LinkTransformer(
|
128 |
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
129 |
+
(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})
|
130 |
)
|
131 |
```
|
132 |
|
133 |
## Citing & Authors
|
134 |
|
135 |
+
```
|
136 |
+
@misc{arora2023linktransformer,
|
137 |
+
title={LinkTransformer: A Unified Package for Record Linkage with Transformer Language Models},
|
138 |
+
author={Abhishek Arora and Melissa Dell},
|
139 |
+
year={2023},
|
140 |
+
eprint={2309.00789},
|
141 |
+
archivePrefix={arXiv},
|
142 |
+
primaryClass={cs.CL}
|
143 |
+
}
|
144 |
+
|
145 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "models/lt-mexicantrade4748
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
@@ -20,7 +20,7 @@
|
|
20 |
"pad_token_id": 1,
|
21 |
"position_embedding_type": "absolute",
|
22 |
"torch_dtype": "float32",
|
23 |
-
"transformers_version": "4.
|
24 |
"type_vocab_size": 2,
|
25 |
"use_cache": true,
|
26 |
"vocab_size": 31002
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "models/lt-mexicantrade4748",
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
|
|
20 |
"pad_token_id": 1,
|
21 |
"position_embedding_type": "absolute",
|
22 |
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.35.1",
|
24 |
"type_vocab_size": 2,
|
25 |
"use_cache": true,
|
26 |
"vocab_size": 31002
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7cf1e594ab2c0cdcfb5f197b181310a0ae3f6056d21c80ab97768f5c14819f64
|
3 |
+
size 439425888
|
special_tokens_map.json
CHANGED
@@ -1,7 +1,37 @@
|
|
1 |
{
|
2 |
-
"cls_token":
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
|
|
1 |
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
}
|
tokenizer_config.json
CHANGED
@@ -1,15 +1,64 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"clean_up_tokenization_spaces": true,
|
3 |
"cls_token": "[CLS]",
|
4 |
"do_basic_tokenize": true,
|
5 |
"do_lower_case": false,
|
6 |
"mask_token": "[MASK]",
|
|
|
7 |
"model_max_length": 512,
|
8 |
"never_split": null,
|
|
|
9 |
"pad_token": "[PAD]",
|
|
|
|
|
10 |
"sep_token": "[SEP]",
|
|
|
11 |
"strip_accents": false,
|
12 |
"tokenize_chinese_chars": true,
|
13 |
"tokenizer_class": "BertTokenizer",
|
|
|
|
|
14 |
"unk_token": "[UNK]"
|
15 |
}
|
|
|
1 |
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[MASK]",
|
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 |
+
"3": {
|
20 |
+
"content": "[UNK]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"4": {
|
28 |
+
"content": "[CLS]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"5": {
|
36 |
+
"content": "[SEP]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
"clean_up_tokenization_spaces": true,
|
45 |
"cls_token": "[CLS]",
|
46 |
"do_basic_tokenize": true,
|
47 |
"do_lower_case": false,
|
48 |
"mask_token": "[MASK]",
|
49 |
+
"max_length": 512,
|
50 |
"model_max_length": 512,
|
51 |
"never_split": null,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
"sep_token": "[SEP]",
|
57 |
+
"stride": 0,
|
58 |
"strip_accents": false,
|
59 |
"tokenize_chinese_chars": true,
|
60 |
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
"unk_token": "[UNK]"
|
64 |
}
|