<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Qaiser Mehdi</title>
    <description>The latest articles on DEV Community by Qaiser Mehdi (@qaisermehdi).</description>
    <link>https://dev.to/qaisermehdi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4180536%2Fee23146b-e527-4e3b-b771-18904d735a6b.png</url>
      <title>DEV Community: Qaiser Mehdi</title>
      <link>https://dev.to/qaisermehdi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/qaisermehdi"/>
    <language>en</language>
    <item>
      <title>The same H100 hour cost $1.26 or $0.22 per million tokens</title>
      <dc:creator>Qaiser Mehdi</dc:creator>
      <pubDate>Tue, 13 Oct 2026 00:46:48 +0000</pubDate>
      <link>https://dev.to/qaisermehdi/the-same-h100-hour-cost-126-or-022-per-million-tokens-27pb</link>
      <guid>https://dev.to/qaisermehdi/the-same-h100-hour-cost-126-or-022-per-million-tokens-27pb</guid>
      <description>&lt;p&gt;A GPU hour has one price. What it delivers does not. Here is one measurement that shows how big the gap can be.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The setup.&lt;/strong&gt; One rented H100 SXM 80GB on vast.ai at $2.689 per hour, 20 vCPUs. vLLM 0.27.1 (official image). Qwen2.5-0.5B-Instruct in fp16, unique prompts so nothing was cached. 28 September 2026. Every number below comes from vLLM's own /metrics counters, and they matched what my client recorded exactly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two loads, three rounds each.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One request at a time:&lt;/strong&gt; each request decoded at 648-649 tokens/s. The whole server produced 589-593 tokens/s. That is about &lt;strong&gt;$1.26 per 1M output tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;8 requests at once:&lt;/strong&gt; each request got a bit slower, 549-573 tokens/s. But the whole server produced 3,194-3,348 tokens/s. That is about &lt;strong&gt;$0.22-0.23 per 1M output tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same GPU, same hour, same price. About 5.5x apart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The common mistake.&lt;/strong&gt; Many cost estimates take one request's speed and divide the hourly price by it. At 8 at once, one request ran at about 549-573 tokens/s, which would price the hour at about $1.30-1.36 per 1M tokens. The real cost was $0.22-0.23. In each round the whole server made 5.65-5.84x what one request suggests.&lt;/p&gt;

&lt;p&gt;So pricing from one request's speed can overstate cost by about 5.7x at this load. At other loads the gap is different. That is the point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What decides your real cost.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many requests your server actually runs at once, not what a benchmark ran.&lt;/li&gt;
&lt;li&gt;The idle time inside the hour. A GPU that waits still bills, so cost per token is the hourly price over everything the server produced in that hour, idle included.&lt;/li&gt;
&lt;li&gt;For scale-to-zero, the boot. On this same H100, one cold wake was about 75 of 77.3 billed seconds before the server could answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Same ratio on a smaller card.&lt;/strong&gt; On a T4 with the same model and test, at 8 at once each request decoded at 122-124 tokens/s while the whole server made 701-708 tokens/s. Again about 5.7x.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I can and cannot say.&lt;/strong&gt; This is a small model, one GPU, three rounds per load. A 7B or 70B model, another server, or longer prompts will give different numbers. I am not saying your cost is $0.22. I am saying the number depends on your load, and you can only know it by measuring your own server.&lt;/p&gt;

&lt;p&gt;The method, the raw numbers and the open-source tool are here, if useful: github.com/qaisermehdi3-coder/qvunex&lt;/p&gt;

&lt;p&gt;If you have measured cost per token on your own servers at different loads, I would like to compare.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gpu</category>
      <category>mlops</category>
    </item>
    <item>
      <title>Ready is not warm: one SGLang cold start on a T4</title>
      <dc:creator>Qaiser Mehdi</dc:creator>
      <pubDate>Mon, 12 Oct 2026 22:51:26 +0000</pubDate>
      <link>https://dev.to/qaisermehdi/ready-is-not-warm-one-sglang-cold-start-on-a-t4-4109</link>
      <guid>https://dev.to/qaisermehdi/ready-is-not-warm-one-sglang-cold-start-on-a-t4-4109</guid>
      <description>&lt;p&gt;I measure what GPU time actually buys. One number surprised me this month, so here it is with the raw timeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The setup.&lt;/strong&gt; One T4 on Colab. SGLang 0.5.21. Qwen2.5-0.5B-Instruct in fp16. I started a clock just before launching the server, the way a scale-to-zero platform starts billing when a worker is created. Then 8 short chat requests, then 60 seconds of health checks, then stop. One run, 5 October 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The timeline.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0 s:&lt;/strong&gt; server launched (billing starts)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~371 s:&lt;/strong&gt; prefill CUDA graph capture finished (it took 287.7 s)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;386.7 s:&lt;/strong&gt; /health returns 200, log says "ready to roll"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~563 s:&lt;/strong&gt; first chat request finishes (it took about 176 s)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~579 s:&lt;/strong&gt; second request finishes (about 16 s), the other six within the same second&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;639.6 s:&lt;/strong&gt; billing stops&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that, 8 more requests on the same server took 0.08 to 0.22 s each.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this means for the bill.&lt;/strong&gt; If you split the bill at the health check, boot looks like 60% of it (386.7 of 639.6 s). But the first user got an answer about 563 s in. That is 88% of the bill gone before anyone was served.&lt;/p&gt;

&lt;p&gt;So "ready" was not the end of the wait. It was about two thirds of it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I can and cannot say.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The server's own counters matched my client exactly: 8 requests, 264 prompt tokens, 80 output tokens.&lt;/li&gt;
&lt;li&gt;The log does not say what the first 176 s were spent on, so I am not claiming a cause.&lt;/li&gt;
&lt;li&gt;Each health check in the tail shows up in the SGLang log as a one-token prefill on the GPU, but the request counters do not move. So "the GPU did work" and "a request was served" are different things.&lt;/li&gt;
&lt;li&gt;For comparison, on vLLM 0.27.1 on the same card, the 8 requests after ready took 5.8 s in total. Boot there was about 165 of 171 billed seconds.&lt;/li&gt;
&lt;li&gt;This is one run on one small card. A bigger GPU or another model can look different. That is the point: measure your own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If you run scale-to-zero, record three times, not one:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;billing start to health check OK&lt;/li&gt;
&lt;li&gt;billing start to the first finished request&lt;/li&gt;
&lt;li&gt;the idle tail after the last request&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then price the whole billed time, not just the part where requests were running.&lt;/p&gt;

&lt;p&gt;The method and the open-source tool I used are here, if useful: github.com/qaisermehdi3-coder/qvunex&lt;/p&gt;

&lt;p&gt;If you have measured this on other cards or servers, I would like to see your numbers.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>gpu</category>
      <category>mlops</category>
    </item>
  </channel>
</rss>
