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');
sentiment (v2)
What feeling does the writer express about the thing they're talking about (a product, place, service or experience)?
A small classifier trained with nodd, exported as ONNX fp32 and int8 for browser and Node.js inference. This version uses a larger offline synthetic training dataset.
| Label | Meaning |
|---|---|
positive |
Happy, satisfied, grateful or recommends it. |
neutral |
Facts, questions, plans or mixed feelings with no clear lean. |
negative |
Unhappy, disappointed, angry or warns others away. Includes sarcastic praise. |
Evaluation
| Metric | Value |
|---|---|
| Test macro F1, PyTorch | 0.8808 |
| Test macro F1, int8 ONNX | 0.8802 |
| int8 vs PyTorch label agreement | 96.08% |
| int8 download | 24.31 MB |
| Train / validation / test | 3238 / 51 / 51 |
| Temperature | 1.549442 |
| Confidence threshold | 0.946760 |
| Validation precision at threshold | 100.00% |
| Test accuracy on covered inputs, PyTorch | 96.15% |
| Test coverage, PyTorch | 50.98% |
| Training seed | 42 |
See baseline comparison, evaluation report, and browser parity results.
Data and limitations
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.
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.
Use
Download this version and serve it from your own origin:
hf download nodd-repo/sentiment --revision v2 --local-dir public/models/sentiment/v2
npm install @nodd/browser
import { nodd } from "@nodd/browser";
const model = await nodd.load("/models/sentiment/v2");
const decision = await model.decide("Your input text");
if (!model.isConfident(decision)) { /* escalate for review */ }
model.dispose();
For Node.js, use @nodd/node and the downloaded directory path. Requires nodd JavaScript packages >= 0.2.0.
Artifacts
onnx/model_quantized.onnx,onnx/model.onnx: int8 and fp32 browser models.nodd.json, tokenizer files andconfig.json: browser runtime configuration.encoder/: original Transformers checkpoint, loadable withAutoModelForSequenceClassification.from_pretrained(local_path, subfolder="encoder").labeled.jsonl: exact training, validation and test records with split and provenance fields.synthetic_manifest.json: generation metadata and baseline fingerprint.model_card.json, reports and parity files: training, calibration and evaluation evidence.
Earlier releases remain available through their version tags. The generation script and cross-task results are in the source repository.
- Downloads last month
- 34
Model tree for nodd-repo/sentiment
Base model
nreimers/MiniLM-L6-H384-uncased