Skip to content

Feat/calibration - #403

Merged
Ingvarstep merged 6 commits into
mainfrom
feat/calibration
Oct 31, 2026
Merged

Ingvarstep merged 6 commits into
mainfrom
feat/calibration

Conversation

@Ingvarstep

Copy link
Copy Markdown
Collaborator

GLiNER scores are poorly calibrated. On a held-out split of bio_post_ner, spans that gliner_small-v2.5 scores 0.8–0.9 are correct only 47% of the time. This PR adds three ways to fix that:

  1. Calibrated cross-entropy training loss. loss_type="ce" / "ce_calibrated".
  2. Post-hoc temperature / Platt scaling. Stored in the config and applied by every decoder.
  3. A calibration head, adapted from GLiClass. It predicts a temperature and bias for each (span, label) pair and is fitted with the backbone frozen.

@Ingvarstep
Ingvarstep merged commit 2dc5de2 into main Oct 31, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant