惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
罗磊的独立博客
量子位
Jina AI
Jina AI
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
美团技术团队
雷峰网
雷峰网
爱范儿
爱范儿
S
SegmentFault 最新的问题
小众软件
小众软件
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your model speed benchmark is measuring the wrong thing
Thousand Mil · 2026-05-19 · via DEV Community

Model speed is not a property of the model. It is a property of the model plus your payload size plus your output format plus whether you're constraining decoding. Most published rankings collapse those four axes into one number, and that number is wrong for almost every production workload. If you picked a model based on tokens/sec on someone's leaderboard, you almost certainly picked the wrong one.

The strongest counter is that benchmarks are useful precisely because they normalize away workload variance — you can't compare models if everyone tests on their own prompt. Fair. But normalization that hides the crossover point is worse than no benchmark at all. A leaderboard that ranks Model A above Model B on 200-token completions, when your production workload generates 2,000 tokens of constrained JSON, has actively misled you. The normalization is the bug.

Here is what is actually going on.

There are two latency clocks. Time-to-first-token (TTFT) and total generation time. They respond to payload size in opposite ways. At short outputs, TTFT dominates perceived latency — the user is waiting for the first character. Models built around aggressive speculative decoding win here, because the draft-verification cycle amortizes over a small number of tokens before the user sees anything. At long outputs, total generation time dominates, and speculative decoding's edge erodes — draft acceptance rates fall as the sequence grows, so the technique that won the short race loses the long one.

This is why the developer who benchmarked Haiku against a larger model on a chatbot turn and picked Haiku is now confused when Haiku is slower on their 4k-token summarization endpoint. Nothing changed about the model. The workload changed, and the workload was always the thing being measured.

Format is the second hidden variable, and it's worse than people think. YAML's indentation and colon syntax inflates token counts relative to the information it encodes. Compact JSON (no whitespace) is usually the densest format for structured data. Markdown sits somewhere in the middle and varies wildly by content. Switching the exact same response from YAML to compact JSON can change your effective throughput by 10-30% without touching the model. If your prompt says "respond in YAML" because it looked cleaner in the docs, you are paying for that decision on every request.

The third variable is constrained decoding. The moment you turn on strict JSON schema, tool-call formatting, or any structured-output mode, the model's sampling step has to mask invalid tokens at every position. That mask is per-token compute overhead that scales with schema complexity and is invisible in the throughput numbers published by labs and third-party benchmarks, because almost no public benchmark separates constrained from unconstrained generation. A model that looks 2x faster than another in the unconstrained leaderboard can be at parity or behind once you turn on a non-trivial schema.

The architectural picture explains why no single model wins all four cells of the matrix. Speculative decoding favors short outputs. MoE routing has a relatively fixed per-token overhead, so MoE models amortize better over long sequences and pull ahead at high token counts. Grouped-query attention reduces KV-cache pressure at large context, helping sustained throughput. These are different architectural bets, and they trade off against each other. There is no model that is the speculatively-decoded short-output king and the MoE long-output king and the constrained-decoding overhead winner. The market has not produced one and probably will not.

Which means the only benchmark that matters is the one you run on your own production-representative payload. Same prompt length distribution. Same output length distribution. Same format. Same schema constraints. Same deployment region. Run it on a sample of real traffic, log p50 and p95 for TTFT and total generation time separately, and only then pick a model. Anything else is cargo-cult evaluation.

The leaderboard isn't lying to you. It's answering a question you didn't ask.

Further reading