eduagarcia commited on
Commit
4f4a841
1 Parent(s): f702cb2

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ 0_WordEmbeddings/whitespacetokenizer_config.json filter=lfs diff=lfs merge=lfs -text
0_WordEmbeddings/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e374699269a619269aadd287baceb9e937a1d109923cb740017dd5b8d42dc105
3
+ size 2231058106
0_WordEmbeddings/whitespacetokenizer_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cf753ca34bc72e962a104b4c08f5929586c71f567455ce81425443d4a53f9d7
3
+ size 12971116
0_WordEmbeddings/wordembedding_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "sentence_transformers.models.tokenizer.WhitespaceTokenizer.WhitespaceTokenizer",
3
+ "update_embeddings": false,
4
+ "max_seq_length": 1000000
5
+ }
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 600,
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
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+ language:
9
+ - pt
10
+ ---
11
+
12
+ # mteb-pt/average_pt_nilc_word2vec_skip_s600
13
+
14
+ This is an adaptation of pre-trained Portuguese Word2Vec Word Embeddings to a [sentence-transformers](https://www.SBERT.net) model.
15
+
16
+ The original pre-trained word embeddings can be found at: [http://nilc.icmc.usp.br/nilc/index.php/repositorio-de-word-embeddings-do-nilc](http://nilc.icmc.usp.br/nilc/index.php/repositorio-de-word-embeddings-do-nilc).
17
+
18
+ This model maps sentences & paragraphs to a 600 dimensional dense vector space and can be used for tasks like clustering or semantic search.
19
+
20
+ ## Usage (Sentence-Transformers)
21
+
22
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
23
+
24
+ ```
25
+ pip install -U sentence-transformers
26
+ ```
27
+
28
+ Then you can use the model like this:
29
+
30
+ ```python
31
+ from sentence_transformers import SentenceTransformer
32
+ sentences = ["This is an example sentence", "Each sentence is converted"]
33
+
34
+ model = SentenceTransformer('mteb-pt/average_pt_nilc_word2vec_skip_s600')
35
+ embeddings = model.encode(sentences)
36
+ print(embeddings)
37
+ ```
38
+
39
+ ## Evaluation Results
40
+
41
+ For an automated evaluation of this model, see the *Portuguese MTEB Leaderboard*: [mteb-pt/leaderboard](https://huggingface.co/spaces/mteb-pt/leaderboard)
42
+
43
+ ## Full Model Architecture
44
+ ```
45
+ SentenceTransformer(
46
+ (0): WordEmbeddings(
47
+ (emb_layer): Embedding(929607, 600)
48
+ )
49
+ (1): Pooling({'word_embedding_dimension': 600, '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, 'include_prompt': True})
50
+ )
51
+ ```
52
+
53
+ ## Citing & Authors
54
+
55
+ ```bibtex
56
+ @inproceedings{hartmann2017portuguese,
57
+ title = {Portuguese Word Embeddings: Evaluating on Word Analogies and Natural Language Tasks},
58
+ author = {Hartmann, Nathan S and
59
+ Fonseca, Erick R and
60
+ Shulby, Christopher D and
61
+ Treviso, Marcos V and
62
+ Rodrigues, J{'{e}}ssica S and
63
+ Alu{'{\i}}sio, Sandra Maria},
64
+ year = {2017},
65
+ publisher = {SBC},
66
+ booktitle = {Brazilian Symposium in Information and Human Language Technology - STIL},
67
+ url = {https://sol.sbc.org.br/index.php/stil/article/view/4008}
68
+ }
69
+ ```
config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.6.1",
4
+ "transformers": "4.39.0.dev0",
5
+ "pytorch": "2.2.2"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "0_WordEmbeddings",
6
+ "type": "sentence_transformers.models.WordEmbeddings"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]