99eren99 commited on
Commit
941911e
·
verified ·
1 Parent(s): a723569

Upload 13 files

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:ef5d616b84a29a425b917c795c329aff459193f7aee52529eb09b5c574e8990f
3
+ size 393304
README.md CHANGED
@@ -1,3 +1,404 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - ColBERT
4
+ - PyLate
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - loss:Distillation
10
+ - turkish
11
+ pipeline_tag: sentence-similarity
12
+ library_name: PyLate
13
+ ---
14
+
15
+ # PyLate
16
+
17
+ This is a [PyLate](https://github.com/lightonai/pylate) model trained. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
18
+
19
+ ## Model Details
20
+
21
+ ### Model Description
22
+ - **Model Type:** PyLate model
23
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
24
+ - **Document Length:** 512 tokens
25
+ - **Query Length:** 32 tokens
26
+ - **Output Dimensionality:** 128 tokens
27
+ - **Similarity Function:** MaxSim
28
+ <!-- - **Training Dataset:** Unknown -->
29
+ <!-- - **Language:** Unknown -->
30
+ <!-- - **License:** Unknown -->
31
+
32
+ ### Model Sources
33
+
34
+ - **Documentation:** [PyLate Documentation](https://lightonai.github.io/pylate/)
35
+ - **Repository:** [PyLate on GitHub](https://github.com/lightonai/pylate)
36
+ - **Hugging Face:** [PyLate models on Hugging Face](https://huggingface.co/models?library=PyLate)
37
+
38
+ ### Full Model Architecture
39
+
40
+ ```
41
+ ColBERT(
42
+ (0): Transformer({'max_seq_length': 511, 'do_lower_case': False}) with Transformer model: ModernBertModel
43
+ (1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
44
+ )
45
+ ```
46
+
47
+ ## Usage
48
+ First install required libraries (Flash Attention is a must for consistency):
49
+
50
+ ```bash
51
+ pip install -U einops flash_attn
52
+ pip install -U pylate
53
+ ```
54
+
55
+ Then normalize your text ---> lambda x: x.replace("İ", "i").replace("I", "ı").lower()
56
+
57
+ ### Retrieval
58
+
59
+ PyLate provides a streamlined interface to index and retrieve documents using ColBERT models. The index leverages the Voyager HNSW index to efficiently handle document embeddings and enable fast retrieval.
60
+
61
+ #### Indexing documents
62
+
63
+ First, load the ColBERT model and initialize the Voyager index, then encode and index your documents:
64
+
65
+ ```python
66
+ from pylate import indexes, models, retrieve
67
+
68
+ # Step 1: Load the ColBERT model
69
+ model = models.ColBERT(
70
+ model_name_or_path=pylate_model_id,
71
+ )
72
+ try:
73
+ model.tokenizer.model_input_names.remove("token_type_ids")
74
+ except:
75
+ pass
76
+ model.eval()
77
+ model.to("cuda")
78
+
79
+ # Step 2: Initialize the Voyager index
80
+ index = indexes.Voyager(
81
+ index_folder="pylate-index",
82
+ index_name="index",
83
+ override=True, # This overwrites the existing index if any
84
+ )
85
+
86
+ # Step 3: Encode the documents
87
+ documents_ids = ["1", "2", "3"]
88
+ documents = ["document 1 text", "document 2 text", "document 3 text"]
89
+
90
+ documents_embeddings = model.encode(
91
+ documents,
92
+ batch_size=32,
93
+ is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
94
+ show_progress_bar=True,
95
+ )
96
+
97
+ # Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
98
+ index.add_documents(
99
+ documents_ids=documents_ids,
100
+ documents_embeddings=documents_embeddings,
101
+ )
102
+ ```
103
+
104
+ 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:
105
+
106
+ ```python
107
+ # To load an index, simply instantiate it with the correct folder/name and without overriding it
108
+ index = indexes.Voyager(
109
+ index_folder="pylate-index",
110
+ index_name="index",
111
+ )
112
+ ```
113
+
114
+ #### Retrieving top-k documents for queries
115
+
116
+ Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
117
+ 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:
118
+
119
+ ```python
120
+ # Step 1: Initialize the ColBERT retriever
121
+ retriever = retrieve.ColBERT(index=index)
122
+
123
+ # Step 2: Encode the queries
124
+ queries_embeddings = model.encode(
125
+ ["query for document 3", "query for document 1"],
126
+ batch_size=32,
127
+ is_query=True, # Ensure that it is set to True to indicate that these are queries
128
+ show_progress_bar=True,
129
+ )
130
+
131
+ # Step 3: Retrieve top-k documents
132
+ scores = retriever.retrieve(
133
+ queries_embeddings=queries_embeddings,
134
+ k=10, # Retrieve the top 10 matches for each query
135
+ )
136
+ ```
137
+
138
+ ### Reranking
139
+ 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:
140
+
141
+ ```python
142
+ from pylate import rank, models
143
+
144
+ queries = [
145
+ "query A",
146
+ "query B",
147
+ ]
148
+
149
+ documents = [
150
+ ["document A", "document B"],
151
+ ["document 1", "document C", "document B"],
152
+ ]
153
+
154
+ documents_ids = [
155
+ [1, 2],
156
+ [1, 3, 2],
157
+ ]
158
+
159
+ model = models.ColBERT(
160
+ model_name_or_path=pylate_model_id,
161
+ )
162
+
163
+ queries_embeddings = model.encode(
164
+ queries,
165
+ is_query=True,
166
+ )
167
+
168
+ documents_embeddings = model.encode(
169
+ documents,
170
+ is_query=False,
171
+ )
172
+
173
+ reranked_documents = rank.rerank(
174
+ documents_ids=documents_ids,
175
+ queries_embeddings=queries_embeddings,
176
+ documents_embeddings=documents_embeddings,
177
+ )
178
+ ```
179
+
180
+ <!--
181
+ ### Direct Usage (Transformers)
182
+
183
+ <details><summary>Click to see the direct usage in Transformers</summary>
184
+
185
+ </details>
186
+ -->
187
+
188
+ <!--
189
+ ### Downstream Usage (Sentence Transformers)
190
+
191
+ You can finetune this model on your own dataset.
192
+
193
+ <details><summary>Click to expand</summary>
194
+
195
+ </details>
196
+ -->
197
+
198
+ <!--
199
+ ### Out-of-Scope Use
200
+
201
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
202
+ -->
203
+
204
+ <!--
205
+ ## Bias, Risks and Limitations
206
+
207
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
208
+ -->
209
+
210
+ <!--
211
+ ### Recommendations
212
+
213
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
214
+ -->
215
+
216
+ ## Training Details
217
+
218
+ ### Training Hyperparameters
219
+ #### Non-Default Hyperparameters
220
+
221
+ - `per_device_train_batch_size`: 32
222
+ - `gradient_accumulation_steps`: 4
223
+ - `learning_rate`: 8e-05
224
+ - `num_train_epochs`: 4
225
+ - `warmup_ratio`: 0.05
226
+ - `bf16`: True
227
+ - `tf32`: True
228
+
229
+ #### All Hyperparameters
230
+ <details><summary>Click to expand</summary>
231
+
232
+ - `overwrite_output_dir`: False
233
+ - `do_predict`: False
234
+ - `eval_strategy`: no
235
+ - `prediction_loss_only`: True
236
+ - `per_device_train_batch_size`: 32
237
+ - `per_device_eval_batch_size`: 8
238
+ - `per_gpu_train_batch_size`: None
239
+ - `per_gpu_eval_batch_size`: None
240
+ - `gradient_accumulation_steps`: 4
241
+ - `eval_accumulation_steps`: None
242
+ - `torch_empty_cache_steps`: None
243
+ - `learning_rate`: 8e-05
244
+ - `weight_decay`: 0.0
245
+ - `adam_beta1`: 0.9
246
+ - `adam_beta2`: 0.999
247
+ - `adam_epsilon`: 1e-08
248
+ - `max_grad_norm`: 1.0
249
+ - `num_train_epochs`: 4
250
+ - `max_steps`: -1
251
+ - `lr_scheduler_type`: linear
252
+ - `lr_scheduler_kwargs`: {}
253
+ - `warmup_ratio`: 0.05
254
+ - `warmup_steps`: 0
255
+ - `log_level`: passive
256
+ - `log_level_replica`: warning
257
+ - `log_on_each_node`: True
258
+ - `logging_nan_inf_filter`: True
259
+ - `save_safetensors`: True
260
+ - `save_on_each_node`: False
261
+ - `save_only_model`: False
262
+ - `restore_callback_states_from_checkpoint`: False
263
+ - `no_cuda`: False
264
+ - `use_cpu`: False
265
+ - `use_mps_device`: False
266
+ - `seed`: 42
267
+ - `data_seed`: None
268
+ - `jit_mode_eval`: False
269
+ - `use_ipex`: False
270
+ - `bf16`: True
271
+ - `fp16`: False
272
+ - `fp16_opt_level`: O1
273
+ - `half_precision_backend`: auto
274
+ - `bf16_full_eval`: False
275
+ - `fp16_full_eval`: False
276
+ - `tf32`: True
277
+ - `local_rank`: 0
278
+ - `ddp_backend`: None
279
+ - `tpu_num_cores`: None
280
+ - `tpu_metrics_debug`: False
281
+ - `debug`: []
282
+ - `dataloader_drop_last`: False
283
+ - `dataloader_num_workers`: 0
284
+ - `dataloader_prefetch_factor`: None
285
+ - `past_index`: -1
286
+ - `disable_tqdm`: False
287
+ - `remove_unused_columns`: True
288
+ - `label_names`: None
289
+ - `load_best_model_at_end`: False
290
+ - `ignore_data_skip`: False
291
+ - `fsdp`: []
292
+ - `fsdp_min_num_params`: 0
293
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
294
+ - `fsdp_transformer_layer_cls_to_wrap`: None
295
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
296
+ - `deepspeed`: None
297
+ - `label_smoothing_factor`: 0.0
298
+ - `optim`: adamw_torch
299
+ - `optim_args`: None
300
+ - `adafactor`: False
301
+ - `group_by_length`: False
302
+ - `length_column_name`: length
303
+ - `ddp_find_unused_parameters`: None
304
+ - `ddp_bucket_cap_mb`: None
305
+ - `ddp_broadcast_buffers`: False
306
+ - `dataloader_pin_memory`: True
307
+ - `dataloader_persistent_workers`: False
308
+ - `skip_memory_metrics`: True
309
+ - `use_legacy_prediction_loop`: False
310
+ - `push_to_hub`: False
311
+ - `resume_from_checkpoint`: None
312
+ - `hub_model_id`: None
313
+ - `hub_strategy`: every_save
314
+ - `hub_private_repo`: None
315
+ - `hub_always_push`: False
316
+ - `gradient_checkpointing`: False
317
+ - `gradient_checkpointing_kwargs`: None
318
+ - `include_inputs_for_metrics`: False
319
+ - `include_for_metrics`: []
320
+ - `eval_do_concat_batches`: True
321
+ - `fp16_backend`: auto
322
+ - `push_to_hub_model_id`: None
323
+ - `push_to_hub_organization`: None
324
+ - `mp_parameters`:
325
+ - `auto_find_batch_size`: False
326
+ - `full_determinism`: False
327
+ - `torchdynamo`: None
328
+ - `ray_scope`: last
329
+ - `ddp_timeout`: 1800
330
+ - `torch_compile`: False
331
+ - `torch_compile_backend`: None
332
+ - `torch_compile_mode`: None
333
+ - `dispatch_batches`: None
334
+ - `split_batches`: None
335
+ - `include_tokens_per_second`: False
336
+ - `include_num_input_tokens_seen`: False
337
+ - `neftune_noise_alpha`: None
338
+ - `optim_target_modules`: None
339
+ - `batch_eval_metrics`: False
340
+ - `eval_on_start`: False
341
+ - `use_liger_kernel`: False
342
+ - `eval_use_gather_object`: False
343
+ - `average_tokens_across_devices`: False
344
+ - `prompts`: None
345
+ - `batch_sampler`: batch_sampler
346
+ - `multi_dataset_batch_sampler`: proportional
347
+
348
+ </details>
349
+
350
+ ### Framework Versions
351
+ - Python: 3.10.16
352
+ - Sentence Transformers: 4.0.2
353
+ - PyLate: 1.1.7
354
+ - Transformers: 4.48.2
355
+ - PyTorch: 2.5.1+cu124
356
+ - Accelerate: 1.2.1
357
+ - Datasets: 2.21.0
358
+ - Tokenizers: 0.21.0
359
+
360
+
361
+ ## Citation
362
+
363
+ ### BibTeX
364
+
365
+ #### Sentence Transformers
366
+ ```bibtex
367
+ @inproceedings{reimers-2019-sentence-bert,
368
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
369
+ author = "Reimers, Nils and Gurevych, Iryna",
370
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
371
+ month = "11",
372
+ year = "2019",
373
+ publisher = "Association for Computational Linguistics",
374
+ url = "https://arxiv.org/abs/1908.10084"
375
+ }
376
+ ```
377
+
378
+ #### PyLate
379
+ ```bibtex
380
+ @misc{PyLate,
381
+ title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
382
+ author={Chaffin, Antoine and Sourty, Raphaël},
383
+ url={https://github.com/lightonai/pylate},
384
+ year={2024}
385
+ }
386
+ ```
387
+
388
+ <!--
389
+ ## Glossary
390
+
391
+ *Clearly define terms in order to be accessible across audiences.*
392
+ -->
393
+
394
+ <!--
395
+ ## Model Card Authors
396
+
397
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
398
+ -->
399
+
400
+ <!--
401
+ ## Model Card Contact
402
+
403
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
404
+ -->
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "[D] ": 32001,
3
+ "[Q] ": 32000
4
+ }
config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.1,
7
+ "bos_token_id": 2,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.1,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 2,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "embedding_dropout": 0.1,
16
+ "eos_token_id": 3,
17
+ "global_attn_every_n_layers": 1,
18
+ "global_rope_theta": 10000.0,
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": 512,
27
+ "local_rope_theta": 10000.0,
28
+ "max_position_embeddings": 512,
29
+ "mlp_bias": false,
30
+ "mlp_dropout": 0.1,
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": 0,
37
+ "position_embedding_type": "absolute",
38
+ "reference_compile": false,
39
+ "repad_logits_with_grad": false,
40
+ "sep_token_id": 3,
41
+ "sparse_pred_ignore_index": -100,
42
+ "sparse_prediction": false,
43
+ "torch_dtype": "float32",
44
+ "transformers_version": "4.48.2",
45
+ "vocab_size": 32002
46
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
4
+ "transformers": "4.48.2",
5
+ "pytorch": "2.5.1+cu124"
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": 512,
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
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a195e11dc420cb174c189f1d67ba4c6b75d9ea9288b98f2864fab85e2fda85a
3
+ size 539649784
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": 511,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "[MASK]",
17
+ "sep_token": {
18
+ "content": "[SEP]",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "unk_token": {
25
+ "content": "[UNK]",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
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
+ "32000": {
44
+ "content": "[Q] ",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ },
51
+ "32001": {
52
+ "content": "[D] ",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": false
58
+ }
59
+ },
60
+ "clean_up_tokenization_spaces": true,
61
+ "cls_token": "[CLS]",
62
+ "do_basic_tokenize": true,
63
+ "do_lower_case": false,
64
+ "extra_special_tokens": {},
65
+ "mask_token": "[MASK]",
66
+ "max_len": 512,
67
+ "model_max_length": 512,
68
+ "never_split": null,
69
+ "pad_token": "[MASK]",
70
+ "sep_token": "[SEP]",
71
+ "strip_accents": null,
72
+ "tokenize_chinese_chars": true,
73
+ "tokenizer_class": "BertTokenizer",
74
+ "unk_token": "[UNK]"
75
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff