4nekro commited on
Commit
033229f
·
verified ·
1 Parent(s): 4b3ca8e

Abyss model card

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags: [decision-model, safety, guardrail, typed-decisions, laya, onnx, modernbert]
4
+ library_name: laya
5
+ ---
6
+
7
+ # Abyss — local tool-call safety gate
8
+
9
+ Non-autoregressive decision model (ModernBERT-large / `ProCreations/auto-0.4b-2`, 421M) that scores a proposed
10
+ agent tool call as `safe` or one of 7 danger reasons, reading its criteria at inference time
11
+ (Laya typed-decisions format — no retraining for a new question). Built as the safety gate of the Horizon harness.
12
+
13
+ **8 labels:** safe · out_of_scope · destroys_data · credentials · untrusted_code · system_change · prompt_injection · abuse
14
+
15
+ ## Measured (3000-case `ProCreations/approve-or-deny` held-out split)
16
+ - Decision 83.6% · **AUROC P(safe) 0.946** (vs TypeSafe `jev-1.14` 0.956; **beats it on the 8-way reason: 69.5 vs 66.4**)
17
+ - Over-block 26% / let-through 6% (argmax)
18
+ - **Portuguese-robust:** 6/6 identical decisions EN vs PT (PT request + EN command), same category & confidence
19
+
20
+ ## Load — eager (needs torch)
21
+ ```python
22
+ import laya
23
+ ag = laya.load("4nekro/Abyss")
24
+ ag.predict(state, questions) # state = tool call + user request; questions = {gate: {type: choice, criteria: {...}}}
25
+ ```
26
+
27
+ ## Load — ONNX, no torch (`onnx/abyss.onnx`)
28
+ ```python
29
+ from huggingface_hub import hf_hub_download
30
+ import laya
31
+ p = hf_hub_download("4nekro/Abyss", "onnx/abyss.onnx")
32
+ ag = laya.load("4nekro/Abyss", backend="onnx", onnx_path=p)
33
+ ```
34
+ ONNX fp32 **verified identical to torch** (graph ≤1.3e-5; 6/6 end-to-end dP=0). INT8 was rejected (accuracy drift).
35
+ **Speed:** set `intra_op_num_threads = CPU cores` — ONNX then beats eager torch (394ms vs 431ms on 12 cores);
36
+ the default under-threads and runs slower. Embeddable via `onnxruntime-node` (no torch) for an in-process gate.