Scaling LLM-based prefill-only ranking systems with SGLang at LinkedIn
LinkedIn's LLM-based ranking workloads for AI Job Search and AI People Search faced high latency and low throughput because existing serving infrastructure was optimized for generative LLMs rather than prefill-only scoring, causing sequential tokenization, fragmented batch execution, unnecessary decode loops, and strict SLA pressure.
Multiple specific failure modes existed in the default SGLang serving path: batch boundaries were lost in ZMQ socket transmission causing fragmented GPU execution; the full decode and sampling loop ran unnecessarily for ranking; per-query prefix KV was recomputed for every candidate item; and Python GC stalls caused 100–300 ms pauses under sustained load.
Through staged optimizations to SGLang, text-based ranking throughput increased approximately 3x from 750 to 2,200 items/s/GPU and P99 latency for the scoring path dropped from 6220 ms to 454 ms (13.7x), with the system now powering AI Job Search and AI People Search for millions of LinkedIn members.
Show all 8 reported metrics
Frequently asked questions
What did this team achieve with this AI workflow?
Through staged optimizations to SGLang, text-based ranking throughput increased approximately 3x from 750 to 2,200 items/s/GPU and P99 latency for the scoring path dropped from 6220 ms to 454 ms (13.7x), with the syst…
What tools did this team use?
SGLang, ZMQ, gRPC, H100 GPUs.
What results were reported?
P99 latency — embedding model batch tokenization: 4583 ms to 464 ms; Average latency reduction from batch send: 41.5%; Average latency — batch send (absolute): 70.39 ms to 41.12 ms; P99 latency — scoring path optimization: 6220 ms to 454 ms (source-reported, not independently verified).
What failed first in this deployment?
Multiple specific failure modes existed in the default SGLang serving path: batch boundaries were lost in ZMQ socket transmission causing fragmented GPU execution; the full decode and sampling loop ran unnecessarily f…
How is this recruiting AI workflow structured?
Member query triggers ranking → Batch tokenization of prompts → Scoring-only prefill execution → In-batch prefix KV reuse → Ranked results returned.