Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +608 -0
- config.json +35 -0
- config_sentence_transformers.json +10 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -0
- vocab.json +0 -0
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 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,608 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: jinaai/jina-embeddings-v2-base-code
|
| 3 |
+
datasets: []
|
| 4 |
+
language: []
|
| 5 |
+
library_name: sentence-transformers
|
| 6 |
+
metrics:
|
| 7 |
+
- cosine_accuracy
|
| 8 |
+
- dot_accuracy
|
| 9 |
+
- manhattan_accuracy
|
| 10 |
+
- euclidean_accuracy
|
| 11 |
+
- max_accuracy
|
| 12 |
+
pipeline_tag: sentence-similarity
|
| 13 |
+
tags:
|
| 14 |
+
- sentence-transformers
|
| 15 |
+
- sentence-similarity
|
| 16 |
+
- feature-extraction
|
| 17 |
+
- generated_from_trainer
|
| 18 |
+
- dataset_size:317521
|
| 19 |
+
- loss:TripletLoss
|
| 20 |
+
widget:
|
| 21 |
+
- source_sentence: Write a function to extract every specified element from a given
|
| 22 |
+
two dimensional list.
|
| 23 |
+
sentences:
|
| 24 |
+
- "def nCr_mod_p(n, r, p): \r\n\tif (r > n- r): \r\n\t\tr = n - r \r\n\tC = [0 for\
|
| 25 |
+
\ i in range(r + 1)] \r\n\tC[0] = 1 \r\n\tfor i in range(1, n + 1): \r\n\t\tfor\
|
| 26 |
+
\ j in range(min(i, r), 0, -1): \r\n\t\t\tC[j] = (C[j] + C[j-1]) % p \r\n\treturn\
|
| 27 |
+
\ C[r] "
|
| 28 |
+
- "import cmath\r\ndef len_complex(a,b):\r\n cn=complex(a,b)\r\n length=abs(cn)\r\
|
| 29 |
+
\n return length"
|
| 30 |
+
- "def specified_element(nums, N):\r\n result = [i[N] for i in nums]\r\n return\
|
| 31 |
+
\ result"
|
| 32 |
+
- source_sentence: Write a python function to find the kth element in an array containing
|
| 33 |
+
odd elements first and then even elements.
|
| 34 |
+
sentences:
|
| 35 |
+
- "def get_Number(n, k): \r\n arr = [0] * n; \r\n i = 0; \r\n odd = 1;\
|
| 36 |
+
\ \r\n while (odd <= n): \r\n arr[i] = odd; \r\n i += 1; \r\
|
| 37 |
+
\n odd += 2;\r\n even = 2; \r\n while (even <= n): \r\n arr[i]\
|
| 38 |
+
\ = even; \r\n i += 1;\r\n even += 2; \r\n return arr[k - 1]; "
|
| 39 |
+
- "def sort_matrix(M):\r\n result = sorted(M, key=sum)\r\n return result"
|
| 40 |
+
- "INT_BITS = 32\r\ndef left_Rotate(n,d): \r\n return (n << d)|(n >> (INT_BITS\
|
| 41 |
+
\ - d)) "
|
| 42 |
+
- source_sentence: Write a function to remove all the words with k length in the given
|
| 43 |
+
string.
|
| 44 |
+
sentences:
|
| 45 |
+
- "def remove_tuples(test_list, K):\r\n res = [ele for ele in test_list if len(ele)\
|
| 46 |
+
\ != K]\r\n return (res) "
|
| 47 |
+
- "def is_Sub_Array(A,B,n,m): \r\n i = 0; j = 0; \r\n while (i < n and j <\
|
| 48 |
+
\ m): \r\n if (A[i] == B[j]): \r\n i += 1; \r\n \
|
| 49 |
+
\ j += 1; \r\n if (j == m): \r\n return True; \r\n\
|
| 50 |
+
\ else: \r\n i = i - j + 1; \r\n j = 0; \r\n\
|
| 51 |
+
\ return False; "
|
| 52 |
+
- "def remove_length(test_str, K):\r\n temp = test_str.split()\r\n res = [ele\
|
| 53 |
+
\ for ele in temp if len(ele) != K]\r\n res = ' '.join(res)\r\n return (res) "
|
| 54 |
+
- source_sentence: Write a function to find the occurence of characters 'std' in the
|
| 55 |
+
given string 1. list item 1. list item 1. list item 2. list item 2. list item
|
| 56 |
+
2. list item
|
| 57 |
+
sentences:
|
| 58 |
+
- "def magic_square_test(my_matrix):\r\n iSize = len(my_matrix[0])\r\n sum_list\
|
| 59 |
+
\ = []\r\n sum_list.extend([sum (lines) for lines in my_matrix]) \r\n \
|
| 60 |
+
\ for col in range(iSize):\r\n sum_list.append(sum(row[col] for row in\
|
| 61 |
+
\ my_matrix))\r\n result1 = 0\r\n for i in range(0,iSize):\r\n result1\
|
| 62 |
+
\ +=my_matrix[i][i]\r\n sum_list.append(result1) \r\n result2 = 0\r\
|
| 63 |
+
\n for i in range(iSize-1,-1,-1):\r\n result2 +=my_matrix[i][i]\r\n\
|
| 64 |
+
\ sum_list.append(result2)\r\n if len(set(sum_list))>1:\r\n return\
|
| 65 |
+
\ False\r\n return True"
|
| 66 |
+
- "def count_occurance(s):\r\n count=0\r\n for i in range(len(s)):\r\n if (s[i]==\
|
| 67 |
+
\ 's' and s[i+1]=='t' and s[i+2]== 'd'):\r\n count = count + 1\r\n return\
|
| 68 |
+
\ count"
|
| 69 |
+
- "def power(a,b):\r\n\tif b==0:\r\n\t\treturn 1\r\n\telif a==0:\r\n\t\treturn 0\r\
|
| 70 |
+
\n\telif b==1:\r\n\t\treturn a\r\n\telse:\r\n\t\treturn a*power(a,b-1)"
|
| 71 |
+
- source_sentence: Write a function to find sum and average of first n natural numbers.
|
| 72 |
+
sentences:
|
| 73 |
+
- "def long_words(n, str):\r\n word_len = []\r\n txt = str.split(\" \")\r\n\
|
| 74 |
+
\ for x in txt:\r\n if len(x) > n:\r\n word_len.append(x)\r\
|
| 75 |
+
\n return word_len\t"
|
| 76 |
+
- "def long_words(n, str):\r\n word_len = []\r\n txt = str.split(\" \")\r\n\
|
| 77 |
+
\ for x in txt:\r\n if len(x) > n:\r\n word_len.append(x)\r\
|
| 78 |
+
\n return word_len\t"
|
| 79 |
+
- "def sum_average(number):\r\n total = 0\r\n for value in range(1, number + 1):\r\
|
| 80 |
+
\n total = total + value\r\n average = total / number\r\n return (total,average)"
|
| 81 |
+
model-index:
|
| 82 |
+
- name: SentenceTransformer based on jinaai/jina-embeddings-v2-base-code
|
| 83 |
+
results:
|
| 84 |
+
- task:
|
| 85 |
+
type: triplet
|
| 86 |
+
name: Triplet
|
| 87 |
+
dataset:
|
| 88 |
+
name: sts dev
|
| 89 |
+
type: sts-dev
|
| 90 |
+
metrics:
|
| 91 |
+
- type: cosine_accuracy
|
| 92 |
+
value: 0.4794644366223058
|
| 93 |
+
name: Cosine Accuracy
|
| 94 |
+
- type: dot_accuracy
|
| 95 |
+
value: 0.3189056517809246
|
| 96 |
+
name: Dot Accuracy
|
| 97 |
+
- type: manhattan_accuracy
|
| 98 |
+
value: 0.49047258618028966
|
| 99 |
+
name: Manhattan Accuracy
|
| 100 |
+
- type: euclidean_accuracy
|
| 101 |
+
value: 0.47951587657351136
|
| 102 |
+
name: Euclidean Accuracy
|
| 103 |
+
- type: max_accuracy
|
| 104 |
+
value: 0.49047258618028966
|
| 105 |
+
name: Max Accuracy
|
| 106 |
+
---
|
| 107 |
+
|
| 108 |
+
# SentenceTransformer based on jinaai/jina-embeddings-v2-base-code
|
| 109 |
+
|
| 110 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [jinaai/jina-embeddings-v2-base-code](https://huggingface.co/jinaai/jina-embeddings-v2-base-code). 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.
|
| 111 |
+
|
| 112 |
+
## Model Details
|
| 113 |
+
|
| 114 |
+
### Model Description
|
| 115 |
+
- **Model Type:** Sentence Transformer
|
| 116 |
+
- **Base model:** [jinaai/jina-embeddings-v2-base-code](https://huggingface.co/jinaai/jina-embeddings-v2-base-code) <!-- at revision fa8baa2e34f0fe28aae07f9bd7bcd1215de41dce -->
|
| 117 |
+
- **Maximum Sequence Length:** 8192 tokens
|
| 118 |
+
- **Output Dimensionality:** 768 tokens
|
| 119 |
+
- **Similarity Function:** Cosine Similarity
|
| 120 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 121 |
+
<!-- - **Language:** Unknown -->
|
| 122 |
+
<!-- - **License:** Unknown -->
|
| 123 |
+
|
| 124 |
+
### Model Sources
|
| 125 |
+
|
| 126 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 127 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 128 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 129 |
+
|
| 130 |
+
### Full Model Architecture
|
| 131 |
+
|
| 132 |
+
```
|
| 133 |
+
SentenceTransformer(
|
| 134 |
+
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: BertModel
|
| 135 |
+
(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})
|
| 136 |
+
)
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
## Usage
|
| 140 |
+
|
| 141 |
+
### Direct Usage (Sentence Transformers)
|
| 142 |
+
|
| 143 |
+
First install the Sentence Transformers library:
|
| 144 |
+
|
| 145 |
+
```bash
|
| 146 |
+
pip install -U sentence-transformers
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
Then you can load this model and run inference.
|
| 150 |
+
```python
|
| 151 |
+
from sentence_transformers import SentenceTransformer
|
| 152 |
+
|
| 153 |
+
# Download from the 🤗 Hub
|
| 154 |
+
model = SentenceTransformer("Nutanix/jina-embeddings-v2-base-code-mbpp")
|
| 155 |
+
# Run inference
|
| 156 |
+
sentences = [
|
| 157 |
+
'Write a function to find sum and average of first n natural numbers.',
|
| 158 |
+
'def sum_average(number):\r\n total = 0\r\n for value in range(1, number + 1):\r\n total = total + value\r\n average = total / number\r\n return (total,average)',
|
| 159 |
+
'def long_words(n, str):\r\n word_len = []\r\n txt = str.split(" ")\r\n for x in txt:\r\n if len(x) > n:\r\n word_len.append(x)\r\n return word_len\t',
|
| 160 |
+
]
|
| 161 |
+
embeddings = model.encode(sentences)
|
| 162 |
+
print(embeddings.shape)
|
| 163 |
+
# [3, 768]
|
| 164 |
+
|
| 165 |
+
# Get the similarity scores for the embeddings
|
| 166 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 167 |
+
print(similarities.shape)
|
| 168 |
+
# [3, 3]
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
<!--
|
| 172 |
+
### Direct Usage (Transformers)
|
| 173 |
+
|
| 174 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 175 |
+
|
| 176 |
+
</details>
|
| 177 |
+
-->
|
| 178 |
+
|
| 179 |
+
<!--
|
| 180 |
+
### Downstream Usage (Sentence Transformers)
|
| 181 |
+
|
| 182 |
+
You can finetune this model on your own dataset.
|
| 183 |
+
|
| 184 |
+
<details><summary>Click to expand</summary>
|
| 185 |
+
|
| 186 |
+
</details>
|
| 187 |
+
-->
|
| 188 |
+
|
| 189 |
+
<!--
|
| 190 |
+
### Out-of-Scope Use
|
| 191 |
+
|
| 192 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 193 |
+
-->
|
| 194 |
+
|
| 195 |
+
## Evaluation
|
| 196 |
+
|
| 197 |
+
### Metrics
|
| 198 |
+
|
| 199 |
+
#### Triplet
|
| 200 |
+
* Dataset: `sts-dev`
|
| 201 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
| 202 |
+
|
| 203 |
+
| Metric | Value |
|
| 204 |
+
|:-------------------|:-----------|
|
| 205 |
+
| cosine_accuracy | 0.4795 |
|
| 206 |
+
| dot_accuracy | 0.3189 |
|
| 207 |
+
| manhattan_accuracy | 0.4905 |
|
| 208 |
+
| euclidean_accuracy | 0.4795 |
|
| 209 |
+
| **max_accuracy** | **0.4905** |
|
| 210 |
+
|
| 211 |
+
<!--
|
| 212 |
+
## Bias, Risks and Limitations
|
| 213 |
+
|
| 214 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 215 |
+
-->
|
| 216 |
+
|
| 217 |
+
<!--
|
| 218 |
+
### Recommendations
|
| 219 |
+
|
| 220 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 221 |
+
-->
|
| 222 |
+
|
| 223 |
+
## Training Details
|
| 224 |
+
|
| 225 |
+
### Training Hyperparameters
|
| 226 |
+
#### Non-Default Hyperparameters
|
| 227 |
+
|
| 228 |
+
- `per_device_train_batch_size`: 16
|
| 229 |
+
- `per_device_eval_batch_size`: 16
|
| 230 |
+
- `num_train_epochs`: 1
|
| 231 |
+
- `warmup_ratio`: 0.1
|
| 232 |
+
- `fp16`: True
|
| 233 |
+
- `batch_sampler`: no_duplicates
|
| 234 |
+
|
| 235 |
+
#### All Hyperparameters
|
| 236 |
+
<details><summary>Click to expand</summary>
|
| 237 |
+
|
| 238 |
+
- `overwrite_output_dir`: False
|
| 239 |
+
- `do_predict`: False
|
| 240 |
+
- `prediction_loss_only`: True
|
| 241 |
+
- `per_device_train_batch_size`: 16
|
| 242 |
+
- `per_device_eval_batch_size`: 16
|
| 243 |
+
- `per_gpu_train_batch_size`: None
|
| 244 |
+
- `per_gpu_eval_batch_size`: None
|
| 245 |
+
- `gradient_accumulation_steps`: 1
|
| 246 |
+
- `eval_accumulation_steps`: None
|
| 247 |
+
- `learning_rate`: 5e-05
|
| 248 |
+
- `weight_decay`: 0.0
|
| 249 |
+
- `adam_beta1`: 0.9
|
| 250 |
+
- `adam_beta2`: 0.999
|
| 251 |
+
- `adam_epsilon`: 1e-08
|
| 252 |
+
- `max_grad_norm`: 1.0
|
| 253 |
+
- `num_train_epochs`: 1
|
| 254 |
+
- `max_steps`: -1
|
| 255 |
+
- `lr_scheduler_type`: linear
|
| 256 |
+
- `lr_scheduler_kwargs`: {}
|
| 257 |
+
- `warmup_ratio`: 0.1
|
| 258 |
+
- `warmup_steps`: 0
|
| 259 |
+
- `log_level`: passive
|
| 260 |
+
- `log_level_replica`: warning
|
| 261 |
+
- `log_on_each_node`: True
|
| 262 |
+
- `logging_nan_inf_filter`: True
|
| 263 |
+
- `save_safetensors`: True
|
| 264 |
+
- `save_on_each_node`: False
|
| 265 |
+
- `save_only_model`: False
|
| 266 |
+
- `no_cuda`: False
|
| 267 |
+
- `use_cpu`: False
|
| 268 |
+
- `use_mps_device`: False
|
| 269 |
+
- `seed`: 42
|
| 270 |
+
- `data_seed`: None
|
| 271 |
+
- `jit_mode_eval`: False
|
| 272 |
+
- `use_ipex`: False
|
| 273 |
+
- `bf16`: False
|
| 274 |
+
- `fp16`: True
|
| 275 |
+
- `fp16_opt_level`: O1
|
| 276 |
+
- `half_precision_backend`: auto
|
| 277 |
+
- `bf16_full_eval`: False
|
| 278 |
+
- `fp16_full_eval`: False
|
| 279 |
+
- `tf32`: None
|
| 280 |
+
- `local_rank`: 0
|
| 281 |
+
- `ddp_backend`: None
|
| 282 |
+
- `tpu_num_cores`: None
|
| 283 |
+
- `tpu_metrics_debug`: False
|
| 284 |
+
- `debug`: []
|
| 285 |
+
- `dataloader_drop_last`: False
|
| 286 |
+
- `dataloader_num_workers`: 0
|
| 287 |
+
- `dataloader_prefetch_factor`: None
|
| 288 |
+
- `past_index`: -1
|
| 289 |
+
- `disable_tqdm`: False
|
| 290 |
+
- `remove_unused_columns`: True
|
| 291 |
+
- `label_names`: None
|
| 292 |
+
- `load_best_model_at_end`: False
|
| 293 |
+
- `ignore_data_skip`: False
|
| 294 |
+
- `fsdp`: []
|
| 295 |
+
- `fsdp_min_num_params`: 0
|
| 296 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 297 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 298 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
|
| 299 |
+
- `deepspeed`: None
|
| 300 |
+
- `label_smoothing_factor`: 0.0
|
| 301 |
+
- `optim`: adamw_torch
|
| 302 |
+
- `optim_args`: None
|
| 303 |
+
- `adafactor`: False
|
| 304 |
+
- `group_by_length`: False
|
| 305 |
+
- `length_column_name`: length
|
| 306 |
+
- `ddp_find_unused_parameters`: None
|
| 307 |
+
- `ddp_bucket_cap_mb`: None
|
| 308 |
+
- `ddp_broadcast_buffers`: False
|
| 309 |
+
- `dataloader_pin_memory`: True
|
| 310 |
+
- `dataloader_persistent_workers`: False
|
| 311 |
+
- `skip_memory_metrics`: True
|
| 312 |
+
- `use_legacy_prediction_loop`: False
|
| 313 |
+
- `push_to_hub`: False
|
| 314 |
+
- `resume_from_checkpoint`: None
|
| 315 |
+
- `hub_model_id`: None
|
| 316 |
+
- `hub_strategy`: every_save
|
| 317 |
+
- `hub_private_repo`: False
|
| 318 |
+
- `hub_always_push`: False
|
| 319 |
+
- `gradient_checkpointing`: False
|
| 320 |
+
- `gradient_checkpointing_kwargs`: None
|
| 321 |
+
- `include_inputs_for_metrics`: False
|
| 322 |
+
- `eval_do_concat_batches`: True
|
| 323 |
+
- `fp16_backend`: auto
|
| 324 |
+
- `push_to_hub_model_id`: None
|
| 325 |
+
- `push_to_hub_organization`: None
|
| 326 |
+
- `mp_parameters`:
|
| 327 |
+
- `auto_find_batch_size`: False
|
| 328 |
+
- `full_determinism`: False
|
| 329 |
+
- `torchdynamo`: None
|
| 330 |
+
- `ray_scope`: last
|
| 331 |
+
- `ddp_timeout`: 1800
|
| 332 |
+
- `torch_compile`: False
|
| 333 |
+
- `torch_compile_backend`: None
|
| 334 |
+
- `torch_compile_mode`: None
|
| 335 |
+
- `dispatch_batches`: None
|
| 336 |
+
- `split_batches`: None
|
| 337 |
+
- `include_tokens_per_second`: False
|
| 338 |
+
- `include_num_input_tokens_seen`: False
|
| 339 |
+
- `neftune_noise_alpha`: None
|
| 340 |
+
- `optim_target_modules`: None
|
| 341 |
+
- `batch_sampler`: no_duplicates
|
| 342 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 343 |
+
|
| 344 |
+
</details>
|
| 345 |
+
|
| 346 |
+
### Training Logs
|
| 347 |
+
<details><summary>Click to expand</summary>
|
| 348 |
+
|
| 349 |
+
| Epoch | Step | Training Loss | sts-dev_max_accuracy |
|
| 350 |
+
|:------:|:-----:|:-------------:|:--------------------:|
|
| 351 |
+
| 0 | 0 | - | 0.5027 |
|
| 352 |
+
| 0.0050 | 100 | 5.0 | - |
|
| 353 |
+
| 0.0101 | 200 | 5.0 | - |
|
| 354 |
+
| 0.0151 | 300 | 4.9999 | - |
|
| 355 |
+
| 0.0202 | 400 | 5.0001 | - |
|
| 356 |
+
| 0.0252 | 500 | 5.0 | - |
|
| 357 |
+
| 0.0302 | 600 | 5.0 | - |
|
| 358 |
+
| 0.0353 | 700 | 4.9999 | - |
|
| 359 |
+
| 0.0403 | 800 | 5.0001 | - |
|
| 360 |
+
| 0.0453 | 900 | 5.0 | - |
|
| 361 |
+
| 0.0504 | 1000 | 5.0001 | - |
|
| 362 |
+
| 0.0554 | 1100 | 4.9999 | - |
|
| 363 |
+
| 0.0605 | 1200 | 5.0 | - |
|
| 364 |
+
| 0.0655 | 1300 | 5.0 | - |
|
| 365 |
+
| 0.0705 | 1400 | 4.9999 | - |
|
| 366 |
+
| 0.0756 | 1500 | 5.0 | - |
|
| 367 |
+
| 0.0806 | 1600 | 4.9999 | - |
|
| 368 |
+
| 0.0857 | 1700 | 5.0001 | - |
|
| 369 |
+
| 0.0907 | 1800 | 5.0001 | - |
|
| 370 |
+
| 0.0957 | 1900 | 5.0 | - |
|
| 371 |
+
| 0.1008 | 2000 | 5.0001 | - |
|
| 372 |
+
| 0.1058 | 2100 | 5.0 | - |
|
| 373 |
+
| 0.1109 | 2200 | 4.9999 | - |
|
| 374 |
+
| 0.1159 | 2300 | 4.9999 | - |
|
| 375 |
+
| 0.1209 | 2400 | 5.0 | - |
|
| 376 |
+
| 0.1260 | 2500 | 5.0 | - |
|
| 377 |
+
| 0.1310 | 2600 | 5.0001 | - |
|
| 378 |
+
| 0.1360 | 2700 | 4.9999 | - |
|
| 379 |
+
| 0.1411 | 2800 | 5.0001 | - |
|
| 380 |
+
| 0.1461 | 2900 | 5.0001 | - |
|
| 381 |
+
| 0.1512 | 3000 | 5.0 | - |
|
| 382 |
+
| 0.1562 | 3100 | 5.0001 | - |
|
| 383 |
+
| 0.1612 | 3200 | 4.9999 | - |
|
| 384 |
+
| 0.1663 | 3300 | 5.0001 | - |
|
| 385 |
+
| 0.1713 | 3400 | 4.9999 | - |
|
| 386 |
+
| 0.1764 | 3500 | 4.9999 | - |
|
| 387 |
+
| 0.1814 | 3600 | 4.9999 | - |
|
| 388 |
+
| 0.1864 | 3700 | 5.0 | - |
|
| 389 |
+
| 0.1915 | 3800 | 4.9999 | - |
|
| 390 |
+
| 0.1965 | 3900 | 5.0 | - |
|
| 391 |
+
| 0.2016 | 4000 | 5.0 | - |
|
| 392 |
+
| 0.2066 | 4100 | 5.0 | - |
|
| 393 |
+
| 0.2116 | 4200 | 5.0002 | - |
|
| 394 |
+
| 0.2167 | 4300 | 5.0002 | - |
|
| 395 |
+
| 0.2217 | 4400 | 5.0 | - |
|
| 396 |
+
| 0.2267 | 4500 | 5.0001 | - |
|
| 397 |
+
| 0.2318 | 4600 | 5.0001 | - |
|
| 398 |
+
| 0.2368 | 4700 | 5.0001 | - |
|
| 399 |
+
| 0.2419 | 4800 | 4.9998 | - |
|
| 400 |
+
| 0.2469 | 4900 | 5.0 | - |
|
| 401 |
+
| 0.2519 | 5000 | 4.9999 | - |
|
| 402 |
+
| 0.2570 | 5100 | 4.9999 | - |
|
| 403 |
+
| 0.2620 | 5200 | 5.0001 | - |
|
| 404 |
+
| 0.2671 | 5300 | 5.0001 | - |
|
| 405 |
+
| 0.2721 | 5400 | 4.9999 | - |
|
| 406 |
+
| 0.2771 | 5500 | 5.0 | - |
|
| 407 |
+
| 0.2822 | 5600 | 5.0002 | - |
|
| 408 |
+
| 0.2872 | 5700 | 5.0002 | - |
|
| 409 |
+
| 0.2923 | 5800 | 4.9999 | - |
|
| 410 |
+
| 0.2973 | 5900 | 5.0 | - |
|
| 411 |
+
| 0.3023 | 6000 | 5.0001 | - |
|
| 412 |
+
| 0.3074 | 6100 | 4.9999 | - |
|
| 413 |
+
| 0.3124 | 6200 | 4.9997 | - |
|
| 414 |
+
| 0.3174 | 6300 | 4.9999 | - |
|
| 415 |
+
| 0.3225 | 6400 | 5.0 | - |
|
| 416 |
+
| 0.3275 | 6500 | 4.9998 | - |
|
| 417 |
+
| 0.3326 | 6600 | 5.0 | - |
|
| 418 |
+
| 0.3376 | 6700 | 4.9998 | - |
|
| 419 |
+
| 0.3426 | 6800 | 5.0001 | - |
|
| 420 |
+
| 0.3477 | 6900 | 5.0002 | - |
|
| 421 |
+
| 0.3527 | 7000 | 5.0 | - |
|
| 422 |
+
| 0.3578 | 7100 | 4.9998 | - |
|
| 423 |
+
| 0.3628 | 7200 | 5.0003 | - |
|
| 424 |
+
| 0.3678 | 7300 | 5.0 | - |
|
| 425 |
+
| 0.3729 | 7400 | 5.0002 | - |
|
| 426 |
+
| 0.3779 | 7500 | 5.0 | - |
|
| 427 |
+
| 0.3829 | 7600 | 5.0001 | - |
|
| 428 |
+
| 0.3880 | 7700 | 5.0002 | - |
|
| 429 |
+
| 0.3930 | 7800 | 5.0001 | - |
|
| 430 |
+
| 0.3981 | 7900 | 5.0001 | - |
|
| 431 |
+
| 0.4031 | 8000 | 5.0 | - |
|
| 432 |
+
| 0.4081 | 8100 | 4.9998 | - |
|
| 433 |
+
| 0.4132 | 8200 | 4.9999 | - |
|
| 434 |
+
| 0.4182 | 8300 | 5.0001 | - |
|
| 435 |
+
| 0.4233 | 8400 | 5.0001 | - |
|
| 436 |
+
| 0.4283 | 8500 | 5.0 | - |
|
| 437 |
+
| 0.4333 | 8600 | 5.0002 | - |
|
| 438 |
+
| 0.4384 | 8700 | 5.0001 | - |
|
| 439 |
+
| 0.4434 | 8800 | 5.0 | - |
|
| 440 |
+
| 0.4485 | 8900 | 4.9996 | - |
|
| 441 |
+
| 0.4535 | 9000 | 4.9999 | - |
|
| 442 |
+
| 0.4585 | 9100 | 5.0 | - |
|
| 443 |
+
| 0.4636 | 9200 | 4.9999 | - |
|
| 444 |
+
| 0.4686 | 9300 | 4.9999 | - |
|
| 445 |
+
| 0.4736 | 9400 | 4.9998 | - |
|
| 446 |
+
| 0.4787 | 9500 | 5.0001 | - |
|
| 447 |
+
| 0.4837 | 9600 | 4.9998 | - |
|
| 448 |
+
| 0.4888 | 9700 | 4.9999 | - |
|
| 449 |
+
| 0.4938 | 9800 | 5.0 | - |
|
| 450 |
+
| 0.4988 | 9900 | 4.9998 | - |
|
| 451 |
+
| 0.5039 | 10000 | 5.0 | - |
|
| 452 |
+
| 0.5089 | 10100 | 5.0002 | - |
|
| 453 |
+
| 0.5140 | 10200 | 5.0003 | - |
|
| 454 |
+
| 0.5190 | 10300 | 4.9998 | - |
|
| 455 |
+
| 0.5240 | 10400 | 4.9999 | - |
|
| 456 |
+
| 0.5291 | 10500 | 5.0 | - |
|
| 457 |
+
| 0.5341 | 10600 | 4.9999 | - |
|
| 458 |
+
| 0.5392 | 10700 | 5.0 | - |
|
| 459 |
+
| 0.5442 | 10800 | 5.0001 | - |
|
| 460 |
+
| 0.5492 | 10900 | 4.9999 | - |
|
| 461 |
+
| 0.5543 | 11000 | 5.0 | - |
|
| 462 |
+
| 0.5593 | 11100 | 4.9999 | - |
|
| 463 |
+
| 0.5643 | 11200 | 5.0 | - |
|
| 464 |
+
| 0.5694 | 11300 | 4.9999 | - |
|
| 465 |
+
| 0.5744 | 11400 | 4.9997 | - |
|
| 466 |
+
| 0.5795 | 11500 | 5.0002 | - |
|
| 467 |
+
| 0.5845 | 11600 | 4.9999 | - |
|
| 468 |
+
| 0.5895 | 11700 | 5.0001 | - |
|
| 469 |
+
| 0.5946 | 11800 | 5.0001 | - |
|
| 470 |
+
| 0.5996 | 11900 | 5.0004 | - |
|
| 471 |
+
| 0.6047 | 12000 | 4.9998 | - |
|
| 472 |
+
| 0.6097 | 12100 | 5.0002 | - |
|
| 473 |
+
| 0.6147 | 12200 | 4.9998 | - |
|
| 474 |
+
| 0.6198 | 12300 | 5.0001 | - |
|
| 475 |
+
| 0.6248 | 12400 | 5.0001 | - |
|
| 476 |
+
| 0.6298 | 12500 | 5.0001 | - |
|
| 477 |
+
| 0.6349 | 12600 | 4.9999 | - |
|
| 478 |
+
| 0.6399 | 12700 | 5.0001 | - |
|
| 479 |
+
| 0.6450 | 12800 | 4.9999 | - |
|
| 480 |
+
| 0.6500 | 12900 | 5.0001 | - |
|
| 481 |
+
| 0.6550 | 13000 | 4.9999 | - |
|
| 482 |
+
| 0.6601 | 13100 | 5.0002 | - |
|
| 483 |
+
| 0.6651 | 13200 | 5.0001 | - |
|
| 484 |
+
| 0.6702 | 13300 | 5.0002 | - |
|
| 485 |
+
| 0.6752 | 13400 | 4.9997 | - |
|
| 486 |
+
| 0.6802 | 13500 | 5.0001 | - |
|
| 487 |
+
| 0.6853 | 13600 | 4.9996 | - |
|
| 488 |
+
| 0.6903 | 13700 | 4.9999 | - |
|
| 489 |
+
| 0.6954 | 13800 | 5.0002 | - |
|
| 490 |
+
| 0.7004 | 13900 | 4.9997 | - |
|
| 491 |
+
| 0.7054 | 14000 | 5.0 | - |
|
| 492 |
+
| 0.7105 | 14100 | 5.0001 | - |
|
| 493 |
+
| 0.7155 | 14200 | 5.0001 | - |
|
| 494 |
+
| 0.7205 | 14300 | 4.9999 | - |
|
| 495 |
+
| 0.7256 | 14400 | 4.9999 | - |
|
| 496 |
+
| 0.7306 | 14500 | 4.9998 | - |
|
| 497 |
+
| 0.7357 | 14600 | 5.0 | - |
|
| 498 |
+
| 0.7407 | 14700 | 5.0002 | - |
|
| 499 |
+
| 0.7457 | 14800 | 5.0001 | - |
|
| 500 |
+
| 0.7508 | 14900 | 4.9998 | - |
|
| 501 |
+
| 0.7558 | 15000 | 5.0002 | - |
|
| 502 |
+
| 0.7609 | 15100 | 5.0002 | - |
|
| 503 |
+
| 0.7659 | 15200 | 5.0 | - |
|
| 504 |
+
| 0.7709 | 15300 | 5.0002 | - |
|
| 505 |
+
| 0.7760 | 15400 | 5.0 | - |
|
| 506 |
+
| 0.7810 | 15500 | 5.0001 | - |
|
| 507 |
+
| 0.7861 | 15600 | 5.0 | - |
|
| 508 |
+
| 0.7911 | 15700 | 5.0004 | - |
|
| 509 |
+
| 0.7961 | 15800 | 5.0 | - |
|
| 510 |
+
| 0.8012 | 15900 | 5.0001 | - |
|
| 511 |
+
| 0.8062 | 16000 | 5.0003 | - |
|
| 512 |
+
| 0.8112 | 16100 | 4.9999 | - |
|
| 513 |
+
| 0.8163 | 16200 | 5.0 | - |
|
| 514 |
+
| 0.8213 | 16300 | 4.9999 | - |
|
| 515 |
+
| 0.8264 | 16400 | 5.0 | - |
|
| 516 |
+
| 0.8314 | 16500 | 4.9999 | - |
|
| 517 |
+
| 0.8364 | 16600 | 4.9998 | - |
|
| 518 |
+
| 0.8415 | 16700 | 4.9998 | - |
|
| 519 |
+
| 0.8465 | 16800 | 5.0002 | - |
|
| 520 |
+
| 0.8516 | 16900 | 4.9999 | - |
|
| 521 |
+
| 0.8566 | 17000 | 4.9999 | - |
|
| 522 |
+
| 0.8616 | 17100 | 4.9997 | - |
|
| 523 |
+
| 0.8667 | 17200 | 5.0001 | - |
|
| 524 |
+
| 0.8717 | 17300 | 4.9999 | - |
|
| 525 |
+
| 0.8768 | 17400 | 5.0001 | - |
|
| 526 |
+
| 0.8818 | 17500 | 4.9999 | - |
|
| 527 |
+
| 0.8868 | 17600 | 5.0001 | - |
|
| 528 |
+
| 0.8919 | 17700 | 5.0001 | - |
|
| 529 |
+
| 0.8969 | 17800 | 5.0001 | - |
|
| 530 |
+
| 0.9019 | 17900 | 4.9996 | - |
|
| 531 |
+
| 0.9070 | 18000 | 5.0001 | - |
|
| 532 |
+
| 0.9120 | 18100 | 4.9997 | - |
|
| 533 |
+
| 0.9171 | 18200 | 5.0001 | - |
|
| 534 |
+
| 0.9221 | 18300 | 4.9998 | - |
|
| 535 |
+
| 0.9271 | 18400 | 4.9997 | - |
|
| 536 |
+
| 0.9322 | 18500 | 4.9999 | - |
|
| 537 |
+
| 0.9372 | 18600 | 5.0001 | - |
|
| 538 |
+
| 0.9423 | 18700 | 5.0004 | - |
|
| 539 |
+
| 0.9473 | 18800 | 4.9997 | - |
|
| 540 |
+
| 0.9523 | 18900 | 4.9999 | - |
|
| 541 |
+
| 0.9574 | 19000 | 5.0001 | - |
|
| 542 |
+
| 0.9624 | 19100 | 4.9999 | - |
|
| 543 |
+
| 0.9674 | 19200 | 5.0 | - |
|
| 544 |
+
| 0.9725 | 19300 | 4.9999 | - |
|
| 545 |
+
| 0.9775 | 19400 | 4.9999 | - |
|
| 546 |
+
| 0.9826 | 19500 | 4.9999 | - |
|
| 547 |
+
| 0.9876 | 19600 | 4.9998 | - |
|
| 548 |
+
| 0.9926 | 19700 | 5.0 | - |
|
| 549 |
+
| 0.9977 | 19800 | 4.9999 | - |
|
| 550 |
+
| 1.0 | 19846 | - | 0.4905 |
|
| 551 |
+
|
| 552 |
+
</details>
|
| 553 |
+
|
| 554 |
+
### Framework Versions
|
| 555 |
+
- Python: 3.10.14
|
| 556 |
+
- Sentence Transformers: 3.0.1
|
| 557 |
+
- Transformers: 4.40.0
|
| 558 |
+
- PyTorch: 2.3.0+cu121
|
| 559 |
+
- Accelerate: 0.33.0
|
| 560 |
+
- Datasets: 2.20.0
|
| 561 |
+
- Tokenizers: 0.19.1
|
| 562 |
+
|
| 563 |
+
## Citation
|
| 564 |
+
|
| 565 |
+
### BibTeX
|
| 566 |
+
|
| 567 |
+
#### Sentence Transformers
|
| 568 |
+
```bibtex
|
| 569 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 570 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 571 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 572 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 573 |
+
month = "11",
|
| 574 |
+
year = "2019",
|
| 575 |
+
publisher = "Association for Computational Linguistics",
|
| 576 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 577 |
+
}
|
| 578 |
+
```
|
| 579 |
+
|
| 580 |
+
#### TripletLoss
|
| 581 |
+
```bibtex
|
| 582 |
+
@misc{hermans2017defense,
|
| 583 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
| 584 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
| 585 |
+
year={2017},
|
| 586 |
+
eprint={1703.07737},
|
| 587 |
+
archivePrefix={arXiv},
|
| 588 |
+
primaryClass={cs.CV}
|
| 589 |
+
}
|
| 590 |
+
```
|
| 591 |
+
|
| 592 |
+
<!--
|
| 593 |
+
## Glossary
|
| 594 |
+
|
| 595 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 596 |
+
-->
|
| 597 |
+
|
| 598 |
+
<!--
|
| 599 |
+
## Model Card Authors
|
| 600 |
+
|
| 601 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 602 |
+
-->
|
| 603 |
+
|
| 604 |
+
<!--
|
| 605 |
+
## Model Card Contact
|
| 606 |
+
|
| 607 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 608 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "jinaai/jina-embeddings-v2-base-code",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "jinaai/jina-bert-v2-qk-post-norm--configuration_bert.JinaBertConfig",
|
| 9 |
+
"AutoModel": "jinaai/jina-bert-v2-qk-post-norm--modeling_bert.JinaBertModel",
|
| 10 |
+
"AutoModelForMaskedLM": "jinaai/jina-bert-v2-qk-post-norm--modeling_bert.JinaBertForMaskedLM",
|
| 11 |
+
"AutoModelForSequenceClassification": "jinaai/jina-bert-v2-qk-post-norm--modeling_bert.JinaBertForSequenceClassification"
|
| 12 |
+
},
|
| 13 |
+
"classifier_dropout": null,
|
| 14 |
+
"emb_pooler": "mean",
|
| 15 |
+
"feed_forward_type": "geglu",
|
| 16 |
+
"gradient_checkpointing": false,
|
| 17 |
+
"hidden_act": "gelu",
|
| 18 |
+
"hidden_dropout_prob": 0.0,
|
| 19 |
+
"hidden_size": 768,
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 3072,
|
| 22 |
+
"layer_norm_eps": 1e-12,
|
| 23 |
+
"max_position_embeddings": 8192,
|
| 24 |
+
"model_max_length": 8192,
|
| 25 |
+
"model_type": "bert",
|
| 26 |
+
"num_attention_heads": 12,
|
| 27 |
+
"num_hidden_layers": 12,
|
| 28 |
+
"pad_token_id": 0,
|
| 29 |
+
"position_embedding_type": "alibi",
|
| 30 |
+
"torch_dtype": "float32",
|
| 31 |
+
"transformers_version": "4.40.0",
|
| 32 |
+
"type_vocab_size": 2,
|
| 33 |
+
"use_cache": true,
|
| 34 |
+
"vocab_size": 61056
|
| 35 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.0.1",
|
| 4 |
+
"transformers": "4.40.0",
|
| 5 |
+
"pytorch": "2.3.0+cu121"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": null
|
| 10 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51884e1118e76a16cc5b327d93689c19af318de5a6c913e227201952bbfca9fb
|
| 3 |
+
size 555344752
|
modules.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 8192,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": true,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
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 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<s>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<pad>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"4": {
|
| 37 |
+
"content": "<mask>",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"bos_token": "<s>",
|
| 46 |
+
"clean_up_tokenization_spaces": true,
|
| 47 |
+
"cls_token": "<s>",
|
| 48 |
+
"eos_token": "</s>",
|
| 49 |
+
"errors": "replace",
|
| 50 |
+
"mask_token": "<mask>",
|
| 51 |
+
"model_max_length": 8192,
|
| 52 |
+
"pad_token": "<pad>",
|
| 53 |
+
"sep_token": "</s>",
|
| 54 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 55 |
+
"trim_offsets": true,
|
| 56 |
+
"unk_token": "<unk>"
|
| 57 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|