Downloads · 30 days
5
18% of all-time downloads
MrWoRmMrLabs/groundedness-judge-lfm2.5
groundedness-judge-lfm2.5 is a text generation model from MrWoRmMrLabs. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
A tiny, fully local groundedness auditor for AI agents. Given (1) the context an agent had available, (2) the user's question, and (3) the agent's response, it decides whether the response is grounded in that context…
Downloads · 30 days
5
18% of all-time downloads
All-time downloads
28
Public
Repo size
116 MB
Likes
1
Public
Click a slice to open those files.
.safetensors97.9 MB · 85%
From the Hugging Face model README
A tiny, fully local groundedness auditor for AI agents. Given (1) the context an agent had available, (2) the user's question, and (3) the agent's response, it decides whether the response is grounded in that context and returns a structured JSON verdict — flagging invented facts, missing citations, and avoidable gaps.
Built as a LoRA adapter on LiquidAI/LFM2.5-2.6B, so it runs on modest hardware (trained on a single Tesla P100; small enough to run on a phone at Q4).
Trained by MrWoRmMr.
Local agent stacks hallucinate, and shipping a cloud "judge" defeats the point of running locally. This is a small judge you can run next to your agents, offline, to catch groundedness failures.
The model returns a single JSON object:
| field | type | meaning |
|---|---|---|
used_context | bool | did the answer use the persistent context? |
used_rag | bool | did it use retrieved passages? |
invented_facts | bool | did it assert facts unsupported by the context? |
potentially_invented_facts | list[str] | the specific unsupported claims |
cited_sources | bool | did it cite a source? |
avoidable_gaps | list[str] | things it should have said (e.g. "I don't have that") |
severe_alert | bool | serious groundedness failure |
quality_score | int 0–5 | overall quality |
suggested_response | str | null | a grounded rewrite, when useful |
Anti-artifact guards (things that are not hallucinations): addressing the user by name, naming the system/ecosystem, naming a teammate agent, stable general knowledge, and arithmetic correctly derived from given numbers.
moe.py needs torch ≥ 2.5
(older torch fails infer_schema on string annotations). On a CUDA-12.2 driver, torch 2.5.1+cu121
is the sweet spot.bf16: false, fp16: true,
flash_attn: disabled. Plain fp16 LoRA fits a 2.6B in 16 GB; no 4-bit needed.The model reliably reaches the correct judgment, but on out-of-distribution inputs it tends to reason in prose instead of emitting clean JSON. Force structured output at inference:
format: jsonWith constrained decoding you get valid JSON every time; the fine-tune supplies the judgment, the grammar supplies the format.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("MrWoRmMrLabs/groundedness-judge-lfm2.5")
base = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-2.6B")
model = PeftModel.from_pretrained(base, "MrWoRmMrLabs/groundedness-judge-lfm2.5")
# messages = [{"role":"system","content": RUBRIC}, {"role":"user","content": AUDIT_CASE}]
(Prefer constrained JSON decoding — see Known limitation.)
LoRA weights under the LFM Open License v1.0 (inherited from the base model): free for organizations under $10M annual revenue; commercial licensing above that threshold.