param-bharat commited on
Commit
b1ae5f6
1 Parent(s): c526ecf

Upload NLIScorer

Browse files
Files changed (7) hide show
  1. README.md +199 -0
  2. config.json +64 -0
  3. model.safetensors +3 -0
  4. pipeline.py +388 -0
  5. special_tokens_map.json +37 -0
  6. tokenizer.json +0 -0
  7. tokenizer_config.json +947 -0
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "param-bharat/ModernBERT-base-nli-clf",
3
+ "architectures": [
4
+ "ModernBertForSequenceClassification"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 50281,
9
+ "classifier_activation": "gelu",
10
+ "classifier_bias": true,
11
+ "classifier_dropout": 0.3,
12
+ "classifier_pooling": "cls",
13
+ "cls_token_id": 50281,
14
+ "custom_pipelines": {
15
+ "nli-scorer": {
16
+ "impl": "pipeline.NLIScorer",
17
+ "pt": [
18
+ "AutoModelForSequenceClassification"
19
+ ],
20
+ "tf": []
21
+ }
22
+ },
23
+ "decoder_bias": true,
24
+ "deterministic_flash_attn": false,
25
+ "embedding_dropout": 0.0,
26
+ "eos_token_id": 50282,
27
+ "global_attn_every_n_layers": 3,
28
+ "global_rope_theta": 160000.0,
29
+ "gradient_checkpointing": false,
30
+ "hidden_activation": "gelu",
31
+ "hidden_size": 768,
32
+ "id2label": {
33
+ "0": "False",
34
+ "1": "True"
35
+ },
36
+ "initializer_cutoff_factor": 2.0,
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 1152,
39
+ "label2id": {
40
+ "False": 0,
41
+ "True": 1
42
+ },
43
+ "layer_norm_eps": 1e-05,
44
+ "local_attention": 128,
45
+ "local_rope_theta": 10000.0,
46
+ "max_position_embeddings": 8192,
47
+ "mlp_bias": false,
48
+ "mlp_dropout": 0.0,
49
+ "model_type": "modernbert",
50
+ "norm_bias": false,
51
+ "norm_eps": 1e-05,
52
+ "num_attention_heads": 12,
53
+ "num_hidden_layers": 22,
54
+ "pad_token_id": 50283,
55
+ "position_embedding_type": "absolute",
56
+ "problem_type": "single_label_classification",
57
+ "reference_compile": true,
58
+ "sep_token_id": 50282,
59
+ "sparse_pred_ignore_index": -100,
60
+ "sparse_prediction": false,
61
+ "torch_dtype": "float32",
62
+ "transformers_version": "4.48.0.dev0",
63
+ "vocab_size": 50368
64
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66b2bc760eeba85d11fd61534cccedfaac37d5d7dc3f421df4d11642163e04e1
3
+ size 598442928
pipeline.py ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel, ConfigDict
2
+ from transformers import (
3
+ AutoTokenizer,
4
+ PreTrainedTokenizerFast,
5
+ PreTrainedTokenizer,
6
+ BatchEncoding,
7
+ )
8
+ from transformers import Pipeline
9
+
10
+
11
+ class NLIInstruction(BaseModel):
12
+ tokenizer: AutoTokenizer | PreTrainedTokenizerFast | PreTrainedTokenizer
13
+ instruction: str
14
+ hypothesis: str
15
+ Prompt: str | None = None
16
+ Completion: str | None = None
17
+ Context: str | None = None
18
+ ChatHistory: list[dict[str, str]] | None = None
19
+ model_config = ConfigDict(arbitrary_types_allowed=True)
20
+
21
+ def format_chat_history(self, chat_history: list[dict[str, str]]) -> str:
22
+ return "\n".join(
23
+ [
24
+ f"### Background\n{message['role']}: {message['content']}"
25
+ for message in chat_history
26
+ ]
27
+ )
28
+
29
+ @property
30
+ def premise(self) -> str:
31
+ base_template = "## Premise\n"
32
+ if self.Context:
33
+ base_template += f"### Context\n{self.Context}\n"
34
+ if self.ChatHistory:
35
+ base_template += self.format_chat_history(self.ChatHistory)
36
+ if self.Prompt:
37
+ base_template += f"### Prompt\n{self.Prompt}\n"
38
+ if self.Completion:
39
+ base_template += f"### Completion\n{self.Completion}\n"
40
+ return base_template
41
+
42
+ @property
43
+ def as_str(self):
44
+ return f"{self.instruction}\n{self.premise}\n{self.hypothesis}"
45
+
46
+ @property
47
+ def as_model_inputs(self) -> dict[str, list[int]]:
48
+ instruction_ids = self.tokenizer(
49
+ self.instruction, add_special_tokens=False
50
+ ).input_ids
51
+ premise_ids = self.tokenizer(self.premise, add_special_tokens=False).input_ids
52
+ hypothesis_ids = self.tokenizer(
53
+ self.hypothesis, add_special_tokens=False
54
+ ).input_ids
55
+
56
+ premise_length = self.tokenizer.model_max_length - len(
57
+ instruction_ids + hypothesis_ids
58
+ )
59
+ premise_ids = premise_ids[:premise_length]
60
+ input_ids = (
61
+ [self.tokenizer.cls_token_id]
62
+ + instruction_ids
63
+ + [self.tokenizer.sep_token_id]
64
+ + premise_ids
65
+ + [self.tokenizer.sep_token_id]
66
+ + hypothesis_ids
67
+ + [self.tokenizer.sep_token_id]
68
+ )
69
+ attention_mask = [1] * len(input_ids)
70
+ return BatchEncoding(
71
+ data={"input_ids": input_ids, "attention_mask": attention_mask},
72
+ tensor_type="pt",
73
+ prepend_batch_axis=True,
74
+ )
75
+
76
+
77
+ class DetectionResponseFactualConsistency(NLIInstruction):
78
+ instruction: str = (
79
+ """## Task\nDetermine if the completion is factually consistent with the context."""
80
+ )
81
+ hypothesis: str = (
82
+ """## Hypothesis\nThe completion is factually consistent with the context."""
83
+ )
84
+
85
+
86
+ class DetectionContextPromptInjection(NLIInstruction):
87
+ instruction: str = (
88
+ """## Task\nDetermine if the prompt contains a prompt injection attack."""
89
+ )
90
+ hypothesis: str = (
91
+ """## Hypothesis\nThe prompt contains a prompt injection attack."""
92
+ )
93
+
94
+
95
+ class DetectionContextSourceCode(NLIInstruction):
96
+ instruction: str = (
97
+ """## Task\nDetermine if the given context contains any source code or code snippets."""
98
+ )
99
+ hypothesis: str = (
100
+ """## Hypothesis\nThe given context contains source code or code blocks."""
101
+ )
102
+
103
+
104
+ class DetectionContextToxicity(NLIInstruction):
105
+ instruction: str = (
106
+ """## Task\nDetermine if the context contains any toxic content related to one of the following: disability, gender, identity hate, insult, obscene, race, religion, toxicity, violence."""
107
+ )
108
+ hypothesis: str = (
109
+ """## Hypothesis\nThe context contains some toxic content related to one of the following: disability, gender, identity hate, insult, obscene, race, religion, toxicity, violence."""
110
+ )
111
+
112
+
113
+ class DetectionContextToxicityDisability(NLIInstruction):
114
+ instruction: str = (
115
+ """## Task\nDetermine if the context contains any toxic content related to disability."""
116
+ )
117
+ hypothesis: str = (
118
+ """## Hypothesis\nThe context contains some toxic content related to disability."""
119
+ )
120
+
121
+
122
+ class DetectionContextToxicityGender(NLIInstruction):
123
+ instruction: str = (
124
+ """## Task\nDetermine if the context contains any toxic content related to gender."""
125
+ )
126
+ hypothesis: str = (
127
+ """## Hypothesis\nThe context contains some toxic content related to gender."""
128
+ )
129
+
130
+
131
+ class DetectionContextToxicityIdentityHate(NLIInstruction):
132
+ instruction: str = (
133
+ """## Task\nDetermine if the context contains any toxic content related to identity hate."""
134
+ )
135
+ hypothesis: str = (
136
+ """## Hypothesis\nThe context contains some toxic content related to identity hate."""
137
+ )
138
+
139
+
140
+ class DetectionContextToxicityInsult(NLIInstruction):
141
+ instruction: str = (
142
+ """## Task\nDetermine if the context contains any insulting content."""
143
+ )
144
+ hypothesis: str = """## Hypothesis\nThe context contains some insulting content."""
145
+
146
+
147
+ class DetectionContextToxicityObscene(NLIInstruction):
148
+ instruction: str = (
149
+ """## Task\nDetermine if the context contains any obscene content."""
150
+ )
151
+ hypothesis: str = """## Hypothesis\nThe context contains some obscene content."""
152
+
153
+
154
+ class DetectionContextToxicityRace(NLIInstruction):
155
+ instruction: str = (
156
+ """## Task\nDetermine if the context contains any racist content."""
157
+ )
158
+ hypothesis: str = """## Hypothesis\nThe context contains some racist content."""
159
+
160
+
161
+ class DetectionContextToxicityReligion(NLIInstruction):
162
+ instruction: str = (
163
+ """## Task\nDetermine if the context contains any toxic content related to religion."""
164
+ )
165
+ hypothesis: str = (
166
+ """## Hypothesis\nThe context contains some toxic content related to religion."""
167
+ )
168
+
169
+
170
+ class DetectionContextToxicityViolence(NLIInstruction):
171
+ instruction: str = (
172
+ """## Task\nDetermine if the context contains any violent content."""
173
+ )
174
+ hypothesis: str = """## Hypothesis\nThe context contains some violent content."""
175
+
176
+
177
+ class QualityContextDocumentRelevance(NLIInstruction):
178
+ instruction: str = (
179
+ """## Task\nDetermine if the context contains relevant information used by the completion to answer the question in the given prompt correctly."""
180
+ )
181
+ hypothesis: str = (
182
+ """## Hypothesis\nThe context contains relevant information used by the completion to answer the question in the given prompt correctly."""
183
+ )
184
+
185
+
186
+ class QualityContextDocumentUtilization(NLIInstruction):
187
+ instruction: str = (
188
+ """## Task\nDetermine if the context was utilized in the completion to answer the question in the given prompt correctly."""
189
+ )
190
+ hypothesis: str = (
191
+ """## Hypothesis\nThe context was utilized in the completion to answer the question in the given prompt correctly."""
192
+ )
193
+
194
+
195
+ class QualityContextSentenceRelevance(NLIInstruction):
196
+ instruction: str = (
197
+ """## Task\nDetermine if the context contains relevant information used by the completion to answer the question in the given prompt correctly."""
198
+ )
199
+ hypothesis: str = (
200
+ """## Hypothesis\nThe context contains relevant information used by the completion to answer the question in the given prompt correctly."""
201
+ )
202
+ Sentence: str
203
+
204
+ @property
205
+ def premise(self) -> str:
206
+ return super().premise + f"\n### Sentence\n{self.Sentence}\n"
207
+
208
+
209
+ class QualityContextSentenceUtilization(NLIInstruction):
210
+ instruction: str = (
211
+ """## Task\nDetermine if the selected sentence was utilized in the completion to answer the question in the given prompt correctly."""
212
+ )
213
+ hypothesis: str = (
214
+ """## Hypothesis\nThe selected sentence was utilized in the completion to answer the question in the given prompt correctly."""
215
+ )
216
+ Sentence: str
217
+
218
+ @property
219
+ def premise(self) -> str:
220
+ return super().premise + f"\n### Sentence\n{self.Sentence}\n"
221
+
222
+
223
+ class QualityResponseAdherence(NLIInstruction):
224
+ instruction: str = (
225
+ """## Task\nDetermine if the completion adheres to the context when answering the question in the given prompt."""
226
+ )
227
+ hypothesis: str = (
228
+ """## Hypothesis\nThe completion adheres to the context when answering the question in the given prompt."""
229
+ )
230
+
231
+
232
+ class QualityResponseAttribution(NLIInstruction):
233
+ instruction: str = (
234
+ """## Task\nDetermine if the completion attributes the context when answering the question in the given prompt."""
235
+ )
236
+ hypothesis: str = (
237
+ """## Hypothesis\nThe completion attributes the context when answering the question in the given prompt."""
238
+ )
239
+
240
+
241
+ class QualityResponseCoherence(NLIInstruction):
242
+ instruction: str = (
243
+ """## Task\nDetermine if the completion is coherent and for the given context."""
244
+ )
245
+ hypothesis: str = (
246
+ """## Hypothesis\nThe completion is coherent and for the given context."""
247
+ )
248
+
249
+
250
+ class QualityResponseComplexity(NLIInstruction):
251
+ instruction: str = (
252
+ """## Task\nDetermine if the completion is complex and contains multiple steps to answer the question."""
253
+ )
254
+ hypothesis: str = (
255
+ """## Hypothesis\nThe completion is complex and contains multiple steps to answer the question."""
256
+ )
257
+
258
+
259
+ class QualityResponseCorrectness(NLIInstruction):
260
+ instruction: str = (
261
+ """## Task\nDetermine if the completion is correct with respect to the given prompt and context."""
262
+ )
263
+ hypothesis: str = (
264
+ """## Hypothesis\nThe completion is correct with respect to the given prompt and context."""
265
+ )
266
+
267
+
268
+ class QualityResponseHelpfulness(NLIInstruction):
269
+ instruction: str = (
270
+ """## Task\nDetermine if the completion is helpful with respect to the given prompt and context."""
271
+ )
272
+ hypothesis: str = (
273
+ """## Hypothesis\nThe completion is helpful with respect to the given prompt and context."""
274
+ )
275
+
276
+
277
+ class QualityResponseInstructionFollowing(NLIInstruction):
278
+ instruction: str = (
279
+ """## Task\nDetermine if the completion follows the instructions provided in the given prompt."""
280
+ )
281
+ hypothesis: str = (
282
+ """## Hypothesis\nThe completion follows the instructions provided in the given prompt."""
283
+ )
284
+
285
+
286
+ class QualityResponseRelevance(NLIInstruction):
287
+ instruction: str = (
288
+ """## Task\nDetermine if the completion is relevant to the given prompt and context."""
289
+ )
290
+ hypothesis: str = (
291
+ """## Hypothesis\nThe completion is relevant to the given prompt and context."""
292
+ )
293
+
294
+
295
+ class QualityResponseVerbosity(NLIInstruction):
296
+ instruction: str = (
297
+ """## Task\nDetermine if the completion is too verbose with respect to the given prompt and context."""
298
+ )
299
+ hypothesis: str = (
300
+ """## Hypothesis\nThe completion is too verbose with respect to the given prompt and context."""
301
+ )
302
+
303
+
304
+ TASK_CLASSES = {
305
+ "Detection/Hallucination/Factual Consistency": DetectionResponseFactualConsistency,
306
+ "Detection/Prompt Injection": DetectionContextPromptInjection,
307
+ "Detection/Source Code": DetectionContextSourceCode,
308
+ "Detection/Toxicity/Disability": DetectionContextToxicityDisability,
309
+ "Detection/Toxicity/Gender": DetectionContextToxicityGender,
310
+ "Detection/Toxicity/Identity Hate": DetectionContextToxicityIdentityHate,
311
+ "Detection/Toxicity/Insult": DetectionContextToxicityInsult,
312
+ "Detection/Toxicity/Obscene": DetectionContextToxicityObscene,
313
+ "Detection/Toxicity/Race": DetectionContextToxicityRace,
314
+ "Detection/Toxicity/Religion": DetectionContextToxicityReligion,
315
+ "Detection/Toxicity/Toxicity": DetectionContextToxicity,
316
+ "Detection/Toxicity/Toxic": DetectionContextToxicity,
317
+ "Detection/Toxicity/Violence": DetectionContextToxicityViolence,
318
+ "Quality/Context/Document Relevance": QualityContextDocumentRelevance,
319
+ "Quality/Context/Document Utilization": QualityContextDocumentUtilization,
320
+ "Quality/Context/Sentence Relevance": QualityContextSentenceRelevance,
321
+ "Quality/Context/Sentence Utilization": QualityContextSentenceUtilization,
322
+ "Quality/Response/Adherence": QualityResponseAdherence,
323
+ "Quality/Response/Attribution": QualityResponseAttribution,
324
+ "Quality/Response/Coherence": QualityResponseCoherence,
325
+ "Quality/Response/Complexity": QualityResponseComplexity,
326
+ "Quality/Response/Correctness": QualityResponseCorrectness,
327
+ "Quality/Response/Helpfulness": QualityResponseHelpfulness,
328
+ "Quality/Response/Instruction Following": QualityResponseInstructionFollowing,
329
+ "Quality/Response/Relevance": QualityResponseRelevance,
330
+ "Quality/Response/Verbosity": QualityResponseVerbosity,
331
+ }
332
+
333
+ TASK_THRESHOLDS = {
334
+ "Detection/Hallucination/Factual Consistency": 0.5895,
335
+ "Detection/Prompt Injection": 0.4147,
336
+ "Detection/Source Code": 0.4001,
337
+ "Detection/Toxicity/Disability": 0.5547,
338
+ "Detection/Toxicity/Gender": 0.4007,
339
+ "Detection/Toxicity/Identity Hate": 0.5502,
340
+ "Detection/Toxicity/Insult": 0.4913,
341
+ "Detection/Toxicity/Obscene": 0.448,
342
+ "Detection/Toxicity/Race": 0.5983,
343
+ "Detection/Toxicity/Religion": 0.4594,
344
+ "Detection/Toxicity/Toxic": 0.5034,
345
+ "Detection/Toxicity/Violence": 0.4031,
346
+ "Quality/Context/Document Relevance": 0.5809,
347
+ "Quality/Context/Document Utilization": 0.4005,
348
+ "Quality/Context/Sentence Relevance": 0.6003,
349
+ "Quality/Context/Sentence Utilization": 0.5417,
350
+ "Quality/Response/Adherence": 0.59,
351
+ "Quality/Response/Attribution": 0.5304,
352
+ "Quality/Response/Coherence": 0.6891,
353
+ "Quality/Response/Complexity": 0.7235,
354
+ "Quality/Response/Correctness": 0.6535,
355
+ "Quality/Response/Helpfulness": 0.4445,
356
+ "Quality/Response/Instruction Following": 0.5323,
357
+ "Quality/Response/Relevance": 0.4011,
358
+ "Quality/Response/Verbosity": 0.4243,
359
+ }
360
+
361
+
362
+ class NLIScorer(Pipeline):
363
+ def _sanitize_parameters(self, **kwargs):
364
+ preprocess_kwargs = {}
365
+ postprocess_kwargs = {}
366
+ if "task_type" in kwargs:
367
+ preprocess_kwargs["task_type"] = kwargs["task_type"]
368
+ postprocess_kwargs["task_type"] = kwargs["task_type"]
369
+ return preprocess_kwargs, {}, postprocess_kwargs
370
+
371
+ def preprocess(self, inputs, task_type):
372
+ TaskClass = TASK_CLASSES[task_type]
373
+ task_class = TaskClass(tokenizer=self.tokenizer, **inputs)
374
+ return task_class.as_model_inputs
375
+
376
+ def _forward(self, model_inputs):
377
+ outputs = self.model(**model_inputs)
378
+ return outputs
379
+
380
+ def postprocess(self, model_outputs, task_type):
381
+ threshold = TASK_THRESHOLDS[task_type]
382
+ pos_scores = model_outputs["logits"].softmax(-1)[0][1]
383
+ best_class = int(pos_scores > threshold)
384
+ if best_class == 1:
385
+ score = pos_scores
386
+ else:
387
+ score = 1 - pos_scores
388
+ return {"score": score.item(), "label": best_class}
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": true,
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,947 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "|||IP_ADDRESS|||",
5
+ "lstrip": false,
6
+ "normalized": true,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": false
10
+ },
11
+ "1": {
12
+ "content": "<|padding|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "50254": {
20
+ "content": " ",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": false
26
+ },
27
+ "50255": {
28
+ "content": " ",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": false
34
+ },
35
+ "50256": {
36
+ "content": " ",
37
+ "lstrip": false,
38
+ "normalized": true,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": false
42
+ },
43
+ "50257": {
44
+ "content": " ",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ },
51
+ "50258": {
52
+ "content": " ",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": false
58
+ },
59
+ "50259": {
60
+ "content": " ",
61
+ "lstrip": false,
62
+ "normalized": true,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": false
66
+ },
67
+ "50260": {
68
+ "content": " ",
69
+ "lstrip": false,
70
+ "normalized": true,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": false
74
+ },
75
+ "50261": {
76
+ "content": " ",
77
+ "lstrip": false,
78
+ "normalized": true,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": false
82
+ },
83
+ "50262": {
84
+ "content": " ",
85
+ "lstrip": false,
86
+ "normalized": true,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": false
90
+ },
91
+ "50263": {
92
+ "content": " ",
93
+ "lstrip": false,
94
+ "normalized": true,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": false
98
+ },
99
+ "50264": {
100
+ "content": " ",
101
+ "lstrip": false,
102
+ "normalized": true,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": false
106
+ },
107
+ "50265": {
108
+ "content": " ",
109
+ "lstrip": false,
110
+ "normalized": true,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": false
114
+ },
115
+ "50266": {
116
+ "content": " ",
117
+ "lstrip": false,
118
+ "normalized": true,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": false
122
+ },
123
+ "50267": {
124
+ "content": " ",
125
+ "lstrip": false,
126
+ "normalized": true,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": false
130
+ },
131
+ "50268": {
132
+ "content": " ",
133
+ "lstrip": false,
134
+ "normalized": true,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": false
138
+ },
139
+ "50269": {
140
+ "content": " ",
141
+ "lstrip": false,
142
+ "normalized": true,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": false
146
+ },
147
+ "50270": {
148
+ "content": " ",
149
+ "lstrip": false,
150
+ "normalized": true,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": false
154
+ },
155
+ "50271": {
156
+ "content": " ",
157
+ "lstrip": false,
158
+ "normalized": true,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": false
162
+ },
163
+ "50272": {
164
+ "content": " ",
165
+ "lstrip": false,
166
+ "normalized": true,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": false
170
+ },
171
+ "50273": {
172
+ "content": " ",
173
+ "lstrip": false,
174
+ "normalized": true,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": false
178
+ },
179
+ "50274": {
180
+ "content": " ",
181
+ "lstrip": false,
182
+ "normalized": true,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": false
186
+ },
187
+ "50275": {
188
+ "content": " ",
189
+ "lstrip": false,
190
+ "normalized": true,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": false
194
+ },
195
+ "50276": {
196
+ "content": " ",
197
+ "lstrip": false,
198
+ "normalized": true,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": false
202
+ },
203
+ "50277": {
204
+ "content": "|||EMAIL_ADDRESS|||",
205
+ "lstrip": false,
206
+ "normalized": true,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": false
210
+ },
211
+ "50278": {
212
+ "content": "|||PHONE_NUMBER|||",
213
+ "lstrip": false,
214
+ "normalized": true,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": false
218
+ },
219
+ "50279": {
220
+ "content": "<|endoftext|>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "50280": {
228
+ "content": "[UNK]",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "50281": {
236
+ "content": "[CLS]",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "50282": {
244
+ "content": "[SEP]",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "50283": {
252
+ "content": "[PAD]",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "50284": {
260
+ "content": "[MASK]",
261
+ "lstrip": true,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "50285": {
268
+ "content": "[unused0]",
269
+ "lstrip": false,
270
+ "normalized": true,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": false
274
+ },
275
+ "50286": {
276
+ "content": "[unused1]",
277
+ "lstrip": false,
278
+ "normalized": true,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": false
282
+ },
283
+ "50287": {
284
+ "content": "[unused2]",
285
+ "lstrip": false,
286
+ "normalized": true,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": false
290
+ },
291
+ "50288": {
292
+ "content": "[unused3]",
293
+ "lstrip": false,
294
+ "normalized": true,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": false
298
+ },
299
+ "50289": {
300
+ "content": "[unused4]",
301
+ "lstrip": false,
302
+ "normalized": true,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": false
306
+ },
307
+ "50290": {
308
+ "content": "[unused5]",
309
+ "lstrip": false,
310
+ "normalized": true,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": false
314
+ },
315
+ "50291": {
316
+ "content": "[unused6]",
317
+ "lstrip": false,
318
+ "normalized": true,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": false
322
+ },
323
+ "50292": {
324
+ "content": "[unused7]",
325
+ "lstrip": false,
326
+ "normalized": true,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": false
330
+ },
331
+ "50293": {
332
+ "content": "[unused8]",
333
+ "lstrip": false,
334
+ "normalized": true,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": false
338
+ },
339
+ "50294": {
340
+ "content": "[unused9]",
341
+ "lstrip": false,
342
+ "normalized": true,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": false
346
+ },
347
+ "50295": {
348
+ "content": "[unused10]",
349
+ "lstrip": false,
350
+ "normalized": true,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": false
354
+ },
355
+ "50296": {
356
+ "content": "[unused11]",
357
+ "lstrip": false,
358
+ "normalized": true,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": false
362
+ },
363
+ "50297": {
364
+ "content": "[unused12]",
365
+ "lstrip": false,
366
+ "normalized": true,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": false
370
+ },
371
+ "50298": {
372
+ "content": "[unused13]",
373
+ "lstrip": false,
374
+ "normalized": true,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": false
378
+ },
379
+ "50299": {
380
+ "content": "[unused14]",
381
+ "lstrip": false,
382
+ "normalized": true,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": false
386
+ },
387
+ "50300": {
388
+ "content": "[unused15]",
389
+ "lstrip": false,
390
+ "normalized": true,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": false
394
+ },
395
+ "50301": {
396
+ "content": "[unused16]",
397
+ "lstrip": false,
398
+ "normalized": true,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": false
402
+ },
403
+ "50302": {
404
+ "content": "[unused17]",
405
+ "lstrip": false,
406
+ "normalized": true,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": false
410
+ },
411
+ "50303": {
412
+ "content": "[unused18]",
413
+ "lstrip": false,
414
+ "normalized": true,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": false
418
+ },
419
+ "50304": {
420
+ "content": "[unused19]",
421
+ "lstrip": false,
422
+ "normalized": true,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": false
426
+ },
427
+ "50305": {
428
+ "content": "[unused20]",
429
+ "lstrip": false,
430
+ "normalized": true,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": false
434
+ },
435
+ "50306": {
436
+ "content": "[unused21]",
437
+ "lstrip": false,
438
+ "normalized": true,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": false
442
+ },
443
+ "50307": {
444
+ "content": "[unused22]",
445
+ "lstrip": false,
446
+ "normalized": true,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": false
450
+ },
451
+ "50308": {
452
+ "content": "[unused23]",
453
+ "lstrip": false,
454
+ "normalized": true,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": false
458
+ },
459
+ "50309": {
460
+ "content": "[unused24]",
461
+ "lstrip": false,
462
+ "normalized": true,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": false
466
+ },
467
+ "50310": {
468
+ "content": "[unused25]",
469
+ "lstrip": false,
470
+ "normalized": true,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": false
474
+ },
475
+ "50311": {
476
+ "content": "[unused26]",
477
+ "lstrip": false,
478
+ "normalized": true,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": false
482
+ },
483
+ "50312": {
484
+ "content": "[unused27]",
485
+ "lstrip": false,
486
+ "normalized": true,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": false
490
+ },
491
+ "50313": {
492
+ "content": "[unused28]",
493
+ "lstrip": false,
494
+ "normalized": true,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": false
498
+ },
499
+ "50314": {
500
+ "content": "[unused29]",
501
+ "lstrip": false,
502
+ "normalized": true,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": false
506
+ },
507
+ "50315": {
508
+ "content": "[unused30]",
509
+ "lstrip": false,
510
+ "normalized": true,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": false
514
+ },
515
+ "50316": {
516
+ "content": "[unused31]",
517
+ "lstrip": false,
518
+ "normalized": true,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": false
522
+ },
523
+ "50317": {
524
+ "content": "[unused32]",
525
+ "lstrip": false,
526
+ "normalized": true,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": false
530
+ },
531
+ "50318": {
532
+ "content": "[unused33]",
533
+ "lstrip": false,
534
+ "normalized": true,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": false
538
+ },
539
+ "50319": {
540
+ "content": "[unused34]",
541
+ "lstrip": false,
542
+ "normalized": true,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": false
546
+ },
547
+ "50320": {
548
+ "content": "[unused35]",
549
+ "lstrip": false,
550
+ "normalized": true,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": false
554
+ },
555
+ "50321": {
556
+ "content": "[unused36]",
557
+ "lstrip": false,
558
+ "normalized": true,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": false
562
+ },
563
+ "50322": {
564
+ "content": "[unused37]",
565
+ "lstrip": false,
566
+ "normalized": true,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": false
570
+ },
571
+ "50323": {
572
+ "content": "[unused38]",
573
+ "lstrip": false,
574
+ "normalized": true,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": false
578
+ },
579
+ "50324": {
580
+ "content": "[unused39]",
581
+ "lstrip": false,
582
+ "normalized": true,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": false
586
+ },
587
+ "50325": {
588
+ "content": "[unused40]",
589
+ "lstrip": false,
590
+ "normalized": true,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": false
594
+ },
595
+ "50326": {
596
+ "content": "[unused41]",
597
+ "lstrip": false,
598
+ "normalized": true,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": false
602
+ },
603
+ "50327": {
604
+ "content": "[unused42]",
605
+ "lstrip": false,
606
+ "normalized": true,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": false
610
+ },
611
+ "50328": {
612
+ "content": "[unused43]",
613
+ "lstrip": false,
614
+ "normalized": true,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": false
618
+ },
619
+ "50329": {
620
+ "content": "[unused44]",
621
+ "lstrip": false,
622
+ "normalized": true,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": false
626
+ },
627
+ "50330": {
628
+ "content": "[unused45]",
629
+ "lstrip": false,
630
+ "normalized": true,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": false
634
+ },
635
+ "50331": {
636
+ "content": "[unused46]",
637
+ "lstrip": false,
638
+ "normalized": true,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": false
642
+ },
643
+ "50332": {
644
+ "content": "[unused47]",
645
+ "lstrip": false,
646
+ "normalized": true,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": false
650
+ },
651
+ "50333": {
652
+ "content": "[unused48]",
653
+ "lstrip": false,
654
+ "normalized": true,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": false
658
+ },
659
+ "50334": {
660
+ "content": "[unused49]",
661
+ "lstrip": false,
662
+ "normalized": true,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": false
666
+ },
667
+ "50335": {
668
+ "content": "[unused50]",
669
+ "lstrip": false,
670
+ "normalized": true,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": false
674
+ },
675
+ "50336": {
676
+ "content": "[unused51]",
677
+ "lstrip": false,
678
+ "normalized": true,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": false
682
+ },
683
+ "50337": {
684
+ "content": "[unused52]",
685
+ "lstrip": false,
686
+ "normalized": true,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": false
690
+ },
691
+ "50338": {
692
+ "content": "[unused53]",
693
+ "lstrip": false,
694
+ "normalized": true,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": false
698
+ },
699
+ "50339": {
700
+ "content": "[unused54]",
701
+ "lstrip": false,
702
+ "normalized": true,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": false
706
+ },
707
+ "50340": {
708
+ "content": "[unused55]",
709
+ "lstrip": false,
710
+ "normalized": true,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": false
714
+ },
715
+ "50341": {
716
+ "content": "[unused56]",
717
+ "lstrip": false,
718
+ "normalized": true,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": false
722
+ },
723
+ "50342": {
724
+ "content": "[unused57]",
725
+ "lstrip": false,
726
+ "normalized": true,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": false
730
+ },
731
+ "50343": {
732
+ "content": "[unused58]",
733
+ "lstrip": false,
734
+ "normalized": true,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": false
738
+ },
739
+ "50344": {
740
+ "content": "[unused59]",
741
+ "lstrip": false,
742
+ "normalized": true,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": false
746
+ },
747
+ "50345": {
748
+ "content": "[unused60]",
749
+ "lstrip": false,
750
+ "normalized": true,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": false
754
+ },
755
+ "50346": {
756
+ "content": "[unused61]",
757
+ "lstrip": false,
758
+ "normalized": true,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": false
762
+ },
763
+ "50347": {
764
+ "content": "[unused62]",
765
+ "lstrip": false,
766
+ "normalized": true,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": false
770
+ },
771
+ "50348": {
772
+ "content": "[unused63]",
773
+ "lstrip": false,
774
+ "normalized": true,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": false
778
+ },
779
+ "50349": {
780
+ "content": "[unused64]",
781
+ "lstrip": false,
782
+ "normalized": true,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": false
786
+ },
787
+ "50350": {
788
+ "content": "[unused65]",
789
+ "lstrip": false,
790
+ "normalized": true,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": false
794
+ },
795
+ "50351": {
796
+ "content": "[unused66]",
797
+ "lstrip": false,
798
+ "normalized": true,
799
+ "rstrip": false,
800
+ "single_word": false,
801
+ "special": false
802
+ },
803
+ "50352": {
804
+ "content": "[unused67]",
805
+ "lstrip": false,
806
+ "normalized": true,
807
+ "rstrip": false,
808
+ "single_word": false,
809
+ "special": false
810
+ },
811
+ "50353": {
812
+ "content": "[unused68]",
813
+ "lstrip": false,
814
+ "normalized": true,
815
+ "rstrip": false,
816
+ "single_word": false,
817
+ "special": false
818
+ },
819
+ "50354": {
820
+ "content": "[unused69]",
821
+ "lstrip": false,
822
+ "normalized": true,
823
+ "rstrip": false,
824
+ "single_word": false,
825
+ "special": false
826
+ },
827
+ "50355": {
828
+ "content": "[unused70]",
829
+ "lstrip": false,
830
+ "normalized": true,
831
+ "rstrip": false,
832
+ "single_word": false,
833
+ "special": false
834
+ },
835
+ "50356": {
836
+ "content": "[unused71]",
837
+ "lstrip": false,
838
+ "normalized": true,
839
+ "rstrip": false,
840
+ "single_word": false,
841
+ "special": false
842
+ },
843
+ "50357": {
844
+ "content": "[unused72]",
845
+ "lstrip": false,
846
+ "normalized": true,
847
+ "rstrip": false,
848
+ "single_word": false,
849
+ "special": false
850
+ },
851
+ "50358": {
852
+ "content": "[unused73]",
853
+ "lstrip": false,
854
+ "normalized": true,
855
+ "rstrip": false,
856
+ "single_word": false,
857
+ "special": false
858
+ },
859
+ "50359": {
860
+ "content": "[unused74]",
861
+ "lstrip": false,
862
+ "normalized": true,
863
+ "rstrip": false,
864
+ "single_word": false,
865
+ "special": false
866
+ },
867
+ "50360": {
868
+ "content": "[unused75]",
869
+ "lstrip": false,
870
+ "normalized": true,
871
+ "rstrip": false,
872
+ "single_word": false,
873
+ "special": false
874
+ },
875
+ "50361": {
876
+ "content": "[unused76]",
877
+ "lstrip": false,
878
+ "normalized": true,
879
+ "rstrip": false,
880
+ "single_word": false,
881
+ "special": false
882
+ },
883
+ "50362": {
884
+ "content": "[unused77]",
885
+ "lstrip": false,
886
+ "normalized": true,
887
+ "rstrip": false,
888
+ "single_word": false,
889
+ "special": false
890
+ },
891
+ "50363": {
892
+ "content": "[unused78]",
893
+ "lstrip": false,
894
+ "normalized": true,
895
+ "rstrip": false,
896
+ "single_word": false,
897
+ "special": false
898
+ },
899
+ "50364": {
900
+ "content": "[unused79]",
901
+ "lstrip": false,
902
+ "normalized": true,
903
+ "rstrip": false,
904
+ "single_word": false,
905
+ "special": false
906
+ },
907
+ "50365": {
908
+ "content": "[unused80]",
909
+ "lstrip": false,
910
+ "normalized": true,
911
+ "rstrip": false,
912
+ "single_word": false,
913
+ "special": false
914
+ },
915
+ "50366": {
916
+ "content": "[unused81]",
917
+ "lstrip": false,
918
+ "normalized": true,
919
+ "rstrip": false,
920
+ "single_word": false,
921
+ "special": false
922
+ },
923
+ "50367": {
924
+ "content": "[unused82]",
925
+ "lstrip": false,
926
+ "normalized": true,
927
+ "rstrip": false,
928
+ "single_word": false,
929
+ "special": false
930
+ }
931
+ },
932
+ "clean_up_tokenization_spaces": true,
933
+ "cls_token": "[CLS]",
934
+ "extra_special_tokens": {},
935
+ "mask_token": "[MASK]",
936
+ "max_length": 2048,
937
+ "model_input_names": [
938
+ "input_ids",
939
+ "attention_mask"
940
+ ],
941
+ "model_max_length": 2048,
942
+ "pad_token": "[PAD]",
943
+ "sep_token": "[SEP]",
944
+ "tokenizer_class": "PreTrainedTokenizerFast",
945
+ "truncation": "longest_first",
946
+ "unk_token": "[UNK]"
947
+ }