Upload folder using huggingface_hub
Browse files- .ipynb_checkpoints/config-checkpoint.json +26 -0
- .ipynb_checkpoints/config_sentence_transformers-checkpoint.json +7 -0
- .ipynb_checkpoints/tokenizer-checkpoint.json +0 -0
- 1_Pooling/.ipynb_checkpoints/config-checkpoint.json +7 -0
- 1_Pooling/config.json +7 -0
- 2_Dense/config.json +1 -0
- 2_Dense/pytorch_model.bin +3 -0
- README.md +91 -0
- config.json +26 -0
- config_sentence_transformers.json +7 -0
- eval/.ipynb_checkpoints/similarity_evaluation_results-checkpoint.csv +2 -0
- eval/similarity_evaluation_results.csv +26 -0
- modules.json +20 -0
- pytorch_model.bin +3 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
- vocab.txt +0 -0
.ipynb_checkpoints/config-checkpoint.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "jjzha/jobbert-base-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.28.1",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 28996
|
26 |
+
}
|
.ipynb_checkpoints/config_sentence_transformers-checkpoint.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.2.2",
|
4 |
+
"transformers": "4.28.1",
|
5 |
+
"pytorch": "1.13.1"
|
6 |
+
}
|
7 |
+
}
|
.ipynb_checkpoints/tokenizer-checkpoint.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
1_Pooling/.ipynb_checkpoints/config-checkpoint.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
2_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 384, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
|
2_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ddedaff841cfba85d96fe8c77c9453b6b52f45eef8bdb257f2229a381f05099e
|
3 |
+
size 1182399
|
README.md
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: sentence-similarity
|
3 |
+
tags:
|
4 |
+
- sentence-transformers
|
5 |
+
- feature-extraction
|
6 |
+
- sentence-similarity
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
# {MODEL_NAME}
|
11 |
+
|
12 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 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 |
+
## Evaluation Results
|
38 |
+
|
39 |
+
<!--- Describe how your model was evaluated -->
|
40 |
+
|
41 |
+
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
|
42 |
+
|
43 |
+
|
44 |
+
## Training
|
45 |
+
The model was trained with the parameters:
|
46 |
+
|
47 |
+
**DataLoader**:
|
48 |
+
|
49 |
+
`torch.utils.data.dataloader.DataLoader` of length 13952 with parameters:
|
50 |
+
```
|
51 |
+
{'batch_size': 14, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
52 |
+
```
|
53 |
+
|
54 |
+
**Loss**:
|
55 |
+
|
56 |
+
`sentence_transformers.losses.ContrastiveLoss.ContrastiveLoss` with parameters:
|
57 |
+
```
|
58 |
+
{'distance_metric': 'SiameseDistanceMetric.COSINE_DISTANCE', 'margin': 0.5, 'size_average': True}
|
59 |
+
```
|
60 |
+
|
61 |
+
Parameters of the fit()-Method:
|
62 |
+
```
|
63 |
+
{
|
64 |
+
"epochs": 10,
|
65 |
+
"evaluation_steps": 2000,
|
66 |
+
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
67 |
+
"max_grad_norm": 1,
|
68 |
+
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
69 |
+
"optimizer_params": {
|
70 |
+
"lr": 2e-05
|
71 |
+
},
|
72 |
+
"scheduler": "WarmupLinear",
|
73 |
+
"steps_per_epoch": null,
|
74 |
+
"warmup_steps": 10000,
|
75 |
+
"weight_decay": 0.01
|
76 |
+
}
|
77 |
+
```
|
78 |
+
|
79 |
+
|
80 |
+
## Full Model Architecture
|
81 |
+
```
|
82 |
+
SentenceTransformer(
|
83 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
84 |
+
(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})
|
85 |
+
(2): Dense({'in_features': 768, 'out_features': 384, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
|
86 |
+
)
|
87 |
+
```
|
88 |
+
|
89 |
+
## Citing & Authors
|
90 |
+
|
91 |
+
<!--- Describe where people can find more information -->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "jjzha/jobbert-base-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.28.1",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 28996
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.2.2",
|
4 |
+
"transformers": "4.28.1",
|
5 |
+
"pytorch": "1.13.1"
|
6 |
+
}
|
7 |
+
}
|
eval/.ipynb_checkpoints/similarity_evaluation_results-checkpoint.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 |
+
0,2000,0.9620967570857263,0.8656843900989896,0.9576860826125646,0.8655457297383932,0.956790631706535,0.8655465200901662,0.9443489366012364,0.8646869422200442
|
eval/similarity_evaluation_results.csv
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman
|
2 |
+
0,2000,0.9620967570857263,0.8656843900989896,0.9576860826125646,0.8655457297383932,0.956790631706535,0.8655465200901662,0.9443489366012364,0.8646869422200442
|
3 |
+
0,4000,0.9757625739396699,0.8659520987313962,0.9721630045633578,0.8658829196050186,0.9718497713198054,0.8658844421951383,0.9477962904266586,0.8653547318060353
|
4 |
+
0,6000,0.9763679739999793,0.8659845496846734,0.9771342988517222,0.8658887775087574,0.9769248345200108,0.865898796389763,0.958424355075297,0.8657110760940272
|
5 |
+
0,8000,0.968420698159747,0.8659819694384423,0.9814136282279418,0.8659398249712291,0.9812167123117663,0.8659458455977739,0.9570578065403882,0.8656307042408063
|
6 |
+
0,10000,0.9588003738341574,0.8658677751883797,0.9776970484979342,0.8658010019106682,0.9767258142086378,0.8657948534362276,0.9543490568677792,0.865516556445657
|
7 |
+
0,12000,0.9736717020053842,0.8660080975507602,0.9754315366463718,0.8659926972141372,0.9757216334053973,0.8659936502867528,0.955879337650436,0.8658051047712958
|
8 |
+
0,-1,0.9672764702295693,0.8659194619653063,0.9795469480098705,0.8658939961594514,0.9795998615935617,0.8659042358706204,0.9625427410425603,0.8656422863891527
|
9 |
+
1,2000,0.9728529400967733,0.8659272375962298,0.9798027368504951,0.8659100124145628,0.9800596835186687,0.8659131738248675,0.9725344221339278,0.8657798716151341
|
10 |
+
1,4000,0.964557775339131,0.8658773176121489,0.9803417136427685,0.8659184040957124,0.9802017563832188,0.8659129878587261,0.9660521200901877,0.8656914800101909
|
11 |
+
1,6000,0.9710684204058313,0.8659298295839918,0.9827374551159173,0.8658937520763136,0.9825219290879302,0.8658880685157098,0.9675807947609758,0.8657373320656621
|
12 |
+
1,8000,0.9719213708807937,0.8659649073114143,0.9808081920937366,0.8659060606530202,0.9812651909588999,0.8659289343795465,0.9708419695022548,0.8658963439778603
|
13 |
+
1,10000,0.9551920879253551,0.8658861742951324,0.9825550098556257,0.865970857921808,0.9819672911005527,0.865972996521101,0.9605386895381901,0.8657300678047237
|
14 |
+
1,12000,0.965337360816363,0.8659492165404664,0.9821582007163127,0.8659534120552745,0.982167153300361,0.8659604089984845,0.969349835794043,0.8658010716594159
|
15 |
+
1,-1,0.9599416843632763,0.8660102595451264,0.9838700375616571,0.8660050522803713,0.9826244974705571,0.8660071095198678,0.9626400582295737,0.8658476210810014
|
16 |
+
2,2000,0.9709350537370208,0.8660000082587895,0.9830407528599024,0.8659735544161342,0.9832758489444736,0.8659846309700315,0.9741815746301953,0.8659622570393926
|
17 |
+
2,4000,0.9675477468116134,0.8659942201221856,0.98432340510277,0.8659730546350629,0.9838875714591936,0.8659810860092565,0.9701339007783303,0.8657348099139346
|
18 |
+
2,6000,0.9631428719182976,0.8660086556808969,0.9875279673334031,0.8659980204701055,0.9865944839729344,0.8660032042517799,0.9680592896500297,0.8659187063028077
|
19 |
+
2,8000,0.9739747492233086,0.8659923025529875,0.9870653841488919,0.8659751699881644,0.9872624004765722,0.8659844333828469,0.9771609807402465,0.8659248547817104
|
20 |
+
2,10000,0.9595340015128075,0.8659705444524671,0.9875605215862908,0.8659413010671804,0.9854495726257982,0.8659595256630158,0.9646104920890192,0.8659126508090284
|
21 |
+
2,12000,0.9633881401474407,0.86597327593827,0.9878431429577965,0.8659503087598241,0.9866889490532749,0.8659611993522207,0.96660842615623,0.86584712130582
|
22 |
+
2,-1,0.9602841062819389,0.8659641171142265,0.9881791764986009,0.8659451366013348,0.9862481675030815,0.8659439162043878,0.9647330050743066,0.865919031743243
|
23 |
+
3,2000,0.9738982495029145,0.8659624783829359,0.9886064323272725,0.8659614782972382,0.9882203215756932,0.8659721364312888,0.973056077003133,0.8658396013428434
|
24 |
+
3,4000,0.9654259192987112,0.8659162197687099,0.9900150095651109,0.865936175401967,0.9879696217075965,0.8659326188156862,0.9672384492630365,0.8657297423732115
|
25 |
+
3,6000,0.9461672497001872,0.8659386167511743,0.9883663539601071,0.8659953472185793,0.9834505717261531,0.8659870601425252,0.9508572601391017,0.8656473365141927
|
26 |
+
3,8000,0.9629828726832148,0.8659027951936242,0.9895712303419852,0.8659947777037529,0.9870734707895225,0.8659820971949412,0.9680127613348622,0.8658359866381388
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
]
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:857be2eac1d708b6816dd12b24770432538d3b80fbe801b723c526ad2e8759bc
|
3 |
+
size 433312301
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": true
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": 1000000000000000019884624838656,
|
8 |
+
"never_split": null,
|
9 |
+
"pad_token": "[PAD]",
|
10 |
+
"sep_token": "[SEP]",
|
11 |
+
"strip_accents": null,
|
12 |
+
"tokenize_chinese_chars": true,
|
13 |
+
"tokenizer_class": "BertTokenizer",
|
14 |
+
"unk_token": "[UNK]"
|
15 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|