Instructions to use nodd-repo/sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use nodd-repo/sentiment with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'nodd-repo/sentiment');
Publish v2: larger synthetic dataset, checkpoints and evaluation
Browse files- README.md +42 -31
- browser_parity.json +22 -0
- comparison.md +24 -0
- encoder/config.json +40 -0
- encoder/model.safetensors +3 -0
- encoder/nodd.json +1 -0
- encoder/tokenizer.json +0 -0
- encoder/tokenizer_config.json +24 -0
- labeled.jsonl +0 -0
- model_card.json +68 -60
- nodd.json +1 -1
- onnx/model.onnx +2 -2
- onnx/model_quantized.onnx +2 -2
- parity.jsonl +51 -51
- report.json +181 -0
- report.md +48 -0
- synthetic_manifest.json +24 -0
README.md
CHANGED
|
@@ -4,16 +4,14 @@ language: en
|
|
| 4 |
library_name: transformers.js
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
base_model: sentence-transformers/all-MiniLM-L6-v2
|
| 7 |
-
tags: [nodd, onnx, text-classification,
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# sentiment (
|
| 11 |
|
| 12 |
What feeling does the writer express about the thing they're talking about (a product, place, service or experience)?
|
| 13 |
|
| 14 |
-
A
|
| 15 |
-
`sentence-transformers/all-MiniLM-L6-v2` exported to ONNX (int8, 24.4 MB) that runs in the browser
|
| 16 |
-
with one forward pass, and knows when it is unsure so hard cases can go to a bigger model.
|
| 17 |
|
| 18 |
| Label | Meaning |
|
| 19 |
|---|---|
|
|
@@ -21,43 +19,56 @@ with one forward pass, and knows when it is unsure so hard cases can go to a big
|
|
| 21 |
| `neutral` | Facts, questions, plans or mixed feelings with no clear lean. |
|
| 22 |
| `negative` | Unhappy, disappointed, angry or warns others away. Includes sarcastic praise. |
|
| 23 |
|
| 24 |
-
##
|
| 25 |
|
| 26 |
-
| | |
|
| 27 |
-
|---|---|
|
| 28 |
-
| Test macro
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
|
| 37 |
## Use
|
| 38 |
|
| 39 |
-
Download
|
| 40 |
|
| 41 |
```sh
|
| 42 |
-
hf download nodd-repo/sentiment --local-dir public/models/sentiment/
|
| 43 |
-
npm install @nodd/browser
|
| 44 |
```
|
| 45 |
|
| 46 |
```ts
|
| 47 |
-
import { nodd } from "@nodd/browser";
|
| 48 |
-
|
| 49 |
-
const
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
m.dispose(); // stops the worker
|
| 53 |
```
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
-
- `tokenizer.json`, `tokenizer_config.json`, `config.json`
|
| 61 |
-
- `nodd.json`: labels, temperature, threshold, tokenizer and ONNX settings read by the runtime
|
| 62 |
-
- `model_card.json`: full training, calibration and export metadata
|
| 63 |
-
- `parity.jsonl`: test-split inputs with reference probabilities, for checking a runtime
|
|
|
|
| 4 |
library_name: transformers.js
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
base_model: sentence-transformers/all-MiniLM-L6-v2
|
| 7 |
+
tags: [nodd, onnx, text-classification, synthetic-data]
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# sentiment (v2)
|
| 11 |
|
| 12 |
What feeling does the writer express about the thing they're talking about (a product, place, service or experience)?
|
| 13 |
|
| 14 |
+
A small classifier trained with [nodd](https://github.com/michaljach/nodd), exported as ONNX fp32 and int8 for browser and Node.js inference. This version uses a larger offline synthetic training dataset.
|
|
|
|
|
|
|
| 15 |
|
| 16 |
| Label | Meaning |
|
| 17 |
|---|---|
|
|
|
|
| 19 |
| `neutral` | Facts, questions, plans or mixed feelings with no clear lean. |
|
| 20 |
| `negative` | Unhappy, disappointed, angry or warns others away. Includes sarcastic praise. |
|
| 21 |
|
| 22 |
+
## Evaluation
|
| 23 |
|
| 24 |
+
| Metric | Value |
|
| 25 |
+
|---|---:|
|
| 26 |
+
| Test macro F1, PyTorch | 0.8808 |
|
| 27 |
+
| Test macro F1, int8 ONNX | 0.8802 |
|
| 28 |
+
| int8 vs PyTorch label agreement | 96.08% |
|
| 29 |
+
| int8 download | 24.31 MB |
|
| 30 |
+
| Train / validation / test | 3238 / 51 / 51 |
|
| 31 |
+
| Temperature | 1.549442 |
|
| 32 |
+
| Confidence threshold | 0.946760 |
|
| 33 |
+
| Validation precision at threshold | 100.00% |
|
| 34 |
+
| Test accuracy on covered inputs, PyTorch | 96.15% |
|
| 35 |
+
| Test coverage, PyTorch | 50.98% |
|
| 36 |
+
| Training seed | 42 |
|
| 37 |
+
|
| 38 |
+
See [baseline comparison](comparison.md), [evaluation report](report.md), and [browser parity results](browser_parity.json).
|
| 39 |
+
|
| 40 |
+
## Data and limitations
|
| 41 |
|
| 42 |
+
Added 1,000 examples per label using deterministic offline templates, with generation seed 20260928. Labels were assigned by construction, not by an independent teacher. Template variants are correlated and do not represent independent scenarios. New rows are training-only; the original validation and test records were preserved. Exact duplicates and examples with embedding cosine similarity above 0.90 to either holdout were rejected.
|
| 43 |
+
|
| 44 |
+
All evaluation inputs are synthetic; real-world accuracy is unmeasured. More data did not consistently improve held-out quality: consult the comparison before replacing an earlier version. The 97% precision target selected on validation was not met on this version's covered PyTorch test subset. Quantization can change individual probabilities substantially, so label parity does not establish confidence equivalence. Prompt-injection detection, where applicable, is not a standalone security boundary.
|
| 45 |
|
| 46 |
## Use
|
| 47 |
|
| 48 |
+
Download this version and serve it from your own origin:
|
| 49 |
|
| 50 |
```sh
|
| 51 |
+
hf download nodd-repo/sentiment --revision v2 --local-dir public/models/sentiment/v2
|
| 52 |
+
npm install @nodd/browser
|
| 53 |
```
|
| 54 |
|
| 55 |
```ts
|
| 56 |
+
import { nodd } from "@nodd/browser";
|
| 57 |
+
const model = await nodd.load("/models/sentiment/v2");
|
| 58 |
+
const decision = await model.decide("Your input text");
|
| 59 |
+
if (!model.isConfident(decision)) { /* escalate for review */ }
|
| 60 |
+
model.dispose();
|
|
|
|
| 61 |
```
|
| 62 |
|
| 63 |
+
For Node.js, use `@nodd/node` and the downloaded directory path. Requires nodd JavaScript packages >= 0.2.0.
|
| 64 |
+
|
| 65 |
+
## Artifacts
|
| 66 |
|
| 67 |
+
- `onnx/model_quantized.onnx`, `onnx/model.onnx`: int8 and fp32 browser models.
|
| 68 |
+
- `nodd.json`, tokenizer files and `config.json`: browser runtime configuration.
|
| 69 |
+
- `encoder/`: original Transformers checkpoint, loadable with `AutoModelForSequenceClassification.from_pretrained(local_path, subfolder="encoder")`.
|
| 70 |
+
- `labeled.jsonl`: exact training, validation and test records with split and provenance fields.
|
| 71 |
+
- `synthetic_manifest.json`: generation metadata and baseline fingerprint.
|
| 72 |
+
- `model_card.json`, reports and parity files: training, calibration and evaluation evidence.
|
| 73 |
|
| 74 |
+
Earlier releases remain available through their version tags. The generation script and cross-task results are in the [source repository](https://github.com/michaljach/nodd/blob/main/scripts/train_synthetic.py).
|
|
|
|
|
|
|
|
|
|
|
|
browser_parity.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "/models/sentiment/v2",
|
| 3 |
+
"n": 51,
|
| 4 |
+
"results": [
|
| 5 |
+
{
|
| 6 |
+
"name": "transformers.js \u00b7 wasm \u00b7 q8",
|
| 7 |
+
"device": "wasm",
|
| 8 |
+
"agreement": 1,
|
| 9 |
+
"maxProbDiff": 0.009276406422991879,
|
| 10 |
+
"pass": true
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"name": "transformers.js \u00b7 webgpu \u00b7 q8",
|
| 14 |
+
"device": "webgpu",
|
| 15 |
+
"agreement": 1,
|
| 16 |
+
"maxProbDiff": 0.06435286888915914,
|
| 17 |
+
"pass": true
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"pass": true,
|
| 21 |
+
"webgpu": true
|
| 22 |
+
}
|
comparison.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model comparison — sentiment
|
| 2 |
+
|
| 3 |
+
Test split identical across versions (fingerprint a9ff6039d984, n=51).
|
| 4 |
+
|
| 5 |
+
| | sentiment@v1 | sentiment@v2 |
|
| 6 |
+
|---|---|---|
|
| 7 |
+
| tier | encoder | encoder |
|
| 8 |
+
| base | `sentence-transformers/all-MiniLM-L6-v2` | `sentence-transformers/all-MiniLM-L6-v2` |
|
| 9 |
+
| **macro F1** | **0.882** | **0.881** |
|
| 10 |
+
| accuracy | 88.2% | 88.2% |
|
| 11 |
+
| coverage @ threshold | 82.4% (95.2% accurate) | 51.0% (96.2% accurate) |
|
| 12 |
+
| escalation rate | 17.6% | 49.0% |
|
| 13 |
+
| ECE after calibration | 0.066 | 0.093 |
|
| 14 |
+
| download | 23.7 MB | 24.31 MB |
|
| 15 |
+
| latency p95, python | 3.99 ms (cpu) | 3.57 ms (cpu) |
|
| 16 |
+
| latency p95, browser (best) | — | — |
|
| 17 |
+
| train time | 19 s | 120 s |
|
| 18 |
+
| F1 · positive | 0.875 | 0.919 |
|
| 19 |
+
| F1 · neutral | 0.914 | 0.875 |
|
| 20 |
+
| F1 · negative | 0.857 | 0.848 |
|
| 21 |
+
|
| 22 |
+
Prediction agreement on the test split: sentiment@v1 vs sentiment@v2: 88.2%
|
| 23 |
+
|
| 24 |
+
Targets: macro F1 ≥ 0.9, download ≤ 30.0 MB.
|
encoder/config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": null,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"hidden_act": "gelu",
|
| 13 |
+
"hidden_dropout_prob": 0.1,
|
| 14 |
+
"hidden_size": 384,
|
| 15 |
+
"id2label": {
|
| 16 |
+
"0": "positive",
|
| 17 |
+
"1": "neutral",
|
| 18 |
+
"2": "negative"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 1536,
|
| 22 |
+
"is_decoder": false,
|
| 23 |
+
"label2id": {
|
| 24 |
+
"negative": 2,
|
| 25 |
+
"neutral": 1,
|
| 26 |
+
"positive": 0
|
| 27 |
+
},
|
| 28 |
+
"layer_norm_eps": 1e-12,
|
| 29 |
+
"max_position_embeddings": 512,
|
| 30 |
+
"model_type": "bert",
|
| 31 |
+
"num_attention_heads": 12,
|
| 32 |
+
"num_hidden_layers": 6,
|
| 33 |
+
"pad_token_id": 0,
|
| 34 |
+
"position_embedding_type": "absolute",
|
| 35 |
+
"tie_word_embeddings": true,
|
| 36 |
+
"transformers_version": "5.17.0",
|
| 37 |
+
"type_vocab_size": 2,
|
| 38 |
+
"use_cache": true,
|
| 39 |
+
"vocab_size": 30522
|
| 40 |
+
}
|
encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:030c2ac940cde0809b5b4826d06d50e390a70da495f859657b7efc3ed40802c3
|
| 3 |
+
size 90869492
|
encoder/nodd.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"labels": ["positive", "neutral", "negative"], "max_tokens": 256}
|
encoder/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
encoder/tokenizer_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_basic_tokenize": true,
|
| 5 |
+
"do_lower_case": true,
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"local_files_only": false,
|
| 8 |
+
"mask_token": "[MASK]",
|
| 9 |
+
"max_length": 128,
|
| 10 |
+
"model_max_length": 512,
|
| 11 |
+
"never_split": null,
|
| 12 |
+
"pad_to_multiple_of": null,
|
| 13 |
+
"pad_token": "[PAD]",
|
| 14 |
+
"pad_token_type_id": 0,
|
| 15 |
+
"padding_side": "right",
|
| 16 |
+
"sep_token": "[SEP]",
|
| 17 |
+
"stride": 0,
|
| 18 |
+
"strip_accents": null,
|
| 19 |
+
"tokenize_chinese_chars": true,
|
| 20 |
+
"tokenizer_class": "BertTokenizer",
|
| 21 |
+
"truncation_side": "right",
|
| 22 |
+
"truncation_strategy": "longest_first",
|
| 23 |
+
"unk_token": "[UNK]"
|
| 24 |
+
}
|
labeled.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model_card.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
{
|
| 2 |
"artifact_version": 1,
|
| 3 |
-
"model": "sentiment@
|
| 4 |
"tier": "encoder",
|
| 5 |
"labels": [
|
| 6 |
"positive",
|
| 7 |
"neutral",
|
| 8 |
"negative"
|
| 9 |
],
|
| 10 |
-
"temperature":
|
| 11 |
-
"threshold": 0.
|
| 12 |
"spec": {
|
| 13 |
"task": "sentiment",
|
| 14 |
"description": "What feeling does the writer express about the thing they're talking about (a product, place, service or experience)?\n",
|
|
@@ -25,7 +25,7 @@
|
|
| 25 |
}
|
| 26 |
},
|
| 27 |
"model": {
|
| 28 |
-
"tier": "
|
| 29 |
"base": null,
|
| 30 |
"quantization": "q8"
|
| 31 |
},
|
|
@@ -54,34 +54,35 @@
|
|
| 54 |
"seed": 42
|
| 55 |
},
|
| 56 |
"task": "sentiment",
|
| 57 |
-
"version": "
|
| 58 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 59 |
"prompt_template": null,
|
| 60 |
"calibration": {
|
| 61 |
"method": "temperature",
|
| 62 |
-
"temperature":
|
| 63 |
-
"val_ece_before": 0.
|
| 64 |
-
"val_ece_after": 0.
|
| 65 |
-
"threshold": 0.
|
| 66 |
-
"val_coverage": 0.
|
| 67 |
-
"val_precision_at_threshold":
|
| 68 |
"target_precision_reached": true
|
| 69 |
},
|
| 70 |
"download_mb": 23.7,
|
| 71 |
"training": {
|
|
|
|
| 72 |
"chosen": {
|
| 73 |
"tier": "encoder",
|
| 74 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 75 |
"est_download_mb": 23.7,
|
| 76 |
-
"val_macro_f1": 0.
|
| 77 |
-
"best_epoch":
|
| 78 |
"val_macro_f1_by_epoch": [
|
| 79 |
-
0.
|
| 80 |
-
0.865,
|
| 81 |
-
0.9029,
|
| 82 |
0.9029,
|
| 83 |
-
0.
|
| 84 |
-
0.
|
|
|
|
|
|
|
| 85 |
],
|
| 86 |
"epochs": 6,
|
| 87 |
"lr": 0.0001,
|
|
@@ -90,36 +91,19 @@
|
|
| 90 |
"device": "cpu"
|
| 91 |
},
|
| 92 |
"candidates": [
|
| 93 |
-
{
|
| 94 |
-
"tier": "static",
|
| 95 |
-
"base": "minishlab/potion-base-8M",
|
| 96 |
-
"est_download_mb": 8.6,
|
| 97 |
-
"C": 0.1,
|
| 98 |
-
"val_macro_f1": 0.8216,
|
| 99 |
-
"val_macro_f1_by_C": {
|
| 100 |
-
"0.003": 0.7592,
|
| 101 |
-
"0.01": 0.7806,
|
| 102 |
-
"0.03": 0.7826,
|
| 103 |
-
"0.1": 0.8216,
|
| 104 |
-
"0.3": 0.8013,
|
| 105 |
-
"1.0": 0.8013,
|
| 106 |
-
"3.0": 0.7397
|
| 107 |
-
},
|
| 108 |
-
"embedding_dtype": "int8"
|
| 109 |
-
},
|
| 110 |
{
|
| 111 |
"tier": "encoder",
|
| 112 |
"base": "sentence-transformers/paraphrase-MiniLM-L3-v2",
|
| 113 |
"est_download_mb": 18.4,
|
| 114 |
-
"val_macro_f1": 0.
|
| 115 |
-
"best_epoch":
|
| 116 |
"val_macro_f1_by_epoch": [
|
| 117 |
-
0.
|
| 118 |
-
0.
|
| 119 |
-
0.
|
| 120 |
-
0.
|
| 121 |
-
0.
|
| 122 |
-
0.
|
| 123 |
],
|
| 124 |
"epochs": 6,
|
| 125 |
"lr": 0.0001,
|
|
@@ -131,15 +115,15 @@
|
|
| 131 |
"tier": "encoder",
|
| 132 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 133 |
"est_download_mb": 23.7,
|
| 134 |
-
"val_macro_f1": 0.
|
| 135 |
-
"best_epoch":
|
| 136 |
"val_macro_f1_by_epoch": [
|
| 137 |
-
0.
|
| 138 |
-
0.865,
|
| 139 |
0.9029,
|
| 140 |
-
0.
|
| 141 |
-
0.
|
| 142 |
-
0.
|
|
|
|
| 143 |
],
|
| 144 |
"epochs": 6,
|
| 145 |
"lr": 0.0001,
|
|
@@ -148,7 +132,7 @@
|
|
| 148 |
"device": "cpu"
|
| 149 |
}
|
| 150 |
],
|
| 151 |
-
"train_seconds":
|
| 152 |
"sample_weight": "teacher confidence"
|
| 153 |
},
|
| 154 |
"teacher": {
|
|
@@ -158,12 +142,36 @@
|
|
| 158 |
"min_confidence": 0.0
|
| 159 |
},
|
| 160 |
"data": {
|
| 161 |
-
"train":
|
| 162 |
"val": 51,
|
| 163 |
"test": 51
|
| 164 |
},
|
| 165 |
"seed": 42,
|
| 166 |
-
"created": "2026-09-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
"export": {
|
| 168 |
"format": "nodd",
|
| 169 |
"format_version": 2,
|
|
@@ -171,19 +179,19 @@
|
|
| 171 |
"n": 51,
|
| 172 |
"onnx_fp32": {
|
| 173 |
"label_agreement": 1.0,
|
| 174 |
-
"max_abs_prob_diff":
|
| 175 |
-
"macro_f1": 0.
|
| 176 |
"f1_drop": 0.0
|
| 177 |
},
|
| 178 |
"onnx_q8": {
|
| 179 |
"label_agreement": 0.9607843137254902,
|
| 180 |
-
"max_abs_prob_diff": 0.
|
| 181 |
-
"macro_f1": 0.
|
| 182 |
-
"f1_drop":
|
| 183 |
}
|
| 184 |
},
|
| 185 |
"parity_reference": "onnx_q8",
|
| 186 |
-
"onnx_download_mb": 24.
|
| 187 |
-
"onnx_fp32_download_mb": 92.
|
| 188 |
}
|
| 189 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"artifact_version": 1,
|
| 3 |
+
"model": "sentiment@v2",
|
| 4 |
"tier": "encoder",
|
| 5 |
"labels": [
|
| 6 |
"positive",
|
| 7 |
"neutral",
|
| 8 |
"negative"
|
| 9 |
],
|
| 10 |
+
"temperature": 1.5494422923834061,
|
| 11 |
+
"threshold": 0.9467601639708129,
|
| 12 |
"spec": {
|
| 13 |
"task": "sentiment",
|
| 14 |
"description": "What feeling does the writer express about the thing they're talking about (a product, place, service or experience)?\n",
|
|
|
|
| 25 |
}
|
| 26 |
},
|
| 27 |
"model": {
|
| 28 |
+
"tier": "encoder",
|
| 29 |
"base": null,
|
| 30 |
"quantization": "q8"
|
| 31 |
},
|
|
|
|
| 54 |
"seed": 42
|
| 55 |
},
|
| 56 |
"task": "sentiment",
|
| 57 |
+
"version": "v2",
|
| 58 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 59 |
"prompt_template": null,
|
| 60 |
"calibration": {
|
| 61 |
"method": "temperature",
|
| 62 |
+
"temperature": 1.5494422923834061,
|
| 63 |
+
"val_ece_before": 0.10366493771366977,
|
| 64 |
+
"val_ece_after": 0.10166117276176741,
|
| 65 |
+
"threshold": 0.9467601639708129,
|
| 66 |
+
"val_coverage": 0.5294117647058824,
|
| 67 |
+
"val_precision_at_threshold": 1.0,
|
| 68 |
"target_precision_reached": true
|
| 69 |
},
|
| 70 |
"download_mb": 23.7,
|
| 71 |
"training": {
|
| 72 |
+
"selection": "best fit",
|
| 73 |
"chosen": {
|
| 74 |
"tier": "encoder",
|
| 75 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 76 |
"est_download_mb": 23.7,
|
| 77 |
+
"val_macro_f1": 0.9029,
|
| 78 |
+
"best_epoch": 2,
|
| 79 |
"val_macro_f1_by_epoch": [
|
| 80 |
+
0.8835,
|
|
|
|
|
|
|
| 81 |
0.9029,
|
| 82 |
+
0.8674,
|
| 83 |
+
0.8454,
|
| 84 |
+
0.8407,
|
| 85 |
+
0.8407
|
| 86 |
],
|
| 87 |
"epochs": 6,
|
| 88 |
"lr": 0.0001,
|
|
|
|
| 91 |
"device": "cpu"
|
| 92 |
},
|
| 93 |
"candidates": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
{
|
| 95 |
"tier": "encoder",
|
| 96 |
"base": "sentence-transformers/paraphrase-MiniLM-L3-v2",
|
| 97 |
"est_download_mb": 18.4,
|
| 98 |
+
"val_macro_f1": 0.8432,
|
| 99 |
+
"best_epoch": 6,
|
| 100 |
"val_macro_f1_by_epoch": [
|
| 101 |
+
0.763,
|
| 102 |
+
0.8402,
|
| 103 |
+
0.8229,
|
| 104 |
+
0.8205,
|
| 105 |
+
0.8226,
|
| 106 |
+
0.8432
|
| 107 |
],
|
| 108 |
"epochs": 6,
|
| 109 |
"lr": 0.0001,
|
|
|
|
| 115 |
"tier": "encoder",
|
| 116 |
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 117 |
"est_download_mb": 23.7,
|
| 118 |
+
"val_macro_f1": 0.9029,
|
| 119 |
+
"best_epoch": 2,
|
| 120 |
"val_macro_f1_by_epoch": [
|
| 121 |
+
0.8835,
|
|
|
|
| 122 |
0.9029,
|
| 123 |
+
0.8674,
|
| 124 |
+
0.8454,
|
| 125 |
+
0.8407,
|
| 126 |
+
0.8407
|
| 127 |
],
|
| 128 |
"epochs": 6,
|
| 129 |
"lr": 0.0001,
|
|
|
|
| 132 |
"device": "cpu"
|
| 133 |
}
|
| 134 |
],
|
| 135 |
+
"train_seconds": 120.39,
|
| 136 |
"sample_weight": "teacher confidence"
|
| 137 |
},
|
| 138 |
"teacher": {
|
|
|
|
| 142 |
"min_confidence": 0.0
|
| 143 |
},
|
| 144 |
"data": {
|
| 145 |
+
"train": 3238,
|
| 146 |
"val": 51,
|
| 147 |
"test": 51
|
| 148 |
},
|
| 149 |
"seed": 42,
|
| 150 |
+
"created": "2026-09-28T09:38:29+00:00",
|
| 151 |
+
"synthetic_augmentation": {
|
| 152 |
+
"baseline": "runs/sentiment/v1",
|
| 153 |
+
"baseline_sha256": "fe5d48bb3f9f751fa8ec1869257a48db3bd7c90d6ee40964646bd927c9f99c2c",
|
| 154 |
+
"seed": 20260928,
|
| 155 |
+
"added_per_label": {
|
| 156 |
+
"positive": 1000,
|
| 157 |
+
"neutral": 1000,
|
| 158 |
+
"negative": 1000
|
| 159 |
+
},
|
| 160 |
+
"before": {
|
| 161 |
+
"train": 238,
|
| 162 |
+
"test": 51,
|
| 163 |
+
"val": 51
|
| 164 |
+
},
|
| 165 |
+
"after": {
|
| 166 |
+
"train": 3238,
|
| 167 |
+
"test": 51,
|
| 168 |
+
"val": 51
|
| 169 |
+
},
|
| 170 |
+
"generator": "offline-templates-v1",
|
| 171 |
+
"holdout_max_cosine": 0.9,
|
| 172 |
+
"rejected": {},
|
| 173 |
+
"limitations": "Template variants are correlated. Labels are assigned by construction, not an independent teacher. Original synthetic validation/test are unchanged. Real-world generalization is unmeasured."
|
| 174 |
+
},
|
| 175 |
"export": {
|
| 176 |
"format": "nodd",
|
| 177 |
"format_version": 2,
|
|
|
|
| 179 |
"n": 51,
|
| 180 |
"onnx_fp32": {
|
| 181 |
"label_agreement": 1.0,
|
| 182 |
+
"max_abs_prob_diff": 1.439289778637498e-06,
|
| 183 |
+
"macro_f1": 0.8808012558012558,
|
| 184 |
"f1_drop": 0.0
|
| 185 |
},
|
| 186 |
"onnx_q8": {
|
| 187 |
"label_agreement": 0.9607843137254902,
|
| 188 |
+
"max_abs_prob_diff": 0.41190388463864464,
|
| 189 |
+
"macro_f1": 0.8801699426699426,
|
| 190 |
+
"f1_drop": 0.0006313131313131493
|
| 191 |
}
|
| 192 |
},
|
| 193 |
"parity_reference": "onnx_q8",
|
| 194 |
+
"onnx_download_mb": 24.31,
|
| 195 |
+
"onnx_fp32_download_mb": 92.47
|
| 196 |
}
|
| 197 |
}
|
nodd.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"format":"nodd","format_version":2,"model":"sentiment@
|
|
|
|
| 1 |
+
{"format":"nodd","format_version":2,"model":"sentiment@v2","labels":["positive","neutral","negative"],"temperature":1.5494422923834061,"threshold":0.9467601639708129,"max_chars":2000,"files":{"config.json":923,"onnx/model.onnx":91752775,"onnx/model_quantized.onnx":23598378,"tokenizer.json":711649,"tokenizer_config.json":594},"tier":"encoder","tokenizer":{"file":"tokenizer.json","add_special_tokens":true,"max_tokens":256,"truncation":true},"onnx":{"file":"onnx/model_quantized.onnx","fp32_file":"onnx/model.onnx","dtype":"q8","inputs":["input_ids","token_type_ids","attention_mask"],"output":"logits"}}
|
onnx/model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e15e2af81a60ccc1ebbd4894fbcd581f153dc975a10934cfbb398fea343eab68
|
| 3 |
+
size 91752775
|
onnx/model_quantized.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fab106ffd3cf4992cb355dbc92af876cd70d008b1b2d12f3ce284a89ac91ccb
|
| 3 |
+
size 23598378
|
parity.jsonl
CHANGED
|
@@ -1,51 +1,51 @@
|
|
| 1 |
-
{"text": "The worst customer service I have ever dealt with.", "label": "negative", "probabilities": {"positive": 0.
|
| 2 |
-
{"text": "Rude staff and overpriced drinks. Avoid.", "label": "negative", "probabilities": {"positive": 0.
|
| 3 |
-
{"text": "My package was delivered to the wrong address and nobody cares.", "label": "negative", "probabilities": {"positive": 0.
|
| 4 |
-
{"text": "They cancelled my order without explanation. Pathetic.", "label": "negative", "probabilities": {"positive": 0.
|
| 5 |
-
{"text": "Took forever to set up and it still doesn't connect.", "label": "negative", "probabilities": {"positive": 0.
|
| 6 |
-
{"text": "The hotel photos are clearly fake, the place is run down.", "label": "negative", "probabilities": {"positive": 0.
|
| 7 |
-
{"text": "Poor quality stitching, came apart in the wash.", "label": "negative", "probabilities": {"positive": 0.
|
| 8 |
-
{"text": "The mattress is lumpy and gave me back pain.", "label": "negative", "probabilities": {"positive": 0.
|
| 9 |
-
{"text": "Slow, clunky and expensive. No thanks.", "label": "negative", "probabilities": {"positive": 0.
|
| 10 |
-
{"text": "I'm cancelling my membership, the gym is always dirty.", "label": "negative", "probabilities": {"positive": 0.
|
| 11 |
-
{"text": "Disgusting bathroom, broken lock, rude receptionist.", "label": "negative", "probabilities": {"positive": 0.
|
| 12 |
-
{"text": "ugh, broken again 😡", "label": "negative", "probabilities": {"positive": 0.
|
| 13 |
-
{"text": "1 star is too generous", "label": "positive", "probabilities": {"positive": 0.
|
| 14 |
-
{"text": "Waited on hold for two hours to be told to call back tomorrow.", "label": "neutral", "probabilities": {"positive": 0.
|
| 15 |
-
{"text": "Pretty design, shame it barely works.", "label": "
|
| 16 |
-
{"text": "Thanks for making the app worse with every update.", "label": "negative", "probabilities": {"positive": 0.
|
| 17 |
-
{"text": "The store opens at 9am on weekdays.", "label": "neutral", "probabilities": {"positive": 0.
|
| 18 |
-
{"text": "We stayed for three nights in a double room.", "label": "neutral", "probabilities": {"positive": 0.
|
| 19 |
-
{"text": "Our flight departs at 6:40 in the morning.", "label": "neutral", "probabilities": {"positive": 0.
|
| 20 |
-
{"text": "The sofa comes in grey, green and beige.", "label": "neutral", "probabilities": {"positive": 0.
|
| 21 |
-
{"text": "Does anyone know if this works with Alexa?", "label": "neutral", "probabilities": {"positive": 0.
|
| 22 |
-
{"text": "Is this dishwasher safe?", "label": "neutral", "probabilities": {"positive": 0.
|
| 23 |
-
{"text": "I'll check back after the next update.", "label": "neutral", "probabilities": {"positive": 0.
|
| 24 |
-
{"text": "This is my second order from this store.", "label": "neutral", "probabilities": {"positive": 0.
|
| 25 |
-
{"text": "The instructions are in English and Spanish.", "label": "neutral", "probabilities": {"positive": 0.
|
| 26 |
-
{"text": "It uses AA batteries.", "label": "neutral", "probabilities": {"positive": 0.
|
| 27 |
-
{"text": "The app syncs every 15 minutes.", "label": "neutral", "probabilities": {"positive": 0.
|
| 28 |
-
{"text": "We took the train instead of driving.", "label": "
|
| 29 |
-
{"text": "Took the bus to the museum, about 20 minutes.", "label": "neutral", "probabilities": {"positive": 0.
|
| 30 |
-
{"text": "Planning to upgrade next year.", "label": "neutral", "probabilities": {"positive": 0.
|
| 31 |
-
{"text": "Le colis est arrivé ce matin.", "label": "neutral", "probabilities": {"positive": 0.
|
| 32 |
-
{"text": "Pros: light, cheap. Cons: flimsy, loud.", "label": "negative", "probabilities": {"positive": 0.
|
| 33 |
-
{"text": "The pizza was alright.", "label": "neutral", "probabilities": {"positive": 0.
|
| 34 |
-
{"text": "Thank you so much for the quick refund, really appreciate it.", "label": "positive", "probabilities": {"positive": 0.
|
| 35 |
-
{"text": "Delivery arrived a day early and everything was in perfect condition.", "label": "positive", "probabilities": {"positive": 0.
|
| 36 |
-
{"text": "I'm obsessed with this moisturizer, my skin has never felt better.", "label": "negative", "probabilities": {"positive": 0.
|
| 37 |
-
{"text": "Delicious, generous portions, and the waiter was lovely.", "label": "positive", "probabilities": {"positive": 0.
|
| 38 |
-
{"text": "Kudos to the devs, the dark mode looks stunning.", "label": "positive", "probabilities": {"positive": 0.
|
| 39 |
-
{"text": "This podcast episode was so insightful, learned a ton.", "label": "positive", "probabilities": {"positive": 0.
|
| 40 |
-
{"text": "Very pleased with the repair, the car drives like new.", "label": "positive", "probabilities": {"positive": 0.
|
| 41 |
-
{"text": "The museum was fascinating and the guide was brilliant.", "label": "positive", "probabilities": {"positive": 0.
|
| 42 |
-
{"text": "The team was welcoming and made onboarding painless.", "label": "
|
| 43 |
-
{"text": "This library saved me hours of work, thanks to the maintainers.", "label": "positive", "probabilities": {"positive": 0.
|
| 44 |
-
{"text": "Perfect fit and the fabric is super soft.", "label": "positive", "probabilities": {"positive": 0.
|
| 45 |
-
{"text": "I'm really proud of how this project turned out, thanks everyone.", "label": "positive", "probabilities": {"positive": 0.
|
| 46 |
-
{"text": "Great product, great price, great service.", "label": "positive", "probabilities": {"positive": 0.
|
| 47 |
-
{"text": "This charger is tiny and charges my laptop super fast. Love it.", "label": "positive", "probabilities": {"positive": 0.
|
| 48 |
-
{"text": "Quick, friendly and efficient. What more could you want?", "label": "positive", "probabilities": {"positive": 0.
|
| 49 |
-
{"text": "A bit pricey, but the quality makes up for it. Happy.", "label": "positive", "probabilities": {"positive": 0.
|
| 50 |
-
{"text": "It's no Michelin star, but it was a lovely meal.", "label": "positive", "probabilities": {"positive": 0.
|
| 51 |
-
{"text": "Slow start, but the second half of the book is brilliant.", "label": "
|
|
|
|
| 1 |
+
{"text": "The worst customer service I have ever dealt with.", "label": "negative", "probabilities": {"positive": 0.022732729664800333, "neutral": 0.02787839675993739, "negative": 0.9493888735752624}}
|
| 2 |
+
{"text": "Rude staff and overpriced drinks. Avoid.", "label": "negative", "probabilities": {"positive": 0.03657828832126019, "neutral": 0.04027292973439461, "negative": 0.9231487819443451}}
|
| 3 |
+
{"text": "My package was delivered to the wrong address and nobody cares.", "label": "negative", "probabilities": {"positive": 0.019697576217617276, "neutral": 0.0408890623700929, "negative": 0.9394133614122899}}
|
| 4 |
+
{"text": "They cancelled my order without explanation. Pathetic.", "label": "negative", "probabilities": {"positive": 0.02156548427014997, "neutral": 0.024858529404526163, "negative": 0.9535759863253239}}
|
| 5 |
+
{"text": "Took forever to set up and it still doesn't connect.", "label": "negative", "probabilities": {"positive": 0.0231232868458743, "neutral": 0.02112925087843885, "negative": 0.955747462275687}}
|
| 6 |
+
{"text": "The hotel photos are clearly fake, the place is run down.", "label": "negative", "probabilities": {"positive": 0.06266887810683679, "neutral": 0.09870886800099776, "negative": 0.8386222538921654}}
|
| 7 |
+
{"text": "Poor quality stitching, came apart in the wash.", "label": "negative", "probabilities": {"positive": 0.027432687681153554, "neutral": 0.02047087498398513, "negative": 0.9520964373348613}}
|
| 8 |
+
{"text": "The mattress is lumpy and gave me back pain.", "label": "negative", "probabilities": {"positive": 0.025013547330756232, "neutral": 0.018892569177520666, "negative": 0.9560938834917231}}
|
| 9 |
+
{"text": "Slow, clunky and expensive. No thanks.", "label": "negative", "probabilities": {"positive": 0.039961166120812956, "neutral": 0.025463345849973725, "negative": 0.9345754880292133}}
|
| 10 |
+
{"text": "I'm cancelling my membership, the gym is always dirty.", "label": "negative", "probabilities": {"positive": 0.028108783170786623, "neutral": 0.04173747635476573, "negative": 0.9301537404744477}}
|
| 11 |
+
{"text": "Disgusting bathroom, broken lock, rude receptionist.", "label": "negative", "probabilities": {"positive": 0.02487671942594719, "neutral": 0.02060096775213736, "negative": 0.9545223128219155}}
|
| 12 |
+
{"text": "ugh, broken again 😡", "label": "negative", "probabilities": {"positive": 0.025791558875005033, "neutral": 0.023479953282957156, "negative": 0.9507284878420378}}
|
| 13 |
+
{"text": "1 star is too generous", "label": "positive", "probabilities": {"positive": 0.8935329691015025, "neutral": 0.0425933850041057, "negative": 0.06387364589439185}}
|
| 14 |
+
{"text": "Waited on hold for two hours to be told to call back tomorrow.", "label": "neutral", "probabilities": {"positive": 0.02351739979289841, "neutral": 0.8767317545528871, "negative": 0.09975084565421455}}
|
| 15 |
+
{"text": "Pretty design, shame it barely works.", "label": "positive", "probabilities": {"positive": 0.5456890318394592, "neutral": 0.020666810390063177, "negative": 0.4336441577704776}}
|
| 16 |
+
{"text": "Thanks for making the app worse with every update.", "label": "negative", "probabilities": {"positive": 0.15130164538731705, "neutral": 0.016544758098495347, "negative": 0.8321535965141876}}
|
| 17 |
+
{"text": "The store opens at 9am on weekdays.", "label": "neutral", "probabilities": {"positive": 0.023255098870509187, "neutral": 0.9561585612908057, "negative": 0.020586339838685245}}
|
| 18 |
+
{"text": "We stayed for three nights in a double room.", "label": "neutral", "probabilities": {"positive": 0.12045498867806145, "neutral": 0.7975807218958599, "negative": 0.08196428942607849}}
|
| 19 |
+
{"text": "Our flight departs at 6:40 in the morning.", "label": "neutral", "probabilities": {"positive": 0.026883725479022513, "neutral": 0.9478315726096493, "negative": 0.025284701911328204}}
|
| 20 |
+
{"text": "The sofa comes in grey, green and beige.", "label": "neutral", "probabilities": {"positive": 0.20577690297226564, "neutral": 0.7581402894499925, "negative": 0.03608280757774184}}
|
| 21 |
+
{"text": "Does anyone know if this works with Alexa?", "label": "neutral", "probabilities": {"positive": 0.05236810649637475, "neutral": 0.9081180201541645, "negative": 0.03951387334946067}}
|
| 22 |
+
{"text": "Is this dishwasher safe?", "label": "neutral", "probabilities": {"positive": 0.22276124468965597, "neutral": 0.5165383429241467, "negative": 0.2607004123861974}}
|
| 23 |
+
{"text": "I'll check back after the next update.", "label": "neutral", "probabilities": {"positive": 0.02266674922832736, "neutral": 0.952141771711581, "negative": 0.025191479060091802}}
|
| 24 |
+
{"text": "This is my second order from this store.", "label": "neutral", "probabilities": {"positive": 0.12486390448834193, "neutral": 0.8373956457413828, "negative": 0.037740449770275214}}
|
| 25 |
+
{"text": "The instructions are in English and Spanish.", "label": "neutral", "probabilities": {"positive": 0.025459676694021414, "neutral": 0.9555874104992783, "negative": 0.018952912806700337}}
|
| 26 |
+
{"text": "It uses AA batteries.", "label": "neutral", "probabilities": {"positive": 0.05621023043704398, "neutral": 0.8918792170889146, "negative": 0.051910552474041555}}
|
| 27 |
+
{"text": "The app syncs every 15 minutes.", "label": "neutral", "probabilities": {"positive": 0.10292317968318757, "neutral": 0.7765542298305381, "negative": 0.12052259048627435}}
|
| 28 |
+
{"text": "We took the train instead of driving.", "label": "negative", "probabilities": {"positive": 0.06846555012683701, "neutral": 0.299043599956491, "negative": 0.632490849916672}}
|
| 29 |
+
{"text": "Took the bus to the museum, about 20 minutes.", "label": "neutral", "probabilities": {"positive": 0.03897910206734341, "neutral": 0.9262995257091182, "negative": 0.03472137222353839}}
|
| 30 |
+
{"text": "Planning to upgrade next year.", "label": "neutral", "probabilities": {"positive": 0.04240472500425306, "neutral": 0.9260246916680073, "negative": 0.03157058332773968}}
|
| 31 |
+
{"text": "Le colis est arrivé ce matin.", "label": "neutral", "probabilities": {"positive": 0.18884652230946813, "neutral": 0.5216173923775365, "negative": 0.2895360853129954}}
|
| 32 |
+
{"text": "Pros: light, cheap. Cons: flimsy, loud.", "label": "negative", "probabilities": {"positive": 0.10533729176659042, "neutral": 0.027624897726048037, "negative": 0.8670378105073615}}
|
| 33 |
+
{"text": "The pizza was alright.", "label": "neutral", "probabilities": {"positive": 0.2048309436191239, "neutral": 0.735223182741217, "negative": 0.05994587363965906}}
|
| 34 |
+
{"text": "Thank you so much for the quick refund, really appreciate it.", "label": "positive", "probabilities": {"positive": 0.9452156730302687, "neutral": 0.014083655841315134, "negative": 0.04070067112841606}}
|
| 35 |
+
{"text": "Delivery arrived a day early and everything was in perfect condition.", "label": "positive", "probabilities": {"positive": 0.951516194800968, "neutral": 0.023058526978325333, "negative": 0.02542527822070666}}
|
| 36 |
+
{"text": "I'm obsessed with this moisturizer, my skin has never felt better.", "label": "negative", "probabilities": {"positive": 0.036281944019340304, "neutral": 0.029968475396225182, "negative": 0.9337495805844346}}
|
| 37 |
+
{"text": "Delicious, generous portions, and the waiter was lovely.", "label": "positive", "probabilities": {"positive": 0.9584187219004168, "neutral": 0.018279471539756485, "negative": 0.023301806559826808}}
|
| 38 |
+
{"text": "Kudos to the devs, the dark mode looks stunning.", "label": "positive", "probabilities": {"positive": 0.9561556363872546, "neutral": 0.01837029835049029, "negative": 0.02547406526225516}}
|
| 39 |
+
{"text": "This podcast episode was so insightful, learned a ton.", "label": "positive", "probabilities": {"positive": 0.9555686752512573, "neutral": 0.017976855802408927, "negative": 0.026454468946333812}}
|
| 40 |
+
{"text": "Very pleased with the repair, the car drives like new.", "label": "positive", "probabilities": {"positive": 0.9589325189363227, "neutral": 0.017700491604114982, "negative": 0.023366989459562303}}
|
| 41 |
+
{"text": "The museum was fascinating and the guide was brilliant.", "label": "positive", "probabilities": {"positive": 0.9564181745141263, "neutral": 0.019581620802546728, "negative": 0.024000204683327038}}
|
| 42 |
+
{"text": "The team was welcoming and made onboarding painless.", "label": "positive", "probabilities": {"positive": 0.5224835168122385, "neutral": 0.025439524542114286, "negative": 0.45207695864564723}}
|
| 43 |
+
{"text": "This library saved me hours of work, thanks to the maintainers.", "label": "positive", "probabilities": {"positive": 0.9530391540775632, "neutral": 0.018957402994338558, "negative": 0.02800344292809813}}
|
| 44 |
+
{"text": "Perfect fit and the fabric is super soft.", "label": "positive", "probabilities": {"positive": 0.9539594041422013, "neutral": 0.016872804985438965, "negative": 0.029167790872359975}}
|
| 45 |
+
{"text": "I'm really proud of how this project turned out, thanks everyone.", "label": "positive", "probabilities": {"positive": 0.9594479827880417, "neutral": 0.017505981967099234, "negative": 0.02304603524485925}}
|
| 46 |
+
{"text": "Great product, great price, great service.", "label": "positive", "probabilities": {"positive": 0.9513287689167623, "neutral": 0.01865588850544544, "negative": 0.03001534257779225}}
|
| 47 |
+
{"text": "This charger is tiny and charges my laptop super fast. Love it.", "label": "positive", "probabilities": {"positive": 0.9546800773556958, "neutral": 0.01663138541010711, "negative": 0.028688537234196943}}
|
| 48 |
+
{"text": "Quick, friendly and efficient. What more could you want?", "label": "positive", "probabilities": {"positive": 0.9162133507683954, "neutral": 0.030774072483803185, "negative": 0.05301257674780137}}
|
| 49 |
+
{"text": "A bit pricey, but the quality makes up for it. Happy.", "label": "positive", "probabilities": {"positive": 0.9547402220118609, "neutral": 0.01743616702949393, "negative": 0.027823610958645162}}
|
| 50 |
+
{"text": "It's no Michelin star, but it was a lovely meal.", "label": "positive", "probabilities": {"positive": 0.9563229043632224, "neutral": 0.019548317085197983, "negative": 0.024128778551579612}}
|
| 51 |
+
{"text": "Slow start, but the second half of the book is brilliant.", "label": "positive", "probabilities": {"positive": 0.6405768336008174, "neutral": 0.05249405114830608, "negative": 0.3069291152508764}}
|
report.json
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "sentiment@v2",
|
| 3 |
+
"tier": "encoder",
|
| 4 |
+
"base": "sentence-transformers/all-MiniLM-L6-v2",
|
| 5 |
+
"test": {
|
| 6 |
+
"n": 51,
|
| 7 |
+
"accuracy": 0.8823529411764706,
|
| 8 |
+
"macro_f1": 0.8808012558012558,
|
| 9 |
+
"per_label": {
|
| 10 |
+
"positive": {
|
| 11 |
+
"precision": 0.8947368421052632,
|
| 12 |
+
"recall": 0.9444444444444444,
|
| 13 |
+
"f1": 0.918918918918919,
|
| 14 |
+
"support": 18
|
| 15 |
+
},
|
| 16 |
+
"neutral": {
|
| 17 |
+
"precision": 0.9333333333333333,
|
| 18 |
+
"recall": 0.8235294117647058,
|
| 19 |
+
"f1": 0.875,
|
| 20 |
+
"support": 17
|
| 21 |
+
},
|
| 22 |
+
"negative": {
|
| 23 |
+
"precision": 0.8235294117647058,
|
| 24 |
+
"recall": 0.875,
|
| 25 |
+
"f1": 0.8484848484848485,
|
| 26 |
+
"support": 16
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"confusion": [
|
| 30 |
+
[
|
| 31 |
+
17,
|
| 32 |
+
0,
|
| 33 |
+
1
|
| 34 |
+
],
|
| 35 |
+
[
|
| 36 |
+
1,
|
| 37 |
+
14,
|
| 38 |
+
2
|
| 39 |
+
],
|
| 40 |
+
[
|
| 41 |
+
1,
|
| 42 |
+
1,
|
| 43 |
+
14
|
| 44 |
+
]
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
"by_source": {
|
| 48 |
+
"synthetic": {
|
| 49 |
+
"n": 51,
|
| 50 |
+
"accuracy": 0.8823529411764706,
|
| 51 |
+
"macro_f1": 0.8808012558012558,
|
| 52 |
+
"per_label": {
|
| 53 |
+
"positive": {
|
| 54 |
+
"precision": 0.8947368421052632,
|
| 55 |
+
"recall": 0.9444444444444444,
|
| 56 |
+
"f1": 0.918918918918919,
|
| 57 |
+
"support": 18
|
| 58 |
+
},
|
| 59 |
+
"neutral": {
|
| 60 |
+
"precision": 0.9333333333333333,
|
| 61 |
+
"recall": 0.8235294117647058,
|
| 62 |
+
"f1": 0.875,
|
| 63 |
+
"support": 17
|
| 64 |
+
},
|
| 65 |
+
"negative": {
|
| 66 |
+
"precision": 0.8235294117647058,
|
| 67 |
+
"recall": 0.875,
|
| 68 |
+
"f1": 0.8484848484848485,
|
| 69 |
+
"support": 16
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"confusion": [
|
| 73 |
+
[
|
| 74 |
+
17,
|
| 75 |
+
0,
|
| 76 |
+
1
|
| 77 |
+
],
|
| 78 |
+
[
|
| 79 |
+
1,
|
| 80 |
+
14,
|
| 81 |
+
2
|
| 82 |
+
],
|
| 83 |
+
[
|
| 84 |
+
1,
|
| 85 |
+
1,
|
| 86 |
+
14
|
| 87 |
+
]
|
| 88 |
+
]
|
| 89 |
+
}
|
| 90 |
+
},
|
| 91 |
+
"teacher_agreement": 0.8823529411764706,
|
| 92 |
+
"calibration": {
|
| 93 |
+
"temperature": 1.5494422923834061,
|
| 94 |
+
"test_ece_before": 0.13583191042865103,
|
| 95 |
+
"test_ece_after": 0.09304488274530132,
|
| 96 |
+
"val_ece_before": 0.10366493771366977,
|
| 97 |
+
"val_ece_after": 0.10166117276176741,
|
| 98 |
+
"val_coverage": 0.5294117647058824,
|
| 99 |
+
"val_precision_at_threshold": 1.0
|
| 100 |
+
},
|
| 101 |
+
"escalation": {
|
| 102 |
+
"threshold": 0.9467601639708129,
|
| 103 |
+
"target_precision": 0.97,
|
| 104 |
+
"coverage": 0.5098039215686274,
|
| 105 |
+
"accuracy_on_covered": 0.9615384615384616,
|
| 106 |
+
"escalation_rate": 0.4901960784313726
|
| 107 |
+
},
|
| 108 |
+
"latency": {
|
| 109 |
+
"p50_ms": 3.41874998412095,
|
| 110 |
+
"p95_ms": 3.5703955072676763,
|
| 111 |
+
"batch_ms_per_input": 0.451612745082992,
|
| 112 |
+
"backend": "python (cpu); browser numbers: web/ `npm run bench`"
|
| 113 |
+
},
|
| 114 |
+
"size_mb": 24.31,
|
| 115 |
+
"targets": {
|
| 116 |
+
"min_macro_f1": {
|
| 117 |
+
"target": 0.9,
|
| 118 |
+
"actual": 0.8808012558012558,
|
| 119 |
+
"met": false
|
| 120 |
+
},
|
| 121 |
+
"max_download_mb": {
|
| 122 |
+
"target": 30.0,
|
| 123 |
+
"actual": 24.31,
|
| 124 |
+
"met": true
|
| 125 |
+
}
|
| 126 |
+
},
|
| 127 |
+
"worst_errors": [
|
| 128 |
+
{
|
| 129 |
+
"text": "I'm obsessed with this moisturizer, my skin has never felt better.",
|
| 130 |
+
"label": "positive",
|
| 131 |
+
"predicted": "negative",
|
| 132 |
+
"confidence": 0.947,
|
| 133 |
+
"teacher_confidence": 0.95
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"text": "Pros: light, cheap. Cons: flimsy, loud.",
|
| 137 |
+
"label": "neutral",
|
| 138 |
+
"predicted": "negative",
|
| 139 |
+
"confidence": 0.922,
|
| 140 |
+
"teacher_confidence": 0.75
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"text": "1 star is too generous",
|
| 144 |
+
"label": "negative",
|
| 145 |
+
"predicted": "positive",
|
| 146 |
+
"confidence": 0.914,
|
| 147 |
+
"teacher_confidence": 0.95
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"text": "Waited on hold for two hours to be told to call back tomorrow.",
|
| 151 |
+
"label": "negative",
|
| 152 |
+
"predicted": "neutral",
|
| 153 |
+
"confidence": 0.908,
|
| 154 |
+
"teacher_confidence": 0.95
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"text": "This is my second order from this store.",
|
| 158 |
+
"label": "neutral",
|
| 159 |
+
"predicted": "positive",
|
| 160 |
+
"confidence": 0.529,
|
| 161 |
+
"teacher_confidence": 0.92
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"text": "We took the train instead of driving.",
|
| 165 |
+
"label": "neutral",
|
| 166 |
+
"predicted": "negative",
|
| 167 |
+
"confidence": 0.508,
|
| 168 |
+
"teacher_confidence": 0.92
|
| 169 |
+
}
|
| 170 |
+
],
|
| 171 |
+
"data": {
|
| 172 |
+
"train": 3238,
|
| 173 |
+
"val": 51,
|
| 174 |
+
"test": 51
|
| 175 |
+
},
|
| 176 |
+
"seed": 42,
|
| 177 |
+
"recommendations": [
|
| 178 |
+
"Macro F1 0.881 is below the 0.90 target. Options: more/better data (real inputs beat synthetic), the encoder tier (M4), or escalation-heavy mode (the micro model handles only confident cases).",
|
| 179 |
+
"All test data is synthetic: expect lower accuracy on real inputs. Add a human-labeled gold set."
|
| 180 |
+
]
|
| 181 |
+
}
|
report.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# sentiment@v2 — encoder tier
|
| 2 |
+
|
| 3 |
+
Base `sentence-transformers/all-MiniLM-L6-v2` · test n=51 · train/val/test = 3238/51/51 · seed 42
|
| 4 |
+
|
| 5 |
+
## Summary
|
| 6 |
+
|
| 7 |
+
| metric | value |
|
| 8 |
+
|---|---|
|
| 9 |
+
| macro F1 | **0.881** (target 0.90 ❌) |
|
| 10 |
+
| accuracy | 88.2% |
|
| 11 |
+
| teacher agreement | 88.2% |
|
| 12 |
+
| coverage @ threshold 0.947 | 51.0% handled alone, 96.2% accurate (target 97%) |
|
| 13 |
+
| escalation rate | 49.0% |
|
| 14 |
+
| ECE (test) | 0.136 → 0.093 after temperature 1.55 |
|
| 15 |
+
| download size | 24.31 MB (budget 30.0 MB ✅) |
|
| 16 |
+
| latency (python (cpu), single input) | p50 3.42 ms · p95 3.57 ms |
|
| 17 |
+
|
| 18 |
+
## Recommendations
|
| 19 |
+
|
| 20 |
+
- Macro F1 0.881 is below the 0.90 target. Options: more/better data (real inputs beat synthetic), the encoder tier (M4), or escalation-heavy mode (the micro model handles only confident cases).
|
| 21 |
+
- All test data is synthetic: expect lower accuracy on real inputs. Add a human-labeled gold set.
|
| 22 |
+
|
| 23 |
+
## Per label
|
| 24 |
+
|
| 25 |
+
| label | precision | recall | F1 | support |
|
| 26 |
+
|---|---|---|---|---|
|
| 27 |
+
| positive | 0.895 | 0.944 | 0.919 | 18 |
|
| 28 |
+
| neutral | 0.933 | 0.824 | 0.875 | 17 |
|
| 29 |
+
| negative | 0.824 | 0.875 | 0.848 | 16 |
|
| 30 |
+
|
| 31 |
+
## Confusion matrix (rows = true, cols = predicted)
|
| 32 |
+
|
| 33 |
+
| | positive | neutral | negative |
|
| 34 |
+
|---|---|---|---|
|
| 35 |
+
| **positive** | 17 | 0 | 1 |
|
| 36 |
+
| **neutral** | 1 | 14 | 2 |
|
| 37 |
+
| **negative** | 1 | 1 | 14 |
|
| 38 |
+
|
| 39 |
+
## Worst 6 errors (most confident mistakes)
|
| 40 |
+
|
| 41 |
+
| conf | true → predicted | teacher conf | text |
|
| 42 |
+
|---|---|---|---|
|
| 43 |
+
| 0.95 | positive → negative | 0.95 | I'm obsessed with this moisturizer, my skin has never felt better. |
|
| 44 |
+
| 0.92 | neutral → negative | 0.75 | Pros: light, cheap. Cons: flimsy, loud. |
|
| 45 |
+
| 0.91 | negative → positive | 0.95 | 1 star is too generous |
|
| 46 |
+
| 0.91 | negative → neutral | 0.95 | Waited on hold for two hours to be told to call back tomorrow. |
|
| 47 |
+
| 0.53 | neutral → positive | 0.92 | This is my second order from this store. |
|
| 48 |
+
| 0.51 | neutral → negative | 0.92 | We took the train instead of driving. |
|
synthetic_manifest.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"baseline": "runs/sentiment/v1",
|
| 3 |
+
"baseline_sha256": "fe5d48bb3f9f751fa8ec1869257a48db3bd7c90d6ee40964646bd927c9f99c2c",
|
| 4 |
+
"seed": 20260928,
|
| 5 |
+
"added_per_label": {
|
| 6 |
+
"positive": 1000,
|
| 7 |
+
"neutral": 1000,
|
| 8 |
+
"negative": 1000
|
| 9 |
+
},
|
| 10 |
+
"before": {
|
| 11 |
+
"train": 238,
|
| 12 |
+
"test": 51,
|
| 13 |
+
"val": 51
|
| 14 |
+
},
|
| 15 |
+
"after": {
|
| 16 |
+
"train": 3238,
|
| 17 |
+
"test": 51,
|
| 18 |
+
"val": 51
|
| 19 |
+
},
|
| 20 |
+
"generator": "offline-templates-v1",
|
| 21 |
+
"holdout_max_cosine": 0.9,
|
| 22 |
+
"rejected": {},
|
| 23 |
+
"limitations": "Template variants are correlated. Labels are assigned by construction, not an independent teacher. Original synthetic validation/test are unchanged. Real-world generalization is unmeasured."
|
| 24 |
+
}
|