yjoonjang commited on
Commit
a3f4cf2
·
verified ·
1 Parent(s): 9c433e6

Add new SentenceTransformer model

Browse files
1_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 128, "bias": false, "activation_function": "torch.nn.modules.linear.Identity"}
1_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d5716e26bbeed34d627dc912752311b1be10610ddbd0d841fdd526927a50f11
3
+ size 393304
README.md ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - ColBERT
4
+ - PyLate
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ pipeline_tag: sentence-similarity
10
+ library_name: PyLate
11
+ ---
12
+
13
+ # ColBERT-ko-v1.0
14
+
15
+ **ColBERT-ko-v1.0** is a Korean ColBERT model finetuned with [PyLate](https://github.com/lightonai/pylate). This model is trained exclusively on Korean dataset. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+ - **Model Type:** PyLate model
21
+ - **Document Length:** 1024 tokens
22
+ - **Query Length:** 32 tokens
23
+ - **Output Dimensionality:** 128 tokens
24
+ - **Similarity Function:** MaxSim
25
+ <!-- - **Language:** Unknown -->
26
+ <!-- - **License:** Unknown -->
27
+
28
+
29
+ ### Full Model Architecture
30
+
31
+ ```
32
+ ColBERT(
33
+ (0): Transformer({'max_seq_length': 1023, 'do_lower_case': False}) with Transformer model: ModernBertModel
34
+ (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
35
+ )
36
+ ```
37
+
38
+ ## Usage
39
+ <details>
40
+ <summary>PyLate for reranking</summary>
41
+
42
+ If you only want to use the ColBERT model to perform reranking on top of your first-stage retrieval pipeline without building an index, you can simply use rank function and pass the queries and documents to rerank:
43
+
44
+ ```python
45
+ from pylate import rank, models
46
+
47
+ queries = [
48
+ "query A",
49
+ "query B",
50
+ ]
51
+
52
+ documents = [
53
+ ["document A", "document B"],
54
+ ["document 1", "document C", "document B"],
55
+ ]
56
+
57
+ documents_ids = [
58
+ [1, 2],
59
+ [1, 3, 2],
60
+ ]
61
+
62
+ model = models.ColBERT(
63
+ model_name_or_path="pylate_model_id",
64
+ )
65
+
66
+ queries_embeddings = model.encode(
67
+ queries,
68
+ is_query=True,
69
+ )
70
+
71
+ documents_embeddings = model.encode(
72
+ documents,
73
+ is_query=False,
74
+ )
75
+
76
+ reranked_documents = rank.rerank(
77
+ documents_ids=documents_ids,
78
+ queries_embeddings=queries_embeddings,
79
+ documents_embeddings=documents_embeddings,
80
+ )
81
+ ```
82
+ </details>
83
+
84
+ <details>
85
+ <summary>Usage with PLAID</summary>
86
+ First install the PyLate library:
87
+
88
+ ```bash
89
+ pip install -U pylate
90
+ ```
91
+
92
+ ### Retrieval
93
+
94
+ Use this model with PyLate to index and retrieve documents. The index uses [FastPLAID](https://github.com/lightonai/fast-plaid) for efficient similarity search.
95
+
96
+ #### Indexing documents
97
+
98
+ Load the ColBERT model and initialize the PLAID index, then encode and index your documents:
99
+
100
+ ```python
101
+ from pylate import indexes, models, retrieve
102
+
103
+ # Step 1: Load the ColBERT model
104
+ model = models.ColBERT(
105
+ model_name_or_path="pylate_model_id",
106
+ )
107
+
108
+ # Step 2: Initialize the PLAID index
109
+ index = indexes.PLAID(
110
+ index_folder="pylate-index",
111
+ index_name="index",
112
+ override=True, # This overwrites the existing index if any
113
+ )
114
+
115
+ # Step 3: Encode the documents
116
+ documents_ids = ["1", "2", "3"]
117
+ documents = ["document 1 text", "document 2 text", "document 3 text"]
118
+
119
+ documents_embeddings = model.encode(
120
+ documents,
121
+ batch_size=32,
122
+ is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
123
+ show_progress_bar=True,
124
+ )
125
+
126
+ # Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
127
+ index.add_documents(
128
+ documents_ids=documents_ids,
129
+ documents_embeddings=documents_embeddings,
130
+ )
131
+ ```
132
+
133
+ Note that you do not have to recreate the index and encode the documents every time. Once you have created an index and added the documents, you can re-use the index later by loading it:
134
+
135
+ ```python
136
+ # To load an index, simply instantiate it with the correct folder/name and without overriding it
137
+ index = indexes.PLAID(
138
+ index_folder="pylate-index",
139
+ index_name="index",
140
+ )
141
+ ```
142
+
143
+ #### Retrieving top-k documents for queries
144
+
145
+ Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
146
+ To do so, initialize the ColBERT retriever with the index you want to search in, encode the queries and then retrieve the top-k documents to get the top matches ids and relevance scores:
147
+
148
+ ```python
149
+ # Step 1: Initialize the ColBERT retriever
150
+ retriever = retrieve.ColBERT(index=index)
151
+
152
+ # Step 2: Encode the queries
153
+ queries_embeddings = model.encode(
154
+ ["query for document 3", "query for document 1"],
155
+ batch_size=32,
156
+ is_query=True, # # Ensure that it is set to False to indicate that these are queries
157
+ show_progress_bar=True,
158
+ )
159
+
160
+ # Step 3: Retrieve top-k documents
161
+ scores = retriever.retrieve(
162
+ queries_embeddings=queries_embeddings,
163
+ k=10, # Retrieve the top 10 matches for each query
164
+ )
165
+ ```
166
+ </details>
167
+
168
+ <details>
169
+ <summary>Usage with MUVERA</summary>
170
+ First install the muvera-py (Python implementation of MUVERA):
171
+
172
+ ```bash
173
+ git clone https://github.com/sionic-ai/muvera-py.git
174
+ cd muvera-py
175
+ ```
176
+
177
+ Then run the main script:
178
+
179
+ ```python
180
+ uv run main_pylate.py
181
+ ```
182
+
183
+ </details>
184
+
185
+ <!--
186
+ ### Direct Usage (Transformers)
187
+
188
+ <details><summary>Click to see the direct usage in Transformers</summary>
189
+
190
+ </details>
191
+ -->
192
+
193
+ <!--
194
+ ### Downstream Usage (Sentence Transformers)
195
+
196
+ You can finetune this model on your own dataset.
197
+
198
+ <details><summary>Click to expand</summary>
199
+
200
+ </details>
201
+ -->
202
+
203
+ <!--
204
+ ### Out-of-Scope Use
205
+
206
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
207
+ -->
208
+
209
+ ## Evaluation
210
+
211
+ ### Evaluation Dataset
212
+ | Dataset | Description | Average Length (characters) |
213
+ |-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|-----------------------------|
214
+ | [Ko-StrategyQA](https://huggingface.co/datasets/taeminlee/Ko-StrategyQA) | Korean ODQA multi-hop retrieval dataset (translated from StrategyQA) | 305.15 |
215
+ | [AutoRAGRetrieval](https://huggingface.co/datasets/yjoonjang/markers_bm) | Korean document retrieval dataset constructed by parsing PDFs from 5 domains: finance, public, medical, legal, and commerce | 823.60 |
216
+ | [PublicHealthQA](https://huggingface.co/datasets/xhluca/publichealth-qa) | Korean document retrieval dataset for medical and public health domains | 339.00 |
217
+ | [BelebeleRetrieval](https://huggingface.co/datasets/facebook/belebele) | Korean document retrieval dataset based on FLORES-200 | 243.11 |
218
+ | [MultiLongDocRetrieval](https://huggingface.co/datasets/Shitao/MLDR) | Korean long document retrieval dataset covering various domains | 13,813.44 |
219
+ <!-- | [MrTidyRetrieval](https://huggingface.co/datasets/mteb/mrtidy) | Korean document retrieval dataset based on Wikipedia | 166.90 | -->
220
+ <!-- | [MIRACLRetrieval](https://huggingface.co/datasets/miracl/miracl) | Korean document retrieval dataset based on Wikipedia | 166.63 | -->
221
+
222
+
223
+ ### Average Results
224
+
225
+ | Model | Parameters | Average Recall@10 | Average Precision@10 | Average NDCG@10 | Average F1@10 |
226
+ |-----------------------------------------------|------------|----------------|-------------------|--------------|------------|
227
+ | **ColBERT-ko-v1.0** | **0.1B** | **0.7999** | **0.0930** | **0.7172** | **0.1655**|
228
+ | jina-colbert-v2 | 0.5B | 0.7518 | 0.0888 | 0.6671 | 0.1577 |
229
+
230
+
231
+ <!--
232
+ ## Bias, Risks and Limitations
233
+
234
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
235
+ -->
236
+
237
+ <!--
238
+ ### Recommendations
239
+
240
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
241
+ -->
242
+
243
+ ## Training Details
244
+ * Loss: <code>pylate.losses.cached_contrastive.CachedContrastive</code>
245
+
246
+ ### Training Hyperparameters
247
+ #### Non-Default Hyperparameters
248
+
249
+ - `per_device_train_batch_size`: 128
250
+ - `per_device_eval_batch_size`: 32
251
+ - `learning_rate`: 3e-06
252
+ - `num_train_epochs`: 1
253
+ - `warmup_ratio`: 0.1
254
+ - `bf16`: True
255
+
256
+ #### All Hyperparameters
257
+ <details><summary>Click to expand</summary>
258
+
259
+ - `overwrite_output_dir`: False
260
+ - `do_predict`: False
261
+ - `eval_strategy`: steps
262
+ - `prediction_loss_only`: True
263
+ - `per_device_train_batch_size`: 128
264
+ - `per_device_eval_batch_size`: 32
265
+ - `per_gpu_train_batch_size`: None
266
+ - `per_gpu_eval_batch_size`: None
267
+ - `gradient_accumulation_steps`: 1
268
+ - `eval_accumulation_steps`: None
269
+ - `torch_empty_cache_steps`: None
270
+ - `learning_rate`: 3e-06
271
+ - `weight_decay`: 0.0
272
+ - `adam_beta1`: 0.9
273
+ - `adam_beta2`: 0.999
274
+ - `adam_epsilon`: 1e-08
275
+ - `max_grad_norm`: 1.0
276
+ - `num_train_epochs`: 1
277
+ - `max_steps`: -1
278
+ - `lr_scheduler_type`: linear
279
+ - `lr_scheduler_kwargs`: {}
280
+ - `warmup_ratio`: 0.1
281
+ - `warmup_steps`: 0
282
+ - `log_level`: passive
283
+ - `log_level_replica`: warning
284
+ - `log_on_each_node`: True
285
+ - `logging_nan_inf_filter`: True
286
+ - `save_safetensors`: True
287
+ - `save_on_each_node`: False
288
+ - `save_only_model`: False
289
+ - `restore_callback_states_from_checkpoint`: False
290
+ - `no_cuda`: False
291
+ - `use_cpu`: False
292
+ - `use_mps_device`: False
293
+ - `seed`: 42
294
+ - `data_seed`: None
295
+ - `jit_mode_eval`: False
296
+ - `use_ipex`: False
297
+ - `bf16`: True
298
+ - `fp16`: False
299
+ - `fp16_opt_level`: O1
300
+ - `half_precision_backend`: auto
301
+ - `bf16_full_eval`: False
302
+ - `fp16_full_eval`: False
303
+ - `tf32`: None
304
+ - `local_rank`: 0
305
+ - `ddp_backend`: None
306
+ - `tpu_num_cores`: None
307
+ - `tpu_metrics_debug`: False
308
+ - `debug`: []
309
+ - `dataloader_drop_last`: True
310
+ - `dataloader_num_workers`: 0
311
+ - `dataloader_prefetch_factor`: None
312
+ - `past_index`: -1
313
+ - `disable_tqdm`: False
314
+ - `remove_unused_columns`: True
315
+ - `label_names`: None
316
+ - `load_best_model_at_end`: False
317
+ - `ignore_data_skip`: False
318
+ - `fsdp`: []
319
+ - `fsdp_min_num_params`: 0
320
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
321
+ - `fsdp_transformer_layer_cls_to_wrap`: None
322
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
323
+ - `deepspeed`: None
324
+ - `label_smoothing_factor`: 0.0
325
+ - `optim`: adamw_torch
326
+ - `optim_args`: None
327
+ - `adafactor`: False
328
+ - `group_by_length`: False
329
+ - `length_column_name`: length
330
+ - `ddp_find_unused_parameters`: None
331
+ - `ddp_bucket_cap_mb`: None
332
+ - `ddp_broadcast_buffers`: False
333
+ - `dataloader_pin_memory`: True
334
+ - `dataloader_persistent_workers`: False
335
+ - `skip_memory_metrics`: True
336
+ - `use_legacy_prediction_loop`: False
337
+ - `push_to_hub`: False
338
+ - `resume_from_checkpoint`: None
339
+ - `hub_model_id`: None
340
+ - `hub_strategy`: every_save
341
+ - `hub_private_repo`: None
342
+ - `hub_always_push`: False
343
+ - `gradient_checkpointing`: False
344
+ - `gradient_checkpointing_kwargs`: None
345
+ - `include_inputs_for_metrics`: False
346
+ - `include_for_metrics`: []
347
+ - `eval_do_concat_batches`: True
348
+ - `fp16_backend`: auto
349
+ - `push_to_hub_model_id`: None
350
+ - `push_to_hub_organization`: None
351
+ - `mp_parameters`:
352
+ - `auto_find_batch_size`: False
353
+ - `full_determinism`: False
354
+ - `torchdynamo`: None
355
+ - `ray_scope`: last
356
+ - `ddp_timeout`: 1800
357
+ - `torch_compile`: False
358
+ - `torch_compile_backend`: None
359
+ - `torch_compile_mode`: None
360
+ - `include_tokens_per_second`: False
361
+ - `include_num_input_tokens_seen`: False
362
+ - `neftune_noise_alpha`: None
363
+ - `optim_target_modules`: None
364
+ - `batch_eval_metrics`: False
365
+ - `eval_on_start`: False
366
+ - `use_liger_kernel`: False
367
+ - `eval_use_gather_object`: False
368
+ - `average_tokens_across_devices`: False
369
+ - `prompts`: None
370
+ - `batch_sampler`: batch_sampler
371
+ - `multi_dataset_batch_sampler`: proportional
372
+
373
+ </details>
374
+
375
+ ### Framework Versions
376
+ - Python: 3.10.18
377
+ - Sentence Transformers: 4.0.2
378
+ - PyLate: 1.3.0
379
+ - Transformers: 4.52.3
380
+ - PyTorch: 2.8.0+cu128
381
+ - Accelerate: 1.10.1
382
+ - Datasets: 3.6.0
383
+ - Tokenizers: 0.21.4
384
+
385
+
386
+ ## Citation
387
+
388
+ ### BibTeX
389
+
390
+ #### Sentence Transformers
391
+ ```bibtex
392
+ @inproceedings{reimers-2019-sentence-bert,
393
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
394
+ author = "Reimers, Nils and Gurevych, Iryna",
395
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
396
+ month = "11",
397
+ year = "2019",
398
+ publisher = "Association for Computational Linguistics",
399
+ url = "https://arxiv.org/abs/1908.10084"
400
+ }
401
+ ```
402
+
403
+ #### PyLate
404
+ ```bibtex
405
+ @misc{PyLate,
406
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
407
+ author={Chaffin, Antoine and Sourty, Raphaël},
408
+ url={https://github.com/lightonai/pylate},
409
+ year={2024}
410
+ }
411
+ ```
412
+
413
+ #### CachedContrastive
414
+ ```bibtex
415
+ @misc{gao2021scaling,
416
+ title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
417
+ author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
418
+ year={2021},
419
+ eprint={2101.06983},
420
+ archivePrefix={arXiv},
421
+ primaryClass={cs.LG}
422
+ }
423
+ ```
424
+
425
+ <!--
426
+ ## Glossary
427
+
428
+ *Clearly define terms in order to be accessible across audiences.*
429
+ -->
430
+
431
+ <!--
432
+ ## Model Card Authors
433
+
434
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
435
+ -->
436
+
437
+ <!--
438
+ ## Model Card Contact
439
+
440
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
441
+ -->
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<pad>": 49999,
3
+ "[D] ": 50001,
4
+ "[Q] ": 50000
5
+ }
config.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 0,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "embedding_dropout": 0.0,
16
+ "eos_token_id": 1,
17
+ "global_attn_every_n_layers": 3,
18
+ "global_rope_theta": 160000,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 768,
22
+ "initializer_cutoff_factor": 2.0,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 1152,
25
+ "layer_norm_eps": 1e-05,
26
+ "local_attention": 128,
27
+ "local_rope_theta": 10000.0,
28
+ "max_position_embeddings": 16384,
29
+ "mlp_bias": false,
30
+ "mlp_dropout": 0.0,
31
+ "model_type": "modernbert",
32
+ "norm_bias": false,
33
+ "norm_eps": 1e-05,
34
+ "num_attention_heads": 12,
35
+ "num_hidden_layers": 22,
36
+ "pad_token_id": 49999,
37
+ "position_embedding_type": "absolute",
38
+ "repad_logits_with_grad": false,
39
+ "sep_token_id": 1,
40
+ "sparse_pred_ignore_index": -100,
41
+ "sparse_prediction": false,
42
+ "torch_dtype": "float32",
43
+ "transformers_version": "4.52.3",
44
+ "vocab_size": 50002
45
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
4
+ "transformers": "4.52.3",
5
+ "pytorch": "2.8.0+cu128"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "MaxSim",
10
+ "query_prefix": "[Q] ",
11
+ "document_prefix": "[D] ",
12
+ "query_length": 32,
13
+ "document_length": 1024,
14
+ "attend_to_expansion_tokens": false,
15
+ "skiplist_words": [
16
+ "!",
17
+ "\"",
18
+ "#",
19
+ "$",
20
+ "%",
21
+ "&",
22
+ "'",
23
+ "(",
24
+ ")",
25
+ "*",
26
+ "+",
27
+ ",",
28
+ "-",
29
+ ".",
30
+ "/",
31
+ ":",
32
+ ";",
33
+ "<",
34
+ "=",
35
+ ">",
36
+ "?",
37
+ "@",
38
+ "[",
39
+ "\\",
40
+ "]",
41
+ "^",
42
+ "_",
43
+ "`",
44
+ "{",
45
+ "|",
46
+ "}",
47
+ "~"
48
+ ],
49
+ "do_query_expansion": true
50
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d83cae96273b267581234f471dfdf7400a1bd9e2528eb6e7bcab0e67e67a66fd
3
+ size 594945784
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_Dense",
12
+ "type": "pylate.models.Dense.Dense"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 1023,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<cls>",
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": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": "<mask>",
31
+ "sep_token": {
32
+ "content": "<sep>",
33
+ "lstrip": false,
34
+ "normalized": false,
35
+ "rstrip": false,
36
+ "single_word": false
37
+ },
38
+ "unk_token": {
39
+ "content": "<unk>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false
44
+ }
45
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<\\s>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "<unk>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<sep>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "<cls>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "<unused0>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "7": {
60
+ "content": "<unused1>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "8": {
68
+ "content": "<unused2>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "9": {
76
+ "content": "<unused3>",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "10": {
84
+ "content": "<unused4>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "11": {
92
+ "content": "<unused5>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "12": {
100
+ "content": "<unused6>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "13": {
108
+ "content": "<unused7>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "14": {
116
+ "content": "<unused8>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "15": {
124
+ "content": "<unused9>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "16": {
132
+ "content": "<unused10>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "17": {
140
+ "content": "<unused11>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "18": {
148
+ "content": "<unused12>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "19": {
156
+ "content": "<unused13>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "20": {
164
+ "content": "<unused14>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "21": {
172
+ "content": "<unused15>",
173
+ "lstrip": false,
174
+ "normalized": false,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "22": {
180
+ "content": "<unused16>",
181
+ "lstrip": false,
182
+ "normalized": false,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "23": {
188
+ "content": "<unused17>",
189
+ "lstrip": false,
190
+ "normalized": false,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "24": {
196
+ "content": "<unused18>",
197
+ "lstrip": false,
198
+ "normalized": false,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "25": {
204
+ "content": "<unused19>",
205
+ "lstrip": false,
206
+ "normalized": false,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "26": {
212
+ "content": "<unused20>",
213
+ "lstrip": false,
214
+ "normalized": false,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "27": {
220
+ "content": "<unused21>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "28": {
228
+ "content": "<unused22>",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "29": {
236
+ "content": "<unused23>",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "30": {
244
+ "content": "<unused24>",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "31": {
252
+ "content": "<unused25>",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "32": {
260
+ "content": "<unused26>",
261
+ "lstrip": false,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "33": {
268
+ "content": "<unused27>",
269
+ "lstrip": false,
270
+ "normalized": false,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "34": {
276
+ "content": "<unused28>",
277
+ "lstrip": false,
278
+ "normalized": false,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "35": {
284
+ "content": "<unused29>",
285
+ "lstrip": false,
286
+ "normalized": false,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "36": {
292
+ "content": "<unused30>",
293
+ "lstrip": false,
294
+ "normalized": false,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "49999": {
300
+ "content": "<pad>",
301
+ "lstrip": false,
302
+ "normalized": false,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "50000": {
308
+ "content": "[Q] ",
309
+ "lstrip": false,
310
+ "normalized": true,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": false
314
+ },
315
+ "50001": {
316
+ "content": "[D] ",
317
+ "lstrip": false,
318
+ "normalized": true,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": false
322
+ }
323
+ },
324
+ "bos_token": "<s>",
325
+ "clean_up_tokenization_spaces": true,
326
+ "cls_token": "<cls>",
327
+ "do_lower_case": false,
328
+ "eos_token": "<\\s>",
329
+ "extra_special_tokens": {},
330
+ "mask_token": "<mask>",
331
+ "max_length": 1023,
332
+ "model_max_length": 1023,
333
+ "pad_to_multiple_of": null,
334
+ "pad_token": "<mask>",
335
+ "pad_token_type_id": 0,
336
+ "padding_side": "right",
337
+ "sep_token": "<sep>",
338
+ "stride": 0,
339
+ "strip_accents": null,
340
+ "tokenize_chinese_chars": true,
341
+ "tokenizer_class": "BertTokenizer",
342
+ "truncation_side": "right",
343
+ "truncation_strategy": "longest_first",
344
+ "unk_token": "<unk>"
345
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff