Instructions to use Manav2op/verdict-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Manav2op/verdict-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Manav2op/verdict-small") sentences = [ "query: Hi, we were billed twice for March. Please refund the duplicate today.", "passage: What does the user want? invoices, payments, refunds", "passage: What does the user want? bugs, outages, errors", "passage: What does the user want? pricing, new contracts" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers.js
How to use Manav2op/verdict-small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'Manav2op/verdict-small'); - Notebooks
- Google Colab
- Kaggle
verdict-small
Try it in the browser: https://huggingface.co/spaces/Manav2op/verdict · Colab: https://colab.research.google.com/github/Manavarya09/verdict/blob/main/examples/verdict_quickstart.ipynb
The default encoder of Verdict: small, fast, honest
decision models. multilingual-e5-small (118M) fine-tuned on a typed-decision mix of 14
public datasets (intent, NLI, ordinal reviews, safety) so that cosine(input, option) × 20
is a good logit over a question's options. Banking77, SST-5 and ToxicChat were never in
the mix; they are the held-out zero-shot numbers below.
pip install verdictml
from verdict import Verdict
v = Verdict() # loads this model
v.choose("Billed twice, refund or we cancel", ["billing", "technical", "sales"])
v.check("Can I talk to a person?", claim="the user asks for a human")
Also runs in the browser via transformers.js (onnx/model_quantized.onnx, int8, 118 MB):
const extractor = await pipeline("feature-extraction", "Manav2op/verdict-small", { dtype: "q8" });
Held-out zero-shot (full test sets)
| suite | base e5-small | verdict-small |
|---|---|---|
| Banking77 (3,076) accuracy | 0.594 | 0.556 |
| SST-5 (2,210) accuracy | 0.274 | 0.403 |
| ToxicChat (5,083) AUROC | 0.59 | 0.892 |
With 16 labels per class and the package's heads: Banking77 0.842, ToxicChat AUROC 0.939.
Every number reproduces with python -m bench.run in the repo; protocol and all rows in
docs/BENCHMARKS.md.
Training: python -m train.train (repo), 2,000 steps, batch 32, lr 2e-5, Apple M5.
Data mix and caps: train/data.py. Prefixes: query: for inputs, passage: for options.
- Downloads last month
- -
Model tree for Manav2op/verdict-small
Base model
intfloat/multilingual-e5-smallSpaces using Manav2op/verdict-small 2
Collection including Manav2op/verdict-small
Evaluation results
- accuracy (zero-shot) on Banking77test set self-reported0.556
- accuracy (16 labels/class on Banking77test set self-reported0.842
- accuracy on SST-5test set self-reported0.403
- AUROC (zero-shot) on ToxicChattest set self-reported0.892
- AUROC (16 labels/class) on ToxicChattest set self-reported0.939
- accuracy (verdict-typed-small) on typed-decisionstest set self-reported0.689