Add new SentenceTransformer model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- 2_Dense/config.json +6 -0
- 2_Dense/model.safetensors +3 -0
- 3_Dense/config.json +6 -0
- 3_Dense/model.safetensors +3 -0
- README.md +346 -0
- added_tokens.json +3 -0
- config.json +60 -0
- config_sentence_transformers.json +26 -0
- model.safetensors +3 -0
- modules.json +32 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +33 -0
- tokenizer.json +3 -0
- tokenizer.model +3 -0
- tokenizer_config.json +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": 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 |
+
}
|
2_Dense/config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_features": 768,
|
| 3 |
+
"out_features": 3072,
|
| 4 |
+
"bias": false,
|
| 5 |
+
"activation_function": "torch.nn.modules.linear.Identity"
|
| 6 |
+
}
|
2_Dense/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95f0669607c11aaacd065708c5172821288aade32f748e2bb6b467c25e579d12
|
| 3 |
+
size 9437272
|
3_Dense/config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_features": 3072,
|
| 3 |
+
"out_features": 768,
|
| 4 |
+
"bias": false,
|
| 5 |
+
"activation_function": "torch.nn.modules.linear.Identity"
|
| 6 |
+
}
|
3_Dense/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e4ca3476ef6fad0296dcc6819e4ff711a130d5ab908dccef15e5d078597d4a0
|
| 3 |
+
size 9437272
|
README.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:3
|
| 9 |
+
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: google/embeddinggemma-300m
|
| 11 |
+
pipeline_tag: sentence-similarity
|
| 12 |
+
library_name: sentence-transformers
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# SentenceTransformer based on google/embeddinggemma-300m
|
| 16 |
+
|
| 17 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m). 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.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
### Model Description
|
| 22 |
+
- **Model Type:** Sentence Transformer
|
| 23 |
+
- **Base model:** [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) <!-- at revision 64614b0b8b64f0c6c1e52b07e4e9a4e8fe4d2da2 -->
|
| 24 |
+
- **Maximum Sequence Length:** 2048 tokens
|
| 25 |
+
- **Output Dimensionality:** 768 dimensions
|
| 26 |
+
- **Similarity Function:** Cosine Similarity
|
| 27 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 28 |
+
<!-- - **Language:** Unknown -->
|
| 29 |
+
<!-- - **License:** Unknown -->
|
| 30 |
+
|
| 31 |
+
### Model Sources
|
| 32 |
+
|
| 33 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 34 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 35 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 36 |
+
|
| 37 |
+
### Full Model Architecture
|
| 38 |
+
|
| 39 |
+
```
|
| 40 |
+
SentenceTransformer(
|
| 41 |
+
(0): Transformer({'max_seq_length': 2048, 'do_lower_case': False, 'architecture': 'Gemma3TextModel'})
|
| 42 |
+
(1): Pooling({'word_embedding_dimension': 768, '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})
|
| 43 |
+
(2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
|
| 44 |
+
(3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
|
| 45 |
+
(4): Normalize()
|
| 46 |
+
)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## Usage
|
| 50 |
+
|
| 51 |
+
### Direct Usage (Sentence Transformers)
|
| 52 |
+
|
| 53 |
+
First install the Sentence Transformers library:
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
pip install -U sentence-transformers
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Then you can load this model and run inference.
|
| 60 |
+
```python
|
| 61 |
+
from sentence_transformers import SentenceTransformer
|
| 62 |
+
|
| 63 |
+
# Download from the 🤗 Hub
|
| 64 |
+
model = SentenceTransformer("mcramesh/my-embedding-gemma")
|
| 65 |
+
# Run inference
|
| 66 |
+
queries = [
|
| 67 |
+
"Which planet is known as the Red Planet?",
|
| 68 |
+
]
|
| 69 |
+
documents = [
|
| 70 |
+
"Venus is often called Earth's twin because of its similar size and proximity.",
|
| 71 |
+
'Mars, known for its reddish appearance, is often referred to as the Red Planet.',
|
| 72 |
+
'Saturn, famous for its rings, is sometimes mistaken for the Red Planet.',
|
| 73 |
+
]
|
| 74 |
+
query_embeddings = model.encode_query(queries)
|
| 75 |
+
document_embeddings = model.encode_document(documents)
|
| 76 |
+
print(query_embeddings.shape, document_embeddings.shape)
|
| 77 |
+
# [1, 768] [3, 768]
|
| 78 |
+
|
| 79 |
+
# Get the similarity scores for the embeddings
|
| 80 |
+
similarities = model.similarity(query_embeddings, document_embeddings)
|
| 81 |
+
print(similarities)
|
| 82 |
+
# tensor([[0.2880, 0.6381, 0.4942]])
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
<!--
|
| 86 |
+
### Direct Usage (Transformers)
|
| 87 |
+
|
| 88 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 89 |
+
|
| 90 |
+
</details>
|
| 91 |
+
-->
|
| 92 |
+
|
| 93 |
+
<!--
|
| 94 |
+
### Downstream Usage (Sentence Transformers)
|
| 95 |
+
|
| 96 |
+
You can finetune this model on your own dataset.
|
| 97 |
+
|
| 98 |
+
<details><summary>Click to expand</summary>
|
| 99 |
+
|
| 100 |
+
</details>
|
| 101 |
+
-->
|
| 102 |
+
|
| 103 |
+
<!--
|
| 104 |
+
### Out-of-Scope Use
|
| 105 |
+
|
| 106 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 107 |
+
-->
|
| 108 |
+
|
| 109 |
+
<!--
|
| 110 |
+
## Bias, Risks and Limitations
|
| 111 |
+
|
| 112 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 113 |
+
-->
|
| 114 |
+
|
| 115 |
+
<!--
|
| 116 |
+
### Recommendations
|
| 117 |
+
|
| 118 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 119 |
+
-->
|
| 120 |
+
|
| 121 |
+
## Training Details
|
| 122 |
+
|
| 123 |
+
### Training Dataset
|
| 124 |
+
|
| 125 |
+
#### Unnamed Dataset
|
| 126 |
+
|
| 127 |
+
* Size: 3 training samples
|
| 128 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 129 |
+
* Approximate statistics based on the first 3 samples:
|
| 130 |
+
| | anchor | positive | negative |
|
| 131 |
+
|:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
| 132 |
+
| type | string | string | string |
|
| 133 |
+
| details | <ul><li>min: 10 tokens</li><li>mean: 12.0 tokens</li><li>max: 15 tokens</li></ul> | <ul><li>min: 13 tokens</li><li>mean: 15.33 tokens</li><li>max: 17 tokens</li></ul> | <ul><li>min: 12 tokens</li><li>mean: 12.67 tokens</li><li>max: 14 tokens</li></ul> |
|
| 134 |
+
* Samples:
|
| 135 |
+
| anchor | positive | negative |
|
| 136 |
+
|:--------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------|
|
| 137 |
+
| <code>How do I open a NISA account?</code> | <code>What is the procedure for starting a new tax-free investment account?</code> | <code>I want to check the balance of my regular savings account.</code> |
|
| 138 |
+
| <code>Are there fees for making an early repayment on a home loan?</code> | <code>If I pay back my house loan early, will there be any costs?</code> | <code>What is the management fee for this investment trust?</code> |
|
| 139 |
+
| <code>What is the coverage for medical insurance?</code> | <code>Tell me about the benefits of the health insurance plan.</code> | <code>What is the cancellation policy for my life insurance?</code> |
|
| 140 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 141 |
+
```json
|
| 142 |
+
{
|
| 143 |
+
"scale": 20.0,
|
| 144 |
+
"similarity_fct": "cos_sim",
|
| 145 |
+
"gather_across_devices": false
|
| 146 |
+
}
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
### Training Hyperparameters
|
| 150 |
+
#### Non-Default Hyperparameters
|
| 151 |
+
|
| 152 |
+
- `per_device_train_batch_size`: 1
|
| 153 |
+
- `learning_rate`: 2e-05
|
| 154 |
+
- `num_train_epochs`: 5
|
| 155 |
+
- `warmup_ratio`: 0.1
|
| 156 |
+
- `prompts`: task: sentence similarity | query:
|
| 157 |
+
|
| 158 |
+
#### All Hyperparameters
|
| 159 |
+
<details><summary>Click to expand</summary>
|
| 160 |
+
|
| 161 |
+
- `overwrite_output_dir`: False
|
| 162 |
+
- `do_predict`: False
|
| 163 |
+
- `eval_strategy`: no
|
| 164 |
+
- `prediction_loss_only`: True
|
| 165 |
+
- `per_device_train_batch_size`: 1
|
| 166 |
+
- `per_device_eval_batch_size`: 8
|
| 167 |
+
- `per_gpu_train_batch_size`: None
|
| 168 |
+
- `per_gpu_eval_batch_size`: None
|
| 169 |
+
- `gradient_accumulation_steps`: 1
|
| 170 |
+
- `eval_accumulation_steps`: None
|
| 171 |
+
- `torch_empty_cache_steps`: None
|
| 172 |
+
- `learning_rate`: 2e-05
|
| 173 |
+
- `weight_decay`: 0.0
|
| 174 |
+
- `adam_beta1`: 0.9
|
| 175 |
+
- `adam_beta2`: 0.999
|
| 176 |
+
- `adam_epsilon`: 1e-08
|
| 177 |
+
- `max_grad_norm`: 1.0
|
| 178 |
+
- `num_train_epochs`: 5
|
| 179 |
+
- `max_steps`: -1
|
| 180 |
+
- `lr_scheduler_type`: linear
|
| 181 |
+
- `lr_scheduler_kwargs`: {}
|
| 182 |
+
- `warmup_ratio`: 0.1
|
| 183 |
+
- `warmup_steps`: 0
|
| 184 |
+
- `log_level`: passive
|
| 185 |
+
- `log_level_replica`: warning
|
| 186 |
+
- `log_on_each_node`: True
|
| 187 |
+
- `logging_nan_inf_filter`: True
|
| 188 |
+
- `save_safetensors`: True
|
| 189 |
+
- `save_on_each_node`: False
|
| 190 |
+
- `save_only_model`: False
|
| 191 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 192 |
+
- `no_cuda`: False
|
| 193 |
+
- `use_cpu`: False
|
| 194 |
+
- `use_mps_device`: False
|
| 195 |
+
- `seed`: 42
|
| 196 |
+
- `data_seed`: None
|
| 197 |
+
- `jit_mode_eval`: False
|
| 198 |
+
- `use_ipex`: False
|
| 199 |
+
- `bf16`: False
|
| 200 |
+
- `fp16`: False
|
| 201 |
+
- `fp16_opt_level`: O1
|
| 202 |
+
- `half_precision_backend`: auto
|
| 203 |
+
- `bf16_full_eval`: False
|
| 204 |
+
- `fp16_full_eval`: False
|
| 205 |
+
- `tf32`: None
|
| 206 |
+
- `local_rank`: 0
|
| 207 |
+
- `ddp_backend`: None
|
| 208 |
+
- `tpu_num_cores`: None
|
| 209 |
+
- `tpu_metrics_debug`: False
|
| 210 |
+
- `debug`: []
|
| 211 |
+
- `dataloader_drop_last`: False
|
| 212 |
+
- `dataloader_num_workers`: 0
|
| 213 |
+
- `dataloader_prefetch_factor`: None
|
| 214 |
+
- `past_index`: -1
|
| 215 |
+
- `disable_tqdm`: False
|
| 216 |
+
- `remove_unused_columns`: True
|
| 217 |
+
- `label_names`: None
|
| 218 |
+
- `load_best_model_at_end`: False
|
| 219 |
+
- `ignore_data_skip`: False
|
| 220 |
+
- `fsdp`: []
|
| 221 |
+
- `fsdp_min_num_params`: 0
|
| 222 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 223 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 224 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 225 |
+
- `parallelism_config`: None
|
| 226 |
+
- `deepspeed`: None
|
| 227 |
+
- `label_smoothing_factor`: 0.0
|
| 228 |
+
- `optim`: adamw_torch_fused
|
| 229 |
+
- `optim_args`: None
|
| 230 |
+
- `adafactor`: False
|
| 231 |
+
- `group_by_length`: False
|
| 232 |
+
- `length_column_name`: length
|
| 233 |
+
- `ddp_find_unused_parameters`: None
|
| 234 |
+
- `ddp_bucket_cap_mb`: None
|
| 235 |
+
- `ddp_broadcast_buffers`: False
|
| 236 |
+
- `dataloader_pin_memory`: True
|
| 237 |
+
- `dataloader_persistent_workers`: False
|
| 238 |
+
- `skip_memory_metrics`: True
|
| 239 |
+
- `use_legacy_prediction_loop`: False
|
| 240 |
+
- `push_to_hub`: False
|
| 241 |
+
- `resume_from_checkpoint`: None
|
| 242 |
+
- `hub_model_id`: None
|
| 243 |
+
- `hub_strategy`: every_save
|
| 244 |
+
- `hub_private_repo`: None
|
| 245 |
+
- `hub_always_push`: False
|
| 246 |
+
- `hub_revision`: None
|
| 247 |
+
- `gradient_checkpointing`: False
|
| 248 |
+
- `gradient_checkpointing_kwargs`: None
|
| 249 |
+
- `include_inputs_for_metrics`: False
|
| 250 |
+
- `include_for_metrics`: []
|
| 251 |
+
- `eval_do_concat_batches`: True
|
| 252 |
+
- `fp16_backend`: auto
|
| 253 |
+
- `push_to_hub_model_id`: None
|
| 254 |
+
- `push_to_hub_organization`: None
|
| 255 |
+
- `mp_parameters`:
|
| 256 |
+
- `auto_find_batch_size`: False
|
| 257 |
+
- `full_determinism`: False
|
| 258 |
+
- `torchdynamo`: None
|
| 259 |
+
- `ray_scope`: last
|
| 260 |
+
- `ddp_timeout`: 1800
|
| 261 |
+
- `torch_compile`: False
|
| 262 |
+
- `torch_compile_backend`: None
|
| 263 |
+
- `torch_compile_mode`: None
|
| 264 |
+
- `include_tokens_per_second`: False
|
| 265 |
+
- `include_num_input_tokens_seen`: False
|
| 266 |
+
- `neftune_noise_alpha`: None
|
| 267 |
+
- `optim_target_modules`: None
|
| 268 |
+
- `batch_eval_metrics`: False
|
| 269 |
+
- `eval_on_start`: False
|
| 270 |
+
- `use_liger_kernel`: False
|
| 271 |
+
- `liger_kernel_config`: None
|
| 272 |
+
- `eval_use_gather_object`: False
|
| 273 |
+
- `average_tokens_across_devices`: False
|
| 274 |
+
- `prompts`: task: sentence similarity | query:
|
| 275 |
+
- `batch_sampler`: batch_sampler
|
| 276 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 277 |
+
- `router_mapping`: {}
|
| 278 |
+
- `learning_rate_mapping`: {}
|
| 279 |
+
|
| 280 |
+
</details>
|
| 281 |
+
|
| 282 |
+
### Training Logs
|
| 283 |
+
| Epoch | Step | Training Loss |
|
| 284 |
+
|:-----:|:----:|:-------------:|
|
| 285 |
+
| 1.0 | 3 | 0.0483 |
|
| 286 |
+
| 2.0 | 6 | 0.0 |
|
| 287 |
+
| 3.0 | 9 | 0.0 |
|
| 288 |
+
| 4.0 | 12 | 0.0 |
|
| 289 |
+
| 5.0 | 15 | 0.0 |
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
### Framework Versions
|
| 293 |
+
- Python: 3.12.11
|
| 294 |
+
- Sentence Transformers: 5.1.0
|
| 295 |
+
- Transformers: 4.57.0.dev0
|
| 296 |
+
- PyTorch: 2.8.0+cu126
|
| 297 |
+
- Accelerate: 1.10.1
|
| 298 |
+
- Datasets: 4.0.0
|
| 299 |
+
- Tokenizers: 0.22.0
|
| 300 |
+
|
| 301 |
+
## Citation
|
| 302 |
+
|
| 303 |
+
### BibTeX
|
| 304 |
+
|
| 305 |
+
#### Sentence Transformers
|
| 306 |
+
```bibtex
|
| 307 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 308 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 309 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 310 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 311 |
+
month = "11",
|
| 312 |
+
year = "2019",
|
| 313 |
+
publisher = "Association for Computational Linguistics",
|
| 314 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 315 |
+
}
|
| 316 |
+
```
|
| 317 |
+
|
| 318 |
+
#### MultipleNegativesRankingLoss
|
| 319 |
+
```bibtex
|
| 320 |
+
@misc{henderson2017efficient,
|
| 321 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 322 |
+
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},
|
| 323 |
+
year={2017},
|
| 324 |
+
eprint={1705.00652},
|
| 325 |
+
archivePrefix={arXiv},
|
| 326 |
+
primaryClass={cs.CL}
|
| 327 |
+
}
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
<!--
|
| 331 |
+
## Glossary
|
| 332 |
+
|
| 333 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 334 |
+
-->
|
| 335 |
+
|
| 336 |
+
<!--
|
| 337 |
+
## Model Card Authors
|
| 338 |
+
|
| 339 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 340 |
+
-->
|
| 341 |
+
|
| 342 |
+
<!--
|
| 343 |
+
## Model Card Contact
|
| 344 |
+
|
| 345 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 346 |
+
-->
|
added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_sliding_window_pattern": 6,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Gemma3TextModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"attn_logit_softcapping": null,
|
| 9 |
+
"bos_token_id": 2,
|
| 10 |
+
"dtype": "float32",
|
| 11 |
+
"eos_token_id": 1,
|
| 12 |
+
"final_logit_softcapping": null,
|
| 13 |
+
"head_dim": 256,
|
| 14 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 15 |
+
"hidden_size": 768,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 1152,
|
| 18 |
+
"layer_types": [
|
| 19 |
+
"sliding_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"sliding_attention",
|
| 22 |
+
"sliding_attention",
|
| 23 |
+
"sliding_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"sliding_attention",
|
| 26 |
+
"sliding_attention",
|
| 27 |
+
"sliding_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"sliding_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention"
|
| 43 |
+
],
|
| 44 |
+
"max_position_embeddings": 2048,
|
| 45 |
+
"model_type": "gemma3_text",
|
| 46 |
+
"num_attention_heads": 3,
|
| 47 |
+
"num_hidden_layers": 24,
|
| 48 |
+
"num_key_value_heads": 1,
|
| 49 |
+
"pad_token_id": 0,
|
| 50 |
+
"query_pre_attn_scalar": 256,
|
| 51 |
+
"rms_norm_eps": 1e-06,
|
| 52 |
+
"rope_local_base_freq": 10000.0,
|
| 53 |
+
"rope_scaling": null,
|
| 54 |
+
"rope_theta": 1000000.0,
|
| 55 |
+
"sliding_window": 512,
|
| 56 |
+
"transformers_version": "4.57.0.dev0",
|
| 57 |
+
"use_bidirectional_attention": true,
|
| 58 |
+
"use_cache": true,
|
| 59 |
+
"vocab_size": 262144
|
| 60 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "SentenceTransformer",
|
| 3 |
+
"__version__": {
|
| 4 |
+
"sentence_transformers": "5.1.0",
|
| 5 |
+
"transformers": "4.57.0.dev0",
|
| 6 |
+
"pytorch": "2.8.0+cu126"
|
| 7 |
+
},
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "task: search result | query: ",
|
| 10 |
+
"document": "title: none | text: ",
|
| 11 |
+
"BitextMining": "task: search result | query: ",
|
| 12 |
+
"Clustering": "task: clustering | query: ",
|
| 13 |
+
"Classification": "task: classification | query: ",
|
| 14 |
+
"InstructionRetrieval": "task: code retrieval | query: ",
|
| 15 |
+
"MultilabelClassification": "task: classification | query: ",
|
| 16 |
+
"PairClassification": "task: sentence similarity | query: ",
|
| 17 |
+
"Reranking": "task: search result | query: ",
|
| 18 |
+
"Retrieval": "task: search result | query: ",
|
| 19 |
+
"Retrieval-query": "task: search result | query: ",
|
| 20 |
+
"Retrieval-document": "title: none | text: ",
|
| 21 |
+
"STS": "task: sentence similarity | query: ",
|
| 22 |
+
"Summarization": "task: summarization | query: "
|
| 23 |
+
},
|
| 24 |
+
"default_prompt_name": null,
|
| 25 |
+
"similarity_fn_name": "cosine"
|
| 26 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:420b9bbc655f1280af350cb05ce7eb779af19c78c2d1644a49c862be192689c5
|
| 3 |
+
size 1211486072
|
modules.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_Dense",
|
| 18 |
+
"type": "sentence_transformers.models.Dense"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"idx": 3,
|
| 22 |
+
"name": "3",
|
| 23 |
+
"path": "3_Dense",
|
| 24 |
+
"type": "sentence_transformers.models.Dense"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"idx": 4,
|
| 28 |
+
"name": "4",
|
| 29 |
+
"path": "4_Normalize",
|
| 30 |
+
"type": "sentence_transformers.models.Normalize"
|
| 31 |
+
}
|
| 32 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 2048,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:216e2a79606fe879c9f17c529c71cd241338407fd5646b595ffd3c4b9ea1d503
|
| 3 |
+
size 33385262
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
|
| 3 |
+
size 4689074
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|