Feature Extraction
Transformers
Safetensors
modernbert
typed-decisions
decision-index
decision-model
cross-encoder
text-embeddings-inference
Instructions to use tasksource/tasksource-decider-nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tasksource/tasksource-decider-nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="tasksource/tasksource-decider-nano")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("tasksource/tasksource-decider-nano") model = AutoModel.from_pretrained("tasksource/tasksource-decider-nano", device_map="auto") - Notebooks
- Google Colab
- Kaggle
plain-language card: public-only example, sub-200M table
Browse files
README.md
CHANGED
|
@@ -16,60 +16,77 @@ base_model: lightonai/LateOn
|
|
| 16 |
|
| 17 |
# Tasksource-JEV-Nano-v0
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
|
| 23 |
- **Base model:** [`lightonai/LateOn`](https://huggingface.co/lightonai/LateOn)
|
| 24 |
-
- **Training data:** [`tasksource/tasksource-jev-typed-decisions`](https://huggingface.co/datasets/tasksource/tasksource-jev-typed-decisions)
|
| 25 |
-
- **
|
| 26 |
-
- **
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
|
| 35 |
-
|
|
| 36 |
-
|
|
| 37 |
-
|
|
| 38 |
-
|
|
| 39 |
-
|
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
```python
|
| 49 |
-
from
|
|
|
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
state = "Customer reports unauthorized international wire transfer of $4,500
|
| 54 |
question = "Select the appropriate fraud mitigation routing:"
|
| 55 |
options = [
|
| 56 |
-
"
|
| 57 |
-
"
|
| 58 |
-
"
|
| 59 |
-
"
|
| 60 |
]
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
print("
|
| 70 |
```
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
## Citation
|
| 75 |
|
|
@@ -82,4 +99,4 @@ Heterogeneous kinds are supported per decision: `choice` (softmax), `noul` (2-wa
|
|
| 82 |
}
|
| 83 |
```
|
| 84 |
|
| 85 |
-
Base model
|
|
|
|
| 16 |
|
| 17 |
# Tasksource-JEV-Nano-v0
|
| 18 |
|
| 19 |
+
A small decision model that picks the best option from a list β fraud routings, intents, topics, sentiments β using token-level late interaction instead of a classifier head.
|
| 20 |
|
| 21 |
+
It is LateOn (~149M parameters) fine-tuned on 512k real decisions covering three judgment types: picking one option (*choice*), yes/no questions (*noul*), and graded scores (*score*). No teacher model was used.
|
| 22 |
+
|
| 23 |
+
**Why this architecture.** The situation (state + question) is encoded once into token vectors and reused for every candidate set, while each option is encoded independently. That gives two properties classifier heads don't have: caching the situation across decisions, and outputs that don't depend on option order (verified exactly permutation-equivariant).
|
| 24 |
|
| 25 |
- **Base model:** [`lightonai/LateOn`](https://huggingface.co/lightonai/LateOn)
|
| 26 |
+
- **Training data:** [`tasksource/tasksource-jev-typed-decisions`](https://huggingface.co/datasets/tasksource/tasksource-jev-typed-decisions) (pinned revision `071f0cf2`), 512k-decision stream, natural mix of the three judgment types, 519 tasks
|
| 27 |
+
- **Checkpoint selection:** Tasksource unseen tasks only (step 4000 of 8000)
|
| 28 |
+
- **Training code:** `decision-models` repo (`scripts/train_multivector.py`, canonical run)
|
| 29 |
+
|
| 30 |
+
## How it scores
|
| 31 |
+
|
| 32 |
+
| Benchmark (1k examples each, same samples for every model) | v0 |
|
| 33 |
+
|---|---|
|
| 34 |
+
| Tasksource, unseen tasks | 58.9% |
|
| 35 |
+
| Tasksource, unseen test tasks | 53.0% |
|
| 36 |
+
| Typed Decisions | 42.6% |
|
| 37 |
+
| AG News | 73.8% |
|
| 38 |
+
| Emotion | 49.0% |
|
| 39 |
+
| Banking77 (77 options) | 44.7% |
|
| 40 |
+
| Fast Decisions (2,900 cases, 17 domains) | 41.3% exact match |
|
| 41 |
+
| classifier-benchmark v2 (866 cases) | 57.5 micro / 57.2 macro |
|
| 42 |
+
|
| 43 |
+
## Compact peers (all under 200M, same 1k samples)
|
| 44 |
+
|
| 45 |
+
| Model | Size | AG News | Emotion | Banking77 | Typed | cb-v2 micro |
|
| 46 |
+
|---|---|---|---|---|---|---|
|
| 47 |
+
| **Tasksource-JEV-Nano-v0** | 149M | 73.8 | 49.0 | 44.7 | 42.6 | 57.5 |
|
| 48 |
+
| GLiClass Base v3 | 187M | 76.9 | 51.8 | 52.4 | 47.3 | 51.2 |
|
| 49 |
+
| GLiClass Modern-Base v3 | 151M | 75.7 | 56.1 | 38.7 | 48.6 | 43.9 |
|
| 50 |
+
| GLiNER2.5 Base | 194M | 76.2 | 56.6 | 69.7 | 43.9 | 60.0 |
|
| 51 |
+
| GLiNER2.5 Small | 74M | 70.4 | 54.2 | 66.5 | 34.0 | 53.5 |
|
| 52 |
+
| GLiClass Edge v3 | 33M | 65.5 | 50.1 | 23.2 | 40.0 | 35.3 |
|
| 53 |
+
|
| 54 |
+
Larger peers (GLiClass Modern-Large 399M, GLiNER2.5-Multi 287M, Laya-Multilingual 322M) are omitted from this table; Laya's 90.0 AG News is training overlap (AG News is in its training mix). v0 trades some raw high-cardinality accuracy for state caching and order-independence, which none of the classifier heads offer.
|
| 55 |
+
|
| 56 |
+
## Use it (only public packages)
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
pip install -U pylate torch
|
| 60 |
+
```
|
| 61 |
|
| 62 |
```python
|
| 63 |
+
from pylate import models
|
| 64 |
+
import torch
|
| 65 |
|
| 66 |
+
model = models.ColBERT("tasksource/tasksource-jev-nano-v0")
|
| 67 |
|
| 68 |
+
state = "Customer reports unauthorized international wire transfer of $4,500."
|
| 69 |
question = "Select the appropriate fraud mitigation routing:"
|
| 70 |
options = [
|
| 71 |
+
"approve and monitor silently",
|
| 72 |
+
"challenge with a push notification",
|
| 73 |
+
"freeze the account and call the customer",
|
| 74 |
+
"decline and file a report",
|
| 75 |
]
|
| 76 |
|
| 77 |
+
# Situation encoded once; each option scored against it (MaxSim)
|
| 78 |
+
context = [state + "\nQuestion: " + question]
|
| 79 |
+
ctx = model.encode(context, is_query=False, convert_to_tensor=True)[0]
|
| 80 |
+
opts = model.encode(options, is_query=True, convert_to_tensor=True)
|
| 81 |
+
scores = torch.stack([(o @ ctx.T).max(dim=1).values.sum() for o in opts])
|
| 82 |
|
| 83 |
+
temperature = 0.53 # learned temperature of this release
|
| 84 |
+
probs = torch.softmax(scores / temperature, dim=0)
|
| 85 |
+
for opt, p in zip(options, probs):
|
| 86 |
+
print(f" {opt:45s} -> {p:.4f}")
|
| 87 |
```
|
| 88 |
|
| 89 |
+
Yes/no and graded decisions work the same way with two options or an ordered scale; encode the situation once and reuse it across as many candidate sets as you like.
|
| 90 |
|
| 91 |
## Citation
|
| 92 |
|
|
|
|
| 99 |
}
|
| 100 |
```
|
| 101 |
|
| 102 |
+
Base model LateOn by LightOn (Apache 2.0). If you use the training data, please also cite `tasksource/tasksource-jev-typed-decisions`.
|