Text Classification
GLiNER2
Safetensors
English
decision-model
calibration
selective-prediction
conformal-prediction
abstention
risk-aware
security
cybersecurity
security-operations
soc
pentest
red-team
blue-team
Eval Results (legacy)
Instructions to use TyrusRC/haruspex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use TyrusRC/haruspex with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("TyrusRC/haruspex") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +4 -10
- calibrator.json +3 -3
- config.json +12 -4
- eval.json +1 -1
- final/adapter_config.json +12 -12
- final/adapter_model.safetensors +1 -1
README.md
CHANGED
|
@@ -30,17 +30,11 @@ model-index:
|
|
| 30 |
name: Security decision (boolean / choice / score)
|
| 31 |
dataset:
|
| 32 |
type: custom
|
| 33 |
-
name: Haruspex security held-out (
|
| 34 |
metrics:
|
| 35 |
- type: accuracy
|
| 36 |
-
value: 0.
|
| 37 |
name: accuracy
|
| 38 |
-
- type: ece
|
| 39 |
-
value: 0.118
|
| 40 |
-
name: ECE
|
| 41 |
-
- type: brier
|
| 42 |
-
value: 0.117
|
| 43 |
-
name: BRIER
|
| 44 |
---
|
| 45 |
|
| 46 |
# TyrusRC/haruspex
|
|
@@ -88,11 +82,11 @@ haruspex-serve --model TyrusRC/haruspex --port 3000 # POST /v1/systemone
|
|
| 88 |
|
| 89 |
## Calibration
|
| 90 |
|
| 91 |
-
Fitted calibrator: accept threshold `0.
|
| 92 |
|
| 93 |
## Evaluation
|
| 94 |
|
| 95 |
-
On a
|
| 96 |
|
| 97 |
A split-conformal selective layer gates each verdict: it accepts when the top-1
|
| 98 |
confidence clears a threshold fitted to hold the error AMONG accepted items at a target
|
|
|
|
| 30 |
name: Security decision (boolean / choice / score)
|
| 31 |
dataset:
|
| 32 |
type: custom
|
| 33 |
+
name: Haruspex security held-out (133 rows)
|
| 34 |
metrics:
|
| 35 |
- type: accuracy
|
| 36 |
+
value: 0.954
|
| 37 |
name: accuracy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
---
|
| 39 |
|
| 40 |
# TyrusRC/haruspex
|
|
|
|
| 82 |
|
| 83 |
## Calibration
|
| 84 |
|
| 85 |
+
Fitted calibrator: accept threshold `0.663848`, target risk `0.2`, coverage `1.0` (n=87).
|
| 86 |
|
| 87 |
## Evaluation
|
| 88 |
|
| 89 |
+
On a 133-row held-out split of the security pack (recipe selected on a separate calibration split, never on test): **accuracy 0.954**. The adapter beats a prompted general 8B model on the same set at a small fraction of the parameters; see the repo's `docs/benchmark.md` comparison card.
|
| 90 |
|
| 91 |
A split-conformal selective layer gates each verdict: it accepts when the top-1
|
| 92 |
confidence clears a threshold fitted to hold the error AMONG accepted items at a target
|
calibrator.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
-
"threshold": 0.
|
| 3 |
"target_risk": 0.2,
|
| 4 |
-
"achieved_risk": 0.
|
| 5 |
"coverage": 1.0,
|
| 6 |
-
"n":
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"threshold": 0.663848,
|
| 3 |
"target_risk": 0.2,
|
| 4 |
+
"achieved_risk": 0.091954,
|
| 5 |
"coverage": 1.0,
|
| 6 |
+
"n": 87
|
| 7 |
}
|
config.json
CHANGED
|
@@ -4,9 +4,17 @@
|
|
| 4 |
"base_model": "fastino/GLiNER2.5-Decide",
|
| 5 |
"pipeline_tag": "text-classification",
|
| 6 |
"haruspex": {
|
| 7 |
-
"contract": [
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"adapter": "final",
|
| 10 |
-
"calibrator": "calibrator.json"
|
|
|
|
| 11 |
}
|
| 12 |
-
}
|
|
|
|
| 4 |
"base_model": "fastino/GLiNER2.5-Decide",
|
| 5 |
"pipeline_tag": "text-classification",
|
| 6 |
"haruspex": {
|
| 7 |
+
"contract": [
|
| 8 |
+
"/v1/evaluate",
|
| 9 |
+
"/v1/systemone"
|
| 10 |
+
],
|
| 11 |
+
"decision_types": [
|
| 12 |
+
"boolean",
|
| 13 |
+
"choice",
|
| 14 |
+
"score"
|
| 15 |
+
],
|
| 16 |
"adapter": "final",
|
| 17 |
+
"calibrator": "calibrator.json",
|
| 18 |
+
"cve_routing": true
|
| 19 |
}
|
| 20 |
+
}
|
eval.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"accuracy":0.
|
|
|
|
| 1 |
+
{"accuracy": 0.954, "test_n": 133, "dataset": "Haruspex security held-out", "coverage": 0.977}
|
final/adapter_config.json
CHANGED
|
@@ -35,22 +35,22 @@
|
|
| 35 |
"rank_pattern": {},
|
| 36 |
"revision": null,
|
| 37 |
"target_modules": [
|
| 38 |
-
"project_end.0",
|
| 39 |
-
"count_pred.2",
|
| 40 |
-
"count_pred.0",
|
| 41 |
-
"classifier.2",
|
| 42 |
-
"query_proj",
|
| 43 |
-
"classifier.0",
|
| 44 |
"projector.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
"out_project.3",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
"project_end.3",
|
| 47 |
"key_proj",
|
| 48 |
-
"
|
| 49 |
-
"
|
| 50 |
-
"projector.2",
|
| 51 |
-
"project_start.0",
|
| 52 |
-
"project_start.3",
|
| 53 |
-
"out_project.0"
|
| 54 |
],
|
| 55 |
"target_parameters": null,
|
| 56 |
"task_type": null,
|
|
|
|
| 35 |
"rank_pattern": {},
|
| 36 |
"revision": null,
|
| 37 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
"projector.0",
|
| 39 |
+
"value_proj",
|
| 40 |
+
"classifier.0",
|
| 41 |
+
"count_pred.0",
|
| 42 |
+
"count_pred.2",
|
| 43 |
+
"project_start.3",
|
| 44 |
+
"dense",
|
| 45 |
"out_project.3",
|
| 46 |
+
"classifier.2",
|
| 47 |
+
"projector.2",
|
| 48 |
+
"project_end.0",
|
| 49 |
+
"out_project.0",
|
| 50 |
"project_end.3",
|
| 51 |
"key_proj",
|
| 52 |
+
"query_proj",
|
| 53 |
+
"project_start.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
],
|
| 55 |
"target_parameters": null,
|
| 56 |
"task_type": null,
|
final/adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 31766440
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f90129ec17a0fa461803ad8675294de0e00796155c3d31aaf9c9f9794e1aeca
|
| 3 |
size 31766440
|