Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +331 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -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,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:10
|
| 8 |
+
- loss:CosineSimilarityLoss
|
| 9 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: Find the most popular payment method used in 2024.
|
| 12 |
+
sentences:
|
| 13 |
+
- SELECT * FROM orders WHERE customer_id = 42;
|
| 14 |
+
- SELECT customer_id, COUNT(order_id) AS order_count FROM orders WHERE order_date
|
| 15 |
+
BETWEEN '2024-01-01' AND '2024-12-31' GROUP BY customer_id HAVING order_count
|
| 16 |
+
>= 3;
|
| 17 |
+
- SELECT payment_method, COUNT(*) AS usage_count FROM payments WHERE payment_date
|
| 18 |
+
BETWEEN '2024-01-01' AND '2024-12-31' GROUP BY payment_method ORDER BY usage_count
|
| 19 |
+
DESC LIMIT 1;
|
| 20 |
+
- source_sentence: Which products sold the most in 2024?
|
| 21 |
+
sentences:
|
| 22 |
+
- SELECT COUNT(*) AS total_orders FROM orders WHERE order_date >= DATE('now', '-6
|
| 23 |
+
months');
|
| 24 |
+
- SELECT p.category, SUM(oi.subtotal) AS total_revenue FROM order_items oi JOIN
|
| 25 |
+
products p ON oi.product_id = p.product_id GROUP BY p.category ORDER BY total_revenue
|
| 26 |
+
DESC LIMIT 3;
|
| 27 |
+
- SELECT product_id, SUM(quantity) AS total_sold FROM order_items JOIN orders ON
|
| 28 |
+
order_items.order_id = orders.order_id WHERE order_date BETWEEN '2024-01-01' AND
|
| 29 |
+
'2024-12-31' GROUP BY product_id ORDER BY total_sold DESC LIMIT 10;
|
| 30 |
+
pipeline_tag: sentence-similarity
|
| 31 |
+
library_name: sentence-transformers
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
| 35 |
+
|
| 36 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). 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.
|
| 37 |
+
|
| 38 |
+
## Model Details
|
| 39 |
+
|
| 40 |
+
### Model Description
|
| 41 |
+
- **Model Type:** Sentence Transformer
|
| 42 |
+
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision fa97f6e7cb1a59073dff9e6b13e2715cf7475ac9 -->
|
| 43 |
+
- **Maximum Sequence Length:** 256 tokens
|
| 44 |
+
- **Output Dimensionality:** 384 dimensions
|
| 45 |
+
- **Similarity Function:** Cosine Similarity
|
| 46 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 47 |
+
<!-- - **Language:** Unknown -->
|
| 48 |
+
<!-- - **License:** Unknown -->
|
| 49 |
+
|
| 50 |
+
### Model Sources
|
| 51 |
+
|
| 52 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 53 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 54 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 55 |
+
|
| 56 |
+
### Full Model Architecture
|
| 57 |
+
|
| 58 |
+
```
|
| 59 |
+
SentenceTransformer(
|
| 60 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
| 61 |
+
(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})
|
| 62 |
+
(2): Normalize()
|
| 63 |
+
)
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
### Direct Usage (Sentence Transformers)
|
| 69 |
+
|
| 70 |
+
First install the Sentence Transformers library:
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
pip install -U sentence-transformers
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
Then you can load this model and run inference.
|
| 77 |
+
```python
|
| 78 |
+
from sentence_transformers import SentenceTransformer
|
| 79 |
+
|
| 80 |
+
# Download from the 🤗 Hub
|
| 81 |
+
model = SentenceTransformer("krishanusinha20/multi-agentic-sql-generator-model")
|
| 82 |
+
# Run inference
|
| 83 |
+
sentences = [
|
| 84 |
+
'Which products sold the most in 2024?',
|
| 85 |
+
"SELECT product_id, SUM(quantity) AS total_sold FROM order_items JOIN orders ON order_items.order_id = orders.order_id WHERE order_date BETWEEN '2024-01-01' AND '2024-12-31' GROUP BY product_id ORDER BY total_sold DESC LIMIT 10;",
|
| 86 |
+
"SELECT COUNT(*) AS total_orders FROM orders WHERE order_date >= DATE('now', '-6 months');",
|
| 87 |
+
]
|
| 88 |
+
embeddings = model.encode(sentences)
|
| 89 |
+
print(embeddings.shape)
|
| 90 |
+
# [3, 384]
|
| 91 |
+
|
| 92 |
+
# Get the similarity scores for the embeddings
|
| 93 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 94 |
+
print(similarities.shape)
|
| 95 |
+
# [3, 3]
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
<!--
|
| 99 |
+
### Direct Usage (Transformers)
|
| 100 |
+
|
| 101 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 102 |
+
|
| 103 |
+
</details>
|
| 104 |
+
-->
|
| 105 |
+
|
| 106 |
+
<!--
|
| 107 |
+
### Downstream Usage (Sentence Transformers)
|
| 108 |
+
|
| 109 |
+
You can finetune this model on your own dataset.
|
| 110 |
+
|
| 111 |
+
<details><summary>Click to expand</summary>
|
| 112 |
+
|
| 113 |
+
</details>
|
| 114 |
+
-->
|
| 115 |
+
|
| 116 |
+
<!--
|
| 117 |
+
### Out-of-Scope Use
|
| 118 |
+
|
| 119 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 120 |
+
-->
|
| 121 |
+
|
| 122 |
+
<!--
|
| 123 |
+
## Bias, Risks and Limitations
|
| 124 |
+
|
| 125 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 126 |
+
-->
|
| 127 |
+
|
| 128 |
+
<!--
|
| 129 |
+
### Recommendations
|
| 130 |
+
|
| 131 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 132 |
+
-->
|
| 133 |
+
|
| 134 |
+
## Training Details
|
| 135 |
+
|
| 136 |
+
### Training Dataset
|
| 137 |
+
|
| 138 |
+
#### Unnamed Dataset
|
| 139 |
+
|
| 140 |
+
* Size: 10 training samples
|
| 141 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 142 |
+
* Approximate statistics based on the first 10 samples:
|
| 143 |
+
| | sentence_0 | sentence_1 | label |
|
| 144 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 145 |
+
| type | string | string | float |
|
| 146 |
+
| details | <ul><li>min: 11 tokens</li><li>mean: 13.0 tokens</li><li>max: 15 tokens</li></ul> | <ul><li>min: 13 tokens</li><li>mean: 45.5 tokens</li><li>max: 72 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
|
| 147 |
+
* Samples:
|
| 148 |
+
| sentence_0 | sentence_1 | label |
|
| 149 |
+
|:-------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 150 |
+
| <code>Find the total revenue generated in 2024.</code> | <code>SELECT SUM(total_amount) AS total_revenue FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-12-31';</code> | <code>1.0</code> |
|
| 151 |
+
| <code>Find the top 3 product categories with the highest sales revenue.</code> | <code>SELECT p.category, SUM(oi.subtotal) AS total_revenue FROM order_items oi JOIN products p ON oi.product_id = p.product_id GROUP BY p.category ORDER BY total_revenue DESC LIMIT 3;</code> | <code>1.0</code> |
|
| 152 |
+
| <code>How many orders were placed in the last 6 months?</code> | <code>SELECT COUNT(*) AS total_orders FROM orders WHERE order_date >= DATE('now', '-6 months');</code> | <code>1.0</code> |
|
| 153 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
| 154 |
+
```json
|
| 155 |
+
{
|
| 156 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
| 157 |
+
}
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
### Training Hyperparameters
|
| 161 |
+
#### Non-Default Hyperparameters
|
| 162 |
+
|
| 163 |
+
- `per_device_train_batch_size`: 4
|
| 164 |
+
- `per_device_eval_batch_size`: 4
|
| 165 |
+
- `num_train_epochs`: 5
|
| 166 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 167 |
+
|
| 168 |
+
#### All Hyperparameters
|
| 169 |
+
<details><summary>Click to expand</summary>
|
| 170 |
+
|
| 171 |
+
- `overwrite_output_dir`: False
|
| 172 |
+
- `do_predict`: False
|
| 173 |
+
- `eval_strategy`: no
|
| 174 |
+
- `prediction_loss_only`: True
|
| 175 |
+
- `per_device_train_batch_size`: 4
|
| 176 |
+
- `per_device_eval_batch_size`: 4
|
| 177 |
+
- `per_gpu_train_batch_size`: None
|
| 178 |
+
- `per_gpu_eval_batch_size`: None
|
| 179 |
+
- `gradient_accumulation_steps`: 1
|
| 180 |
+
- `eval_accumulation_steps`: None
|
| 181 |
+
- `torch_empty_cache_steps`: None
|
| 182 |
+
- `learning_rate`: 5e-05
|
| 183 |
+
- `weight_decay`: 0.0
|
| 184 |
+
- `adam_beta1`: 0.9
|
| 185 |
+
- `adam_beta2`: 0.999
|
| 186 |
+
- `adam_epsilon`: 1e-08
|
| 187 |
+
- `max_grad_norm`: 1
|
| 188 |
+
- `num_train_epochs`: 5
|
| 189 |
+
- `max_steps`: -1
|
| 190 |
+
- `lr_scheduler_type`: linear
|
| 191 |
+
- `lr_scheduler_kwargs`: {}
|
| 192 |
+
- `warmup_ratio`: 0.0
|
| 193 |
+
- `warmup_steps`: 0
|
| 194 |
+
- `log_level`: passive
|
| 195 |
+
- `log_level_replica`: warning
|
| 196 |
+
- `log_on_each_node`: True
|
| 197 |
+
- `logging_nan_inf_filter`: True
|
| 198 |
+
- `save_safetensors`: True
|
| 199 |
+
- `save_on_each_node`: False
|
| 200 |
+
- `save_only_model`: False
|
| 201 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 202 |
+
- `no_cuda`: False
|
| 203 |
+
- `use_cpu`: False
|
| 204 |
+
- `use_mps_device`: False
|
| 205 |
+
- `seed`: 42
|
| 206 |
+
- `data_seed`: None
|
| 207 |
+
- `jit_mode_eval`: False
|
| 208 |
+
- `use_ipex`: False
|
| 209 |
+
- `bf16`: False
|
| 210 |
+
- `fp16`: False
|
| 211 |
+
- `fp16_opt_level`: O1
|
| 212 |
+
- `half_precision_backend`: auto
|
| 213 |
+
- `bf16_full_eval`: False
|
| 214 |
+
- `fp16_full_eval`: False
|
| 215 |
+
- `tf32`: None
|
| 216 |
+
- `local_rank`: 0
|
| 217 |
+
- `ddp_backend`: None
|
| 218 |
+
- `tpu_num_cores`: None
|
| 219 |
+
- `tpu_metrics_debug`: False
|
| 220 |
+
- `debug`: []
|
| 221 |
+
- `dataloader_drop_last`: False
|
| 222 |
+
- `dataloader_num_workers`: 0
|
| 223 |
+
- `dataloader_prefetch_factor`: None
|
| 224 |
+
- `past_index`: -1
|
| 225 |
+
- `disable_tqdm`: False
|
| 226 |
+
- `remove_unused_columns`: True
|
| 227 |
+
- `label_names`: None
|
| 228 |
+
- `load_best_model_at_end`: False
|
| 229 |
+
- `ignore_data_skip`: False
|
| 230 |
+
- `fsdp`: []
|
| 231 |
+
- `fsdp_min_num_params`: 0
|
| 232 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 233 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 234 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 235 |
+
- `deepspeed`: None
|
| 236 |
+
- `label_smoothing_factor`: 0.0
|
| 237 |
+
- `optim`: adamw_torch
|
| 238 |
+
- `optim_args`: None
|
| 239 |
+
- `adafactor`: False
|
| 240 |
+
- `group_by_length`: False
|
| 241 |
+
- `length_column_name`: length
|
| 242 |
+
- `ddp_find_unused_parameters`: None
|
| 243 |
+
- `ddp_bucket_cap_mb`: None
|
| 244 |
+
- `ddp_broadcast_buffers`: False
|
| 245 |
+
- `dataloader_pin_memory`: True
|
| 246 |
+
- `dataloader_persistent_workers`: False
|
| 247 |
+
- `skip_memory_metrics`: True
|
| 248 |
+
- `use_legacy_prediction_loop`: False
|
| 249 |
+
- `push_to_hub`: False
|
| 250 |
+
- `resume_from_checkpoint`: None
|
| 251 |
+
- `hub_model_id`: None
|
| 252 |
+
- `hub_strategy`: every_save
|
| 253 |
+
- `hub_private_repo`: None
|
| 254 |
+
- `hub_always_push`: False
|
| 255 |
+
- `gradient_checkpointing`: False
|
| 256 |
+
- `gradient_checkpointing_kwargs`: None
|
| 257 |
+
- `include_inputs_for_metrics`: False
|
| 258 |
+
- `include_for_metrics`: []
|
| 259 |
+
- `eval_do_concat_batches`: True
|
| 260 |
+
- `fp16_backend`: auto
|
| 261 |
+
- `push_to_hub_model_id`: None
|
| 262 |
+
- `push_to_hub_organization`: None
|
| 263 |
+
- `mp_parameters`:
|
| 264 |
+
- `auto_find_batch_size`: False
|
| 265 |
+
- `full_determinism`: False
|
| 266 |
+
- `torchdynamo`: None
|
| 267 |
+
- `ray_scope`: last
|
| 268 |
+
- `ddp_timeout`: 1800
|
| 269 |
+
- `torch_compile`: False
|
| 270 |
+
- `torch_compile_backend`: None
|
| 271 |
+
- `torch_compile_mode`: None
|
| 272 |
+
- `dispatch_batches`: None
|
| 273 |
+
- `split_batches`: None
|
| 274 |
+
- `include_tokens_per_second`: False
|
| 275 |
+
- `include_num_input_tokens_seen`: False
|
| 276 |
+
- `neftune_noise_alpha`: None
|
| 277 |
+
- `optim_target_modules`: None
|
| 278 |
+
- `batch_eval_metrics`: False
|
| 279 |
+
- `eval_on_start`: False
|
| 280 |
+
- `use_liger_kernel`: False
|
| 281 |
+
- `eval_use_gather_object`: False
|
| 282 |
+
- `average_tokens_across_devices`: False
|
| 283 |
+
- `prompts`: None
|
| 284 |
+
- `batch_sampler`: batch_sampler
|
| 285 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 286 |
+
|
| 287 |
+
</details>
|
| 288 |
+
|
| 289 |
+
### Framework Versions
|
| 290 |
+
- Python: 3.11.11
|
| 291 |
+
- Sentence Transformers: 3.4.1
|
| 292 |
+
- Transformers: 4.48.3
|
| 293 |
+
- PyTorch: 2.5.1+cu124
|
| 294 |
+
- Accelerate: 1.3.0
|
| 295 |
+
- Datasets: 3.3.2
|
| 296 |
+
- Tokenizers: 0.21.0
|
| 297 |
+
|
| 298 |
+
## Citation
|
| 299 |
+
|
| 300 |
+
### BibTeX
|
| 301 |
+
|
| 302 |
+
#### Sentence Transformers
|
| 303 |
+
```bibtex
|
| 304 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 305 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 306 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 307 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 308 |
+
month = "11",
|
| 309 |
+
year = "2019",
|
| 310 |
+
publisher = "Association for Computational Linguistics",
|
| 311 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 312 |
+
}
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
<!--
|
| 316 |
+
## Glossary
|
| 317 |
+
|
| 318 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 319 |
+
-->
|
| 320 |
+
|
| 321 |
+
<!--
|
| 322 |
+
## Model Card Authors
|
| 323 |
+
|
| 324 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 325 |
+
-->
|
| 326 |
+
|
| 327 |
+
<!--
|
| 328 |
+
## Model Card Contact
|
| 329 |
+
|
| 330 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 331 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 384,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 1536,
|
| 14 |
+
"layer_norm_eps": 1e-12,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"model_type": "bert",
|
| 17 |
+
"num_attention_heads": 12,
|
| 18 |
+
"num_hidden_layers": 6,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"position_embedding_type": "absolute",
|
| 21 |
+
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.48.3",
|
| 23 |
+
"type_vocab_size": 2,
|
| 24 |
+
"use_cache": true,
|
| 25 |
+
"vocab_size": 30522
|
| 26 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.4.1",
|
| 4 |
+
"transformers": "4.48.3",
|
| 5 |
+
"pytorch": "2.5.1+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": "cosine"
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dfdc6cf54776c94f6f8e25957c93425a2868c8f95373014922dc6645bbff0cb9
|
| 3 |
+
size 90864192
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.models.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 256,
|
| 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
|
The diff for this file is too large to render.
See raw diff
|
|
|
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": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"max_length": 128,
|
| 51 |
+
"model_max_length": 256,
|
| 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
|
|
|