Text Classification
Transformers
ONNX
Safetensors
English
modernbert
agents
context-management
topic-shift
cross-encoder
text-embeddings-inference
Instructions to use danielrosehill/Agent-Task-Break-Detector-ModernBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danielrosehill/Agent-Task-Break-Detector-ModernBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="danielrosehill/Agent-Task-Break-Detector-ModernBERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("danielrosehill/Agent-Task-Break-Detector-ModernBERT") model = AutoModelForSequenceClassification.from_pretrained("danielrosehill/Agent-Task-Break-Detector-ModernBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Card: int8 calibration results
Browse files
README.md
CHANGED
|
@@ -34,6 +34,7 @@ evaluated on real, hand-labelled sessions.
|
|
| 34 |
| Path | What |
|
| 35 |
|---|---|
|
| 36 |
| `model.safetensors`, `config.json`, `tokenizer*` | Fine-tuned weights (fp32), for `transformers` |
|
|
|
|
| 37 |
| `onnx/model_int8.onnx` + tokenizer | Dynamic int8 quantisation (onnxruntime `quantize_dynamic`), 151 MB, for CPU inference |
|
| 38 |
|
| 39 |
## Input format
|
|
@@ -101,9 +102,16 @@ The weakest cases are a message that looks self-contained but continues the work
|
|
| 101 |
(`counterfactual_continue`, 0.896) and a different task in the same workspace (`same_workspace`,
|
| 102 |
0.867).
|
| 103 |
|
| 104 |
-
**int8 ONNX
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
## Intended use and limitations
|
| 109 |
|
|
|
|
| 34 |
| Path | What |
|
| 35 |
|---|---|
|
| 36 |
| `model.safetensors`, `config.json`, `tokenizer*` | Fine-tuned weights (fp32), for `transformers` |
|
| 37 |
+
| `new_task_split.json` | Recommended int8 threshold and input settings (read by the New-Task-Split plugin) |
|
| 38 |
| `onnx/model_int8.onnx` + tokenizer | Dynamic int8 quantisation (onnxruntime `quantize_dynamic`), 151 MB, for CPU inference |
|
| 39 |
|
| 40 |
## Input format
|
|
|
|
| 102 |
(`counterfactual_continue`, 0.896) and a different task in the same workspace (`same_workspace`,
|
| 103 |
0.867).
|
| 104 |
|
| 105 |
+
**int8 ONNX** (validation n = 697, test n = 608; tokenised with `tokenizers`, identical ids to training):
|
| 106 |
+
|
| 107 |
+
| | Accuracy | AUC-PR | `new_task` recall @ precision 0.95 |
|
| 108 |
+
|---|---|---|---|
|
| 109 |
+
| validation | 0.937 | 0.988 | 0.925 |
|
| 110 |
+
| test | 0.929 | 0.982 | 0.888 |
|
| 111 |
+
|
| 112 |
+
int8 probabilities sit lower than fp32 (mean shift 0.14), so **use threshold 0.76 for int8**, not the
|
| 113 |
+
fp32 value. At the validation threshold of 0.751, test precision is 0.941 and recall 0.893. This is recorded in
|
| 114 |
+
`new_task_split.json`. Session load takes about 1.2 s on CPU; per-call latency has not been measured yet.
|
| 115 |
|
| 116 |
## Intended use and limitations
|
| 117 |
|