Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:12800
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Borsa356/bert_mnr_7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Borsa356/bert_mnr_7 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Borsa356/bert_mnr_7") sentences = [ "Two boys are playing in pool filled with sparkling blue water.", "A boy plays in the pool.", "Woman holds her purse.", "The child is very brave to hold onto that tail." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +364 -0
- config.json +24 -0
- config_sentence_transformers.json +14 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 384,
|
| 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,364 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:12800
|
| 9 |
+
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: microsoft/MiniLM-L12-H384-uncased
|
| 11 |
+
widget:
|
| 12 |
+
- source_sentence: Two boys are playing in pool filled with sparkling blue water.
|
| 13 |
+
sentences:
|
| 14 |
+
- A boy plays in the pool.
|
| 15 |
+
- Woman holds her purse.
|
| 16 |
+
- The child is very brave to hold onto that tail.
|
| 17 |
+
- source_sentence: An artist shows off his work to a large crowd of people who appear
|
| 18 |
+
to be listening intently to the artist's description of his display.
|
| 19 |
+
sentences:
|
| 20 |
+
- A man with a bike watched musicians playing.
|
| 21 |
+
- A piece of art on display.
|
| 22 |
+
- A man is climbing.
|
| 23 |
+
- source_sentence: A man on a street in a bright t-shirt holds some sort of tablet
|
| 24 |
+
towards a woman in a pink t-shirt and shades.
|
| 25 |
+
sentences:
|
| 26 |
+
- The man is working on a sculpture.
|
| 27 |
+
- Older men are sitting.
|
| 28 |
+
- A woman is shown a tablet by a man standing on the street.
|
| 29 |
+
- source_sentence: A skateboarder is riding a skateboard along a metal railing in
|
| 30 |
+
front of a concrete building.
|
| 31 |
+
sentences:
|
| 32 |
+
- A man is dressed in traditional Jewish clothing.
|
| 33 |
+
- A man has some flowers.
|
| 34 |
+
- A skateboarder is riding a skateboard
|
| 35 |
+
- source_sentence: Three women enjoying a balloon joyride.
|
| 36 |
+
sentences:
|
| 37 |
+
- The group of people had braided hair.
|
| 38 |
+
- Three women are on a balloon ride.
|
| 39 |
+
- A woman who is wearing purple is painting another woman.
|
| 40 |
+
pipeline_tag: sentence-similarity
|
| 41 |
+
library_name: sentence-transformers
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
# SentenceTransformer based on microsoft/MiniLM-L12-H384-uncased
|
| 45 |
+
|
| 46 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 47 |
+
|
| 48 |
+
## Model Details
|
| 49 |
+
|
| 50 |
+
### Model Description
|
| 51 |
+
- **Model Type:** Sentence Transformer
|
| 52 |
+
- **Base model:** [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) <!-- at revision 44acabbec0ef496f6dbc93adadea57f376b7c0ec -->
|
| 53 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 54 |
+
- **Output Dimensionality:** 384 dimensions
|
| 55 |
+
- **Similarity Function:** Cosine Similarity
|
| 56 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 57 |
+
<!-- - **Language:** Unknown -->
|
| 58 |
+
<!-- - **License:** Unknown -->
|
| 59 |
+
|
| 60 |
+
### Model Sources
|
| 61 |
+
|
| 62 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 63 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 64 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 65 |
+
|
| 66 |
+
### Full Model Architecture
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
SentenceTransformer(
|
| 70 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'BertModel'})
|
| 71 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
| 72 |
+
)
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Usage
|
| 76 |
+
|
| 77 |
+
### Direct Usage (Sentence Transformers)
|
| 78 |
+
|
| 79 |
+
First install the Sentence Transformers library:
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
pip install -U sentence-transformers
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
Then you can load this model and run inference.
|
| 86 |
+
```python
|
| 87 |
+
from sentence_transformers import SentenceTransformer
|
| 88 |
+
|
| 89 |
+
# Download from the 🤗 Hub
|
| 90 |
+
model = SentenceTransformer("Borsa356/bert_mnr_7")
|
| 91 |
+
# Run inference
|
| 92 |
+
sentences = [
|
| 93 |
+
'Three women enjoying a balloon joyride.',
|
| 94 |
+
'Three women are on a balloon ride.',
|
| 95 |
+
'A woman who is wearing purple is painting another woman.',
|
| 96 |
+
]
|
| 97 |
+
embeddings = model.encode(sentences)
|
| 98 |
+
print(embeddings.shape)
|
| 99 |
+
# [3, 384]
|
| 100 |
+
|
| 101 |
+
# Get the similarity scores for the embeddings
|
| 102 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 103 |
+
print(similarities)
|
| 104 |
+
# tensor([[1.0000, 0.8457, 0.2791],
|
| 105 |
+
# [0.8457, 1.0000, 0.3065],
|
| 106 |
+
# [0.2791, 0.3065, 1.0000]])
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
<!--
|
| 110 |
+
### Direct Usage (Transformers)
|
| 111 |
+
|
| 112 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 113 |
+
|
| 114 |
+
</details>
|
| 115 |
+
-->
|
| 116 |
+
|
| 117 |
+
<!--
|
| 118 |
+
### Downstream Usage (Sentence Transformers)
|
| 119 |
+
|
| 120 |
+
You can finetune this model on your own dataset.
|
| 121 |
+
|
| 122 |
+
<details><summary>Click to expand</summary>
|
| 123 |
+
|
| 124 |
+
</details>
|
| 125 |
+
-->
|
| 126 |
+
|
| 127 |
+
<!--
|
| 128 |
+
### Out-of-Scope Use
|
| 129 |
+
|
| 130 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 131 |
+
-->
|
| 132 |
+
|
| 133 |
+
<!--
|
| 134 |
+
## Bias, Risks and Limitations
|
| 135 |
+
|
| 136 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 137 |
+
-->
|
| 138 |
+
|
| 139 |
+
<!--
|
| 140 |
+
### Recommendations
|
| 141 |
+
|
| 142 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 143 |
+
-->
|
| 144 |
+
|
| 145 |
+
## Training Details
|
| 146 |
+
|
| 147 |
+
### Training Dataset
|
| 148 |
+
|
| 149 |
+
#### Unnamed Dataset
|
| 150 |
+
|
| 151 |
+
* Size: 12,800 training samples
|
| 152 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
| 153 |
+
* Approximate statistics based on the first 1000 samples:
|
| 154 |
+
| | sentence_0 | sentence_1 |
|
| 155 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
| 156 |
+
| type | string | string |
|
| 157 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 16.86 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.51 tokens</li><li>max: 26 tokens</li></ul> |
|
| 158 |
+
* Samples:
|
| 159 |
+
| sentence_0 | sentence_1 |
|
| 160 |
+
|:------------------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 161 |
+
| <code>A classroom of students discussing lecture.</code> | <code>A classroom is discussing the topics of the day.</code> |
|
| 162 |
+
| <code>A overweight man with shorts on about to get on a motorcycle.</code> | <code>A chubby man gets ready to go for a ride.</code> |
|
| 163 |
+
| <code>A woman stares at something lighted that three people are holding in front of her.</code> | <code>A woman is staring.</code> |
|
| 164 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 165 |
+
```json
|
| 166 |
+
{
|
| 167 |
+
"scale": 20.0,
|
| 168 |
+
"similarity_fct": "cos_sim"
|
| 169 |
+
}
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
### Training Hyperparameters
|
| 173 |
+
#### Non-Default Hyperparameters
|
| 174 |
+
|
| 175 |
+
- `per_device_train_batch_size`: 32
|
| 176 |
+
- `per_device_eval_batch_size`: 32
|
| 177 |
+
- `num_train_epochs`: 2
|
| 178 |
+
- `batch_sampler`: no_duplicates
|
| 179 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 180 |
+
|
| 181 |
+
#### All Hyperparameters
|
| 182 |
+
<details><summary>Click to expand</summary>
|
| 183 |
+
|
| 184 |
+
- `overwrite_output_dir`: False
|
| 185 |
+
- `do_predict`: False
|
| 186 |
+
- `eval_strategy`: no
|
| 187 |
+
- `prediction_loss_only`: True
|
| 188 |
+
- `per_device_train_batch_size`: 32
|
| 189 |
+
- `per_device_eval_batch_size`: 32
|
| 190 |
+
- `per_gpu_train_batch_size`: None
|
| 191 |
+
- `per_gpu_eval_batch_size`: None
|
| 192 |
+
- `gradient_accumulation_steps`: 1
|
| 193 |
+
- `eval_accumulation_steps`: None
|
| 194 |
+
- `torch_empty_cache_steps`: None
|
| 195 |
+
- `learning_rate`: 5e-05
|
| 196 |
+
- `weight_decay`: 0.0
|
| 197 |
+
- `adam_beta1`: 0.9
|
| 198 |
+
- `adam_beta2`: 0.999
|
| 199 |
+
- `adam_epsilon`: 1e-08
|
| 200 |
+
- `max_grad_norm`: 1
|
| 201 |
+
- `num_train_epochs`: 2
|
| 202 |
+
- `max_steps`: -1
|
| 203 |
+
- `lr_scheduler_type`: linear
|
| 204 |
+
- `lr_scheduler_kwargs`: {}
|
| 205 |
+
- `warmup_ratio`: 0.0
|
| 206 |
+
- `warmup_steps`: 0
|
| 207 |
+
- `log_level`: passive
|
| 208 |
+
- `log_level_replica`: warning
|
| 209 |
+
- `log_on_each_node`: True
|
| 210 |
+
- `logging_nan_inf_filter`: True
|
| 211 |
+
- `save_safetensors`: True
|
| 212 |
+
- `save_on_each_node`: False
|
| 213 |
+
- `save_only_model`: False
|
| 214 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 215 |
+
- `no_cuda`: False
|
| 216 |
+
- `use_cpu`: False
|
| 217 |
+
- `use_mps_device`: False
|
| 218 |
+
- `seed`: 42
|
| 219 |
+
- `data_seed`: None
|
| 220 |
+
- `jit_mode_eval`: False
|
| 221 |
+
- `use_ipex`: False
|
| 222 |
+
- `bf16`: False
|
| 223 |
+
- `fp16`: False
|
| 224 |
+
- `fp16_opt_level`: O1
|
| 225 |
+
- `half_precision_backend`: auto
|
| 226 |
+
- `bf16_full_eval`: False
|
| 227 |
+
- `fp16_full_eval`: False
|
| 228 |
+
- `tf32`: None
|
| 229 |
+
- `local_rank`: 0
|
| 230 |
+
- `ddp_backend`: None
|
| 231 |
+
- `tpu_num_cores`: None
|
| 232 |
+
- `tpu_metrics_debug`: False
|
| 233 |
+
- `debug`: []
|
| 234 |
+
- `dataloader_drop_last`: False
|
| 235 |
+
- `dataloader_num_workers`: 0
|
| 236 |
+
- `dataloader_prefetch_factor`: None
|
| 237 |
+
- `past_index`: -1
|
| 238 |
+
- `disable_tqdm`: False
|
| 239 |
+
- `remove_unused_columns`: True
|
| 240 |
+
- `label_names`: None
|
| 241 |
+
- `load_best_model_at_end`: False
|
| 242 |
+
- `ignore_data_skip`: False
|
| 243 |
+
- `fsdp`: []
|
| 244 |
+
- `fsdp_min_num_params`: 0
|
| 245 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 246 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 247 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 248 |
+
- `deepspeed`: None
|
| 249 |
+
- `label_smoothing_factor`: 0.0
|
| 250 |
+
- `optim`: adamw_torch
|
| 251 |
+
- `optim_args`: None
|
| 252 |
+
- `adafactor`: False
|
| 253 |
+
- `group_by_length`: False
|
| 254 |
+
- `length_column_name`: length
|
| 255 |
+
- `ddp_find_unused_parameters`: None
|
| 256 |
+
- `ddp_bucket_cap_mb`: None
|
| 257 |
+
- `ddp_broadcast_buffers`: False
|
| 258 |
+
- `dataloader_pin_memory`: True
|
| 259 |
+
- `dataloader_persistent_workers`: False
|
| 260 |
+
- `skip_memory_metrics`: True
|
| 261 |
+
- `use_legacy_prediction_loop`: False
|
| 262 |
+
- `push_to_hub`: False
|
| 263 |
+
- `resume_from_checkpoint`: None
|
| 264 |
+
- `hub_model_id`: None
|
| 265 |
+
- `hub_strategy`: every_save
|
| 266 |
+
- `hub_private_repo`: None
|
| 267 |
+
- `hub_always_push`: False
|
| 268 |
+
- `hub_revision`: None
|
| 269 |
+
- `gradient_checkpointing`: False
|
| 270 |
+
- `gradient_checkpointing_kwargs`: None
|
| 271 |
+
- `include_inputs_for_metrics`: False
|
| 272 |
+
- `include_for_metrics`: []
|
| 273 |
+
- `eval_do_concat_batches`: True
|
| 274 |
+
- `fp16_backend`: auto
|
| 275 |
+
- `push_to_hub_model_id`: None
|
| 276 |
+
- `push_to_hub_organization`: None
|
| 277 |
+
- `mp_parameters`:
|
| 278 |
+
- `auto_find_batch_size`: False
|
| 279 |
+
- `full_determinism`: False
|
| 280 |
+
- `torchdynamo`: None
|
| 281 |
+
- `ray_scope`: last
|
| 282 |
+
- `ddp_timeout`: 1800
|
| 283 |
+
- `torch_compile`: False
|
| 284 |
+
- `torch_compile_backend`: None
|
| 285 |
+
- `torch_compile_mode`: None
|
| 286 |
+
- `include_tokens_per_second`: False
|
| 287 |
+
- `include_num_input_tokens_seen`: False
|
| 288 |
+
- `neftune_noise_alpha`: None
|
| 289 |
+
- `optim_target_modules`: None
|
| 290 |
+
- `batch_eval_metrics`: False
|
| 291 |
+
- `eval_on_start`: False
|
| 292 |
+
- `use_liger_kernel`: False
|
| 293 |
+
- `liger_kernel_config`: None
|
| 294 |
+
- `eval_use_gather_object`: False
|
| 295 |
+
- `average_tokens_across_devices`: False
|
| 296 |
+
- `prompts`: None
|
| 297 |
+
- `batch_sampler`: no_duplicates
|
| 298 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 299 |
+
- `router_mapping`: {}
|
| 300 |
+
- `learning_rate_mapping`: {}
|
| 301 |
+
|
| 302 |
+
</details>
|
| 303 |
+
|
| 304 |
+
### Training Logs
|
| 305 |
+
| Epoch | Step | Training Loss |
|
| 306 |
+
|:-----:|:----:|:-------------:|
|
| 307 |
+
| 1.25 | 500 | 0.7044 |
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
### Framework Versions
|
| 311 |
+
- Python: 3.13.5
|
| 312 |
+
- Sentence Transformers: 5.0.0
|
| 313 |
+
- Transformers: 4.53.0
|
| 314 |
+
- PyTorch: 2.7.1+cpu
|
| 315 |
+
- Accelerate: 1.8.1
|
| 316 |
+
- Datasets: 3.6.0
|
| 317 |
+
- Tokenizers: 0.21.2
|
| 318 |
+
|
| 319 |
+
## Citation
|
| 320 |
+
|
| 321 |
+
### BibTeX
|
| 322 |
+
|
| 323 |
+
#### Sentence Transformers
|
| 324 |
+
```bibtex
|
| 325 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 326 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 327 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 328 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 329 |
+
month = "11",
|
| 330 |
+
year = "2019",
|
| 331 |
+
publisher = "Association for Computational Linguistics",
|
| 332 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 333 |
+
}
|
| 334 |
+
```
|
| 335 |
+
|
| 336 |
+
#### MultipleNegativesRankingLoss
|
| 337 |
+
```bibtex
|
| 338 |
+
@misc{henderson2017efficient,
|
| 339 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 340 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
| 341 |
+
year={2017},
|
| 342 |
+
eprint={1705.00652},
|
| 343 |
+
archivePrefix={arXiv},
|
| 344 |
+
primaryClass={cs.CL}
|
| 345 |
+
}
|
| 346 |
+
```
|
| 347 |
+
|
| 348 |
+
<!--
|
| 349 |
+
## Glossary
|
| 350 |
+
|
| 351 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 352 |
+
-->
|
| 353 |
+
|
| 354 |
+
<!--
|
| 355 |
+
## Model Card Authors
|
| 356 |
+
|
| 357 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 358 |
+
-->
|
| 359 |
+
|
| 360 |
+
<!--
|
| 361 |
+
## Model Card Contact
|
| 362 |
+
|
| 363 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 364 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_dropout_prob": 0.1,
|
| 9 |
+
"hidden_size": 384,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 1536,
|
| 12 |
+
"layer_norm_eps": 1e-12,
|
| 13 |
+
"max_position_embeddings": 512,
|
| 14 |
+
"model_type": "bert",
|
| 15 |
+
"num_attention_heads": 12,
|
| 16 |
+
"num_hidden_layers": 12,
|
| 17 |
+
"pad_token_id": 0,
|
| 18 |
+
"position_embedding_type": "absolute",
|
| 19 |
+
"torch_dtype": "float32",
|
| 20 |
+
"transformers_version": "4.53.0",
|
| 21 |
+
"type_vocab_size": 2,
|
| 22 |
+
"use_cache": true,
|
| 23 |
+
"vocab_size": 30522
|
| 24 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "SentenceTransformer",
|
| 3 |
+
"__version__": {
|
| 4 |
+
"sentence_transformers": "5.0.0",
|
| 5 |
+
"transformers": "4.53.0",
|
| 6 |
+
"pytorch": "2.7.1+cpu"
|
| 7 |
+
},
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "",
|
| 10 |
+
"document": ""
|
| 11 |
+
},
|
| 12 |
+
"default_prompt_name": null,
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac26585eac09d444c90dae37e81b52dffe4a84bee20914d2a8f39f9b378ad106
|
| 3 |
+
size 133462128
|
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,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"sep_token": "[SEP]",
|
| 54 |
+
"strip_accents": null,
|
| 55 |
+
"tokenize_chinese_chars": true,
|
| 56 |
+
"tokenizer_class": "BertTokenizer",
|
| 57 |
+
"unk_token": "[UNK]"
|
| 58 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|