Downloads · 30 days
12
13% of all-time downloads
debajyotidasgupta/eu-halt-phi-3.5-mini-instruct
eu-halt-phi-3.5-mini-instruct 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 microsoft/Phi-3.5-mini-instruct trunk. Configuration: middim=128, K=4 (default).
Downloads · 30 days
12
13% of all-time downloads
All-time downloads
90
Public
Parameters
18.1M
435 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt362 MB · 83%
From the Hugging Face model README
microsoft/Phi-3.5-mini-instruct (default)Lightweight epistemic-uncertainty detector: K=4 prediction heads sharing the frozen microsoft/Phi-3.5-mini-instruct trunk. Configuration: mid_dim=128, 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(
"microsoft/Phi-3.5-mini-instruct", torch_dtype=torch.bfloat16,
).to("cuda").eval()
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
uncertainty = attach(
model,
heads_repo="debajyotidasgupta/eu-halt-phi-3.5-mini-instruct",
mid_dim=128,
)
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.7420 | [0.7193, 0.7614] |
| entropy | 0.5382 | [0.5150, 0.5612] |
| last_token_unc | 0.4002 | [0.3691, 0.4337] |
| 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 microsoft/Phi-3.5-mini-instruct 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-phi-3.5-mini-instruct},
}