Views
No views yet
google/gemma-2-27b-it (frontier-panel, NORMAL regime)google/gemma-2-27b-it trunk. Configuration: mid_dim=128, K=4 (frontier-panel, NORMAL regime).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.
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from eu_halt import attach
4
5model = AutoModelForCausalLM.from_pretrained(
6 "google/gemma-2-27b-it", torch_dtype=torch.bfloat16,
7).to("cuda").eval()
8tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
9
10uncertainty = attach(
11 model,
12 heads_repo="debajyotidasgupta/eu-halt-gemma-2-27b-it",
13 mid_dim=128,
14)
15print(uncertainty("Who founded Quora in 2008?", tokenizer))
16# 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).| Signal | AUROC | 95% CI |
|---|---|---|
| disagreement | 0.8908 | [0.8644, 0.9158] |
| entropy | 0.6298 | [0.5982, 0.6661] |
| last_token_unc | 0.1200 | [0.0789, 0.1629] |
| mahalanobis | 0.7291 | [0.6262, 0.8281] |
| targ_margin | 0.1236 | [0.0815, 0.1679] |
| etc_trend | 0.6000 | [0.5611, 0.6363] |
| llm_check | 0.5006 | [0.4574, 0.5456] |
| mc_dropout | 0.5287 | [0.4927, 0.5674] |
| rauq | 0.1016 | [0.0832, 0.1222] |
| p_true | nan | [nan, nan] |
| semantic_entropy | nan | [nan, nan] |
| semantic_entropy_nli | nan | [nan, nan] |
| eigenscore | nan | [nan, nan] |
uncertainty.per_token(text, tokenizer).google/gemma-2-27b-it retains its own license (Qwen3 / Llama-3 / Phi / Gemma).1@inproceedings{dasgupta2026euhalt,
2 author = {Dasgupta, Debajyoti and Mondal, Arijit and Chakrabarti, Partha P.},
3 title = {When Uncertainty Lies: How Model Scale and Layer Geometry Quietly
4 Invert the Meaning of Internal Disagreement in Large Language Models},
5 booktitle = {1st Conference For AI Scientists (CAISc)},
6 year = {2026},
7 url = {https://huggingface.co/debajyotidasgupta/eu-halt-gemma-2-27b-it},
8}