n4nAI

Qwen 2.5 72B speed benchmark across inference gateways

A practical analysis of Qwen 2.5 72B speed benchmark results across inference gateways, covering TTFT, throughput, quantization, and how to measure it.

n4n Team5 min read1,063 words

Audio narration

Coming soon — every post will get a voice note here.

The Qwen 2.5 72B speed benchmark is not a single number you can paste into a spreadsheet and forget. Every inference gateway that serves this 72-billion-parameter open-weight model makes different tradeoffs in tensor parallelism, batching strategy, and quantization, so the same model card produces wildly different latency profiles depending on where you call it. If you are building a production system on Qwen 2.5 72B, you need to benchmark under your own concurrency pattern rather than trusting a leaderboard screenshot.

Why Qwen 2.5 72B stresses gateways differently

Qwen 2.5 72B is large enough that it rarely fits on a single commodity GPU, but small enough that many providers can shard it across two or four accelerators. Unlike Llama 3 70B, which has been heavily optimized by every serving framework, Qwen’s specific RoPE scaling and attention variants sometimes trigger code paths that are less tuned. The result: a gateway running vLLM with default settings may see noticeably lower token throughput than one running a patched SGLang build.

Because the weights are open, any gateway can pull the safetensors and serve them. That democratization is good for price competition but bad for benchmark consistency. One provider might use BF16 on H100, another INT4 on A100, and a third FP8 on L40S. Those choices dominate the Qwen 2.5 72B speed benchmark more than the network hop does.

Defining speed for a 72B class model

Speed has two axes that engineers confuse:

  1. Time to first token (TTFT) – dominated by prompt prefill and scheduler queue depth.
  2. Output token throughput – tokens per second generated after the first token.

A gateway can have excellent TTFT because it pre-empts your request into a low-latency queue, but then throttle generation to a crawl under load. Conversely, a batch-optimized provider might show high tok/s per request at batch 32 but a multi-hundred-millisecond TTFT.

For a chat assistant using Qwen 2.5 72B, TTFT drives perceived responsiveness. For a bulk extraction job, output throughput at high concurrency is the only metric that counts.

Hardware mapping for the 72B footprint

In BF16, 72B parameters consume ~144GB of VRAM just for weights. Add KV cache and activation memory, and you need at least 2× H100 80GB with tensor parallel degree 2, or 4× A100 40GB. Gateways that run on H100 can leverage FP8 tensor cores, roughly doubling math throughput versus A100. That hardware split is the silent variable in any Qwen 2.5 72B speed benchmark: an A100-only gateway will never match an H100 FP8 stack on raw generation speed, regardless of software tuning.

How to run your own Qwen 2.5 72B speed benchmark

Don’t rely on someone else’s numbers. Write a harness that streams responses and records timestamps. Below is a minimal Python script using the OpenAI SDK against any OpenAI-compatible endpoint.

import time, asyncio
from openai import AsyncOpenAI

async def measure(base_url, api_key, prompt, max_tokens=256):
    client = AsyncOpenAI(base_url=base_url, api_key=api_key)
    start = time.perf_counter()
    first_token = None
    tokens = 0
    stream = await client.chat.completions.create(
        model="qwen2.5-72b-instruct",
        messages=[{"role": "user", "content": prompt}],
        max_tokens=max_tokens,
        stream=True,
    )
    async for chunk in stream:
        if chunk.choices[0].delta.content:
            tokens += 1
            if first_token is None:
                first_token = time.perf_counter()
                ttft = first_token - start
    elapsed = time.perf_counter() - (first_token or start)
    tps = tokens / elapsed if elapsed > 0 else 0
    return {"ttft": ttft, "tps": tps, "tokens": tokens}

configs = {
    "provider_a": "https://api.provider-a.com/v1",
    "provider_b": "https://api.provider-b.com/v1",
}

Run this with a representative prompt (e.g., 2k-token system prompt plus user query) and ramp concurrency from 1 to 50. The Qwen 2.5 72B speed benchmark you care about is the p95 TTFT and median TPS at your target concurrency, not the single-stream best case.

