computermacgyver commited on
Commit
20d8b8d
1 Parent(s): 4fe8fd1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -7
README.md CHANGED
@@ -7,11 +7,13 @@ tags:
7
  - transformers
8
  ---
9
 
10
- # {MODEL_NAME}
11
 
12
  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.
13
 
14
- <!--- Describe your model here -->
 
 
15
 
16
  ## Usage (Sentence-Transformers)
17
 
@@ -25,11 +27,15 @@ 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
 
@@ -74,7 +80,8 @@ print(sentence_embeddings)
74
 
75
  ## Evaluation Results
76
 
77
- <!--- Describe how your model was evaluated -->
 
78
 
79
  For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
80
 
@@ -96,7 +103,7 @@ The model was trained with the parameters:
96
  Parameters of the fit()-Method:
97
  ```
98
  {
99
- "epochs": 5,
100
  "evaluation_steps": 0,
101
  "evaluator": "NoneType",
102
  "max_grad_norm": 1,
 
7
  - transformers
8
  ---
9
 
10
+ # paraphrase-filipino-mpnet-base-v2
11
 
12
  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.
13
 
14
+ This model was trained using the student--teacher approach outlined in [Reimers and Gurevych (2020)](https://aclanthology.org/2020.emnlp-main.365/).
15
+
16
+ The teacher model was [sentence-transformers/paraphrase-mpnet-base-v2](), and the student model was [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](), which is based on XLM-R. We trained the model for 2 epoch using a batch size of 64 on parallel data English--Tagalog and English--Filipino data from OPUS. We found the data to be of variable quality and filtered it to only include sentence pairs that the Compact Language Detection kit (CLDv3) identified reliably as being in Tagalog or Filipino. Other parameters were left unchanged from the example [make_multilingual_sys.py](https://github.com/UKPLab/sentence-transformers/blob/master/examples/training/multilingual/make_multilingual_sys.py) code in the sentence-transformers code base.
17
 
18
  ## Usage (Sentence-Transformers)
19
 
 
27
 
28
  ```python
29
  from sentence_transformers import SentenceTransformer
30
+ from scipy.spatial import distance
31
+ import itertools
32
+
33
+ model = SentenceTransformer('meedan/paraphrase-filipino-mpnet-base-v2')
34
 
35
+ sentences = ["saan pong mga lugar available ang pfizer vaccine? Thank you!","Ask ko lang po saan meron available na vaccine","Where is the vaccine available?"]
36
  embeddings = model.encode(sentences)
37
+ dist=[distance.cosine(i,j) for i,j in itertools.combinations(embeddings,2)]
38
+ print(dist)
39
  ```
40
 
41
 
 
80
 
81
  ## Evaluation Results
82
 
83
+ We machine translated the STS data from [SentEval](https://github.com/facebookresearch/SentEval) to Filipino using the Google Translation API and used this for evaluation alongside the original English-language STS data. We used Spearman's rank correlation coefficient. We found roughly the same performance as the original base model (sentence-transformers/paraphrase-multilingual-mpnet-base-v2) on English while substantial gains were made for Filipino. For English, the average correlation is 0.80. For Filipino, it is 0.75.
84
+
85
 
86
  For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
87
 
 
103
  Parameters of the fit()-Method:
104
  ```
105
  {
106
+ "epochs": 2,
107
  "evaluation_steps": 0,
108
  "evaluator": "NoneType",
109
  "max_grad_norm": 1,