Zero-Shot Classification
Transformers
Safetensors
GGUF
English
unknown
decision-model
system-one
falcondec
lightdec_v2
calibrated-decisions
multiple-choice
intent-classification
customer-support
natural-language-inference
code
guardrails
agents
selective-prediction
falconsai
model-surgeon
attested-lineage
Instructions to use Falconsai/LightDec_V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Falconsai/LightDec_V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="Falconsai/LightDec_V2")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Falconsai/LightDec_V2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,434 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
-
#
|
|
|
|
| 6 |
|
| 7 |
**[View in Model Surgeon](https://surgeon.falcons.ai/?hub=Falconsai/LightDec_V2)**
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ical record itself; the package's
|
| 10 |
`lineage.intoto.jsonl` is the signed source of truth (verify it free at
|
| 11 |
the Surgeon's public verifier or with the bundled `verify_attestation.py`).
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0 # TODO: confirm before publishing (the Ettin backbone is MIT-licensed)
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: pytorch
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
base_model: jhu-clsp/ettin-encoder-150m
|
| 8 |
+
tags:
|
| 9 |
+
- falcondec
|
| 10 |
+
- decision-model
|
| 11 |
+
- multiple-choice
|
| 12 |
+
- zero-shot-classification
|
| 13 |
+
- calibration
|
| 14 |
+
- routing
|
| 15 |
+
- guardrails
|
| 16 |
+
- agents
|
| 17 |
+
- long-context
|
| 18 |
+
- safetensors
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# LightDec_V2 (Long)
|
| 22 |
+
|
| 23 |
|
| 24 |
**[View in Model Surgeon](https://surgeon.falcons.ai/?hub=Falconsai/LightDec_V2)**
|
| 25 |
|
| 26 |
+
**LightDec_V2** is a small, fast, calibrated *decision model* from [Falcons.ai](https://huggingface.co/Falconsai). Given a piece of state (an email, a ticket, an agent trace, a contract, a log, a JSON record) and one or more typed questions, it picks an answer from a closed set of options in a single forward pass and returns calibrated probabilities, so your application knows when to trust the answer and when to defer to a human or a larger model.
|
| 27 |
+
|
| 28 |
+
It is the long-context successor to [Falconsai/LightDec](https://huggingface.co/Falconsai/LightDec). Every call now uses a **2,048-token window** (LightDec v1 used 512 tokens by default and only switched to 2,048 for questions with more than 24 options), so long email threads, contracts and service logs fit without truncation.
|
| 29 |
+
|
| 30 |
+
| | |
|
| 31 |
+
|---|---|
|
| 32 |
+
| **Architecture** | FalconDec (encoder + permutation-equivariant option head) |
|
| 33 |
+
| **Backbone** | [`jhu-clsp/ettin-encoder-150m`](https://huggingface.co/jhu-clsp/ettin-encoder-150m) |
|
| 34 |
+
| **Parameters** | ~0.16B (fp16 weights ≈ 319 MB; int8 export available) |
|
| 35 |
+
| **Context** | 2,048 tokens per call |
|
| 36 |
+
| **Question types** | `choice`, `noul` (yes/no), `score` (ordinal levels) |
|
| 37 |
+
| **Options per question** | 2 to 96 in one pass; more via an automatic tournament |
|
| 38 |
+
| **Test accuracy** | 78.4% micro / 78.9% macro over 31,990 test items, 73 tasks |
|
| 39 |
+
| **Calibration** | ECE 0.029 (per-type, per-option-count temperature scaling) |
|
| 40 |
+
| **Latency** | ~10 ms per call on GPU (fp16), ~48 ms on CPU (int8) |
|
| 41 |
+
| **Version** | 1.0.0 (trained from the pretrained backbone, not fine-tuned from LightDec v1) |
|
| 42 |
+
|
| 43 |
+
## What it does
|
| 44 |
+
|
| 45 |
+
LightDec_V2 answers the kind of small, structured questions that sit inside real systems: *Which queue does this ticket go to? Does this email ask for a refund? How angry is the customer, 0–2? Is this agent step wrong? Is this prompt a jailbreak? Does this invoice violate the policy?* It is not a generative model and never produces free text; it only chooses among the options you give it, which makes its output easy to validate, log and act on.
|
| 46 |
+
|
| 47 |
+
Three question types are supported, and several questions about the same state can be asked in one call:
|
| 48 |
+
|
| 49 |
+
- **`choice`**: pick one of N labelled options (options can carry descriptions, e.g. `{"billing": "Charges, invoices, refunds"}`).
|
| 50 |
+
- **`noul`**: a yes/no judgment about a statement (returns `p_true`).
|
| 51 |
+
- **`score`**: an ordinal scale such as `["Calm", "Annoyed", "Furious"]` (also returns an `expected_level`).
|
| 52 |
+
|
| 53 |
+
Every answer includes a `confidence` and a `defer` flag. With the default `defer_threshold` of 0.7, the model answered **68.0%** of test questions and was **90.6%** accurate on those; the remainder are flagged for review.
|
| 54 |
+
|
| 55 |
+
## How it works
|
| 56 |
+
|
| 57 |
+
The question, the options and the state are packed into one sequence:
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
[CLS] question [SEP] [MASK] option_1 [MASK] option_2 ... [MASK] option_k [SEP] state [SEP]
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
The encoder reads the whole sequence once. The hidden vector at each `[MASK]` marker represents one option; it is combined with the `[CLS]` context and a question-type embedding, then passed through a 2-layer, 8-head set transformer in which options attend to each other **without positional encoding**, so the result does not depend on option order. An MLP produces one logit per option and a softmax turns them into a distribution. Finally a temperature, learned per question type and per option-count bucket (2, 3–5, 6–12, 13+ options) and stored in `falcondec_config.json`, calibrates the probabilities.
|
| 64 |
+
|
| 65 |
+
Questions with more than 96 options are resolved with a tournament: options are scored in chunks, the best of each chunk advance, and a final pass ranks the survivors.
|
| 66 |
+
|
| 67 |
+
## Usage
|
| 68 |
+
|
| 69 |
+
The model ships with its own loader, `falcondec_modeling.py`, which requires `torch`, `transformers`, `safetensors` and `huggingface_hub`.
|
| 70 |
+
|
| 71 |
+
```python
|
| 72 |
+
import importlib.util
|
| 73 |
+
from huggingface_hub import hf_hub_download
|
| 74 |
+
|
| 75 |
+
path = hf_hub_download("Falconsai/LightDec_V2", "falcondec_modeling.py")
|
| 76 |
+
spec = importlib.util.spec_from_file_location("falcondec_modeling", path)
|
| 77 |
+
fd = importlib.util.module_from_spec(spec)
|
| 78 |
+
spec.loader.exec_module(fd)
|
| 79 |
+
|
| 80 |
+
model, tok = fd.load_falcondec("Falconsai/LightDec_V2") # GPU if available, else CPU
|
| 81 |
+
|
| 82 |
+
state = {
|
| 83 |
+
"email": {
|
| 84 |
+
"subject": "Charged twice this month",
|
| 85 |
+
"body": "I was billed twice for my Pro plan in March. Please refund the duplicate charge. This is the second time!",
|
| 86 |
+
},
|
| 87 |
+
"customer": {"plan": "Pro", "customer_since": "2021"},
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
questions = {
|
| 91 |
+
"topic": {
|
| 92 |
+
"type": "choice",
|
| 93 |
+
"instructions": "What is this support email primarily about?",
|
| 94 |
+
"criteria": {
|
| 95 |
+
"billing": "Charges, invoices, payments, refunds or subscription costs",
|
| 96 |
+
"technical": "Something in the product is broken, failing or erroring",
|
| 97 |
+
"feature_request": "Asking for a new feature or an improvement",
|
| 98 |
+
"account": "Login, password, profile, seats or account settings",
|
| 99 |
+
"none": "None of these",
|
| 100 |
+
},
|
| 101 |
+
},
|
| 102 |
+
"refund": {"type": "noul", "instructions": "The email asks for money to be returned or credited"},
|
| 103 |
+
"anger": {"type": "score", "instructions": "How angry does the customer sound?",
|
| 104 |
+
"criteria": ["Calm", "Annoyed", "Furious"]},
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
out = fd.decide(model, tok, state, questions)
|
| 108 |
+
for key, r in out["answers"].items():
|
| 109 |
+
print(key, r["choice"], round(r["confidence"], 3), "DEFER" if r["defer"] else "")
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
Each result contains `choice`, `choice_text`, `confidence`, the full `probs` distribution and `defer`; `noul` answers add `p_true` and `score` answers add `expected_level`. Pass `defer_threshold=` to `decide` to trade coverage for accuracy. For lower-level control, `fd.score_items(model, tok, items)` scores raw `{"state", "question", "options", "type"}` items in batches.
|
| 113 |
+
|
| 114 |
+
**CPU / small footprint.** If the repository includes the int8 export (as LightDec v1 does in `compact-int8/`), load that folder the same way; the loader dequantizes the per-channel int8 weights automatically.
|
| 115 |
+
|
| 116 |
+
## Evaluation
|
| 117 |
+
|
| 118 |
+
All numbers come from `falcondec_report.json`. The test split has 31,990 items across 73 tasks in 11 domains. Tasks marked *held-out* are flagged as such in the training report.
|
| 119 |
+
|
| 120 |
+
### Overall
|
| 121 |
+
|
| 122 |
+
| Metric | Value |
|
| 123 |
+
|---|---:|
|
| 124 |
+
| Micro accuracy | 78.4% |
|
| 125 |
+
| Macro accuracy (mean over tasks) | 78.9% |
|
| 126 |
+
| Negative log-likelihood | 0.563 |
|
| 127 |
+
| Brier score | 0.295 |
|
| 128 |
+
| Expected calibration error | 0.029 |
|
| 129 |
+
| AURC (area under risk–coverage) | 0.068 |
|
| 130 |
+
| Mean absolute error on `score` questions (levels) | 0.51 |
|
| 131 |
+
| Coverage at defer threshold 0.7 | 68.0% |
|
| 132 |
+
| Accuracy on covered questions | 90.6% |
|
| 133 |
+
|
| 134 |
+
### By domain
|
| 135 |
+
|
| 136 |
+
| Domain | Tasks | Test items | Accuracy |
|
| 137 |
+
|---|---:|---:|---:|
|
| 138 |
+
| long_context | 3 | 450 | 100.0% |
|
| 139 |
+
| support | 3 | 1,505 | 98.2% |
|
| 140 |
+
| code | 9 | 3,854 | 91.1% |
|
| 141 |
+
| intents | 4 | 1,800 | 85.0% |
|
| 142 |
+
| agentic | 6 | 1,563 | 82.1% |
|
| 143 |
+
| policy | 11 | 5,500 | 80.6% |
|
| 144 |
+
| guardrails | 4 | 1,294 | 79.8% |
|
| 145 |
+
| workflows | 4 | 2,000 | 77.3% |
|
| 146 |
+
| reasoning | 18 | 9,224 | 71.8% |
|
| 147 |
+
| tev1_benchmark | 7 | 2,800 | 65.4% |
|
| 148 |
+
| classification | 4 | 2,000 | 61.2% |
|
| 149 |
+
|
| 150 |
+
### Head-to-head against the proof_v2 baseline
|
| 151 |
+
|
| 152 |
+
On 72 shared tasks (up to 120 items each), LightDec_V2 averaged **79.6%** against **46.7%** for the `proof_v2` baseline, winning on 70 tasks, tying on 1 and losing on 1 (`policy/invoice_total_transfer`).
|
| 153 |
+
|
| 154 |
+
<details>
|
| 155 |
+
<summary>Per-task head-to-head</summary>
|
| 156 |
+
|
| 157 |
+
| Task | n | LightDec_V2 | proof_v2 | Δ |
|
| 158 |
+
|---|---:|---:|---:|---:|
|
| 159 |
+
| `long/email_thread` | 120 | 100.0% | 5.0% | +95.0 |
|
| 160 |
+
| `agenttrek/next_action_type` | 120 | 87.5% | 7.5% | +80.0 |
|
| 161 |
+
| `policy/table_extreme_transfer` | 120 | 92.5% | 14.2% | +78.3 |
|
| 162 |
+
| `long/contract_clause` | 120 | 100.0% | 23.3% | +76.7 |
|
| 163 |
+
| `policy/access_control_transfer` | 120 | 100.0% | 23.3% | +76.7 |
|
| 164 |
+
| `long/service_log` | 120 | 100.0% | 24.2% | +75.8 |
|
| 165 |
+
| `policy/count_threshold_transfer` | 120 | 86.7% | 10.8% | +75.8 |
|
| 166 |
+
| `bigclonebench/clone` | 120 | 96.7% | 24.2% | +72.5 |
|
| 167 |
+
| `policy/return_window_transfer` | 120 | 100.0% | 34.2% | +65.8 |
|
| 168 |
+
| `snli/contradicts` | 120 | 100.0% | 35.8% | +64.2 |
|
| 169 |
+
| `policy/refund_approval_transfer` | 120 | 95.8% | 32.5% | +63.3 |
|
| 170 |
+
| `gsm8k/math` | 120 | 73.3% | 12.5% | +60.8 |
|
| 171 |
+
| `hotpotqa/retrieve` | 120 | 87.5% | 29.2% | +58.3 |
|
| 172 |
+
| `civil_comments/toxic` | 120 | 93.3% | 35.8% | +57.5 |
|
| 173 |
+
| `snli/nli` | 120 | 90.8% | 34.2% | +56.7 |
|
| 174 |
+
| `triage/support_email` | 120 | 95.8% | 39.2% | +56.7 |
|
| 175 |
+
| `mnli/claim` | 120 | 87.5% | 31.7% | +55.8 |
|
| 176 |
+
| `scitail/support` | 120 | 95.8% | 42.5% | +53.3 |
|
| 177 |
+
| `agenttrek/finish_now` | 120 | 78.3% | 25.8% | +52.5 |
|
| 178 |
+
| `tev1_test/ag_news` | 120 | 92.5% | 42.5% | +50.0 |
|
| 179 |
+
| `typed_decisions/agent_trace_observability` | 120 | 80.8% | 33.3% | +47.5 |
|
| 180 |
+
| `hotpotqa/comparison_yes_no` | 26 | 92.3% | 46.2% | +46.2 |
|
| 181 |
+
| `typed_decisions/customer_service` | 120 | 74.2% | 28.3% | +45.8 |
|
| 182 |
+
| `policy/table_compare_transfer` | 120 | 91.7% | 49.2% | +42.5 |
|
| 183 |
+
| `jailbreak/detect` | 120 | 98.3% | 56.7% | +41.7 |
|
| 184 |
+
| `ag_news/topic` | 120 | 85.0% | 45.0% | +40.0 |
|
| 185 |
+
| `openbookqa/mcq` | 120 | 65.0% | 28.3% | +36.7 |
|
| 186 |
+
| `tev1_test/mnli` | 120 | 75.0% | 39.2% | +35.8 |
|
| 187 |
+
| `counsel/critique_quality` | 120 | 60.8% | 25.8% | +35.0 |
|
| 188 |
+
| `typed_decisions/invoice_processing` | 120 | 81.7% | 47.5% | +34.2 |
|
| 189 |
+
| `humaneval/completion` | 119 | 84.9% | 51.3% | +33.6 |
|
| 190 |
+
| `clinc150/intent` | 120 | 97.5% | 64.2% | +33.3 |
|
| 191 |
+
| `hellaswag/continuation` | 120 | 60.8% | 29.2% | +31.7 |
|
| 192 |
+
| `yelp/score` | 120 | 62.5% | 32.5% | +30.0 |
|
| 193 |
+
| `mbpp/bugspot` | 120 | 85.8% | 57.5% | +28.3 |
|
| 194 |
+
| `tev1_test/boolq` | 120 | 84.2% | 55.8% | +28.3 |
|
| 195 |
+
| `commonsense_qa/mcq` | 120 | 68.3% | 40.8% | +27.5 |
|
| 196 |
+
| `anli/nli` | 120 | 59.2% | 32.5% | +26.7 |
|
| 197 |
+
| `typed_decisions/security_incidents` | 120 | 75.8% | 50.0% | +25.8 |
|
| 198 |
+
| `arc_challenge/mcq` | 120 | 53.3% | 30.8% | +22.5 |
|
| 199 |
+
| `policy/free_shipping_transfer` | 120 | 92.5% | 70.8% | +21.7 |
|
| 200 |
+
| `agentharm/refuse` | 120 | 66.7% | 45.0% | +21.7 |
|
| 201 |
+
| `massive_en/intent` | 120 | 95.0% | 74.2% | +20.8 |
|
| 202 |
+
| `arc_easy/mcq` | 120 | 65.0% | 45.8% | +19.2 |
|
| 203 |
+
| `tev1_test/banking77` | 120 | 71.7% | 55.0% | +16.7 |
|
| 204 |
+
| `boolq/yes_no` | 120 | 82.5% | 66.7% | +15.8 |
|
| 205 |
+
| `policy/table_count_transfer` | 120 | 31.7% | 15.8% | +15.8 |
|
| 206 |
+
| `mbpp/solution` | 120 | 100.0% | 85.0% | +15.0 |
|
| 207 |
+
| `policy/invoice_overdue_transfer` | 120 | 80.8% | 65.8% | +15.0 |
|
| 208 |
+
| `tev1_test/routing` | 120 | 44.2% | 29.2% | +15.0 |
|
| 209 |
+
| `bitext/category` | 120 | 100.0% | 85.8% | +14.2 |
|
| 210 |
+
| `qasc/mcq` | 120 | 99.2% | 85.8% | +13.3 |
|
| 211 |
+
| `winogrande/blank` | 120 | 69.2% | 55.8% | +13.3 |
|
| 212 |
+
| `emotion/6way` | 120 | 49.2% | 36.7% | +12.5 |
|
| 213 |
+
| `tev1_test/sst5` | 120 | 39.2% | 27.5% | +11.7 |
|
| 214 |
+
| `aqua_rat/math` | 120 | 35.0% | 24.2% | +10.8 |
|
| 215 |
+
| `sst5/score` | 120 | 38.3% | 28.3% | +10.0 |
|
| 216 |
+
| `devign/vulnerability` | 120 | 66.7% | 56.7% | +10.0 |
|
| 217 |
+
| `mmlu/mcq` | 120 | 40.8% | 30.8% | +10.0 |
|
| 218 |
+
| `sciq/mcq` | 120 | 96.7% | 86.7% | +10.0 |
|
| 219 |
+
| `tev1_test/policy` | 120 | 50.0% | 40.8% | +9.2 |
|
| 220 |
+
| `codexglue/func_name` | 120 | 99.2% | 91.7% | +7.5 |
|
| 221 |
+
| `policy/sla_urgency_transfer` | 120 | 51.7% | 44.2% | +7.5 |
|
| 222 |
+
| `bitext/route` | 120 | 100.0% | 92.5% | +7.5 |
|
| 223 |
+
| `counsel/step_has_error` | 120 | 82.5% | 75.0% | +7.5 |
|
| 224 |
+
| `codexglue/code_to_doc` | 120 | 100.0% | 93.3% | +6.7 |
|
| 225 |
+
| `snli/must_be_true` | 120 | 99.2% | 92.5% | +6.7 |
|
| 226 |
+
| `banking77/intent` | 120 | 92.5% | 86.7% | +5.8 |
|
| 227 |
+
| `prompt_injections/detect` | 116 | 59.5% | 54.3% | +5.2 |
|
| 228 |
+
| `codexglue/doc_to_code` | 120 | 98.3% | 97.5% | +0.8 |
|
| 229 |
+
| `codexglue/lang_id` | 120 | 100.0% | 100.0% | +0.0 |
|
| 230 |
+
| `policy/invoice_total_transfer` | 120 | 45.0% | 52.5% | -7.5 |
|
| 231 |
+
|
| 232 |
+
</details>
|
| 233 |
+
|
| 234 |
+
### Support-email triage (bundled benchmark)
|
| 235 |
+
|
| 236 |
+
`benchmarks/triage_support_email_test.jsonl` contains 101 support emails, each with five typed questions and reference answers. It doubles as a worked example of the input format.
|
| 237 |
+
|
| 238 |
+
| Question | Type | Accuracy |
|
| 239 |
+
|---|---|---:|
|
| 240 |
+
| `topic` | choice (5-way) | 99.0% |
|
| 241 |
+
| `refund` | noul (yes/no) | 100.0% |
|
| 242 |
+
| `breakage` | score (4 levels) | 99.0% |
|
| 243 |
+
| `anger` | score (3 levels) | 92.1% |
|
| 244 |
+
| `judgment` | choice (3-way) | 82.2% |
|
| 245 |
+
|
| 246 |
+
All five answers together route an email to the correct handling pile **94.1%** of the time.
|
| 247 |
+
|
| 248 |
+
### Long context
|
| 249 |
+
|
| 250 |
+
Three long-document tasks exercise the 2,048-token window (150 items each): `long/contract_clause`, `long/email_thread` and `long/service_log`. LightDec_V2 scored 100% on all three. These are synthetic, in-distribution tasks, so treat them as a check that long inputs are read end to end rather than as a measure of general long-document reasoning.
|
| 251 |
+
|
| 252 |
+
### TEV1 transfer benchmark
|
| 253 |
+
|
| 254 |
+
TEV1 is a separate decision benchmark. Some of its tasks draw on the same public sources as LightDec's training data; the table marks which.
|
| 255 |
+
|
| 256 |
+
| Task | n | Accuracy | Overlaps LightDec training source |
|
| 257 |
+
|---|---:|---:|:---:|
|
| 258 |
+
| `tev1_test/ag_news` | 150 | 92.0% | yes |
|
| 259 |
+
| `tev1_test/banking77` | 200 | 72.0% | no |
|
| 260 |
+
| `tev1_test/boolq` | 200 | 83.5% | yes |
|
| 261 |
+
| `tev1_test/mnli` | 300 | 72.3% | yes |
|
| 262 |
+
| `tev1_test/policy` | 1200 | 52.9% | no |
|
| 263 |
+
| `tev1_test/routing` | 600 | 45.8% | no |
|
| 264 |
+
| `tev1_test/sst5` | 150 | 39.3% | no |
|
| 265 |
+
|
| 266 |
+
Overall TEV1 accuracy is **58.4%** (2,800 items), and **51.8%** on the tasks with no source overlap. For reference, the report lists published results for the 4B-parameter TEV1 model of 88% on its main decisions set and 100% on its policy transfer set; those are different splits and a model roughly 25× larger, so the figures are context rather than a like-for-like comparison.
|
| 267 |
+
|
| 268 |
+
<details>
|
| 269 |
+
<summary>Full per-task test results (73 tasks)</summary>
|
| 270 |
+
|
| 271 |
+
| Domain | Task | n | Accuracy | Chance | ECE | Held-out |
|
| 272 |
+
|---|---|---:|---:|---:|---:|:---:|
|
| 273 |
+
| agentic | `agenttrek/finish_now` | 151 | 78.8% | 50.0% | 0.075 | |
|
| 274 |
+
| agentic | `agenttrek/next_action_type` | 487 | 86.4% | 19.1% | 0.092 | |
|
| 275 |
+
| agentic | `counsel/critique_quality` | 201 | 62.7% | 33.3% | 0.271 | |
|
| 276 |
+
| agentic | `counsel/step_has_error` | 201 | 83.1% | 50.0% | 0.148 | |
|
| 277 |
+
| agentic | `hotpotqa/comparison_yes_no` | 26 | 92.3% | 50.0% | 0.082 | |
|
| 278 |
+
| agentic | `hotpotqa/retrieve` | 497 | 89.3% | 16.7% | 0.043 | |
|
| 279 |
+
| classification | `ag_news/topic` | 500 | 90.0% | 25.0% | 0.052 | |
|
| 280 |
+
| classification | `emotion/6way` | 500 | 47.2% | 16.7% | 0.211 | ✓ |
|
| 281 |
+
| classification | `sst5/score` | 500 | 40.6% | 20.0% | 0.069 | ✓ |
|
| 282 |
+
| classification | `yelp/score` | 500 | 66.8% | 20.0% | 0.091 | |
|
| 283 |
+
| code | `bigclonebench/clone` | 500 | 96.2% | 50.0% | 0.031 | |
|
| 284 |
+
| code | `codexglue/code_to_doc` | 504 | 99.0% | 26.2% | 0.010 | |
|
| 285 |
+
| code | `codexglue/doc_to_code` | 504 | 97.6% | 27.9% | 0.013 | |
|
| 286 |
+
| code | `codexglue/func_name` | 467 | 95.5% | 25.5% | 0.039 | |
|
| 287 |
+
| code | `codexglue/lang_id` | 504 | 100.0% | 23.5% | 0.001 | |
|
| 288 |
+
| code | `devign/vulnerability` | 500 | 63.2% | 50.0% | 0.070 | |
|
| 289 |
+
| code | `humaneval/completion` | 119 | 84.9% | 39.4% | 0.140 | ✓ |
|
| 290 |
+
| code | `mbpp/bugspot` | 256 | 85.5% | 40.6% | 0.037 | |
|
| 291 |
+
| code | `mbpp/solution` | 500 | 97.8% | 25.0% | 0.020 | |
|
| 292 |
+
| guardrails | `agentharm/refuse` | 416 | 70.0% | 50.0% | 0.089 | ✓ |
|
| 293 |
+
| guardrails | `civil_comments/toxic` | 500 | 92.6% | 50.0% | 0.051 | |
|
| 294 |
+
| guardrails | `jailbreak/detect` | 262 | 97.3% | 50.0% | 0.031 | |
|
| 295 |
+
| guardrails | `prompt_injections/detect` | 116 | 59.5% | 50.0% | 0.333 | ✓ |
|
| 296 |
+
| intents | `banking77/intent` | 500 | 92.2% | 32.1% | 0.037 | ✓ |
|
| 297 |
+
| intents | `banking77/intent_77` | 300 | 58.0% | 1.3% | 0.241 | ✓ |
|
| 298 |
+
| intents | `clinc150/intent` | 500 | 97.0% | 12.4% | 0.015 | |
|
| 299 |
+
| intents | `massive_en/intent` | 500 | 93.0% | 13.0% | 0.028 | |
|
| 300 |
+
| long_context | `long/contract_clause` | 150 | 100.0% | 20.0% | 0.000 | |
|
| 301 |
+
| long_context | `long/email_thread` | 150 | 100.0% | 25.0% | 0.000 | |
|
| 302 |
+
| long_context | `long/service_log` | 150 | 100.0% | 20.0% | 0.001 | |
|
| 303 |
+
| policy | `policy/access_control_transfer` | 500 | 100.0% | 33.3% | 0.002 | |
|
| 304 |
+
| policy | `policy/count_threshold_transfer` | 500 | 88.0% | 10.5% | 0.048 | |
|
| 305 |
+
| policy | `policy/free_shipping_transfer` | 500 | 93.8% | 50.0% | 0.041 | |
|
| 306 |
+
| policy | `policy/invoice_overdue_transfer` | 500 | 82.4% | 50.0% | 0.020 | |
|
| 307 |
+
| policy | `policy/invoice_total_transfer` | 500 | 47.4% | 50.0% | 0.082 | |
|
| 308 |
+
| policy | `policy/refund_approval_transfer` | 500 | 96.2% | 33.3% | 0.019 | |
|
| 309 |
+
| policy | `policy/return_window_transfer` | 500 | 100.0% | 33.3% | 0.026 | |
|
| 310 |
+
| policy | `policy/sla_urgency_transfer` | 500 | 60.6% | 25.0% | 0.131 | |
|
| 311 |
+
| policy | `policy/table_compare_transfer` | 500 | 92.8% | 50.0% | 0.049 | |
|
| 312 |
+
| policy | `policy/table_count_transfer` | 500 | 32.4% | 12.1% | 0.541 | |
|
| 313 |
+
| policy | `policy/table_extreme_transfer` | 500 | 93.2% | 12.2% | 0.053 | |
|
| 314 |
+
| reasoning | `anli/nli` | 498 | 48.6% | 33.3% | 0.146 | |
|
| 315 |
+
| reasoning | `aqua_rat/math` | 247 | 34.0% | 20.0% | 0.080 | |
|
| 316 |
+
| reasoning | `arc_challenge/mcq` | 500 | 49.0% | 25.0% | 0.168 | ✓ |
|
| 317 |
+
| reasoning | `arc_easy/mcq` | 500 | 61.2% | 25.0% | 0.122 | ✓ |
|
| 318 |
+
| reasoning | `boolq/yes_no` | 500 | 82.2% | 50.0% | 0.080 | |
|
| 319 |
+
| reasoning | `commonsense_qa/mcq` | 493 | 64.3% | 20.0% | 0.143 | |
|
| 320 |
+
| reasoning | `gsm8k/math` | 500 | 70.0% | 25.0% | 0.085 | |
|
| 321 |
+
| reasoning | `hellaswag/continuation` | 500 | 57.6% | 25.0% | 0.075 | |
|
| 322 |
+
| reasoning | `mmlu/mcq` | 500 | 39.0% | 25.0% | 0.155 | ✓ |
|
| 323 |
+
| reasoning | `mnli/claim` | 500 | 86.0% | 33.3% | 0.081 | |
|
| 324 |
+
| reasoning | `openbookqa/mcq` | 500 | 57.2% | 25.0% | 0.218 | |
|
| 325 |
+
| reasoning | `qasc/mcq` | 500 | 98.6% | 12.5% | 0.008 | |
|
| 326 |
+
| reasoning | `sciq/mcq` | 498 | 95.4% | 25.0% | 0.021 | |
|
| 327 |
+
| reasoning | `scitail/support` | 500 | 96.2% | 50.0% | 0.030 | |
|
| 328 |
+
| reasoning | `snli/contradicts` | 500 | 99.0% | 33.3% | 0.019 | |
|
| 329 |
+
| reasoning | `snli/must_be_true` | 500 | 98.6% | 33.3% | 0.043 | |
|
| 330 |
+
| reasoning | `snli/nli` | 988 | 89.5% | 33.3% | 0.108 | |
|
| 331 |
+
| reasoning | `winogrande/blank` | 500 | 66.2% | 50.0% | 0.116 | |
|
| 332 |
+
| support | `bitext/category` | 500 | 100.0% | 16.1% | 0.001 | |
|
| 333 |
+
| support | `bitext/route` | 500 | 100.0% | 19.0% | 0.000 | |
|
| 334 |
+
| support | `triage/support_email` | 505 | 94.5% | 32.3% | 0.046 | |
|
| 335 |
+
| tev1_benchmark | `tev1_test/ag_news` | 150 | 92.0% | 25.0% | 0.098 | ✓ |
|
| 336 |
+
| tev1_benchmark | `tev1_test/banking77` | 200 | 72.0% | 17.8% | 0.137 | ✓ |
|
| 337 |
+
| tev1_benchmark | `tev1_test/boolq` | 200 | 83.5% | 50.0% | 0.050 | ✓ |
|
| 338 |
+
| tev1_benchmark | `tev1_test/mnli` | 300 | 72.3% | 33.3% | 0.075 | ✓ |
|
| 339 |
+
| tev1_benchmark | `tev1_test/policy` | 1200 | 52.9% | 33.3% | 0.059 | ✓ |
|
| 340 |
+
| tev1_benchmark | `tev1_test/routing` | 600 | 45.8% | 20.0% | 0.038 | ✓ |
|
| 341 |
+
| tev1_benchmark | `tev1_test/sst5` | 150 | 39.3% | 20.0% | 0.108 | ✓ |
|
| 342 |
+
| workflows | `typed_decisions/agent_trace_observability` | 500 | 73.4% | 30.0% | 0.222 | |
|
| 343 |
+
| workflows | `typed_decisions/customer_service` | 500 | 76.4% | 28.0% | 0.210 | |
|
| 344 |
+
| workflows | `typed_decisions/invoice_processing` | 500 | 82.6% | 35.0% | 0.195 | |
|
| 345 |
+
| workflows | `typed_decisions/security_incidents` | 500 | 76.8% | 34.0% | 0.235 | |
|
| 346 |
+
|
| 347 |
+
</details>
|
| 348 |
+
|
| 349 |
+
## Training
|
| 350 |
+
|
| 351 |
+
| | |
|
| 352 |
+
|---|---|
|
| 353 |
+
| Initialization | Pretrained `jhu-clsp/ettin-encoder-150m` (trained from scratch on top of the backbone; no LightDec v1 weights) |
|
| 354 |
+
| Data | 1,023,814 training / 24,200 validation / 31,990 test examples |
|
| 355 |
+
| Sources | Public classification, NLI, QA, code, intent, guardrail and agent-trace datasets converted into typed decisions, plus synthetic policy-transfer, workflow, support-triage and long-context tasks and TEV1 builders. `mind2web` was excluded; no custom data was added. |
|
| 356 |
+
| Preset | `long` (2,048-token sequences, 1,500 long-context training tasks) |
|
| 357 |
+
| Objective | Cross-entropy with spherical-score (0.5) and ranked-probability-score (1.0) terms for ordinal questions; 8% "none of the above" augmentation; task sampling α = 0.5 |
|
| 358 |
+
| Optimizer | Learning rate 8e-5 (encoder) / 6e-4 (head), layer-wise decay 0.9, weight decay 0.01, 6% warmup, gradient clip 1.0, EMA 0.999 |
|
| 359 |
+
| Batching | Token-budget batches of 65,536 tokens (batch size 128) |
|
| 360 |
+
| Schedule | 10 epochs; checkpoint from **epoch 4** selected on validation macro accuracy |
|
| 361 |
+
| Calibration | Temperature per (question type × option-count bucket) fit on validation |
|
| 362 |
+
| Compute | 292 minutes on one NVIDIA RTX PRO 6000 Blackwell Server Edition |
|
| 363 |
+
| Software | PyTorch 2.9.0 (CUDA 13.0), Transformers 5.17.0, Python 3.12 |
|
| 364 |
+
|
| 365 |
+
| Epoch | Train loss | Train acc | Val macro acc | Val NLL |
|
| 366 |
+
|---:|---:|---:|---:|---:|
|
| 367 |
+
| 1 | 0.706 | 73.4% | 81.9% | 0.408 |
|
| 368 |
+
| 2 | 0.431 | 84.7% | 84.5% | 0.362 |
|
| 369 |
+
| 3 | 0.343 | 87.9% | 85.0% | 0.392 |
|
| 370 |
+
| 4 **(selected)** | 0.277 | 90.4% | 85.2% | 0.453 |
|
| 371 |
+
| 5 | 0.220 | 92.6% | 84.9% | 0.537 |
|
| 372 |
+
| 6 | 0.170 | 94.5% | 84.7% | 0.671 |
|
| 373 |
+
| 7 | 0.127 | 96.0% | 84.5% | 0.843 |
|
| 374 |
+
| 8 | 0.095 | 97.1% | 84.5% | 1.034 |
|
| 375 |
+
| 9 | 0.071 | 97.9% | 84.4% | 1.211 |
|
| 376 |
+
| 10 | 0.057 | 98.4% | 84.4% | 1.419 |
|
| 377 |
+
|
| 378 |
+
Validation accuracy peaked at epoch 4 while validation NLL kept rising after epoch 2, so the selected checkpoint is somewhat overconfident before calibration. The fitted temperatures (roughly 1.6 to 2.5) correct for this; they are part of the checkpoint and applied automatically by `decide` and `score_items`.
|
| 379 |
+
|
| 380 |
+
## Speed
|
| 381 |
+
|
| 382 |
+
Measured with `decide` on a single state; latency grows only slightly as more questions are asked about the same state.
|
| 383 |
+
|
| 384 |
+
| Device | Weights | Questions per call | p50 | p95 |
|
| 385 |
+
|---|---|---:|---:|---:|
|
| 386 |
+
| cuda | fp16 | 1 | 10.05 ms | 10.43 ms |
|
| 387 |
+
| cuda | fp16 | 5 | 11.32 ms | 11.41 ms |
|
| 388 |
+
| cuda | fp16 | 10 | 12.57 ms | 12.69 ms |
|
| 389 |
+
| cpu fp32 | int8 file | 1 | 48.4 ms | 48.8 ms |
|
| 390 |
+
|
| 391 |
+
GPU throughput: about **2,589 decisions per second** with batching.
|
| 392 |
+
|
| 393 |
+
## Intended use
|
| 394 |
+
|
| 395 |
+
LightDec_V2 is built for high-volume, low-latency decisions inside software: ticket and email routing, intent detection, triage scoring, content and prompt-safety screening, policy and rule checks over structured records, agent step verification and "should the agent stop now" checks, and pre-filtering before a more expensive LLM call. The calibrated `confidence` and `defer` flag are designed for human-in-the-loop and cascade setups in which uncertain cases escalate.
|
| 396 |
+
|
| 397 |
+
## Limitations
|
| 398 |
+
|
| 399 |
+
- **Closed-set only.** The model can only choose among the options you supply. If the right answer is not listed, it will still pick something; include a `none` option when that can happen.
|
| 400 |
+
- **Weak at multi-step reasoning and arithmetic.** Knowledge- and math-heavy tasks are well below the rest: MMLU 39.0%, AQuA-RAT 34.0%, ANLI 48.6%, ARC-Challenge 49.0%. Some policy tasks that require computing over a table are also weak: `policy/table_count_transfer` scores 32.4% with poor calibration (ECE 0.54), and `policy/invoice_total_transfer` (47.4%) is below chance. Use a larger model for anything that needs counting or totalling.
|
| 401 |
+
- **Fine-grained and subjective labels.** Accuracy drops on 77-way banking intents (58.0%), six-way emotion (47.2%) and five-level sentiment (SST-5 40.6%, Yelp 66.8%).
|
| 402 |
+
- **Transfer to unfamiliar rule sets is limited.** On TEV1 tasks without source overlap, accuracy is 51.8%, and routing and policy transfer (45.8% and 52.9%) are the weakest; validate on your own policies before relying on it.
|
| 403 |
+
- **Guardrail coverage is partial.** Jailbreak detection is strong (97.3%), but prompt-injection detection (59.5%) and harmful-request refusal (70.0%) are not reliable enough to be a sole safety layer.
|
| 404 |
+
- **Calibration is aggregate.** Overall ECE is low, but a few tasks (for example `counsel/critique_quality`, `prompt_injections/detect`, the table-count policy task) are noticeably miscalibrated; check calibration on your own distribution before tuning `defer_threshold`.
|
| 405 |
+
- **English only**, and questions are truncated to 96 tokens and each option to 24 tokens by default (`option_tokens` can raise the per-option budget).
|
| 406 |
+
- **Long-context scores are synthetic.** The 100% long-context results are in-distribution checks, not evidence of general long-document reasoning.
|
| 407 |
+
|
| 408 |
+
## Files
|
| 409 |
+
|
| 410 |
+
| File | Description |
|
| 411 |
+
|---|---|
|
| 412 |
+
| `model.safetensors` | fp16 weights |
|
| 413 |
+
| `falcondec_config.json` | Head configuration, special-token ids, defer threshold and calibration temperatures |
|
| 414 |
+
| `falcondec_modeling.py` | Model definition, loader (`load_falcondec`) and inference API (`decide`, `score_items`) |
|
| 415 |
+
| `falcondec_report.json` | Full training and evaluation report |
|
| 416 |
+
| `encoder/`, `tokenizer/` | Ettin encoder config and tokenizer |
|
| 417 |
+
| `benchmarks/triage_support_email_test.jsonl` | 101-email support-triage benchmark with reference answers |
|
| 418 |
+
|
| 419 |
+
## Citation
|
| 420 |
+
|
| 421 |
+
```bibtex
|
| 422 |
+
@misc{falconsai_lightdec_v2_2026,
|
| 423 |
+
title = {LightDec_V2: A Long-Context, Calibrated Decision Model},
|
| 424 |
+
author = {Falcons.ai},
|
| 425 |
+
year = {2026},
|
| 426 |
+
howpublished = {\url{https://huggingface.co/Falconsai/LightDec_V2}}
|
| 427 |
+
}
|
| 428 |
+
```
|
| 429 |
+
|
| 430 |
+
Built on the Ettin encoder from JHU CLSP ([`jhu-clsp/ettin-encoder-150m`](https://huggingface.co/jhu-clsp/ettin-encoder-150m)).
|
| 431 |
+
|
| 432 |
This card is generated from the surgical record itself; the package's
|
| 433 |
`lineage.intoto.jsonl` is the signed source of truth (verify it free at
|
| 434 |
the Surgeon's public verifier or with the bundled `verify_attestation.py`).
|