DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to compare vLLM and SGLang on a shared-prefix workload with Time to First Token

Run one model on both engines to measure the TTFT gap on prefix-heavy traffic.

Short answer: pip install sglang; then Deploy SGLang with the same model, prompt, and hardware used for the vLLM service, so the engine is the only variable; run a workload with a shared system prompt against both engines. All steps.

Who it is forML engineer choosing a serving engine who needs evidence from a traffic pattern like their own.

The problemEngine performance claims depend on the workload, and the README points to prefix reuse as where RadixAttention helps.

The outcomeA side-by-side TTFT and throughput comparison of vLLM and SGLang with pinned versions.

What you need first

  • Python and command-line comfort
  • One rented GPU with about 24GB of memory for a 7-8B model, billed by the half hour
  • Docker for the Prometheus and Grafana stack
  • An H100 for the 1000-concurrent load test in week 5

Steps

  1. pip install sglang
  2. Deploy SGLang with the same model, prompt, and hardware used for the vLLM service, so the engine is the only variable.
  3. Run a workload with a shared system prompt against both engines.
  4. Record TTFT and throughput for each engine and note the versions used.

Prompt for your agent

Using the patchy631/time-to-first-token repo, run the same model with a shared system prompt on vLLM and on SGLang at <GPU host>. Expected output: a table of TTFT and throughput for each engine. Verify that both runs used the same model, prompt set, and hardware before comparing numbers.

Caveat. The README gives no benchmark numbers for this comparison, so results depend on your own model and hardware.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for patchy631/time-to-first-token and "Compare vLLM and SGLang on a shared-prefix workload"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer