Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +433 -0
- config.json +32 -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 +57 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 1024,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: sentence-transformers
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- generated_from_trainer
|
10 |
+
- dataset_size:50
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
base_model: BAAI/bge-large-en
|
13 |
+
datasets:
|
14 |
+
- sentence-transformers/all-nli
|
15 |
+
metrics:
|
16 |
+
- cosine_accuracy
|
17 |
+
- dot_accuracy
|
18 |
+
- manhattan_accuracy
|
19 |
+
- euclidean_accuracy
|
20 |
+
- max_accuracy
|
21 |
+
widget:
|
22 |
+
- source_sentence: A construction worker is standing on a crane placing a large arm
|
23 |
+
on top of a stature in progress.
|
24 |
+
sentences:
|
25 |
+
- A man is playing with his camera.
|
26 |
+
- A person standing
|
27 |
+
- Nobody is standing
|
28 |
+
- source_sentence: A boy in red slides down an inflatable ride.
|
29 |
+
sentences:
|
30 |
+
- a baby smiling
|
31 |
+
- A boy is playing on an inflatable ride.
|
32 |
+
- A boy pierces a knife through an inflatable ride.
|
33 |
+
- source_sentence: A man in a black shirt is playing a guitar.
|
34 |
+
sentences:
|
35 |
+
- A group of women are selling their wares
|
36 |
+
- The man is wearing black.
|
37 |
+
- The man is wearing a blue shirt.
|
38 |
+
- source_sentence: A man with a large power drill standing next to his daughter with
|
39 |
+
a vacuum cleaner hose.
|
40 |
+
sentences:
|
41 |
+
- A man holding a drill stands next to a girl holding a vacuum hose.
|
42 |
+
- Kids ride an amusement ride.
|
43 |
+
- The man and girl are painting the walls.
|
44 |
+
- source_sentence: A middle-aged man works under the engine of a train on rail tracks.
|
45 |
+
sentences:
|
46 |
+
- A guy is working on a train.
|
47 |
+
- Two young asian men are squatting.
|
48 |
+
- A guy is driving to work.
|
49 |
+
pipeline_tag: sentence-similarity
|
50 |
+
model-index:
|
51 |
+
- name: SentenceTransformer based on BAAI/bge-large-en
|
52 |
+
results:
|
53 |
+
- task:
|
54 |
+
type: triplet
|
55 |
+
name: Triplet
|
56 |
+
dataset:
|
57 |
+
name: all nli test
|
58 |
+
type: all-nli-test
|
59 |
+
metrics:
|
60 |
+
- type: cosine_accuracy
|
61 |
+
value: 0.9499167801482826
|
62 |
+
name: Cosine Accuracy
|
63 |
+
- type: dot_accuracy
|
64 |
+
value: 0.050083219851717355
|
65 |
+
name: Dot Accuracy
|
66 |
+
- type: manhattan_accuracy
|
67 |
+
value: 0.9476471478287184
|
68 |
+
name: Manhattan Accuracy
|
69 |
+
- type: euclidean_accuracy
|
70 |
+
value: 0.9499167801482826
|
71 |
+
name: Euclidean Accuracy
|
72 |
+
- type: max_accuracy
|
73 |
+
value: 0.9499167801482826
|
74 |
+
name: Max Accuracy
|
75 |
+
---
|
76 |
+
|
77 |
+
# SentenceTransformer based on BAAI/bge-large-en
|
78 |
+
|
79 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-large-en](https://huggingface.co/BAAI/bge-large-en) on the [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
80 |
+
|
81 |
+
## Model Details
|
82 |
+
|
83 |
+
### Model Description
|
84 |
+
- **Model Type:** Sentence Transformer
|
85 |
+
- **Base model:** [BAAI/bge-large-en](https://huggingface.co/BAAI/bge-large-en) <!-- at revision abe7d9d814b775ca171121fb03f394dc42974275 -->
|
86 |
+
- **Maximum Sequence Length:** 512 tokens
|
87 |
+
- **Output Dimensionality:** 1024 tokens
|
88 |
+
- **Similarity Function:** Cosine Similarity
|
89 |
+
- **Training Dataset:**
|
90 |
+
- [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
91 |
+
- **Language:** en
|
92 |
+
<!-- - **License:** Unknown -->
|
93 |
+
|
94 |
+
### Model Sources
|
95 |
+
|
96 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
97 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
98 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
99 |
+
|
100 |
+
### Full Model Architecture
|
101 |
+
|
102 |
+
```
|
103 |
+
SentenceTransformer(
|
104 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
105 |
+
(1): Pooling({'word_embedding_dimension': 1024, '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})
|
106 |
+
(2): Normalize()
|
107 |
+
)
|
108 |
+
```
|
109 |
+
|
110 |
+
## Usage
|
111 |
+
|
112 |
+
### Direct Usage (Sentence Transformers)
|
113 |
+
|
114 |
+
First install the Sentence Transformers library:
|
115 |
+
|
116 |
+
```bash
|
117 |
+
pip install -U sentence-transformers
|
118 |
+
```
|
119 |
+
|
120 |
+
Then you can load this model and run inference.
|
121 |
+
```python
|
122 |
+
from sentence_transformers import SentenceTransformer
|
123 |
+
|
124 |
+
# Download from the 🤗 Hub
|
125 |
+
model = SentenceTransformer("Adapala/mpnet-base-all-nli-triplet")
|
126 |
+
# Run inference
|
127 |
+
sentences = [
|
128 |
+
'A middle-aged man works under the engine of a train on rail tracks.',
|
129 |
+
'A guy is working on a train.',
|
130 |
+
'A guy is driving to work.',
|
131 |
+
]
|
132 |
+
embeddings = model.encode(sentences)
|
133 |
+
print(embeddings.shape)
|
134 |
+
# [3, 1024]
|
135 |
+
|
136 |
+
# Get the similarity scores for the embeddings
|
137 |
+
similarities = model.similarity(embeddings, embeddings)
|
138 |
+
print(similarities.shape)
|
139 |
+
# [3, 3]
|
140 |
+
```
|
141 |
+
|
142 |
+
<!--
|
143 |
+
### Direct Usage (Transformers)
|
144 |
+
|
145 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
146 |
+
|
147 |
+
</details>
|
148 |
+
-->
|
149 |
+
|
150 |
+
<!--
|
151 |
+
### Downstream Usage (Sentence Transformers)
|
152 |
+
|
153 |
+
You can finetune this model on your own dataset.
|
154 |
+
|
155 |
+
<details><summary>Click to expand</summary>
|
156 |
+
|
157 |
+
</details>
|
158 |
+
-->
|
159 |
+
|
160 |
+
<!--
|
161 |
+
### Out-of-Scope Use
|
162 |
+
|
163 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
164 |
+
-->
|
165 |
+
|
166 |
+
## Evaluation
|
167 |
+
|
168 |
+
### Metrics
|
169 |
+
|
170 |
+
#### Triplet
|
171 |
+
* Dataset: `all-nli-test`
|
172 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
173 |
+
|
174 |
+
| Metric | Value |
|
175 |
+
|:-------------------|:-----------|
|
176 |
+
| cosine_accuracy | 0.9499 |
|
177 |
+
| dot_accuracy | 0.0501 |
|
178 |
+
| manhattan_accuracy | 0.9476 |
|
179 |
+
| euclidean_accuracy | 0.9499 |
|
180 |
+
| **max_accuracy** | **0.9499** |
|
181 |
+
|
182 |
+
<!--
|
183 |
+
## Bias, Risks and Limitations
|
184 |
+
|
185 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
186 |
+
-->
|
187 |
+
|
188 |
+
<!--
|
189 |
+
### Recommendations
|
190 |
+
|
191 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
192 |
+
-->
|
193 |
+
|
194 |
+
## Training Details
|
195 |
+
|
196 |
+
### Training Dataset
|
197 |
+
|
198 |
+
#### sentence-transformers/all-nli
|
199 |
+
|
200 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
201 |
+
* Size: 50 training samples
|
202 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
203 |
+
* Approximate statistics based on the first 1000 samples:
|
204 |
+
| | anchor | positive | negative |
|
205 |
+
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
206 |
+
| type | string | string | string |
|
207 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 21.7 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 10.4 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.34 tokens</li><li>max: 30 tokens</li></ul> |
|
208 |
+
* Samples:
|
209 |
+
| anchor | positive | negative |
|
210 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
211 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
|
212 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
213 |
+
| <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
|
214 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
215 |
+
```json
|
216 |
+
{
|
217 |
+
"scale": 20.0,
|
218 |
+
"similarity_fct": "cos_sim"
|
219 |
+
}
|
220 |
+
```
|
221 |
+
|
222 |
+
### Evaluation Dataset
|
223 |
+
|
224 |
+
#### sentence-transformers/all-nli
|
225 |
+
|
226 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
227 |
+
* Size: 6,584 evaluation samples
|
228 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
229 |
+
* Approximate statistics based on the first 1000 samples:
|
230 |
+
| | anchor | positive | negative |
|
231 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
232 |
+
| type | string | string | string |
|
233 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 17.95 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.78 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.35 tokens</li><li>max: 29 tokens</li></ul> |
|
234 |
+
* Samples:
|
235 |
+
| anchor | positive | negative |
|
236 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
|
237 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
|
238 |
+
| <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
|
239 |
+
| <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
|
240 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
241 |
+
```json
|
242 |
+
{
|
243 |
+
"scale": 20.0,
|
244 |
+
"similarity_fct": "cos_sim"
|
245 |
+
}
|
246 |
+
```
|
247 |
+
|
248 |
+
### Training Hyperparameters
|
249 |
+
#### Non-Default Hyperparameters
|
250 |
+
|
251 |
+
- `eval_strategy`: steps
|
252 |
+
- `per_device_train_batch_size`: 16
|
253 |
+
- `per_device_eval_batch_size`: 16
|
254 |
+
- `num_train_epochs`: 1
|
255 |
+
- `warmup_ratio`: 0.1
|
256 |
+
- `fp16`: True
|
257 |
+
- `batch_sampler`: no_duplicates
|
258 |
+
|
259 |
+
#### All Hyperparameters
|
260 |
+
<details><summary>Click to expand</summary>
|
261 |
+
|
262 |
+
- `overwrite_output_dir`: False
|
263 |
+
- `do_predict`: False
|
264 |
+
- `eval_strategy`: steps
|
265 |
+
- `prediction_loss_only`: True
|
266 |
+
- `per_device_train_batch_size`: 16
|
267 |
+
- `per_device_eval_batch_size`: 16
|
268 |
+
- `per_gpu_train_batch_size`: None
|
269 |
+
- `per_gpu_eval_batch_size`: None
|
270 |
+
- `gradient_accumulation_steps`: 1
|
271 |
+
- `eval_accumulation_steps`: None
|
272 |
+
- `learning_rate`: 5e-05
|
273 |
+
- `weight_decay`: 0.0
|
274 |
+
- `adam_beta1`: 0.9
|
275 |
+
- `adam_beta2`: 0.999
|
276 |
+
- `adam_epsilon`: 1e-08
|
277 |
+
- `max_grad_norm`: 1.0
|
278 |
+
- `num_train_epochs`: 1
|
279 |
+
- `max_steps`: -1
|
280 |
+
- `lr_scheduler_type`: linear
|
281 |
+
- `lr_scheduler_kwargs`: {}
|
282 |
+
- `warmup_ratio`: 0.1
|
283 |
+
- `warmup_steps`: 0
|
284 |
+
- `log_level`: passive
|
285 |
+
- `log_level_replica`: warning
|
286 |
+
- `log_on_each_node`: True
|
287 |
+
- `logging_nan_inf_filter`: True
|
288 |
+
- `save_safetensors`: True
|
289 |
+
- `save_on_each_node`: False
|
290 |
+
- `save_only_model`: False
|
291 |
+
- `restore_callback_states_from_checkpoint`: False
|
292 |
+
- `no_cuda`: False
|
293 |
+
- `use_cpu`: False
|
294 |
+
- `use_mps_device`: False
|
295 |
+
- `seed`: 42
|
296 |
+
- `data_seed`: None
|
297 |
+
- `jit_mode_eval`: False
|
298 |
+
- `use_ipex`: False
|
299 |
+
- `bf16`: False
|
300 |
+
- `fp16`: True
|
301 |
+
- `fp16_opt_level`: O1
|
302 |
+
- `half_precision_backend`: auto
|
303 |
+
- `bf16_full_eval`: False
|
304 |
+
- `fp16_full_eval`: False
|
305 |
+
- `tf32`: None
|
306 |
+
- `local_rank`: 0
|
307 |
+
- `ddp_backend`: None
|
308 |
+
- `tpu_num_cores`: None
|
309 |
+
- `tpu_metrics_debug`: False
|
310 |
+
- `debug`: []
|
311 |
+
- `dataloader_drop_last`: False
|
312 |
+
- `dataloader_num_workers`: 0
|
313 |
+
- `dataloader_prefetch_factor`: None
|
314 |
+
- `past_index`: -1
|
315 |
+
- `disable_tqdm`: False
|
316 |
+
- `remove_unused_columns`: True
|
317 |
+
- `label_names`: None
|
318 |
+
- `load_best_model_at_end`: False
|
319 |
+
- `ignore_data_skip`: False
|
320 |
+
- `fsdp`: []
|
321 |
+
- `fsdp_min_num_params`: 0
|
322 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
323 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
324 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
325 |
+
- `deepspeed`: None
|
326 |
+
- `label_smoothing_factor`: 0.0
|
327 |
+
- `optim`: adamw_torch
|
328 |
+
- `optim_args`: None
|
329 |
+
- `adafactor`: False
|
330 |
+
- `group_by_length`: False
|
331 |
+
- `length_column_name`: length
|
332 |
+
- `ddp_find_unused_parameters`: None
|
333 |
+
- `ddp_bucket_cap_mb`: None
|
334 |
+
- `ddp_broadcast_buffers`: False
|
335 |
+
- `dataloader_pin_memory`: True
|
336 |
+
- `dataloader_persistent_workers`: False
|
337 |
+
- `skip_memory_metrics`: True
|
338 |
+
- `use_legacy_prediction_loop`: False
|
339 |
+
- `push_to_hub`: False
|
340 |
+
- `resume_from_checkpoint`: None
|
341 |
+
- `hub_model_id`: None
|
342 |
+
- `hub_strategy`: every_save
|
343 |
+
- `hub_private_repo`: False
|
344 |
+
- `hub_always_push`: False
|
345 |
+
- `gradient_checkpointing`: False
|
346 |
+
- `gradient_checkpointing_kwargs`: None
|
347 |
+
- `include_inputs_for_metrics`: False
|
348 |
+
- `eval_do_concat_batches`: True
|
349 |
+
- `fp16_backend`: auto
|
350 |
+
- `push_to_hub_model_id`: None
|
351 |
+
- `push_to_hub_organization`: None
|
352 |
+
- `mp_parameters`:
|
353 |
+
- `auto_find_batch_size`: False
|
354 |
+
- `full_determinism`: False
|
355 |
+
- `torchdynamo`: None
|
356 |
+
- `ray_scope`: last
|
357 |
+
- `ddp_timeout`: 1800
|
358 |
+
- `torch_compile`: False
|
359 |
+
- `torch_compile_backend`: None
|
360 |
+
- `torch_compile_mode`: None
|
361 |
+
- `dispatch_batches`: None
|
362 |
+
- `split_batches`: None
|
363 |
+
- `include_tokens_per_second`: False
|
364 |
+
- `include_num_input_tokens_seen`: False
|
365 |
+
- `neftune_noise_alpha`: None
|
366 |
+
- `optim_target_modules`: None
|
367 |
+
- `batch_eval_metrics`: False
|
368 |
+
- `batch_sampler`: no_duplicates
|
369 |
+
- `multi_dataset_batch_sampler`: proportional
|
370 |
+
|
371 |
+
</details>
|
372 |
+
|
373 |
+
### Training Logs
|
374 |
+
| Epoch | Step | all-nli-test_max_accuracy |
|
375 |
+
|:-----:|:----:|:-------------------------:|
|
376 |
+
| 1.0 | 4 | 0.9499 |
|
377 |
+
|
378 |
+
|
379 |
+
### Framework Versions
|
380 |
+
- Python: 3.10.13
|
381 |
+
- Sentence Transformers: 3.0.1
|
382 |
+
- Transformers: 4.41.2
|
383 |
+
- PyTorch: 2.1.2
|
384 |
+
- Accelerate: 0.30.1
|
385 |
+
- Datasets: 2.19.2
|
386 |
+
- Tokenizers: 0.19.1
|
387 |
+
|
388 |
+
## Citation
|
389 |
+
|
390 |
+
### BibTeX
|
391 |
+
|
392 |
+
#### Sentence Transformers
|
393 |
+
```bibtex
|
394 |
+
@inproceedings{reimers-2019-sentence-bert,
|
395 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
396 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
397 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
398 |
+
month = "11",
|
399 |
+
year = "2019",
|
400 |
+
publisher = "Association for Computational Linguistics",
|
401 |
+
url = "https://arxiv.org/abs/1908.10084",
|
402 |
+
}
|
403 |
+
```
|
404 |
+
|
405 |
+
#### MultipleNegativesRankingLoss
|
406 |
+
```bibtex
|
407 |
+
@misc{henderson2017efficient,
|
408 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
409 |
+
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},
|
410 |
+
year={2017},
|
411 |
+
eprint={1705.00652},
|
412 |
+
archivePrefix={arXiv},
|
413 |
+
primaryClass={cs.CL}
|
414 |
+
}
|
415 |
+
```
|
416 |
+
|
417 |
+
<!--
|
418 |
+
## Glossary
|
419 |
+
|
420 |
+
*Clearly define terms in order to be accessible across audiences.*
|
421 |
+
-->
|
422 |
+
|
423 |
+
<!--
|
424 |
+
## Model Card Authors
|
425 |
+
|
426 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
427 |
+
-->
|
428 |
+
|
429 |
+
<!--
|
430 |
+
## Model Card Contact
|
431 |
+
|
432 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
433 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "BAAI/bge-large-en",
|
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": 1024,
|
12 |
+
"id2label": {
|
13 |
+
"0": "LABEL_0"
|
14 |
+
},
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 4096,
|
17 |
+
"label2id": {
|
18 |
+
"LABEL_0": 0
|
19 |
+
},
|
20 |
+
"layer_norm_eps": 1e-12,
|
21 |
+
"max_position_embeddings": 512,
|
22 |
+
"model_type": "bert",
|
23 |
+
"num_attention_heads": 16,
|
24 |
+
"num_hidden_layers": 24,
|
25 |
+
"pad_token_id": 0,
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"torch_dtype": "float32",
|
28 |
+
"transformers_version": "4.41.2",
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 30522
|
32 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.41.2",
|
5 |
+
"pytorch": "2.1.2"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63eeac716032b6256565a57cfdc4f80b2286220a57059cd9329e5182f47afb20
|
3 |
+
size 1340612432
|
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,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|