tomaarsen HF staff commited on
Commit
c09546f
1 Parent(s): c82f995

Add new SentenceTransformer model.

Browse files
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ - ar
5
+ - bg
6
+ - ca
7
+ - cs
8
+ - da
9
+ - de
10
+ - el
11
+ - en
12
+ - es
13
+ - et
14
+ - fa
15
+ - fi
16
+ - fr
17
+ - gl
18
+ - gu
19
+ - he
20
+ - hi
21
+ - hr
22
+ - hu
23
+ - hy
24
+ - id
25
+ - it
26
+ - ja
27
+ - ka
28
+ - ko
29
+ - ku
30
+ - lt
31
+ - lv
32
+ - mk
33
+ - mn
34
+ - mr
35
+ - ms
36
+ - my
37
+ - nb
38
+ - nl
39
+ - pl
40
+ - pt
41
+ - ro
42
+ - ru
43
+ - sk
44
+ - sl
45
+ - sq
46
+ - sr
47
+ - sv
48
+ - th
49
+ - tr
50
+ - uk
51
+ - ur
52
+ - vi
53
+ language_bcp47:
54
+ - fr-ca
55
+ - pt-br
56
+ - zh-cn
57
+ - zh-tw
58
+ pipeline_tag: sentence-similarity
59
+ license: apache-2.0
60
+ tags:
61
+ - sentence-transformers
62
+ - feature-extraction
63
+ - sentence-similarity
64
+ - transformers
65
+ ---
66
+
67
+ # sentence-transformers/distiluse-base-multilingual-cased-v2
68
+
69
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 512 dimensional dense vector space and can be used for tasks like clustering or semantic search.
70
+
71
+
72
+
73
+ ## Usage (Sentence-Transformers)
74
+
75
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
76
+
77
+ ```
78
+ pip install -U sentence-transformers
79
+ ```
80
+
81
+ Then you can use the model like this:
82
+
83
+ ```python
84
+ from sentence_transformers import SentenceTransformer
85
+ sentences = ["This is an example sentence", "Each sentence is converted"]
86
+
87
+ model = SentenceTransformer('sentence-transformers/distiluse-base-multilingual-cased-v2')
88
+ embeddings = model.encode(sentences)
89
+ print(embeddings)
90
+ ```
91
+
92
+
93
+
94
+ ## Evaluation Results
95
+
96
+
97
+
98
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/distiluse-base-multilingual-cased-v2)
99
+
100
+
101
+
102
+ ## Full Model Architecture
103
+ ```
104
+ SentenceTransformer(
105
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: DistilBertModel
106
+ (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})
107
+ (2): Dense({'in_features': 768, 'out_features': 512, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
108
+ )
109
+ ```
110
+
111
+ ## Citing & Authors
112
+
113
+ This model was trained by [sentence-transformers](https://www.sbert.net/).
114
+
115
+ If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084):
116
+ ```bibtex
117
+ @inproceedings{reimers-2019-sentence-bert,
118
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
119
+ author = "Reimers, Nils and Gurevych, Iryna",
120
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
121
+ month = "11",
122
+ year = "2019",
123
+ publisher = "Association for Computational Linguistics",
124
+ url = "http://arxiv.org/abs/1908.10084",
125
+ }
126
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/distiluse-base-multilingual-cased-v2",
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
+ "output_hidden_states": true,
17
+ "output_past": true,
18
+ "pad_token_id": 0,
19
+ "qa_dropout": 0.1,
20
+ "seq_classif_dropout": 0.2,
21
+ "sinusoidal_pos_embds": false,
22
+ "tie_weights_": true,
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.36.2",
25
+ "vocab_size": 119547
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "pytorch": "2.1.0+cu121",
4
+ "sentence_transformers": "2.2.2",
5
+ "transformers": "4.36.2"
6
+ },
7
+ "model_type": "sentence-transformer",
8
+ "modules": [
9
+ {
10
+ "config": {
11
+ "do_lower_case": false,
12
+ "max_seq_length": 128
13
+ },
14
+ "type": "sentence_transformers.models.Transformer"
15
+ },
16
+ {
17
+ "config": {
18
+ "pooling_mode_cls_token": false,
19
+ "pooling_mode_lasttoken": false,
20
+ "pooling_mode_max_tokens": false,
21
+ "pooling_mode_mean_sqrt_len_tokens": false,
22
+ "pooling_mode_mean_tokens": true,
23
+ "pooling_mode_weightedmean_tokens": false,
24
+ "word_embedding_dimension": 768
25
+ },
26
+ "type": "sentence_transformers.models.Pooling"
27
+ },
28
+ {
29
+ "config": {
30
+ "activation_function": "torch.nn.modules.activation.Tanh",
31
+ "bias": true,
32
+ "in_features": 768,
33
+ "out_features": 512
34
+ },
35
+ "type": "sentence_transformers.models.Dense"
36
+ }
37
+ ],
38
+ "transformers_version": "4.36.2"
39
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96024cb82b7f9abb9761d59b775a3eddc637a2867aa9028334d125934cfc3fc0
3
+ size 540522520
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
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
+ "full_tokenizer_file": null,
49
+ "mask_token": "[MASK]",
50
+ "max_len": 512,
51
+ "model_max_length": 512,
52
+ "never_split": null,
53
+ "pad_token": "[PAD]",
54
+ "sep_token": "[SEP]",
55
+ "strip_accents": null,
56
+ "tokenize_chinese_chars": true,
57
+ "tokenizer_class": "DistilBertTokenizer",
58
+ "unk_token": "[UNK]"
59
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff