Downloads · 30 days
3
4% of all-time downloads
debajyotidasgupta/eu-halt-gemma-2-2b
eu-halt-gemma-2-2b is a feature extraction model from debajyotidasgupta. Use it when you need embeddings to search or compare text. It is set up for pytorch. The card lists the license as apache-2.0.
Lightweight epistemic-uncertainty detector: K=4 prediction heads sharing the frozen google/gemma-2-2b trunk. Configuration: middim=96, K=4 (default).
Downloads · 30 days
3
4% of all-time downloads
All-time downloads
77
Public
Parameters
100M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2 GB · 83%
From the Hugging Face model README
google/gemma-2-2b (default)Lightweight epistemic-uncertainty detector: K=4 prediction heads sharing the frozen google/gemma-2-2b trunk. Configuration: mid_dim=96, K=4 (default).
Calibrate the sign before deploying. The direction of the disagreement signal is trunk-family-specific: on some families it rises on out-of-distribution input, on others (Llama-70B-class, gpt-oss-120B) it falls. Score ~50 known-ID and ~50 known-OOD prompts once and check which direction separates. Details: the paper and repo below.
Paper: When Uncertainty Lies (CAISc 2026, oral) · Code: github.com/debajyotidasgupta/eu-halt
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from eu_halt import attach
model = AutoModelForCausalLM.from_pretrained(
"google/gemma-2-2b", torch_dtype=torch.bfloat16,
).to("cuda").eval()
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b")
uncertainty = attach(
model,
heads_repo="debajyotidasgupta/eu-halt-gemma-2-2b",
mid_dim=96,
)
print(uncertainty("Who founded Quora in 2008?", tokenizer))
# Higher = more uncertain.
model.safetensors — the K=4 head weights (preferred format; config embedded as metadata).config.json — head geometry: num_heads, mid_dim, source_layers, base_model, dims.heads_final.pt — the original torch checkpoint (kept for backward compatibility).heads_step{500,1000,1500,2000,2500}.pt — intermediate checkpoints (where uploaded).source_layers.json — the K=4 trunk-layer indices the heads read from.history.json — per-step loss + disagreement + GPU stats.HuggingFaceFW/fineweb-edu (streaming).quiet variants).OOD AUROC (id vs ood), 2164 samples total:
| Signal | AUROC | 95% CI |
|---|---|---|
| disagreement | 0.9265 | [0.9147, 0.9372] |
| entropy | 0.5883 | [0.5672, 0.6117] |
| last_token_unc | 0.2761 | [0.2466, 0.3058] |
| mahalanobis | 1.0000 | [1.0000, 1.0000] |
| p_true | nan | [nan, nan] |
| semantic_entropy | nan | [nan, nan] |
Best signal: mahalanobis
uncertainty.per_token(text, tokenizer).Apache-2.0 for the heads.
The trunk model google/gemma-2-2b retains its own license (Qwen3 / Llama-3 / Phi / Gemma).
@inproceedings{dasgupta2026euhalt,
author = {Dasgupta, Debajyoti and Mondal, Arijit and Chakrabarti, Partha P.},
title = {When Uncertainty Lies: How Model Scale and Layer Geometry Quietly
Invert the Meaning of Internal Disagreement in Large Language Models},
booktitle = {1st Conference For AI Scientists (CAISc)},
year = {2026},
url = {https://huggingface.co/debajyotidasgupta/eu-halt-gemma-2-2b},
}