Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:6000
loss:CoSENTLoss
text-embeddings-inference
Instructions to use moshew/gist_small_ft_gooaq_v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use moshew/gist_small_ft_gooaq_v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("moshew/gist_small_ft_gooaq_v1") sentences = [ "are paris metro tickets one way?", "The two big differences between the 2.4 GHz and 5 GHz frequencies are speed and range. A wireless transmission at 2.4 GHz provides internet to a larger area but sacrifices speed, while 5 GHz provides faster speeds to a smaller area.", "The State of Rhode Island has adopted the income shares model to determine the weekly child support order. It is based upon the philosophy that children are entitled to the standard of living based upon both parents monthly income. ... Weekly gross income of both parents before taxes and before any other deductions.", "Insulin NPH may be administered in 2 divided doses daily (either as equally divided doses, or as ~2/3 of the dose before the morning meal and ~1/3 of the dose before the evening meal or at bedtime)." ] 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 +396 -0
- config.json +30 -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 +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": 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":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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:6000
|
| 8 |
+
- loss:CoSENTLoss
|
| 9 |
+
base_model: avsolatorio/GIST-small-Embedding-v0
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: are paris metro tickets one way?
|
| 12 |
+
sentences:
|
| 13 |
+
- The two big differences between the 2.4 GHz and 5 GHz frequencies are speed and
|
| 14 |
+
range. A wireless transmission at 2.4 GHz provides internet to a larger area but
|
| 15 |
+
sacrifices speed, while 5 GHz provides faster speeds to a smaller area.
|
| 16 |
+
- The State of Rhode Island has adopted the income shares model to determine the
|
| 17 |
+
weekly child support order. It is based upon the philosophy that children are
|
| 18 |
+
entitled to the standard of living based upon both parents monthly income. ...
|
| 19 |
+
Weekly gross income of both parents before taxes and before any other deductions.
|
| 20 |
+
- Insulin NPH may be administered in 2 divided doses daily (either as equally divided
|
| 21 |
+
doses, or as ~2/3 of the dose before the morning meal and ~1/3 of the dose before
|
| 22 |
+
the evening meal or at bedtime).
|
| 23 |
+
- source_sentence: how to pxe boot surface pro?
|
| 24 |
+
sentences:
|
| 25 |
+
- The UKTV Play app, with shows from Dave, Drama, Yesterday and Really, is available
|
| 26 |
+
on smart TVs powered by Freeview Play and newer Samsung TVs. ... You can watch
|
| 27 |
+
catch up and box sets from W, Alibi, Gold, Eden, Dave, Drama and Yesterday on
|
| 28 |
+
Sky+HD, Sky Q and Sky Go.
|
| 29 |
+
- In a branch For cash that was deposited over the counter at another bank, the
|
| 30 |
+
processing and clearance time is 5 business days (not including public holidays).
|
| 31 |
+
- '[''Click "account" in the upper right corner of your Facebook page.'', ''Select
|
| 32 |
+
"privacy settings."'', ''Under "block lists" at the bottom center of the page,
|
| 33 |
+
click "edit your lists."'', ''At the top, under "block users," add the name or
|
| 34 |
+
e-mail address of the person you\''d like to block.'', ''Click "block."'']'
|
| 35 |
+
- source_sentence: what is long-term capital gains rate?
|
| 36 |
+
sentences:
|
| 37 |
+
- You can get Social Security retirement or survivors benefits and work at the same
|
| 38 |
+
time. But, if you're younger than full retirement age, and earn more than certain
|
| 39 |
+
amounts, your benefits will be reduced. The amount that your benefits are reduced,
|
| 40 |
+
however, isn't truly lost.
|
| 41 |
+
- Dreams that involve shouting can warn of impending trouble. When you are the one
|
| 42 |
+
shouting, this can mean you are going through a tough time in your waking life.
|
| 43 |
+
You may be only feeling only negative emotions. ... Hearing someone else shouting
|
| 44 |
+
signifies a warning of fright or anger.
|
| 45 |
+
- 'A regular polygon is a flat shape whose sides are all equal and whose angles
|
| 46 |
+
are all equal. The formula for finding the sum of the measure of the interior
|
| 47 |
+
angles is (n - 2) * 180. To find the measure of one interior angle, we take that
|
| 48 |
+
formula and divide by the number of sides n: (n - 2) * 180 / n.'
|
| 49 |
+
- source_sentence: can a girl get pregnant two days after her menstruation?
|
| 50 |
+
sentences:
|
| 51 |
+
- Newborn usually refers to a baby from birth to about 2 months of age. Infants
|
| 52 |
+
can be considered children anywhere from birth to 1 year old. Baby can be used
|
| 53 |
+
to refer to any child from birth to age 4 years old, thus encompassing newborns,
|
| 54 |
+
infants, and toddlers.
|
| 55 |
+
- 'According to professional numerologists, there are three ultimately lucky numbers
|
| 56 |
+
for Capricorn-born people: they are 5, 6, and 8. In case they want to increase
|
| 57 |
+
the chance of success for anything, simply make use of these numbers.'
|
| 58 |
+
- He's a professional dancer and model. J.C. Before entering the Big Brother house,
|
| 59 |
+
J.C. was a dancer who traveled the world to perform professionally. “I do professional
|
| 60 |
+
dancing. Not really break dancing, I do more choreography dancing,” he said in
|
| 61 |
+
an interview with Entertainment Tonight Canada.
|
| 62 |
+
- source_sentence: how long does it take to transfer money between anz and westpac?
|
| 63 |
+
sentences:
|
| 64 |
+
- This service is currently offered free of charge by the bank. You can get the
|
| 65 |
+
last 'Available' balance of your account (by an SMS) by giving a Missed Call to
|
| 66 |
+
18008431122. You can get the Mini Statement (by an SMS) for last 5 transactions
|
| 67 |
+
in your account by giving a Missed Call to 18008431133. 1.
|
| 68 |
+
- Simply put, 1 ply toilet paper is made of a single layer of paper, while 2 ply
|
| 69 |
+
has two layers. ... In the 1950's, a manufacturer created a method to roll and
|
| 70 |
+
attach one-ply paper together to make a thicker “two-ply”. For years, 2-ply toilet
|
| 71 |
+
tissue was always thicker and usually assumed to be better.
|
| 72 |
+
- The main difference between unique and distinct is that UNIQUE is a constraint
|
| 73 |
+
that is used on the input of data and ensures data integrity. While DISTINCT keyword
|
| 74 |
+
is used when we want to query our results or in other words, output the data.
|
| 75 |
+
pipeline_tag: sentence-similarity
|
| 76 |
+
library_name: sentence-transformers
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
# SentenceTransformer based on avsolatorio/GIST-small-Embedding-v0
|
| 80 |
+
|
| 81 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [avsolatorio/GIST-small-Embedding-v0](https://huggingface.co/avsolatorio/GIST-small-Embedding-v0). 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.
|
| 82 |
+
|
| 83 |
+
## Model Details
|
| 84 |
+
|
| 85 |
+
### Model Description
|
| 86 |
+
- **Model Type:** Sentence Transformer
|
| 87 |
+
- **Base model:** [avsolatorio/GIST-small-Embedding-v0](https://huggingface.co/avsolatorio/GIST-small-Embedding-v0) <!-- at revision 75e62fd210b9fde790430e0b2f040b0b00a021b1 -->
|
| 88 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 89 |
+
- **Output Dimensionality:** 384 dimensions
|
| 90 |
+
- **Similarity Function:** Cosine Similarity
|
| 91 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 92 |
+
<!-- - **Language:** Unknown -->
|
| 93 |
+
<!-- - **License:** Unknown -->
|
| 94 |
+
|
| 95 |
+
### Model Sources
|
| 96 |
+
|
| 97 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 98 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 99 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 100 |
+
|
| 101 |
+
### Full Model Architecture
|
| 102 |
+
|
| 103 |
+
```
|
| 104 |
+
SentenceTransformer(
|
| 105 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
| 106 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
| 107 |
+
(2): Normalize()
|
| 108 |
+
)
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
## Usage
|
| 112 |
+
|
| 113 |
+
### Direct Usage (Sentence Transformers)
|
| 114 |
+
|
| 115 |
+
First install the Sentence Transformers library:
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
pip install -U sentence-transformers
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
Then you can load this model and run inference.
|
| 122 |
+
```python
|
| 123 |
+
from sentence_transformers import SentenceTransformer
|
| 124 |
+
|
| 125 |
+
# Download from the 🤗 Hub
|
| 126 |
+
model = SentenceTransformer("moshew/gist_small_ft_gooaq_v1")
|
| 127 |
+
# Run inference
|
| 128 |
+
sentences = [
|
| 129 |
+
'how long does it take to transfer money between anz and westpac?',
|
| 130 |
+
"This service is currently offered free of charge by the bank. You can get the last 'Available' balance of your account (by an SMS) by giving a Missed Call to 18008431122. You can get the Mini Statement (by an SMS) for last 5 transactions in your account by giving a Missed Call to 18008431133. 1.",
|
| 131 |
+
"Simply put, 1 ply toilet paper is made of a single layer of paper, while 2 ply has two layers. ... In the 1950's, a manufacturer created a method to roll and attach one-ply paper together to make a thicker “two-ply”. For years, 2-ply toilet tissue was always thicker and usually assumed to be better.",
|
| 132 |
+
]
|
| 133 |
+
embeddings = model.encode(sentences)
|
| 134 |
+
print(embeddings.shape)
|
| 135 |
+
# [3, 384]
|
| 136 |
+
|
| 137 |
+
# Get the similarity scores for the embeddings
|
| 138 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 139 |
+
print(similarities.shape)
|
| 140 |
+
# [3, 3]
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
<!--
|
| 144 |
+
### Direct Usage (Transformers)
|
| 145 |
+
|
| 146 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 147 |
+
|
| 148 |
+
</details>
|
| 149 |
+
-->
|
| 150 |
+
|
| 151 |
+
<!--
|
| 152 |
+
### Downstream Usage (Sentence Transformers)
|
| 153 |
+
|
| 154 |
+
You can finetune this model on your own dataset.
|
| 155 |
+
|
| 156 |
+
<details><summary>Click to expand</summary>
|
| 157 |
+
|
| 158 |
+
</details>
|
| 159 |
+
-->
|
| 160 |
+
|
| 161 |
+
<!--
|
| 162 |
+
### Out-of-Scope Use
|
| 163 |
+
|
| 164 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 165 |
+
-->
|
| 166 |
+
|
| 167 |
+
<!--
|
| 168 |
+
## Bias, Risks and Limitations
|
| 169 |
+
|
| 170 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 171 |
+
-->
|
| 172 |
+
|
| 173 |
+
<!--
|
| 174 |
+
### Recommendations
|
| 175 |
+
|
| 176 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 177 |
+
-->
|
| 178 |
+
|
| 179 |
+
## Training Details
|
| 180 |
+
|
| 181 |
+
### Training Dataset
|
| 182 |
+
|
| 183 |
+
#### Unnamed Dataset
|
| 184 |
+
|
| 185 |
+
* Size: 6,000 training samples
|
| 186 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
| 187 |
+
* Approximate statistics based on the first 1000 samples:
|
| 188 |
+
| | sentence1 | sentence2 | label |
|
| 189 |
+
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 190 |
+
| type | string | string | float |
|
| 191 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 11.97 tokens</li><li>max: 23 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 58.86 tokens</li><li>max: 126 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.17</li><li>max: 1.0</li></ul> |
|
| 192 |
+
* Samples:
|
| 193 |
+
| sentence1 | sentence2 | label |
|
| 194 |
+
|:--------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 195 |
+
| <code>what is the difference between rapid rise yeast and bread machine yeast?</code> | <code>Though there are some minor differences in shape and nutrients, Rapid-Rise Yeast is (pretty much) the same as Instant Yeast and Bread Machine Yeast. ... Also, Rapid-Rise Yeast is a little more potent than Active Dry Yeast and can be mixed in with your dry ingredients directly.</code> | <code>1.0</code> |
|
| 196 |
+
| <code>what is the difference between rapid rise yeast and bread machine yeast?</code> | <code>Omeprazole and esomeprazole therapy are both associated with a low rate of transient and asymptomatic serum aminotransferase elevations and are rare causes of clinically apparent liver injury.</code> | <code>0.0</code> |
|
| 197 |
+
| <code>what is the difference between rapid rise yeast and bread machine yeast?</code> | <code>Benefits of choosing a soft starter A variable frequency drive (VFD) is a motor control device that protects and controls the speed of an AC induction motor. A VFD can control the speed of the motor during the start and stop cycle, as well as throughout the run cycle.</code> | <code>0.0</code> |
|
| 198 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
| 199 |
+
```json
|
| 200 |
+
{
|
| 201 |
+
"scale": 20.0,
|
| 202 |
+
"similarity_fct": "pairwise_cos_sim"
|
| 203 |
+
}
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
### Training Hyperparameters
|
| 207 |
+
#### Non-Default Hyperparameters
|
| 208 |
+
|
| 209 |
+
- `per_device_train_batch_size`: 16
|
| 210 |
+
- `per_device_eval_batch_size`: 16
|
| 211 |
+
- `num_train_epochs`: 1
|
| 212 |
+
- `warmup_ratio`: 0.1
|
| 213 |
+
- `seed`: 12
|
| 214 |
+
- `bf16`: True
|
| 215 |
+
- `dataloader_num_workers`: 4
|
| 216 |
+
|
| 217 |
+
#### All Hyperparameters
|
| 218 |
+
<details><summary>Click to expand</summary>
|
| 219 |
+
|
| 220 |
+
- `overwrite_output_dir`: False
|
| 221 |
+
- `do_predict`: False
|
| 222 |
+
- `eval_strategy`: no
|
| 223 |
+
- `prediction_loss_only`: True
|
| 224 |
+
- `per_device_train_batch_size`: 16
|
| 225 |
+
- `per_device_eval_batch_size`: 16
|
| 226 |
+
- `per_gpu_train_batch_size`: None
|
| 227 |
+
- `per_gpu_eval_batch_size`: None
|
| 228 |
+
- `gradient_accumulation_steps`: 1
|
| 229 |
+
- `eval_accumulation_steps`: None
|
| 230 |
+
- `torch_empty_cache_steps`: None
|
| 231 |
+
- `learning_rate`: 5e-05
|
| 232 |
+
- `weight_decay`: 0.0
|
| 233 |
+
- `adam_beta1`: 0.9
|
| 234 |
+
- `adam_beta2`: 0.999
|
| 235 |
+
- `adam_epsilon`: 1e-08
|
| 236 |
+
- `max_grad_norm`: 1.0
|
| 237 |
+
- `num_train_epochs`: 1
|
| 238 |
+
- `max_steps`: -1
|
| 239 |
+
- `lr_scheduler_type`: linear
|
| 240 |
+
- `lr_scheduler_kwargs`: {}
|
| 241 |
+
- `warmup_ratio`: 0.1
|
| 242 |
+
- `warmup_steps`: 0
|
| 243 |
+
- `log_level`: passive
|
| 244 |
+
- `log_level_replica`: warning
|
| 245 |
+
- `log_on_each_node`: True
|
| 246 |
+
- `logging_nan_inf_filter`: True
|
| 247 |
+
- `save_safetensors`: True
|
| 248 |
+
- `save_on_each_node`: False
|
| 249 |
+
- `save_only_model`: False
|
| 250 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 251 |
+
- `no_cuda`: False
|
| 252 |
+
- `use_cpu`: False
|
| 253 |
+
- `use_mps_device`: False
|
| 254 |
+
- `seed`: 12
|
| 255 |
+
- `data_seed`: None
|
| 256 |
+
- `jit_mode_eval`: False
|
| 257 |
+
- `use_ipex`: False
|
| 258 |
+
- `bf16`: True
|
| 259 |
+
- `fp16`: False
|
| 260 |
+
- `fp16_opt_level`: O1
|
| 261 |
+
- `half_precision_backend`: auto
|
| 262 |
+
- `bf16_full_eval`: False
|
| 263 |
+
- `fp16_full_eval`: False
|
| 264 |
+
- `tf32`: None
|
| 265 |
+
- `local_rank`: 0
|
| 266 |
+
- `ddp_backend`: None
|
| 267 |
+
- `tpu_num_cores`: None
|
| 268 |
+
- `tpu_metrics_debug`: False
|
| 269 |
+
- `debug`: []
|
| 270 |
+
- `dataloader_drop_last`: False
|
| 271 |
+
- `dataloader_num_workers`: 4
|
| 272 |
+
- `dataloader_prefetch_factor`: None
|
| 273 |
+
- `past_index`: -1
|
| 274 |
+
- `disable_tqdm`: False
|
| 275 |
+
- `remove_unused_columns`: True
|
| 276 |
+
- `label_names`: None
|
| 277 |
+
- `load_best_model_at_end`: False
|
| 278 |
+
- `ignore_data_skip`: False
|
| 279 |
+
- `fsdp`: []
|
| 280 |
+
- `fsdp_min_num_params`: 0
|
| 281 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 282 |
+
- `tp_size`: 0
|
| 283 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 284 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 285 |
+
- `deepspeed`: None
|
| 286 |
+
- `label_smoothing_factor`: 0.0
|
| 287 |
+
- `optim`: adamw_torch
|
| 288 |
+
- `optim_args`: None
|
| 289 |
+
- `adafactor`: False
|
| 290 |
+
- `group_by_length`: False
|
| 291 |
+
- `length_column_name`: length
|
| 292 |
+
- `ddp_find_unused_parameters`: None
|
| 293 |
+
- `ddp_bucket_cap_mb`: None
|
| 294 |
+
- `ddp_broadcast_buffers`: False
|
| 295 |
+
- `dataloader_pin_memory`: True
|
| 296 |
+
- `dataloader_persistent_workers`: False
|
| 297 |
+
- `skip_memory_metrics`: True
|
| 298 |
+
- `use_legacy_prediction_loop`: False
|
| 299 |
+
- `push_to_hub`: False
|
| 300 |
+
- `resume_from_checkpoint`: None
|
| 301 |
+
- `hub_model_id`: None
|
| 302 |
+
- `hub_strategy`: every_save
|
| 303 |
+
- `hub_private_repo`: None
|
| 304 |
+
- `hub_always_push`: False
|
| 305 |
+
- `gradient_checkpointing`: False
|
| 306 |
+
- `gradient_checkpointing_kwargs`: None
|
| 307 |
+
- `include_inputs_for_metrics`: False
|
| 308 |
+
- `include_for_metrics`: []
|
| 309 |
+
- `eval_do_concat_batches`: True
|
| 310 |
+
- `fp16_backend`: auto
|
| 311 |
+
- `push_to_hub_model_id`: None
|
| 312 |
+
- `push_to_hub_organization`: None
|
| 313 |
+
- `mp_parameters`:
|
| 314 |
+
- `auto_find_batch_size`: False
|
| 315 |
+
- `full_determinism`: False
|
| 316 |
+
- `torchdynamo`: None
|
| 317 |
+
- `ray_scope`: last
|
| 318 |
+
- `ddp_timeout`: 1800
|
| 319 |
+
- `torch_compile`: False
|
| 320 |
+
- `torch_compile_backend`: None
|
| 321 |
+
- `torch_compile_mode`: None
|
| 322 |
+
- `include_tokens_per_second`: False
|
| 323 |
+
- `include_num_input_tokens_seen`: False
|
| 324 |
+
- `neftune_noise_alpha`: None
|
| 325 |
+
- `optim_target_modules`: None
|
| 326 |
+
- `batch_eval_metrics`: False
|
| 327 |
+
- `eval_on_start`: False
|
| 328 |
+
- `use_liger_kernel`: False
|
| 329 |
+
- `eval_use_gather_object`: False
|
| 330 |
+
- `average_tokens_across_devices`: False
|
| 331 |
+
- `prompts`: None
|
| 332 |
+
- `batch_sampler`: batch_sampler
|
| 333 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 334 |
+
|
| 335 |
+
</details>
|
| 336 |
+
|
| 337 |
+
### Training Logs
|
| 338 |
+
| Epoch | Step | Training Loss |
|
| 339 |
+
|:------:|:----:|:-------------:|
|
| 340 |
+
| 0.0027 | 1 | 0.3104 |
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
### Framework Versions
|
| 344 |
+
- Python: 3.11.12
|
| 345 |
+
- Sentence Transformers: 4.1.0
|
| 346 |
+
- Transformers: 4.51.3
|
| 347 |
+
- PyTorch: 2.6.0+cu124
|
| 348 |
+
- Accelerate: 1.5.2
|
| 349 |
+
- Datasets: 3.5.0
|
| 350 |
+
- Tokenizers: 0.21.1
|
| 351 |
+
|
| 352 |
+
## Citation
|
| 353 |
+
|
| 354 |
+
### BibTeX
|
| 355 |
+
|
| 356 |
+
#### Sentence Transformers
|
| 357 |
+
```bibtex
|
| 358 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 359 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 360 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 361 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 362 |
+
month = "11",
|
| 363 |
+
year = "2019",
|
| 364 |
+
publisher = "Association for Computational Linguistics",
|
| 365 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 366 |
+
}
|
| 367 |
+
```
|
| 368 |
+
|
| 369 |
+
#### CoSENTLoss
|
| 370 |
+
```bibtex
|
| 371 |
+
@online{kexuefm-8847,
|
| 372 |
+
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
| 373 |
+
author={Su Jianlin},
|
| 374 |
+
year={2022},
|
| 375 |
+
month={Jan},
|
| 376 |
+
url={https://kexue.fm/archives/8847},
|
| 377 |
+
}
|
| 378 |
+
```
|
| 379 |
+
|
| 380 |
+
<!--
|
| 381 |
+
## Glossary
|
| 382 |
+
|
| 383 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 384 |
+
-->
|
| 385 |
+
|
| 386 |
+
<!--
|
| 387 |
+
## Model Card Authors
|
| 388 |
+
|
| 389 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 390 |
+
-->
|
| 391 |
+
|
| 392 |
+
<!--
|
| 393 |
+
## Model Card Contact
|
| 394 |
+
|
| 395 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 396 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"id2label": {
|
| 11 |
+
"0": "LABEL_0"
|
| 12 |
+
},
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 1536,
|
| 15 |
+
"label2id": {
|
| 16 |
+
"LABEL_0": 0
|
| 17 |
+
},
|
| 18 |
+
"layer_norm_eps": 1e-12,
|
| 19 |
+
"max_position_embeddings": 512,
|
| 20 |
+
"model_type": "bert",
|
| 21 |
+
"num_attention_heads": 12,
|
| 22 |
+
"num_hidden_layers": 12,
|
| 23 |
+
"pad_token_id": 0,
|
| 24 |
+
"position_embedding_type": "absolute",
|
| 25 |
+
"torch_dtype": "float32",
|
| 26 |
+
"transformers_version": "4.51.3",
|
| 27 |
+
"type_vocab_size": 2,
|
| 28 |
+
"use_cache": true,
|
| 29 |
+
"vocab_size": 30522
|
| 30 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "4.1.0",
|
| 4 |
+
"transformers": "4.51.3",
|
| 5 |
+
"pytorch": "2.6.0+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:8617819d481e36acc23459eb01555a7e5df0eff1ec8a10285ec70341de49faad
|
| 3 |
+
size 133462128
|
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": 512,
|
| 3 |
+
"do_lower_case": true
|
| 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,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": 512,
|
| 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
|
|
|