Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +398 -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": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,398 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- dataset_size:19979
|
8 |
+
- loss:CoSENTLoss
|
9 |
+
base_model: avsolatorio/GIST-small-Embedding-v0
|
10 |
+
widget:
|
11 |
+
- source_sentence: why oval face shape is attractive?
|
12 |
+
sentences:
|
13 |
+
- Both are also designed to add depth to your face, but in different ways. Bronzing
|
14 |
+
primarily warms up your face, adding color in places where the sun would naturally
|
15 |
+
hit. ... On the other hand, contouring is a makeup artist-approved technique that
|
16 |
+
works to add structure and shadow to your face.
|
17 |
+
- '''Ahjussi'' literally means uncle. You can use it for people who are very old
|
18 |
+
than you. Like someone who is the age of your father, or someone with an age gap
|
19 |
+
of 20 years or above.'
|
20 |
+
- Most major banks will be open on Christmas Eve 2018, even though it's a federal
|
21 |
+
holiday and generally recognized as a bank holiday.
|
22 |
+
- source_sentence: is ceo same as owner?
|
23 |
+
sentences:
|
24 |
+
- The CEO reports to the Chairman (acting on behalf of the Board) and to the Board
|
25 |
+
directly. The Chairman is not responsible for executive matters regarding the
|
26 |
+
Company's business. Other than the CEO and the Company Secretary, no executive
|
27 |
+
reports to the Chairman, other than through the Board.
|
28 |
+
- Understanding Deregulation In response to the country's greatest financial crisis
|
29 |
+
in its history, Franklin D. Roosevelt's administration enacted many forms of financial
|
30 |
+
regulation, including the Securities Exchange Acts of 1933 and 1934 and the U.S.
|
31 |
+
Banking Act of 1933, otherwise known as the Glass-Steagall Act.
|
32 |
+
- Gdzie kupić wodorosty? Na naszym rynku są głównie algi suszone. Bez problemu kupimy
|
33 |
+
je w supermarketach, sklepach ze zdrową żywnością, bywają w rybnych - największy
|
34 |
+
wybór jest oczywiście w sklepach internetowych. Za 10 arkuszy glonów nori zapłacimy
|
35 |
+
ok.
|
36 |
+
- source_sentence: is gern stock a good buy?
|
37 |
+
sentences:
|
38 |
+
- 'The majority of these pads are made from one of two absorptive materials: Silica
|
39 |
+
gel (a purified sand) or cellulose (a purified plant fiber), which are then coated
|
40 |
+
in a non-toxic plastic wrapping that''s perforated, allowing the liquid to seep
|
41 |
+
in and stay there.'
|
42 |
+
- '[''The Vanguard Total Stock Market ETF (NYSEMKT:VTI)'', ''The Vanguard Total
|
43 |
+
International Stock ETF (NASDAQ:VXUS)'', ''Amazon.com (NASDAQ:AMZN)'', ''Alphabet
|
44 |
+
(NASDAQ:GOOG)(NASDAQ:GOOGL)'', ''Facebook (NASDAQ:FB)'', ''Intuitive Surgical
|
45 |
+
(NASDAQ:ISRG)'']'
|
46 |
+
- SCD is a disease that worsens over time. Treatments are available that can prevent
|
47 |
+
complications and lengthen the lives of those who have this condition.
|
48 |
+
- source_sentence: where are sulfhydryl groups found?
|
49 |
+
sentences:
|
50 |
+
- Sulfhydryl groups can be found in the amino acid cysteine. When two cysteine residues
|
51 |
+
are in close proximity to each other, they can form a disulfide bridge also called
|
52 |
+
cystine.
|
53 |
+
- '["On your Android phone or tablet, open your device''s Settings app .", ''Tap
|
54 |
+
Google. Manage your Google Account.'', ''At the top, tap Personal info.'', ''Under
|
55 |
+
"Profile," tap Name Edit. . You may be asked to sign in.'', ''Enter your name,
|
56 |
+
then tap Done.'']'
|
57 |
+
- '[''Difficulty digesting fat. It may take your body time to adjust to its new
|
58 |
+
method of digesting fat. ... '', ''Diarrhea and flatulence. Indigestion can cause
|
59 |
+
diarrhea or flatulence, often made worse by excess fat or too little fiber in
|
60 |
+
the diet. ... '', ''Constipation. ... '', ''Intestinal injury. ... '', ''Jaundice
|
61 |
+
or fever.'']'
|
62 |
+
- source_sentence: do assets in an irrevocable trust get a step up in basis?
|
63 |
+
sentences:
|
64 |
+
- An irrevocable grantor trust can own S corporation stock if it meets IRS regulations.
|
65 |
+
... If the trust owner designation is not made or is unclear, the trust will not
|
66 |
+
qualify under IRS regulations. An irrevocable grantor trust does not have to make
|
67 |
+
an election to be an S corporation shareholder.
|
68 |
+
- Pineapple juice also contains bromelain, a group of enzymes linked to health benefits,
|
69 |
+
such as reduced inflammation, improved digestion, and stronger immunity ( 9 ).
|
70 |
+
Pineapple juice is rich in antioxidants, which help protect your body from damage
|
71 |
+
and disease.
|
72 |
+
- 'Ideally, fuel up two hours before you exercise by: Hydrating with water. Eating
|
73 |
+
healthy carbohydrates such as whole-grain cereals (with low-fat or skim milk),
|
74 |
+
whole-wheat toast, low-fat or fat-free yogurt, whole grain pasta, brown rice,
|
75 |
+
fruits and vegetables.'
|
76 |
+
pipeline_tag: sentence-similarity
|
77 |
+
library_name: sentence-transformers
|
78 |
+
---
|
79 |
+
|
80 |
+
# SentenceTransformer based on avsolatorio/GIST-small-Embedding-v0
|
81 |
+
|
82 |
+
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.
|
83 |
+
|
84 |
+
## Model Details
|
85 |
+
|
86 |
+
### Model Description
|
87 |
+
- **Model Type:** Sentence Transformer
|
88 |
+
- **Base model:** [avsolatorio/GIST-small-Embedding-v0](https://huggingface.co/avsolatorio/GIST-small-Embedding-v0) <!-- at revision 75e62fd210b9fde790430e0b2f040b0b00a021b1 -->
|
89 |
+
- **Maximum Sequence Length:** 512 tokens
|
90 |
+
- **Output Dimensionality:** 384 dimensions
|
91 |
+
- **Similarity Function:** Cosine Similarity
|
92 |
+
<!-- - **Training Dataset:** Unknown -->
|
93 |
+
<!-- - **Language:** Unknown -->
|
94 |
+
<!-- - **License:** Unknown -->
|
95 |
+
|
96 |
+
### Model Sources
|
97 |
+
|
98 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
99 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
100 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
101 |
+
|
102 |
+
### Full Model Architecture
|
103 |
+
|
104 |
+
```
|
105 |
+
SentenceTransformer(
|
106 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
|
107 |
+
(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})
|
108 |
+
(2): Normalize()
|
109 |
+
)
|
110 |
+
```
|
111 |
+
|
112 |
+
## Usage
|
113 |
+
|
114 |
+
### Direct Usage (Sentence Transformers)
|
115 |
+
|
116 |
+
First install the Sentence Transformers library:
|
117 |
+
|
118 |
+
```bash
|
119 |
+
pip install -U sentence-transformers
|
120 |
+
```
|
121 |
+
|
122 |
+
Then you can load this model and run inference.
|
123 |
+
```python
|
124 |
+
from sentence_transformers import SentenceTransformer
|
125 |
+
|
126 |
+
# Download from the 🤗 Hub
|
127 |
+
model = SentenceTransformer("moshew/gist_small_ft_gooaq_v4")
|
128 |
+
# Run inference
|
129 |
+
sentences = [
|
130 |
+
'do assets in an irrevocable trust get a step up in basis?',
|
131 |
+
'An irrevocable grantor trust can own S corporation stock if it meets IRS regulations. ... If the trust owner designation is not made or is unclear, the trust will not qualify under IRS regulations. An irrevocable grantor trust does not have to make an election to be an S corporation shareholder.',
|
132 |
+
'Ideally, fuel up two hours before you exercise by: Hydrating with water. Eating healthy carbohydrates such as whole-grain cereals (with low-fat or skim milk), whole-wheat toast, low-fat or fat-free yogurt, whole grain pasta, brown rice, fruits and vegetables.',
|
133 |
+
]
|
134 |
+
embeddings = model.encode(sentences)
|
135 |
+
print(embeddings.shape)
|
136 |
+
# [3, 384]
|
137 |
+
|
138 |
+
# Get the similarity scores for the embeddings
|
139 |
+
similarities = model.similarity(embeddings, embeddings)
|
140 |
+
print(similarities.shape)
|
141 |
+
# [3, 3]
|
142 |
+
```
|
143 |
+
|
144 |
+
<!--
|
145 |
+
### Direct Usage (Transformers)
|
146 |
+
|
147 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
148 |
+
|
149 |
+
</details>
|
150 |
+
-->
|
151 |
+
|
152 |
+
<!--
|
153 |
+
### Downstream Usage (Sentence Transformers)
|
154 |
+
|
155 |
+
You can finetune this model on your own dataset.
|
156 |
+
|
157 |
+
<details><summary>Click to expand</summary>
|
158 |
+
|
159 |
+
</details>
|
160 |
+
-->
|
161 |
+
|
162 |
+
<!--
|
163 |
+
### Out-of-Scope Use
|
164 |
+
|
165 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
166 |
+
-->
|
167 |
+
|
168 |
+
<!--
|
169 |
+
## Bias, Risks and Limitations
|
170 |
+
|
171 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
172 |
+
-->
|
173 |
+
|
174 |
+
<!--
|
175 |
+
### Recommendations
|
176 |
+
|
177 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
178 |
+
-->
|
179 |
+
|
180 |
+
## Training Details
|
181 |
+
|
182 |
+
### Training Dataset
|
183 |
+
|
184 |
+
#### Unnamed Dataset
|
185 |
+
|
186 |
+
* Size: 19,979 training samples
|
187 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
188 |
+
* Approximate statistics based on the first 1000 samples:
|
189 |
+
| | sentence1 | sentence2 | label |
|
190 |
+
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
191 |
+
| type | string | string | float |
|
192 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 11.87 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 59.82 tokens</li><li>max: 139 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
|
193 |
+
* Samples:
|
194 |
+
| sentence1 | sentence2 | label |
|
195 |
+
|:-------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
196 |
+
| <code>if someone blocked you on iphone can you send a text?</code> | <code>If someone has blocked you on their device, you won't get an alert when it happens. You can still use iMessage to text your former contact, but they'll never receive the message or any notification of a text received in their Messages app.</code> | <code>1.0</code> |
|
197 |
+
| <code>if someone blocked you on iphone can you send a text?</code> | <code>If someone has blocked you on their device, you won't get an alert when it happens. You can still use iMessage to text your former contact, but they'll never receive the message or any notification of a text received in their Messages app. There is one clue that you've been blocked, though.</code> | <code>0.0</code> |
|
198 |
+
| <code>can you have a relationship without expectations?</code> | <code>Loving without expectations means being able to love someone even when they are letting you down. It means loving even when it feels awful. Even when you're crying so hard you can't see straight or say clear sentences. Loving someone without expectations means knowing they aren't perfect, but neither are you.</code> | <code>1.0</code> |
|
199 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
200 |
+
```json
|
201 |
+
{
|
202 |
+
"scale": 20.0,
|
203 |
+
"similarity_fct": "pairwise_cos_sim"
|
204 |
+
}
|
205 |
+
```
|
206 |
+
|
207 |
+
### Training Hyperparameters
|
208 |
+
#### Non-Default Hyperparameters
|
209 |
+
|
210 |
+
- `per_device_train_batch_size`: 16
|
211 |
+
- `per_device_eval_batch_size`: 16
|
212 |
+
- `num_train_epochs`: 1
|
213 |
+
- `warmup_ratio`: 0.1
|
214 |
+
- `seed`: 12
|
215 |
+
- `bf16`: True
|
216 |
+
- `dataloader_num_workers`: 4
|
217 |
+
|
218 |
+
#### All Hyperparameters
|
219 |
+
<details><summary>Click to expand</summary>
|
220 |
+
|
221 |
+
- `overwrite_output_dir`: False
|
222 |
+
- `do_predict`: False
|
223 |
+
- `eval_strategy`: no
|
224 |
+
- `prediction_loss_only`: True
|
225 |
+
- `per_device_train_batch_size`: 16
|
226 |
+
- `per_device_eval_batch_size`: 16
|
227 |
+
- `per_gpu_train_batch_size`: None
|
228 |
+
- `per_gpu_eval_batch_size`: None
|
229 |
+
- `gradient_accumulation_steps`: 1
|
230 |
+
- `eval_accumulation_steps`: None
|
231 |
+
- `torch_empty_cache_steps`: None
|
232 |
+
- `learning_rate`: 5e-05
|
233 |
+
- `weight_decay`: 0.0
|
234 |
+
- `adam_beta1`: 0.9
|
235 |
+
- `adam_beta2`: 0.999
|
236 |
+
- `adam_epsilon`: 1e-08
|
237 |
+
- `max_grad_norm`: 1.0
|
238 |
+
- `num_train_epochs`: 1
|
239 |
+
- `max_steps`: -1
|
240 |
+
- `lr_scheduler_type`: linear
|
241 |
+
- `lr_scheduler_kwargs`: {}
|
242 |
+
- `warmup_ratio`: 0.1
|
243 |
+
- `warmup_steps`: 0
|
244 |
+
- `log_level`: passive
|
245 |
+
- `log_level_replica`: warning
|
246 |
+
- `log_on_each_node`: True
|
247 |
+
- `logging_nan_inf_filter`: True
|
248 |
+
- `save_safetensors`: True
|
249 |
+
- `save_on_each_node`: False
|
250 |
+
- `save_only_model`: False
|
251 |
+
- `restore_callback_states_from_checkpoint`: False
|
252 |
+
- `no_cuda`: False
|
253 |
+
- `use_cpu`: False
|
254 |
+
- `use_mps_device`: False
|
255 |
+
- `seed`: 12
|
256 |
+
- `data_seed`: None
|
257 |
+
- `jit_mode_eval`: False
|
258 |
+
- `use_ipex`: False
|
259 |
+
- `bf16`: True
|
260 |
+
- `fp16`: False
|
261 |
+
- `fp16_opt_level`: O1
|
262 |
+
- `half_precision_backend`: auto
|
263 |
+
- `bf16_full_eval`: False
|
264 |
+
- `fp16_full_eval`: False
|
265 |
+
- `tf32`: None
|
266 |
+
- `local_rank`: 0
|
267 |
+
- `ddp_backend`: None
|
268 |
+
- `tpu_num_cores`: None
|
269 |
+
- `tpu_metrics_debug`: False
|
270 |
+
- `debug`: []
|
271 |
+
- `dataloader_drop_last`: False
|
272 |
+
- `dataloader_num_workers`: 4
|
273 |
+
- `dataloader_prefetch_factor`: None
|
274 |
+
- `past_index`: -1
|
275 |
+
- `disable_tqdm`: False
|
276 |
+
- `remove_unused_columns`: True
|
277 |
+
- `label_names`: None
|
278 |
+
- `load_best_model_at_end`: False
|
279 |
+
- `ignore_data_skip`: False
|
280 |
+
- `fsdp`: []
|
281 |
+
- `fsdp_min_num_params`: 0
|
282 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
283 |
+
- `tp_size`: 0
|
284 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
285 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
286 |
+
- `deepspeed`: None
|
287 |
+
- `label_smoothing_factor`: 0.0
|
288 |
+
- `optim`: adamw_torch
|
289 |
+
- `optim_args`: None
|
290 |
+
- `adafactor`: False
|
291 |
+
- `group_by_length`: False
|
292 |
+
- `length_column_name`: length
|
293 |
+
- `ddp_find_unused_parameters`: None
|
294 |
+
- `ddp_bucket_cap_mb`: None
|
295 |
+
- `ddp_broadcast_buffers`: False
|
296 |
+
- `dataloader_pin_memory`: True
|
297 |
+
- `dataloader_persistent_workers`: False
|
298 |
+
- `skip_memory_metrics`: True
|
299 |
+
- `use_legacy_prediction_loop`: False
|
300 |
+
- `push_to_hub`: False
|
301 |
+
- `resume_from_checkpoint`: None
|
302 |
+
- `hub_model_id`: None
|
303 |
+
- `hub_strategy`: every_save
|
304 |
+
- `hub_private_repo`: None
|
305 |
+
- `hub_always_push`: False
|
306 |
+
- `gradient_checkpointing`: False
|
307 |
+
- `gradient_checkpointing_kwargs`: None
|
308 |
+
- `include_inputs_for_metrics`: False
|
309 |
+
- `include_for_metrics`: []
|
310 |
+
- `eval_do_concat_batches`: True
|
311 |
+
- `fp16_backend`: auto
|
312 |
+
- `push_to_hub_model_id`: None
|
313 |
+
- `push_to_hub_organization`: None
|
314 |
+
- `mp_parameters`:
|
315 |
+
- `auto_find_batch_size`: False
|
316 |
+
- `full_determinism`: False
|
317 |
+
- `torchdynamo`: None
|
318 |
+
- `ray_scope`: last
|
319 |
+
- `ddp_timeout`: 1800
|
320 |
+
- `torch_compile`: False
|
321 |
+
- `torch_compile_backend`: None
|
322 |
+
- `torch_compile_mode`: None
|
323 |
+
- `include_tokens_per_second`: False
|
324 |
+
- `include_num_input_tokens_seen`: False
|
325 |
+
- `neftune_noise_alpha`: None
|
326 |
+
- `optim_target_modules`: None
|
327 |
+
- `batch_eval_metrics`: False
|
328 |
+
- `eval_on_start`: False
|
329 |
+
- `use_liger_kernel`: False
|
330 |
+
- `eval_use_gather_object`: False
|
331 |
+
- `average_tokens_across_devices`: False
|
332 |
+
- `prompts`: None
|
333 |
+
- `batch_sampler`: batch_sampler
|
334 |
+
- `multi_dataset_batch_sampler`: proportional
|
335 |
+
|
336 |
+
</details>
|
337 |
+
|
338 |
+
### Training Logs
|
339 |
+
| Epoch | Step | Training Loss |
|
340 |
+
|:------:|:----:|:-------------:|
|
341 |
+
| 0.0008 | 1 | 3.6013 |
|
342 |
+
| 0.8006 | 1000 | 3.4341 |
|
343 |
+
|
344 |
+
|
345 |
+
### Framework Versions
|
346 |
+
- Python: 3.11.12
|
347 |
+
- Sentence Transformers: 4.1.0
|
348 |
+
- Transformers: 4.51.3
|
349 |
+
- PyTorch: 2.6.0+cu124
|
350 |
+
- Accelerate: 1.5.2
|
351 |
+
- Datasets: 3.5.0
|
352 |
+
- Tokenizers: 0.21.1
|
353 |
+
|
354 |
+
## Citation
|
355 |
+
|
356 |
+
### BibTeX
|
357 |
+
|
358 |
+
#### Sentence Transformers
|
359 |
+
```bibtex
|
360 |
+
@inproceedings{reimers-2019-sentence-bert,
|
361 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
362 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
363 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
364 |
+
month = "11",
|
365 |
+
year = "2019",
|
366 |
+
publisher = "Association for Computational Linguistics",
|
367 |
+
url = "https://arxiv.org/abs/1908.10084",
|
368 |
+
}
|
369 |
+
```
|
370 |
+
|
371 |
+
#### CoSENTLoss
|
372 |
+
```bibtex
|
373 |
+
@online{kexuefm-8847,
|
374 |
+
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
375 |
+
author={Su Jianlin},
|
376 |
+
year={2022},
|
377 |
+
month={Jan},
|
378 |
+
url={https://kexue.fm/archives/8847},
|
379 |
+
}
|
380 |
+
```
|
381 |
+
|
382 |
+
<!--
|
383 |
+
## Glossary
|
384 |
+
|
385 |
+
*Clearly define terms in order to be accessible across audiences.*
|
386 |
+
-->
|
387 |
+
|
388 |
+
<!--
|
389 |
+
## Model Card Authors
|
390 |
+
|
391 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
392 |
+
-->
|
393 |
+
|
394 |
+
<!--
|
395 |
+
## Model Card Contact
|
396 |
+
|
397 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
398 |
+
-->
|
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:791abe7f5a88953363d55678d78f28905fef3b3bdc20acdf4e5cbe133ac5df25
|
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
|
|