josedossantos
commited on
Commit
•
39a8c9d
1
Parent(s):
138885a
Add new SentenceTransformer model.
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +369 -0
- config.json +32 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +3 -0
- tokenizer_config.json +65 -0
- vocab.txt +0 -0
.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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
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,369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- dataset_size:10K<n<100K
|
9 |
+
- loss:ContrastiveLoss
|
10 |
+
base_model: sentence-transformers/LaBSE
|
11 |
+
widget:
|
12 |
+
- source_sentence: Alteração, Código Penal, revogação, crime, desacato.
|
13 |
+
sentences:
|
14 |
+
- Alteração, Código Penal, aumenta da pena, crime, maus-tratos.
|
15 |
+
- Equiparação, doença, Lúpus Eritematoso Sistêmico, deficiência física, deficiência
|
16 |
+
intelectual, efeito jurídico.
|
17 |
+
- Alteração, Legislação Tributária Federal, dedução, declaração de ajuste anual,
|
18 |
+
pessoa física, pagamento, despesa, aluguel, imóvel residencial.
|
19 |
+
- source_sentence: Alteração, fixação, jornada de trabalho, psicólogo.
|
20 |
+
sentences:
|
21 |
+
- "Alteração, lei federal, definição, jornada de trabalho, psicólogo.\r\n\r\n"
|
22 |
+
- Ttítulo de capital nacional, Capital Nacional do Guabiju, Guabiju (RS), Rio Grande
|
23 |
+
do Sul, título de topônimo.
|
24 |
+
- 'Alteração, Lei Antifumo, proibição, comercialização, importação, fornecimento,
|
25 |
+
publicidade, cigarro eletrônico. '
|
26 |
+
- source_sentence: Criação, Fundo Garantidor, empresa, alimentação.
|
27 |
+
sentences:
|
28 |
+
- Disciplinamento, auxílio financeiro, União, Estado (ente federado), Distrito
|
29 |
+
Federal (Brasil), Município, fomento, exportação.
|
30 |
+
- 'Alteração, Lei de Diretrizes e Bases da Educação Nacional (1996), proibição,
|
31 |
+
educação à distância, área, saúde. '
|
32 |
+
- Alteração, Legislação Tributária Federal, dedução, declaração de ajuste anual,
|
33 |
+
pessoa física, pagamento, despesa, aluguel, imóvel residencial.
|
34 |
+
- source_sentence: Inclusão, Cerrado, Caatinga, Patrimônio da União.
|
35 |
+
sentences:
|
36 |
+
- Inclusão, cerrado, caatinga, patrimônio da União.
|
37 |
+
- Regulamentação, Programa Nacional de Assistência Estudantil (PNAES), assistência
|
38 |
+
estudantil, educação superior.
|
39 |
+
- Alteração, Lei Federal, piso salarial, jornada de trabalho, enfermeiro, técnico
|
40 |
+
de enfermagem, auxiliar de enfermagem, parteira.
|
41 |
+
- source_sentence: Reserva, vaga, estágio, aluno, escola, rede pública.
|
42 |
+
sentences:
|
43 |
+
- 'Alteração, LDB, aluno, inscrição, Programa Bolsa-Atleta, garantia matrícula escolar,
|
44 |
+
escola, proximidade, residência. '
|
45 |
+
- 'Título de Capital Nacional, Capital Nacional do Alimento, Marília (SP), São Paulo
|
46 |
+
(Estado), Título de Topônimo. '
|
47 |
+
- Alteração, Legislação Tributária Federal, dedução, declaração de ajuste anual,
|
48 |
+
pessoa física, pagamento, despesa, aluguel, imóvel residencial.
|
49 |
+
pipeline_tag: sentence-similarity
|
50 |
+
---
|
51 |
+
|
52 |
+
# SentenceTransformer based on sentence-transformers/LaBSE
|
53 |
+
|
54 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
55 |
+
|
56 |
+
## Model Details
|
57 |
+
|
58 |
+
### Model Description
|
59 |
+
- **Model Type:** Sentence Transformer
|
60 |
+
- **Base model:** [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE) <!-- at revision e34fab64a3011d2176c99545a93d5cbddc9a91b7 -->
|
61 |
+
- **Maximum Sequence Length:** 512 tokens
|
62 |
+
- **Output Dimensionality:** 768 tokens
|
63 |
+
- **Similarity Function:** Cosine Similarity
|
64 |
+
<!-- - **Training Dataset:** Unknown -->
|
65 |
+
<!-- - **Language:** Unknown -->
|
66 |
+
<!-- - **License:** Unknown -->
|
67 |
+
|
68 |
+
### Model Sources
|
69 |
+
|
70 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
71 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
72 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
73 |
+
|
74 |
+
### Full Model Architecture
|
75 |
+
|
76 |
+
```
|
77 |
+
SentenceTransformer(
|
78 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
79 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
80 |
+
)
|
81 |
+
```
|
82 |
+
|
83 |
+
## Usage
|
84 |
+
|
85 |
+
### Direct Usage (Sentence Transformers)
|
86 |
+
|
87 |
+
First install the Sentence Transformers library:
|
88 |
+
|
89 |
+
```bash
|
90 |
+
pip install -U sentence-transformers
|
91 |
+
```
|
92 |
+
|
93 |
+
Then you can load this model and run inference.
|
94 |
+
```python
|
95 |
+
from sentence_transformers import SentenceTransformer
|
96 |
+
|
97 |
+
# Download from the 🤗 Hub
|
98 |
+
model = SentenceTransformer("josedossantos/urf-txtIndexacao-labse")
|
99 |
+
# Run inference
|
100 |
+
sentences = [
|
101 |
+
'Reserva, vaga, estágio, aluno, escola, rede pública.',
|
102 |
+
'Alteração, LDB, aluno, inscrição, Programa Bolsa-Atleta, garantia matrícula escolar, escola, proximidade, residência. ',
|
103 |
+
'Título de Capital Nacional, Capital Nacional do Alimento, Marília (SP), São Paulo (Estado), Título de Topônimo. ',
|
104 |
+
]
|
105 |
+
embeddings = model.encode(sentences)
|
106 |
+
print(embeddings.shape)
|
107 |
+
# [3, 768]
|
108 |
+
|
109 |
+
# Get the similarity scores for the embeddings
|
110 |
+
similarities = model.similarity(embeddings, embeddings)
|
111 |
+
print(similarities.shape)
|
112 |
+
# [3, 3]
|
113 |
+
```
|
114 |
+
|
115 |
+
<!--
|
116 |
+
### Direct Usage (Transformers)
|
117 |
+
|
118 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
119 |
+
|
120 |
+
</details>
|
121 |
+
-->
|
122 |
+
|
123 |
+
<!--
|
124 |
+
### Downstream Usage (Sentence Transformers)
|
125 |
+
|
126 |
+
You can finetune this model on your own dataset.
|
127 |
+
|
128 |
+
<details><summary>Click to expand</summary>
|
129 |
+
|
130 |
+
</details>
|
131 |
+
-->
|
132 |
+
|
133 |
+
<!--
|
134 |
+
### Out-of-Scope Use
|
135 |
+
|
136 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
137 |
+
-->
|
138 |
+
|
139 |
+
<!--
|
140 |
+
## Bias, Risks and Limitations
|
141 |
+
|
142 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
143 |
+
-->
|
144 |
+
|
145 |
+
<!--
|
146 |
+
### Recommendations
|
147 |
+
|
148 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
149 |
+
-->
|
150 |
+
|
151 |
+
## Training Details
|
152 |
+
|
153 |
+
### Training Dataset
|
154 |
+
|
155 |
+
#### Unnamed Dataset
|
156 |
+
|
157 |
+
|
158 |
+
* Size: 10,962 training samples
|
159 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
160 |
+
* Approximate statistics based on the first 1000 samples:
|
161 |
+
| | sentence_0 | sentence_1 | label |
|
162 |
+
|:--------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------|
|
163 |
+
| type | string | string | int |
|
164 |
+
| details | <ul><li>min: 10 tokens</li><li>mean: 47.92 tokens</li><li>max: 393 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 49.62 tokens</li><li>max: 426 tokens</li></ul> | <ul><li>0: ~49.20%</li><li>1: ~50.80%</li></ul> |
|
165 |
+
* Samples:
|
166 |
+
| sentence_0 | sentence_1 | label |
|
167 |
+
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
|
168 |
+
| <code>Inscrição, nome, político, Império (1822-1889), Livro dos Heróis da Pátria. </code> | <code>Inscrição, nome, condessa, Livro dos Heróis da Pátria. </code> | <code>1</code> |
|
169 |
+
| <code>Alteração, Lei do Projovem, inclusão, modalidade, artista, atleta.</code> | <code>Concessão, Auxílio Emergencial Financeiro, motorista, transporte escolar, suspensão, pagamento, financiamento, veículo, renegociação, dívida, Instituição Financeira, vigência, pandemia, Coronavírus.</code> | <code>0</code> |
|
170 |
+
| <code>Alteração, Código Penal, inclusão, efeito da condenação, proibição, nomeação, cargo de comissão, âmbito federal, crime, violência contra a mulher.</code> | <code>Alteração, Código Penal, Efeito da condenação, proibição, nomeação, Cargo em comissão, Administração Pública, Condenado, crime, violência contra a mulher, Lei Maria da Penha.</code> | <code>1</code> |
|
171 |
+
* Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
|
172 |
+
```json
|
173 |
+
{
|
174 |
+
"distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
|
175 |
+
"margin": 0.5,
|
176 |
+
"size_average": true
|
177 |
+
}
|
178 |
+
```
|
179 |
+
|
180 |
+
### Training Hyperparameters
|
181 |
+
#### Non-Default Hyperparameters
|
182 |
+
|
183 |
+
- `per_device_train_batch_size`: 2
|
184 |
+
- `per_device_eval_batch_size`: 2
|
185 |
+
- `num_train_epochs`: 1
|
186 |
+
- `multi_dataset_batch_sampler`: round_robin
|
187 |
+
|
188 |
+
#### All Hyperparameters
|
189 |
+
<details><summary>Click to expand</summary>
|
190 |
+
|
191 |
+
- `overwrite_output_dir`: False
|
192 |
+
- `do_predict`: False
|
193 |
+
- `prediction_loss_only`: True
|
194 |
+
- `per_device_train_batch_size`: 2
|
195 |
+
- `per_device_eval_batch_size`: 2
|
196 |
+
- `per_gpu_train_batch_size`: None
|
197 |
+
- `per_gpu_eval_batch_size`: None
|
198 |
+
- `gradient_accumulation_steps`: 1
|
199 |
+
- `eval_accumulation_steps`: None
|
200 |
+
- `learning_rate`: 5e-05
|
201 |
+
- `weight_decay`: 0.0
|
202 |
+
- `adam_beta1`: 0.9
|
203 |
+
- `adam_beta2`: 0.999
|
204 |
+
- `adam_epsilon`: 1e-08
|
205 |
+
- `max_grad_norm`: 1
|
206 |
+
- `num_train_epochs`: 1
|
207 |
+
- `max_steps`: -1
|
208 |
+
- `lr_scheduler_type`: linear
|
209 |
+
- `lr_scheduler_kwargs`: {}
|
210 |
+
- `warmup_ratio`: 0.0
|
211 |
+
- `warmup_steps`: 0
|
212 |
+
- `log_level`: passive
|
213 |
+
- `log_level_replica`: warning
|
214 |
+
- `log_on_each_node`: True
|
215 |
+
- `logging_nan_inf_filter`: True
|
216 |
+
- `save_safetensors`: True
|
217 |
+
- `save_on_each_node`: False
|
218 |
+
- `save_only_model`: False
|
219 |
+
- `no_cuda`: False
|
220 |
+
- `use_cpu`: False
|
221 |
+
- `use_mps_device`: False
|
222 |
+
- `seed`: 42
|
223 |
+
- `data_seed`: None
|
224 |
+
- `jit_mode_eval`: False
|
225 |
+
- `use_ipex`: False
|
226 |
+
- `bf16`: False
|
227 |
+
- `fp16`: False
|
228 |
+
- `fp16_opt_level`: O1
|
229 |
+
- `half_precision_backend`: auto
|
230 |
+
- `bf16_full_eval`: False
|
231 |
+
- `fp16_full_eval`: False
|
232 |
+
- `tf32`: None
|
233 |
+
- `local_rank`: 0
|
234 |
+
- `ddp_backend`: None
|
235 |
+
- `tpu_num_cores`: None
|
236 |
+
- `tpu_metrics_debug`: False
|
237 |
+
- `debug`: []
|
238 |
+
- `dataloader_drop_last`: False
|
239 |
+
- `dataloader_num_workers`: 0
|
240 |
+
- `dataloader_prefetch_factor`: None
|
241 |
+
- `past_index`: -1
|
242 |
+
- `disable_tqdm`: False
|
243 |
+
- `remove_unused_columns`: True
|
244 |
+
- `label_names`: None
|
245 |
+
- `load_best_model_at_end`: False
|
246 |
+
- `ignore_data_skip`: False
|
247 |
+
- `fsdp`: []
|
248 |
+
- `fsdp_min_num_params`: 0
|
249 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
250 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
251 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True}
|
252 |
+
- `deepspeed`: None
|
253 |
+
- `label_smoothing_factor`: 0.0
|
254 |
+
- `optim`: adamw_torch
|
255 |
+
- `optim_args`: None
|
256 |
+
- `adafactor`: False
|
257 |
+
- `group_by_length`: False
|
258 |
+
- `length_column_name`: length
|
259 |
+
- `ddp_find_unused_parameters`: None
|
260 |
+
- `ddp_bucket_cap_mb`: None
|
261 |
+
- `ddp_broadcast_buffers`: False
|
262 |
+
- `dataloader_pin_memory`: True
|
263 |
+
- `dataloader_persistent_workers`: False
|
264 |
+
- `skip_memory_metrics`: True
|
265 |
+
- `use_legacy_prediction_loop`: False
|
266 |
+
- `push_to_hub`: False
|
267 |
+
- `resume_from_checkpoint`: None
|
268 |
+
- `hub_model_id`: None
|
269 |
+
- `hub_strategy`: every_save
|
270 |
+
- `hub_private_repo`: False
|
271 |
+
- `hub_always_push`: False
|
272 |
+
- `gradient_checkpointing`: False
|
273 |
+
- `gradient_checkpointing_kwargs`: None
|
274 |
+
- `include_inputs_for_metrics`: False
|
275 |
+
- `fp16_backend`: auto
|
276 |
+
- `push_to_hub_model_id`: None
|
277 |
+
- `push_to_hub_organization`: None
|
278 |
+
- `mp_parameters`:
|
279 |
+
- `auto_find_batch_size`: False
|
280 |
+
- `full_determinism`: False
|
281 |
+
- `torchdynamo`: None
|
282 |
+
- `ray_scope`: last
|
283 |
+
- `ddp_timeout`: 1800
|
284 |
+
- `torch_compile`: False
|
285 |
+
- `torch_compile_backend`: None
|
286 |
+
- `torch_compile_mode`: None
|
287 |
+
- `dispatch_batches`: None
|
288 |
+
- `split_batches`: None
|
289 |
+
- `include_tokens_per_second`: False
|
290 |
+
- `include_num_input_tokens_seen`: False
|
291 |
+
- `neftune_noise_alpha`: None
|
292 |
+
- `optim_target_modules`: None
|
293 |
+
- `batch_sampler`: batch_sampler
|
294 |
+
- `multi_dataset_batch_sampler`: round_robin
|
295 |
+
|
296 |
+
</details>
|
297 |
+
|
298 |
+
### Training Logs
|
299 |
+
| Epoch | Step | Training Loss |
|
300 |
+
|:------:|:----:|:-------------:|
|
301 |
+
| 0.0912 | 500 | 0.0268 |
|
302 |
+
| 0.1824 | 1000 | 0.0247 |
|
303 |
+
| 0.2737 | 1500 | 0.0227 |
|
304 |
+
| 0.3649 | 2000 | 0.0215 |
|
305 |
+
| 0.4561 | 2500 | 0.0196 |
|
306 |
+
| 0.5473 | 3000 | 0.0182 |
|
307 |
+
| 0.6386 | 3500 | 0.0178 |
|
308 |
+
| 0.7298 | 4000 | 0.0152 |
|
309 |
+
| 0.8210 | 4500 | 0.0136 |
|
310 |
+
| 0.9122 | 5000 | 0.0132 |
|
311 |
+
|
312 |
+
|
313 |
+
### Framework Versions
|
314 |
+
- Python: 3.10.14
|
315 |
+
- Sentence Transformers: 3.0.0
|
316 |
+
- Transformers: 4.39.3
|
317 |
+
- PyTorch: 2.2.0
|
318 |
+
- Accelerate: 0.30.1
|
319 |
+
- Datasets: 2.14.4
|
320 |
+
- Tokenizers: 0.15.1
|
321 |
+
|
322 |
+
## Citation
|
323 |
+
|
324 |
+
### BibTeX
|
325 |
+
|
326 |
+
#### Sentence Transformers
|
327 |
+
```bibtex
|
328 |
+
@inproceedings{reimers-2019-sentence-bert,
|
329 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
330 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
331 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
332 |
+
month = "11",
|
333 |
+
year = "2019",
|
334 |
+
publisher = "Association for Computational Linguistics",
|
335 |
+
url = "https://arxiv.org/abs/1908.10084",
|
336 |
+
}
|
337 |
+
```
|
338 |
+
|
339 |
+
#### ContrastiveLoss
|
340 |
+
```bibtex
|
341 |
+
@inproceedings{hadsell2006dimensionality,
|
342 |
+
author={Hadsell, R. and Chopra, S. and LeCun, Y.},
|
343 |
+
booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
|
344 |
+
title={Dimensionality Reduction by Learning an Invariant Mapping},
|
345 |
+
year={2006},
|
346 |
+
volume={2},
|
347 |
+
number={},
|
348 |
+
pages={1735-1742},
|
349 |
+
doi={10.1109/CVPR.2006.100}
|
350 |
+
}
|
351 |
+
```
|
352 |
+
|
353 |
+
<!--
|
354 |
+
## Glossary
|
355 |
+
|
356 |
+
*Clearly define terms in order to be accessible across audiences.*
|
357 |
+
-->
|
358 |
+
|
359 |
+
<!--
|
360 |
+
## Model Card Authors
|
361 |
+
|
362 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
363 |
+
-->
|
364 |
+
|
365 |
+
<!--
|
366 |
+
## Model Card Contact
|
367 |
+
|
368 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
369 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/models/urf/txtIndexacao_labse/",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 512,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"pooler_fc_size": 768,
|
22 |
+
"pooler_num_attention_heads": 12,
|
23 |
+
"pooler_num_fc_layers": 3,
|
24 |
+
"pooler_size_per_head": 128,
|
25 |
+
"pooler_type": "first_token_transform",
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"torch_dtype": "float32",
|
28 |
+
"transformers_version": "4.42.4",
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 501153
|
32 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.42.4",
|
5 |
+
"pytorch": "2.3.1+cu118"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:31fc0ac814e157ff353d0c88e73ec35b65b569a0a499d635305e1f8596c1f3b5
|
3 |
+
size 1883730160
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
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
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e160a07b3b76c68cd214747a559d36e04109c9fc522ccfce79548098ce85da2a
|
3 |
+
size 13632172
|
tokenizer_config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_length": 512,
|
51 |
+
"model_max_length": 512,
|
52 |
+
"never_split": null,
|
53 |
+
"pad_to_multiple_of": null,
|
54 |
+
"pad_token": "[PAD]",
|
55 |
+
"pad_token_type_id": 0,
|
56 |
+
"padding_side": "right",
|
57 |
+
"sep_token": "[SEP]",
|
58 |
+
"stride": 0,
|
59 |
+
"strip_accents": null,
|
60 |
+
"tokenize_chinese_chars": true,
|
61 |
+
"tokenizer_class": "BertTokenizer",
|
62 |
+
"truncation_side": "right",
|
63 |
+
"truncation_strategy": "longest_first",
|
64 |
+
"unk_token": "[UNK]"
|
65 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|