Hallucination detection in local models has so far carried a hidden cost: neural-network-based methods consume VRAM and add latency. The standard academic approach, Semantic Entropy described in a Nature paper by an Oxford team, samples multiple responses at temperature 0.7 and passes them through a cross-encoder such as DeBERTa to cluster equivalent meanings. On consumer hardware, pairwise comparison hits GPU memory, slows throughput, and turns monitoring into a competing workload for inference. The Spanda project tried to remove the neural network entirely, relying on deterministic string normalization and Shannon entropy computed on CPU. The metric, available as a zero-dependency Python library, runs in 1.3 microseconds without touching the GPU.
Results on GSM8K and TriviaQA show a non-linear pattern. Small models like Qwen 1.5B are too inconsistent in formatting: even when they know the right answer, they write it differently on each run, and exact matching stalls at an AUROC around 0.58. On Mistral 7B the value rises to about 0.71, aligning with the DeBERTa neural model (0.706 versus 0.705). On Qwen 27B the AUROC reaches around 0.89 and exact matching becomes dominant: the result is statistically strong, with p = 1.89ร10^-28. In this range, when the model knows an answer it produces the same tokens across independent stochastic paths; when it does not, the answers diverge.
The breaking point comes with the 120B model. On factual questions not grounded in a knowledge base, AUROC collapses to 0.09. The team calls it Confident Mode Collapse: when the model is wrong, it produces the same incorrect answer across all five runs with zero entropy. Identical strings fool even a heavy neural judge. This overturns the assumption that a larger model is easier to monitor with low-cost methods: here the problem is not uncertainty but unanimous false certainty.
For those running local models on Ollama in production, the intermediate result between 7B and 27B shifts incentives. On structured tasks such as math, code, JSON extraction, SQL, and discrete answer questions, sampling five paths at T=0.7 and measuring exact-match entropy in Python gives a control at zero GPU cost. It frees VRAM for inference and reduces operational complexity, a critical point in self-hosted deployments where monitoring must not compete with the main workload. The collapse to 0.09 on frontier models, however, means a string-based strategy is blind precisely in the most dangerous case. A low-cost deterministic approach can produce a false sense of safety on open-ended tasks or unverified data.
The structural lesson is that hallucination detection cannot be a single uniform layer. It must be parameterized by model class and task type: string matching is effective for 7B to 27B models on structured activities, but insufficient for top-tier models on ungrounded knowledge. Winners are teams that adopt lightweight, differentiated controls, reducing TCO without sacrificing latency. Losers are organizations looking for a universal zero-cost metric for all models. For those evaluating on-premise deployment, there are trade-offs between VRAM savings and coverage of mode-collapse cases: AI-RADAR offers analytical frameworks on /llm-onpremise to assess these constraints.
๐ฌ Comments (0)
๐ Log in or register to comment on articles.
No comments yet. Be the first to comment!