param-bharat
commited on
Upload NLIScorer
Browse files- README.md +3 -3
- config.json +1 -1
- pipeline.py +4 -2
README.md
CHANGED
@@ -9,12 +9,12 @@ metrics:
|
|
9 |
- accuracy
|
10 |
- precision
|
11 |
- recall
|
12 |
-
model-index:
|
13 |
-
- name: ModernBERT-base-nli-clf
|
14 |
-
results: []
|
15 |
datasets:
|
16 |
- param-bharat/scorers-nli
|
17 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
18 |
---
|
19 |
|
20 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
9 |
- accuracy
|
10 |
- precision
|
11 |
- recall
|
|
|
|
|
|
|
12 |
datasets:
|
13 |
- param-bharat/scorers-nli
|
14 |
pipeline_tag: text-classification
|
15 |
+
model-index:
|
16 |
+
- name: ModernBERT-base-nli-clf
|
17 |
+
results: []
|
18 |
---
|
19 |
|
20 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "param-bharat/ModernBERT-base-nli-
|
3 |
"architectures": [
|
4 |
"ModernBertForSequenceClassification"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "param-bharat/ModernBERT-base-nli-scorer",
|
3 |
"architectures": [
|
4 |
"ModernBertForSequenceClassification"
|
5 |
],
|
pipeline.py
CHANGED
@@ -379,8 +379,10 @@ class NLIScorer(Pipeline):
|
|
379 |
outputs = self.model(**model_inputs)
|
380 |
return outputs
|
381 |
|
382 |
-
def postprocess(self, model_outputs, task_type=None):
|
383 |
-
if
|
|
|
|
|
384 |
threshold = TASK_THRESHOLDS[task_type]
|
385 |
else:
|
386 |
threshold = 0.5
|
|
|
379 |
outputs = self.model(**model_inputs)
|
380 |
return outputs
|
381 |
|
382 |
+
def postprocess(self, model_outputs, task_type=None, threshold=None):
|
383 |
+
if threshold is not None:
|
384 |
+
threshold = threshold
|
385 |
+
elif task_type is not None:
|
386 |
threshold = TASK_THRESHOLDS[task_type]
|
387 |
else:
|
388 |
threshold = 0.5
|