Latest in AI
Hugging Face TEI 1.10: Fix Multi-Label Thresholds Before Upgrading
How to check sigmoid scores against old classifier thresholds and keep Prometheus scraping the upgraded TEI instance.
Hugging Face's Text Embeddings Inference 1.10.0 release changes what a classification score means for models configured to return more than one label. If you route support tickets using a threshold, the API can keep returning valid JSON while the routing policy changes under it.
The important distinction is whether the labels compete. A ticket saying "I was charged twice and I cannot log in" may belong to both billing and account access. An integration that treats those scores like slices of a single pie can lose the second signal.
Check the served model, not the endpoint name
This change applies to models whose configuration declares problem_type: multi_label_classification. Read the configuration from the pinned model revision you actually deploy. Do not infer the problem type from the number of labels or assume every use of TEI's prediction endpoint is affected.
For these models, raw_scores: false now yields a sigmoid score independently for each label. The scores are not required to add up to one. Request raw_scores: true to get the raw logits when your own code needs to interpret them. A score of 0.8 is also not proof that the model is right 80% of the time. That takes calibration on your data.
Replay tickets where the policy matters
Freeze the model revision and start a staging server for each TEI version. Use the same inputs and model artifacts. Include clear single-label examples, mixed-intent tickets, a few inputs that should trigger nothing, and historical examples sitting near your deployed threshold. Use synthetic or appropriately approved tickets.
Capture the pieces that affect the decision: the label-to-score map, output labels after your threshold, and where the ticket would route. Keep downstream sends disabled. Compare bucket counts but inspect individual moves as well. A stable total can hide a similar number of tickets moving in opposite directions.
For an illustration, imagine two raw logits of 2 and 1.5. Independent sigmoid scores are roughly 0.88 and 0.82, so both clear a 0.8 threshold. The numbers are an illustration of the function, not measured TEI output. If billing and account access are mutually exclusive in your destination, decide explicitly who receives a mixed ticket instead of relying on a score normalization to choose.
Pick one place to interpret scores
If clients should use TEI's scores, re-evaluate each label's decision threshold with labeled examples. Track precision and missed cases by label. A generic 0.5 or 0.8 can do uneven work if billing vocabulary is easy and account-access vocabulary is ambiguous.
If your application already owns the activation or calibration, ask for logits explicitly and apply the existing mapping once. Compare raw values on a fixed sample before treating both environments as equivalent. A second sigmoid over an already transformed score makes yesterday's thresholds even harder to interpret.
Verify your metrics target separately
The release also changes the HTTP server when PROMETHEUS_PORT or --prometheus-port names a different port from the API. Metrics are available only on that configured port. The default HTTP shared endpoint and gRPC's port 9000 stay as documented in the release notes.
An inference health check can still be green when Prometheus is scraping the wrong port. In staging, make a synthetic prediction, confirm the scrape target is up, and check that the appropriate request metric actually moves. Keep the metrics listener on your intended internal network rather than opening it broadly.
Before rollout, verify the new threshold decisions and the Prometheus target. If either fails, keep the prior image deployed while you fix the threshold or monitoring configuration.
I help technical teams explain how their AI products work. Book a 30-minute call.