Cross-gateway behavior without fake numbers

I won’t invent latency figures, but the qualitative pattern is consistent across public traces:

  • Self-hosted vLLM on 2× A100 80GB, BF16: Best absolute control. Single-stream TTFT is low, but under dozens of concurrent requests the scheduler may push TTFT up sharply if KV cache pressure hits.
  • Dedicated open-weight providers: They compile custom kernels. Throughput per GPU hour is higher; however, multi-tenant noise means your p95 TTFT varies by time of day.
  • Aggregator gateways: An OpenRouter-class gateway such as n4n.ai exposes one OpenAI-compatible endpoint for 240+ models and will automatically fallback when a provider is rate-limited or degraded. When you run a Qwen 2.5 72B speed benchmark through such a layer, you are measuring a moving target—by design. That can flatten tail latency if one backend congests, but adds a minimal proxy overhead.

The aggregator’s routing directive honors your x-routing header if you send one, so you can pin a provider for benchmarking, then loosen it for production.

curl https://api.n4n.ai/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -H "x-routing: provider=together" \
  -d '{"model":"qwen2.5-72b-instruct","messages":[{"role":"user","content":"hi"}]}'

Quantization is the hidden variable

The biggest lever in any Qwen 2.5 72B speed benchmark is numerical precision. FP8 on H100 cuts memory bandwidth roughly in half versus BF16, directly improving both TTFT and generation. INT4 with GPTQ/AWQ can fit on a single 48GB card, but degrades output quality on reasoning tasks.

If you need faithful function-calling, stay at BF16 or FP8. If you are doing lightweight classification, INT4 may double your tokens/sec. Providers often don’t advertise precision per route. You can probe by measuring perplexity on a fixed dataset, or simply compare output consistency across two endpoints.

Cache control and repeated prompts

Qwen 2.5 72B handles long system prompts poorly if the gateway ignores cache hints. Some gateways forward Anthropic-style cache_control or OpenAI prompt_cache extensions. n4n.ai honors client routing directives and forwards provider cache-control hints, so a static preprompt can be cached at the origin provider, slashing TTFT on subsequent calls.

{
  "model": "qwen2.5-72b-instruct",
  "messages": [
    {"role": "system", "content": "You are a SQL expert...", "cache_control": {"type": "ephemeral"}},
    {"role": "user", "content": "List top customers"}
  ]
}

If your benchmark doesn’t test cache hit ratio, you’re missing the dominant cost in production RAG.

Scheduler differences matter

Continuous batching implementations vary. vLLM uses a dynamic batcher with preemption; TensorRT-LLM uses static max batch with in-flight blending. For Qwen 2.5 72B, the preemption strategy determines whether a 4k-token prompt stalls a batch of small requests. A gateway that exposes max_batch_size or max_num_seqs per key lets you trade throughput for predictable TTFT.

Tradeoffs you must accept

  • Latency vs cost: Higher batch sizes amortize GPU cost but worsen TTFT. A gateway that lets you set batch limits per key is worth more than one with a marginally faster kernel.
  • Resilience vs determinism: Automatic fallback improves uptime but means your Qwen 2.5 72B speed benchmark shifts between runs. For debugging, pin the route.
  • Open-weight freedom vs tuning effort: Self-hosting gives you the raw speed ceiling; managed gateways give you that ceiling minus ops burden.

Decisive takeaway

Run a Qwen 2.5 72B speed benchmark that mirrors your production concurrency, measure TTFT and tokens/sec separately, and insist on knowing the quantization level. If you are a small team, use a gateway that aggregates providers and supports fallback so a degraded backend doesn’t page you at 2am; if you are latency-critical at scale, pin a dedicated provider and self-host when spend justifies. The model is capable; the gateway choice decides whether users feel that capability instantly or after a spinner.

Tagsqwen-2-5-72bspeedbenchmarkopen-weight

Written by

n4n Team

The team building n4n — a single OpenAI-compatible API in front of 240+ models, with automatic fallback, load balancing and pay-per-token metering.

More from n4n Team →

All inference speed benchmarks posts →