Update README.md
Browse files
README.md
CHANGED
@@ -26,7 +26,7 @@ metrics:
|
|
26 |
# rufimelo/Legal-SBERTimbau-sts-large-ma
|
27 |
|
28 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
29 |
-
rufimelo/Legal-SBERTimbau-sts-large-ma is based on Legal-BERTimbau-large which derives from [BERTimbau](https://huggingface.co/neuralmind/bert-large-portuguese-cased) alrge.
|
30 |
It is adapted to the Portuguese legal domain and trained for STS on portuguese datasets.
|
31 |
|
32 |
## Usage (Sentence-Transformers)
|
@@ -43,7 +43,7 @@ Then you can use the model like this:
|
|
43 |
from sentence_transformers import SentenceTransformer
|
44 |
sentences = ["Isto é um exemplo", "Isto é um outro exemplo"]
|
45 |
|
46 |
-
model = SentenceTransformer('rufimelo/Legal-SBERTimbau-sts-large-ma')
|
47 |
embeddings = model.encode(sentences)
|
48 |
print(embeddings)
|
49 |
```
|
@@ -69,8 +69,8 @@ def mean_pooling(model_output, attention_mask):
|
|
69 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
70 |
|
71 |
# Load model from HuggingFace Hub
|
72 |
-
tokenizer = AutoTokenizer.from_pretrained('rufimelo/Legal-SBERTimbau-sts-large-ma')
|
73 |
-
model = AutoModel.from_pretrained('rufimelo/Legal-SBERTimbau-sts-large-ma')
|
74 |
|
75 |
# Tokenize sentences
|
76 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
@@ -107,7 +107,7 @@ print(sentence_embeddings)
|
|
107 |
| paraphrase-multilingual-mpnet-base-v2 Fine-tuned with assin(s)| 0.77641|0.79831 |0.84575 |
|
108 |
## Training
|
109 |
|
110 |
-
rufimelo/Legal-SBERTimbau-sts-large-ma is based on Legal-BERTimbau-
|
111 |
|
112 |
Firstly, due to the lack of portuguese datasets, it was trained using multilingual knowledge distillation. For the Multilingual Knowledge Distillation process, the teacher model was 'sentence-transformers/stsb-roberta-large', the supposed supported language as English and the language to learn was portuguese.
|
113 |
|
|
|
26 |
# rufimelo/Legal-SBERTimbau-sts-large-ma
|
27 |
|
28 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
29 |
+
rufimelo/Legal-SBERTimbau-sts-large-ma-v3 is based on Legal-BERTimbau-large which derives from [BERTimbau](https://huggingface.co/neuralmind/bert-large-portuguese-cased) alrge.
|
30 |
It is adapted to the Portuguese legal domain and trained for STS on portuguese datasets.
|
31 |
|
32 |
## Usage (Sentence-Transformers)
|
|
|
43 |
from sentence_transformers import SentenceTransformer
|
44 |
sentences = ["Isto é um exemplo", "Isto é um outro exemplo"]
|
45 |
|
46 |
+
model = SentenceTransformer('rufimelo/Legal-SBERTimbau-sts-large-ma-v3')
|
47 |
embeddings = model.encode(sentences)
|
48 |
print(embeddings)
|
49 |
```
|
|
|
69 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
70 |
|
71 |
# Load model from HuggingFace Hub
|
72 |
+
tokenizer = AutoTokenizer.from_pretrained('rufimelo/Legal-SBERTimbau-sts-large-ma-v3')
|
73 |
+
model = AutoModel.from_pretrained('rufimelo/Legal-SBERTimbau-sts-large-ma-v3')
|
74 |
|
75 |
# Tokenize sentences
|
76 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
107 |
| paraphrase-multilingual-mpnet-base-v2 Fine-tuned with assin(s)| 0.77641|0.79831 |0.84575 |
|
108 |
## Training
|
109 |
|
110 |
+
rufimelo/Legal-SBERTimbau-sts-large-ma-v3 is based on Legal-BERTimbau-large which derives from [BERTimbau](https://huggingface.co/neuralmind/bert-large-portuguese-cased) large.
|
111 |
|
112 |
Firstly, due to the lack of portuguese datasets, it was trained using multilingual knowledge distillation. For the Multilingual Knowledge Distillation process, the teacher model was 'sentence-transformers/stsb-roberta-large', the supposed supported language as English and the language to learn was portuguese.
|
113 |
|