Instructions to use Tamarillo/groundedness-guard-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/groundedness-guard-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tamarillo/groundedness-guard-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/groundedness-guard-base") model = AutoModelForTokenClassification.from_pretrained("Tamarillo/groundedness-guard-base", device_map="auto") - Transformers.js
How to use Tamarillo/groundedness-guard-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/groundedness-guard-base'); - Notebooks
- Google Colab
- Kaggle
Tamarillo/groundedness-guard-base
Zero-trust_remote_code, Apache-2.0 token-span RAG & AI-agent groundedness / hallucination detector built on jhu-clsp/mmBERT-base (307.5M parameters, trained up to 3,584 tokens and evaluated up to 4,096 tokens on an 8K backbone, parity-verified ONNX).
Outputs both exact token/span-level hallucination localization (0: supported, 1: hallucinated β 1-line drop-in compatible with KRLabsOrg/lettucedect-v2-mmbert-base) and calibrated document/claim-level groundedness scores (1 - sigmoid(Top-6 LME) or 1 - max P(hallucinated)).
- Model Family:
Tamarillo/groundedness-guard-tiny-en(32.0M, EN) Β·Tamarillo/groundedness-guard-small(140.6M, 14 langs) Β·Tamarillo/groundedness-guard-base(307.5M, 14 langs) - Interactive Demo Space:
Tamarillo/groundedness-guard-demo(in-browser ONNX token-span highlighter)
Why This Model Exists
Production RAG observability stacks (RAGAS, DeepEval, LangChain, LlamaIndex, Arize Phoenix, TruLens) and agent tool-output verifiers face three recurring friction points:
vectara/hallucination_evaluation_model(HHEM-2.1-Open) requirestrust_remote_code=True, ships no ONNX exports, is English-only, and cannot localize which span in a multi-sentence response is hallucinated.KRLabsOrg/lettucedect-v2-mmbert-baseships no ONNX exports and no smaller 32M/141M tiers for CPU/edge deployments.- Standard
[CLS]sequence classifiers dilute single-span hallucinations inside multi-sentence RAG responses and JSON tool-output summaries.
Tamarillo/groundedness-guard-base solves all three via standard Hugging Face ModernBertForTokenClassification (trust_remote_code=False):
- Backbone:
jhu-clsp/mmBERT-base(307.5Mparams,id2label = {0: "supported", 1: "hallucinated"}) - Language Coverage: 14 languages trained & evaluated (
en, ar, ca, cs, de, es, eu, fa, fi, fr, hi, it, sv, zhons-nlp/PsiloQA); highest accuracy in the Tamarillo family - Headline Highlights (Top-6 LME): 3-Suite Strictly OOD EN Mean
0.832AUC (RAGTruth0.781,SummEval0.798,FRANK0.916);PsiloQA(ID) EN0.976/ 13-Lang Non-EN0.842(EN Char Span F10.538/ 14-Lang Overall0.387); 250β3,200-tok depth retention+0.002AUC; CPU ONNX FP3253.7 ms@ 64 tok /406.6 ms@ 512 tok /3323.6 ms@ 2,048 tok (1173.7 MB).
Quickstart
1. PyTorch / Transformers β Groundedness Score + Exact Hallucinated Spans (Zero trust_remote_code)
Note: Hugging Face's default pipeline("token-classification") accepts single strings only; use the (context, response) pair helper below.
pip install "transformers>=4.48.0" torch
import math
import torch
from transformers import AutoTokenizer, AutoModelForTokenClassification
repo = "Tamarillo/groundedness-guard-base"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForTokenClassification.from_pretrained(repo).eval() # trust_remote_code=False!
def verify_groundedness(context: str, response: str, threshold: float = 0.5, max_length: int = 3584):
"""Returns calibrated P(consistent) via Top-6 LME + exact hallucinated character spans."""
try:
enc = tokenizer(
context, response,
truncation="only_first", max_length=max_length,
return_token_type_ids=False, return_offsets_mapping=True, return_tensors="pt",
)
except Exception:
enc = tokenizer(
context, response,
truncation="longest_first", max_length=max_length,
return_token_type_ids=False, return_offsets_mapping=True, return_tensors="pt",
)
offsets = enc.pop("offset_mapping")[0].tolist()
seq_ids = enc.sequence_ids(0)
with torch.no_grad():
logits = model(**enc).logits[0].float() # [seq_len, 2]: 0=supported, 1=hallucinated
z_hal = logits[:, 1] - logits[:, 0]
p_hal = torch.sigmoid(z_hal)
hyp_idxs = [i for i, sid in enumerate(seq_ids) if sid == 1 and offsets[i][1] > offsets[i][0]]
if not hyp_idxs:
return {"consistent_score": 1.0, "hallucinated_spans": []}
# Top-6 Log-Mean-Exp (beta=2.0) bag score β robust against single-token noise
top_z = torch.topk(z_hal[hyp_idxs], k=min(6, len(hyp_idxs))).values
lme = (torch.logsumexp(2.0 * top_z, dim=0) - math.log(len(top_z))) / 2.0
p_consistent = float(1.0 - torch.sigmoid(lme))
# Merge contiguous hallucinated tokens into character spans
spans = []
for i in hyp_idxs:
prob = float(p_hal[i])
if prob >= threshold:
s, e = offsets[i]
if spans and s <= spans[-1]["end"] + 1:
spans[-1]["end"] = e
spans[-1]["text"] = response[spans[-1]["start"]:e]
spans[-1]["max_prob"] = round(max(spans[-1]["max_prob"], prob), 4)
else:
spans.append({"start": s, "end": e, "text": response[s:e], "max_prob": round(prob, 4)})
return {"consistent_score": round(p_consistent, 4), "hallucinated_spans": spans}
ctx = "Q3 Financial Summary: Operating revenue rose 8% YoY to $4.2 million. The policy explicitly excludes flood damage."
resp = "Q3 operating revenue reached $4.8 million and the policy covers flood damage automatically."
print(verify_groundedness(ctx, resp))
# Example output:
# {'consistent_score': 0.0412, 'hallucinated_spans': [{'start': 29, 'end': 41, 'text': '$4.8 million', 'max_prob': 0.9614}, {'start': 57, 'end': 90, 'text': 'covers flood damage automatically', 'max_prob': 0.9528}]}
2. CPU-Only ONNX Runtime (onnxruntime, Zero PyTorch Required)
pip install onnxruntime transformers huggingface_hub numpy
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer
repo = "Tamarillo/groundedness-guard-base"
tokenizer = AutoTokenizer.from_pretrained(repo)
# Tip: `onnx/model.onnx` (FP32) is fastest on CPU; `onnx/model_fp16.onnx` cuts download size by 50% for GPU/WASM.
onnx_path = hf_hub_download(repo, "onnx/model.onnx")
sess = ort.InferenceSession(onnx_path, providers=["CPUExecutionProvider"])
try:
enc = tokenizer(
["Q3 revenue rose 8% YoY to $4.2 million."],
["Q3 revenue reached $6.5 million."],
padding=True, truncation="only_first", max_length=3584,
return_token_type_ids=False, return_tensors="np",
)
except Exception:
enc = tokenizer(
["Q3 revenue rose 8% YoY to $4.2 million."],
["Q3 revenue reached $6.5 million."],
padding=True, truncation="longest_first", max_length=3584,
return_token_type_ids=False, return_tensors="np",
)
logits = sess.run(["logits"], {
"input_ids": enc["input_ids"].astype(np.int64),
"attention_mask": enc["attention_mask"].astype(np.int64),
})[0][0].astype(np.float32)
hyp_idxs = [i for i, sid in enumerate(enc.sequence_ids(0)) if sid == 1]
if not hyp_idxs:
print({"consistent_score": 1.0, "peak_token_hal_prob": 0.0})
else:
z_hal = logits[hyp_idxs, 1] - logits[hyp_idxs, 0]
top_z = np.sort(z_hal)[::-1][:6]
mx = float(np.max(2.0 * top_z))
lme = (mx + float(np.log(np.mean(np.exp(2.0 * top_z - mx))))) / 2.0
p_consistent = 1.0 - float(1.0 / (1.0 + np.exp(-lme)))
print({"consistent_score": round(p_consistent, 4), "peak_token_hal_prob": round(float(1.0 / (1.0 + np.exp(-z_hal.max()))), 4)})
# Example output: {'consistent_score': 0.0485, 'peak_token_hal_prob': 0.9712}
Benchmark Comparisons
All 8 models were evaluated on the same NVIDIA A100-80GB GPU (BF16 for ModernBERT/mmBERT/Ettin encoders, FP32 for DeBERTa-v3 which truncates at its native 512-token cap, bs=1 p50 latency, fixed 0.50 probability threshold for F1) with bit-for-bit identical deterministic test splits (eval_results.json bundled in this repository). Each model is evaluated with its native pooling method: Top-6 LME for Tamarillo Token-Span MIL models and native max_pool (1 - max_t P(hal_t)) for KRLabsOrg/lettucedect-v2-mmbert-base (both pooling modes for all token classifiers are bundled side-by-side in eval_results.json).
Tamarillo/groundedness-guard-base (307.5M, 14 languages) achieves 0.832 3-suite strictly OOD EN mean ROC-AUC (0.781 RAGTruth, 0.798 SummEval / 0.530 Hal F1, 0.916 FRANK / 0.862 Hal F1 β within 0.006β0.007 of English-specialized Horizon-Labs 0.838 and Vectara 0.839 while running 1.92Γ faster than Vectara @ 2K tokens with zero trust_remote_code and 1.0000-parity ONNX) plus +0.002 zero-decay long-context retention from 250β3,200 tok.
1. Out-of-Distribution (OOD) English Suites (RAGTruth, SummEval, FRANK)
None of RAGTruth_test, SummEval, FRANK, or FinQA-hallucination-detection appeared in Tamarillo's training or validation splits (enforced via normalized MD5 deduplication on both pairs and claims). KRLabsOrg/lettucedect-v2-mmbert-base was trained on RAGTruth train and is explicitly tagged *(ID)* on RAGTruth. Note on GPU bs=1 latency: mmBERT-small and mmBERT-base share the same 22-layer depth (384 vs 768 hidden width), so single-item A100 kernel-launch latency is nearly identical (~30β34 ms), whereas small is ~2Γ faster on CPU/ONNX (28.2 ms vs 53.7 ms @ 64 tok) and 2.2Γ smaller. All tested encoders score near-random (0.40β0.49 AUC) on FinQA; full FinQA and per-split RAGTruth (qa / summarization / data2txt) metrics are bundled in eval_results.json.
| Model | Params | Pooling / Arch | RAGTruth Test (AUC / Hal F1) |
SummEval (AUC / Hal F1) |
FRANK (AUC / Hal F1) |
3-Suite EN OOD Mean AUC | A100 Latency bs=1 (512 / 2,048 tok) |
|---|---|---|---|---|---|---|---|
| Tamarillo/groundedness-guard-tiny-en | 32.0M | Token-Span MIL (Top-6 LME) | 0.715 / 0.592 | 0.512 / 0.292 | 0.649 / 0.657 | 0.626 | 14.2 ms / 28.2 ms |
| Tamarillo/groundedness-guard-small | 140.6M | Token-Span MIL (Top-6 LME) | 0.746 / 0.608 | 0.684 / 0.363 | 0.814 / 0.777 | 0.748 | 30.7 ms / 34.5 ms |
| Tamarillo/groundedness-guard-base | 307.5M | Token-Span MIL (Top-6 LME) | 0.781 / 0.640 | 0.798 / 0.530 | 0.916 / 0.862 | 0.832 | 29.2 ms / 33.6 ms |
vectara/hallucination_evaluation_model |
109.6M | T5 SeqCls (TRC=True) | 0.832 / 0.578 | 0.773 / 0.386 | 0.911 / 0.835 | 0.839 | 19.1 ms / 64.3 ms |
Horizon-Labs/hallucination-guard-base |
307.5M | SeqCls (8K) | 0.876 / 0.728 | 0.696 / 0.370 | 0.940 / 0.870 | 0.838 | 29.4 ms / 33.6 ms |
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli |
184.4M | 3-Class NLI (512 cap) | 0.569 / 0.312 | 0.668 / 0.372 | 0.863 / 0.787 | 0.700 | 25.8 ms / 25.8 ms |
KRLabsOrg/lettucedect-v2-mmbert-base |
307.5M | Token-Span (native max-pool) | 0.825 / 0.681 (ID) | 0.792 / 0.426 | 0.906 / 0.797 | 0.841 (1 ID) | 28.4 ms / 32.7 ms |
Tamarillo/zeroshot-policy-guard-base |
307.5M | General NLI (4K) | 0.625 / 0.411 | 0.743 / 0.346 | 0.959 / 0.882 | 0.776 | 30.0 ms / 38.7 ms |
2. 14-Language PsiloQA Test (ID for Tamarillo; OOD for Baselines) & 4-Depth Long-Context Stability
- ID / OOD Symmetry:
s-nlp/PsiloQA(train split) is part of Tamarillo's Stage 2 training data, soPsiloQAtest is in-distribution (ID) for Tamarillo (small/baseacross all 14 languages;tiny-enon EN only) and OOD for all 5 public baselines. Do not compare IDPsiloQAscores against OOD baselines as an OOD generalization claim. - Class Prevalence & Metric Choice:
PsiloQAtest is heavily skewed toward hallucinated spans (~95.5%hallucinated in EN,~86.5%in 13-lang Non-EN), where fixed-thresholdHal F1alone looks artificially high even at near-random AUC (0.908Hal F1 at0.562AUC). Table 2 therefore reports ROC-AUC / Macro-F1 (0.5 * (hal_f1 + cons_f1)), with full per-class F1 & FPR ineval_results.json. - 4-Depth LC Needle Seed Provenance & Depth Retention: The 120 balanced English claims (
60consistent +60hallucinated) embedded inside multi-chunk distractor RAG haystacks (~250to~3,200tokens) are drawn from41consistent +60hallucinateds-nlp/PsiloQAEN test rows supplemented by19strictly OOD consistentflowaicom/RAGTruth_testrows (exact same 120 claims across all 4 depths). Because19/60consistent claims come fromRAGTruth_testwhile60/60hallucinated claims come fromPsiloQA, source-domain cues can partially lift absolute AUC; the primary metric below is therefore Depth Retention (LC 3.2K β LC 250), measuring degradation as distractor context grows 13Γ.
| Model | Params | PsiloQA Status |
PsiloQA EN (AUC / Macro-F1) |
PsiloQA Non-EN (AUC / Macro-F1) |
LC 250 | LC 800 | LC 1.6K | LC 3.2K | Depth Ξ (3.2Kβ250) |
|---|---|---|---|---|---|---|---|---|---|
| Tamarillo/groundedness-guard-tiny-en | 32.0M | EN-ID / Non-EN OOD | 0.964 / 0.748 | 0.698 / 0.613 | 0.934 | 0.923 | 0.911 | 0.900 | -0.034 |
| Tamarillo/groundedness-guard-small | 140.6M | ID (14-lang) | 0.974 / 0.758 | 0.845 / 0.673 | 0.937 | 0.939 | 0.934 | 0.929 | -0.008 |
| Tamarillo/groundedness-guard-base | 307.5M | ID (14-lang) | 0.976 / 0.758 | 0.842 / 0.692 | 0.957 | 0.955 | 0.952 | 0.959 | +0.002 |
vectara/hallucination_evaluation_model |
109.6M | OOD | 0.949 / 0.731 | 0.562 / 0.580 | 0.888 | 0.893 | 0.885 | 0.883 | -0.005 |
Horizon-Labs/hallucination-guard-base |
307.5M | OOD | 0.927 / 0.789 | 0.713 / 0.624 | 0.911 | 0.922 | 0.922 | 0.934 | +0.023 |
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli |
184.4M | OOD | 0.910 / 0.602 | 0.698 / 0.609 | 0.880 | 0.814 | 0.561 | 0.524 | -0.356 |
KRLabsOrg/lettucedect-v2-mmbert-base |
307.5M | OOD | 0.829 / 0.785 | 0.801 / 0.576 | 0.928 | 0.923 | 0.907 | 0.876 | -0.052 |
Tamarillo/zeroshot-policy-guard-base |
307.5M | OOD | 0.952 / 0.712 | 0.695 / 0.630 | 0.908 | 0.862 | 0.816 | 0.829 | -0.079 |
3. Character/Span-Level Hallucination Localization (s-nlp/PsiloQA Gold Character Spans)
Exact character-level span localization at fixed token probability threshold 0.50 across all 1,795 PsiloQA test examples (up to 200/lang across 14 languages; note that PsiloQA is ID for Tamarillo small/base, EN-ID for tiny-en, and OOD for LettuceDetect v2). Note on tiny-en Non-EN F1 (0.461 vs 0.315/0.331 for small/base): because PsiloQA Non-EN is 86.5% hallucinated, English-only tiny-en over-predicts hallucination on unfamiliar non-English scripts (45.7% char recall at low 46.6% char precision and 78.1% doc FPR), inflating raw F1 compared to the much higher-precision (62β63%) 14-language small/base models.
| Token-Span Model | PsiloQA Status |
EN Char (Prec / Rec) | EN Span (Char F1 / IoU) | 13-Lang Non-EN Span (Char F1 / IoU) | Overall Char (Prec / Rec) | Overall Char F1 |
|---|---|---|---|---|---|---|
| Tamarillo/groundedness-guard-tiny-en (32.0M) | EN-ID / Non-EN OOD | 0.685 / 0.472 | 0.559 / 0.388 | 0.461 / 0.300 | 0.506 / 0.461 | 0.482 |
| Tamarillo/groundedness-guard-small (140.6M) | ID (14-lang) | 0.685 / 0.456 | 0.547 / 0.377 | 0.315 / 0.187 | 0.652 / 0.269 | 0.381 |
| Tamarillo/groundedness-guard-base (307.5M) | ID (14-lang) | 0.723 / 0.428 | 0.538 / 0.368 | 0.331 / 0.198 | 0.655 / 0.274 | 0.387 |
KRLabsOrg/lettucedect-v2-mmbert-base (307.5M) |
OOD | 0.760 / 0.726 | 0.742 / 0.590 | 0.415 / 0.262 | 0.727 / 0.398 | 0.514 |
ONNX Exports, Parity Gates & Multi-Length CPU Latency
Every ONNX export is gated against PyTorch FP32 on both short (β€256 tok) and long (2,048 tok) pairs across both token-level and bag-level predictions (agreement >= 0.995 and strict max delta thresholds: <= 0.001 FP32, <= 0.02 FP16, <= 0.05 INT8). CPU timings use onnxruntime CPUExecutionProvider (bs=1, 4 intra-op threads) on a GCP a2-highgpu-1g Intel Xeon Cascade Lake vCPU (2.20 GHz, AVX-512).
| Exported Artifact | File Size | Short Parity (Agree / Ξmax) | 2,048-Tok Parity (Agree / Ξmax) | CPU 4-Th @ 64 tok | CPU 4-Th @ 512 tok | CPU 4-Th @ 1,024 tok | CPU 4-Th @ 2,048 tok |
|---|---|---|---|---|---|---|---|
FP32 (onnx/model.onnx) |
1173.7 MB | 1.0000 (Ξβ€0.0000) | 1.0000 (Ξβ€0.0000) | 53.7 ms | 406.6 ms | 1111.0 ms | 3323.6 ms |
FP16 (onnx/model_fp16.onnx) |
587.0 MB | 1.0000 (Ξβ€0.0007) | 1.0000 (Ξβ€0.0011) | 62.3 ms | 469.1 ms | 1376.8 ms | 4298.9 ms |
Excluded precision exports (parity gate):
- INT8 dynamic quantization: withheld β failed our strict token + bag parity gate (
agreement >= 0.995and max delta limit on short & 2,048-token inputs; observed short bag agree=0.875, Ξmax=0.21539; 2,048-tok bag agree=0.875, Ξmax=0.61968).
Training Recipe, Data Provenance & Reproducibility
- Base Model:
jhu-clsp/mmBERT-base(canonical foundation checkpoint) - Architecture & Training Pipeline: Standard
ModernBertForTokenClassification(0: supported,1: hallucinated) trained via a 2-Stage Curriculum onjhu-clsp/mmBERT-base: Stage 1 trains on 112K clean semantic NLI pairs (MoritzLaurer/synthetic_zeroshot_mixtral_v0.1[Apache-2.0],alisawuffles/WANLI[CC-BY-4.0], permissive OANC genres ofnyu-mll/multi_nli); Stage 2 trains on 125K length-debiased multilingual groundedness pairs (McGill-NLP/FaithDial[MIT],lytang/C2D-and-D2C-MiniCheck[MIT],Salesforce/summedits[CC-BY-4.0],s-nlp/PsiloQA14 langs [CC-BY-4.0], minimal-edit counterfactuals, length-matched multi-passage paragraphs, and same-haystack long-context RAG pairs up to 3,584 tokens) with Hybrid Exact-Span BCE + Top-6 Log-Mean-Exp MIL + Max-Pool Calibration + Same-Document Contrastive Bag Ranking + EMA (decay=0.996). - Upstream Synthetic Provenance Note: While
Mixtral-NLI,MiniCheck, andSalesforce/summeditsare published under permissive repository licenses (Apache-2.0/MIT/CC-BY-4.0), they include synthetic pairs originally generated or edited using LLMs; users with strict model-lineage compliance requirements should verify upstream terms for their jurisdiction. - Validation Selection: Best checkpoint selected strictly on validation composite (
selection_score = 0.8469, val ROC-AUCmax=0.8827/LME=0.8864, weights=ema; test sets were never used for checkpoint selection).
Bundled reproducible scripts in this repository:
scripts/schema.pyscripts/data_builder_tok.pyscripts/train_tok.pyscripts/train_distill_tok.pyscripts/export_onnx_tok.pyscripts/eval_suite.pyscripts/eval_span_f1.pyeval_results.jsononnx_benchmark.jsontraining_summary.json
Gather-INT8 Quantized ONNX (onnx/model_quantized.onnx β 611.36 MB, 1.92x smaller)
- Verified Parity (
onnx/quantization_check.json):100.0%prediction agreement vs. FP32 ONNX (mean abs probability diff0.00103, max0.01668;165.95 ms4-thread CPU p50 @ 256 tokens). - Browser WASM / Node.js (
@huggingface/transformersv3): pass{ dtype: "q8" }to loadonnx/model_quantized.onnxautomatically.
Limitations & Candid Comparison
- Multi-step numerical & tabular arithmetic (
FinQA): Compact bi-directional encoders do not execute symbolic arithmetic; subtle multi-step calculation errors in dense financial tables (0.40β0.49AUC across all tested encoders) require tool/code verification rather than an encoder alone. - Where public baselines win: On the strictly English 3-suite OOD mean (Table 1),
Tamarillo/groundedness-guard-basescores0.832compared to English-specializedvectara/hallucination_evaluation_model(0.839, requirestrust_remote_code=True, no ONNX, 1.92Γ slower @ 2K),Horizon-Labs/hallucination-guard-base(0.838, leads onRAGTruth0.876andFRANK0.940), and RAGTruth-trainedKRLabsOrg/lettucedect-v2-mmbert-base(0.841(1 ID),0.825onRAGTruth(ID)). Inspecteval_results.jsonper-split (qa / summarization / data2txt) to choose the best model for your traffic. - Long-context CPU latency of
base(307.5M): Multi-chunk 1,024β2,048 token verification on 4-thread CPU scales quadratically (1.1 sβ3.3 s); CPU-only microservices should preferTamarillo/groundedness-guard-tiny-en(9.0 ms@ 64 tok /70.5 ms@ 512 tok) orsmall(or chunk-level verification) and reservebasefor GPU inference (29β34 msA100 @ 512β2,048 tok). - Multilingual OOD evaluation gap: All 13 non-English languages are evaluated only in-distribution on
s-nlp/PsiloQAtest (with aggregate Non-EN metrics reported in Table 2 rather than per-language breakdowns or an external OOD multilingual groundedness benchmark). - Span recall trade-off vs.
KRLabsOrg/lettucedect-v2-mmbert-base: Because Tamarillo combines exact-span BCE with Top-6 LME MIL and max-pool bag calibration, it concentrates token probability tightly on core offending tokens (high EN precision0.69β0.72, lower full-span recall0.43β0.47atthreshold=0.50). Consequently,KRLabsOrg/lettucedect-v2-mmbert-baseachieves higher full-span character F1 (0.514overall /0.742EN vs.0.387/0.538forbase,0.381/0.547forsmall, and0.482/0.559fortiny-enonPsiloQAgold spans, even thoughPsiloQAis ID for Tamarillo and OOD forLettuceDetect v2). PreferTamarillofor document/claim groundedness scoring, long-context stability, ONNX/edge deployment, and concise core-error highlighting; preferLettuceDetect v2(or lower Tamarillo's span threshold to0.25β0.35) when exhaustive full-span character recall is the primary objective. Note also thatflowaicom/RAGTruth_testprovides only document-level labels, so Table 3 evaluates gold spans ons-nlp/PsiloQAtest.
License
Weights, ONNX exports, and training/evaluation scripts are released under the Apache-2.0 license.
- Downloads last month
- 19
Model tree for Tamarillo/groundedness-guard-base
Base model
jhu-clsp/mmBERT-base
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/groundedness-guard-base');