Added Model
Browse files- .gitattributes +1 -0
- 0_Transformer/config.json +3 -0
- 0_Transformer/model.safetensors +3 -0
- 0_Transformer/sentence_bert_config.json +3 -0
- 0_Transformer/sentencepiece.bpe.model +3 -0
- 0_Transformer/special_tokens_map.json +3 -0
- 0_Transformer/tokenizer.json +3 -0
- 0_Transformer/tokenizer_config.json +3 -0
- 1_Pooling/config.json +3 -0
- 2_Dense/config.json +3 -0
- 2_Dense/pytorch_model.bin +3 -0
- README.md +88 -1
- config_sentence_transformers.json +3 -0
- eval/similarity_evaluation_results.csv +21 -0
- modules.json +3 -0
.gitattributes
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
|
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
|
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.json filter=lfs diff=lfs merge=lfs -text
|
11 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
12 |
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
13 |
*.model filter=lfs diff=lfs merge=lfs -text
|
0_Transformer/config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8cd85c5c6a3aff541b3da7bf756c637e16d23a9fcd62b6742869c8d7296e56c9
|
3 |
+
size 681
|
0_Transformer/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd6bbee9b17e2567c14c55b4fd16b0f7cd7a9510e08811af94200f664551864d
|
3 |
+
size 470637416
|
0_Transformer/sentence_bert_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:70f4448f31320443fe3557cacea5abf2dcc4915dda8c80646bec9f3bb0aa5a1f
|
3 |
+
size 53
|
0_Transformer/sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
0_Transformer/special_tokens_map.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38d989b0fdad0fec0c67c14b1f3c8b68184022cf6d4adc5444526ced8653f738
|
3 |
+
size 965
|
0_Transformer/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1130d2072397032d0b72b52b2ce0638976c2e04d47795ed83348615f39215614
|
3 |
+
size 17083075
|
0_Transformer/tokenizer_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce30001b1b5e8e9cb010e74fdaff3025007f0330eb0fb7da81774f11efdd8845
|
3 |
+
size 1173
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4be450dde3b0273bb9787637cfbd28fe04a7ba6ab9d36ac48e92b11e350ffc23
|
3 |
+
size 190
|
2_Dense/config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b40525e95deabe93a0d6c78ab3db16a8beedd3e234e84cb2f3cf2c334ae71166
|
3 |
+
size 114
|
2_Dense/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eb6167bb9f177c90cfb03e9ff74aeffb1d1955d14eefb357b956152f2c2f112f
|
3 |
+
size 1184380
|
README.md
CHANGED
@@ -1,3 +1,90 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
pipeline_tag: sentence-similarity
|
3 |
+
tags:
|
4 |
+
- sentence-transformers
|
5 |
+
- feature-extraction
|
6 |
+
- sentence-similarity
|
7 |
+
language:
|
8 |
+
- id
|
9 |
---
|
10 |
+
|
11 |
+
# LazarusNLP/congen-indo-e5-small
|
12 |
+
|
13 |
+
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.
|
14 |
+
|
15 |
+
<!--- Describe your model here -->
|
16 |
+
|
17 |
+
## Usage (Sentence-Transformers)
|
18 |
+
|
19 |
+
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
20 |
+
|
21 |
+
```
|
22 |
+
pip install -U sentence-transformers
|
23 |
+
```
|
24 |
+
|
25 |
+
Then you can use the model like this:
|
26 |
+
|
27 |
+
```python
|
28 |
+
from sentence_transformers import SentenceTransformer
|
29 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
30 |
+
|
31 |
+
model = SentenceTransformer('LazarusNLP/congen-indo-e5-small')
|
32 |
+
embeddings = model.encode(sentences)
|
33 |
+
print(embeddings)
|
34 |
+
```
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
## Evaluation Results
|
39 |
+
|
40 |
+
<!--- Describe how your model was evaluated -->
|
41 |
+
|
42 |
+
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=LazarusNLP/congen-indo-e5-small)
|
43 |
+
|
44 |
+
|
45 |
+
## Training
|
46 |
+
The model was trained with the parameters:
|
47 |
+
|
48 |
+
**DataLoader**:
|
49 |
+
|
50 |
+
`torch.utils.data.dataloader.DataLoader` of length 6975 with parameters:
|
51 |
+
```
|
52 |
+
{'batch_size': 128, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
53 |
+
```
|
54 |
+
|
55 |
+
**Loss**:
|
56 |
+
|
57 |
+
`sentence_transformers_congen.losses.ConGenLoss.ConGenLoss`
|
58 |
+
|
59 |
+
Parameters of the fit()-Method:
|
60 |
+
```
|
61 |
+
{
|
62 |
+
"epochs": 20,
|
63 |
+
"evaluation_steps": 0,
|
64 |
+
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
65 |
+
"max_grad_norm": 1,
|
66 |
+
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
67 |
+
"optimizer_params": {
|
68 |
+
"eps": 1e-06,
|
69 |
+
"lr": 0.0001
|
70 |
+
},
|
71 |
+
"scheduler": "WarmupLinear",
|
72 |
+
"steps_per_epoch": null,
|
73 |
+
"warmup_steps": 13950,
|
74 |
+
"weight_decay": 0.01
|
75 |
+
}
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
## Full Model Architecture
|
80 |
+
```
|
81 |
+
SentenceTransformer(
|
82 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
83 |
+
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
|
84 |
+
(2): Dense({'in_features': 384, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
|
85 |
+
)
|
86 |
+
```
|
87 |
+
|
88 |
+
## Citing & Authors
|
89 |
+
|
90 |
+
<!--- Describe where people can find more information -->
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3ee26736863de2a32c6b31502fb3a803dbb83e1d840cc4a05810c1b8b7cf2966
|
3 |
+
size 123
|
eval/similarity_evaluation_results.csv
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman
|
2 |
+
0,-1,0.7782990322038762,0.7959292081159018,0.7955237954649104,0.7924941183857067,0.7954028617337183,0.7924451877445212,0.7505209588852524,0.7535406143324703
|
3 |
+
1,-1,0.8062425027842206,0.8236120702351424,0.8162364240867823,0.8144281308899664,0.8159871197323679,0.8139797606172047,0.7805419392040778,0.7861400585378797
|
4 |
+
2,-1,0.8162161318389998,0.8316083715251787,0.8233075805749702,0.8217797930787498,0.822887219605284,0.8211806004645956,0.7851947613280695,0.7899642622446192
|
5 |
+
3,-1,0.8207125670486619,0.8350624061092488,0.8274222183391784,0.8256214240350072,0.8266532125009348,0.8248106031503928,0.7874704531993474,0.7910864320581865
|
6 |
+
4,-1,0.8227419635901878,0.8361577236456401,0.8291705183353347,0.8274252154051989,0.8281088218122357,0.8264595936943051,0.7881124158566682,0.7914392951048465
|
7 |
+
5,-1,0.8254743004856155,0.8392292506855612,0.8330435175323097,0.8315449586668724,0.831647406494325,0.8300575162851921,0.7881458260376422,0.7907825564036388
|
8 |
+
6,-1,0.8271759835245409,0.839778559064868,0.833369090037312,0.8318145727453601,0.8319540744932381,0.8303907567452762,0.7877011044131356,0.7896370200259033
|
9 |
+
7,-1,0.8269336405888632,0.8402299793276943,0.8347932277095375,0.8330115522786784,0.833205607988386,0.8314436098374371,0.7871473973365445,0.788903647633674
|
10 |
+
8,-1,0.8294772163526041,0.841756738464443,0.836312657211519,0.8345699324352646,0.8347057587626422,0.8330391483845057,0.7885765707089056,0.7901667961922192
|
11 |
+
9,-1,0.8291978584680857,0.8416672401775838,0.836726988901199,0.8350359772640715,0.8350141460758219,0.8332624599376316,0.7870301262961215,0.7885703075459813
|
12 |
+
10,-1,0.8310115871800982,0.8433131648829288,0.8393033721372443,0.8375997745346611,0.8376195702149105,0.8358934512081151,0.7873905214481787,0.7880041690656955
|
13 |
+
11,-1,0.8325309944614392,0.8443270499747279,0.840330496273983,0.838714032332369,0.8386275650764187,0.8370390819489925,0.7889257143011777,0.7893664557822444
|
14 |
+
12,-1,0.8312895881901323,0.8429501948634819,0.8389971330662062,0.8375014915437929,0.837194979212459,0.8356448531594115,0.7888905385226591,0.7893388561190695
|
15 |
+
13,-1,0.8322927625552298,0.8443931799168949,0.8406312767234843,0.8392268077669537,0.8387764234023706,0.8373597263143474,0.7872096575607099,0.7873679935489918
|
16 |
+
14,-1,0.8325653522019192,0.8441159804235421,0.8408381770740186,0.8391653308531404,0.8388564249536297,0.8373059415770439,0.7875643536206228,0.7873664116973664
|
17 |
+
15,-1,0.8328909634216812,0.8444367422267063,0.8411280544882648,0.8399107351761544,0.839075138814515,0.8377635896024852,0.7857085507428183,0.7857027005848087
|
18 |
+
16,-1,0.8327721738669251,0.8443846567789162,0.8415889913764634,0.8403482587746384,0.8395178484204616,0.8382900864333152,0.7855284848402239,0.7851869829553202
|
19 |
+
17,-1,0.833095307459162,0.844720002222764,0.8417371711149423,0.8403627765789742,0.8396255926886131,0.838170187768091,0.7857124013325345,0.7856436827504856
|
20 |
+
18,-1,0.8327427842800366,0.8445170499763085,0.8418790077612337,0.8406005276445632,0.8397171038869046,0.8383162092284437,0.7846711056074946,0.7844753954673698
|
21 |
+
19,-1,0.8329117012165179,0.8445866658251775,0.841902892417138,0.8406626931709859,0.8397396350621168,0.8384307466797367,0.7844851847482883,0.7843512192250909
|
modules.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7456155a0010f205cc36af6cc730fccfc41bba7da66c15136eb868c060581f65
|
3 |
+
size 354
|