From Generation to Scoring: Scaling LLM-Based Semantic Labeling at LinkedIn
Organizations: LinkedIn.
Abstract
For efficiency, industrial large language model (LLM) labelers often pack many candidate labels into one prompt and generate a YES/NO answer for each, even when each decision depends only on the entity and one candidate. Generating these independent decisions as one answer list couples them, spends decoding on the list, and relies on the list being well-formed. In this paper, we present an end-to-end recipe that reformulates the labeler as semantic scoring, fine-tuning it on single-candidate prompts to return each decision as one answer-token score from a prefill-only pass. We also adapt Multiple-Item Scoring (MIS) to score hundreds of candidates in one sequence with attention masked between them. Deployed for profile qualification labeling at LinkedIn, semantic scoring changes at most 0.01% of decisions when candidates are reordered and matches the agreement with reference labels that packed generation reaches only with about 4.7x as many training pairs. The MIS-based stack raises throughput over the deployed stack by 1.24x offline and 1.9x in model serving under a one-second p99 latency target. For offline batch inference, we implement MIS-based scoring as a reusable, model-agnostic Ray Data API proposed for upstream adoption. Model serving uses MIS support contributed to SGLang.
Figures & tables
| Stage | Change | Check before the next stage |
|---|---|---|
| Prompt (§ 3.1 ) | One decision per prompt, shared text in | Single-token answers, split tokens match |
| Training (§ 3.2 ) | Reference label per item, label-only loss | Held-out quality on the served prompt |
| Readout (§ 3.3 ) | Score from yes / no logits, tuned threshold | Held-out FP/FN against references at chosen |
| Inference (§ 4 ) | MIS scores a round in one request | Matches single-item scores, fits limits |
| Integration (§ 5 ) | Only the labeler changes, on both paths | Same checkpoint, answer tokens, and on all paths |
| Packed gen. | Independent | + prefix cache | MIS | |
| Requests | ||||
| Query prefill | to | |||
| Decoded tokens | ||||
| Cross-item attn. | yes | no | no | no |
| Output | text | score | score | score |
| Method | Offline | Profile updates |
|---|---|---|
| Packed generation ( ) | 5.1K (1.0 ) | 2.5K (1.0 ) |
| MIS ( ) | 6.3K (1.24 ) | 4.8K (1.9 ) |
Efficient Language Model Inference
Efficient language model inference reduces the compute, memory, latency, and energy needed to generate useful outputs.
See all 318 papers