<?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: Alex Chen</title>
    <description>The latest articles on DEV Community by Alex Chen (@qisuancloud).</description>
    <link>https://dev.to/qisuancloud</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%2F4165462%2F86ddb891-b316-48b1-8fbc-09bb2f64cdcd.png</url>
      <title>DEV Community: Alex Chen</title>
      <link>https://dev.to/qisuancloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/qisuancloud"/>
    <language>en</language>
    <item>
      <title>SGLang vs vLLM: Your Agent Is Slow Because You Picked the Wrong Cache</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Fri, 23 Oct 2026 01:58:02 +0000</pubDate>
      <link>https://dev.to/qisuancloud/sglang-vs-vllm-your-agent-is-slow-because-you-picked-the-wrong-cache-12hf</link>
      <guid>https://dev.to/qisuancloud/sglang-vs-vllm-your-agent-is-slow-because-you-picked-the-wrong-cache-12hf</guid>
      <description>&lt;p&gt;If you serve LLM agents in production, you have probably seen this week's numbers: in a multi-turn agent workload with an 8,000-token system context, SGLang's RadixAttention cut time-to-first-token (TTFT) from 440ms to 38ms — an 11.57x speedup — while vLLM v0.6 with prefix caching managed 480ms down to 92ms, a 5.21x improvement (Qwen2.5-Coder-32B-Instruct-AWQ), as benchmarked by NextByteTech in their Dev.to post on ollama vs vLLM vs SGLang in 2026.&lt;/p&gt;

&lt;p&gt;The data is real, and the conclusion is mostly right: for long-context, multi-turn agent traffic, SGLang currently wins. But "mostly" hides the interesting part. Those speedups only materialize when your workload has the right shape. Run the same two engines against different traffic and the gap collapses — or flips. This post is the decision framework the benchmark post didn't give you: when RadixAttention genuinely pulls ahead, and when both engines tie.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why RadixAttention Wins in Agent Workloads
&lt;/h2&gt;

&lt;p&gt;Both vLLM's prefix caching and SGLang's RadixAttention reuse previously computed KV cache for repeated prompt prefixes. The difference is the data structure.&lt;/p&gt;

&lt;p&gt;vLLM's automatic prefix caching (APC) historically hashes &lt;strong&gt;whole blocks&lt;/strong&gt; of the prompt and matches them against cached blocks. It's effective when requests share long, identical prefixes — the classic system-prompt-plus-few-shot-template shape — but it degrades when prefixes diverge mid-sequence or when the overlap doesn't align to block boundaries.&lt;/p&gt;

&lt;p&gt;SGLang's RadixAttention stores the KV cache in a &lt;strong&gt;radix tree&lt;/strong&gt; (a compressed trie) over token sequences. Repeated prefixes become shared tree paths, and the cache can be reused at the granularity of any common prefix, not just aligned blocks. Multi-turn agent conversations are exactly this: the same 8,000-token system context plus growing conversation history, turn after turn. Each new turn shares a massive common prefix with the previous one. The tree reuses nearly all of it, which is why the reported TTFT dropped to 38ms — almost the entire prefill was skipped.&lt;/p&gt;

&lt;p&gt;The second Dev.to comparison (ifnodoraemon's SGLang vs vLLM architecture showdown) makes the mechanism visible in the metrics: at a 4,096-token prompt with 75% prefix overlap and concurrency 64, SGLang hit a &lt;strong&gt;78.6% KV cache hit rate vs vLLM's 41.2%&lt;/strong&gt;, with median TTFT of 85ms vs 380ms (4.47x), P99 TTFT of 280ms vs 1,250ms, and throughput of 5,430 vs 3,120 tok/s. The hit-rate gap &lt;em&gt;is&lt;/em&gt; the performance gap. When your workload is prefix-overlap-heavy, the radix tree's finer-grained reuse shows up directly in every latency percentile.&lt;/p&gt;

&lt;h2&gt;
  
  
  But Sometimes They Tie
&lt;/h2&gt;

&lt;p&gt;Here is where the story gets useful. Three published counter-cases show where the advantage evaporates.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Unique-prompt traffic: the gap nearly disappears
&lt;/h3&gt;

&lt;p&gt;bex.co's September 2026 report (&lt;em&gt;SGLang Crossed 400,000 Production GPUs&lt;/em&gt;) benchmarked Llama 3.3 70B FP8 on Spheron H100s at 50 concurrent requests with &lt;strong&gt;unique prompts&lt;/strong&gt; — traffic with no shared prefix to reuse. The result: SGLang at 1,920 tok/s vs vLLM at 1,850 tok/s, with TTFT within 20ms of each other. No shared prefix, no cache to share; the radix tree has nothing to work with, and the two engines are functionally tied.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Raw throughput on short prompts: vLLM can win
&lt;/h3&gt;

&lt;p&gt;The same bex.co report includes a May 2026 result on a single H100 with Qwen2.5-7B: vLLM delivered &lt;strong&gt;23,500 tok/s of raw throughput vs SGLang's 16,800 tok/s&lt;/strong&gt; — a clear vLLM win on aggregate tokens per second. SGLang still held a 4x+ TTFT advantage (1.8s vs 7.8s), so it wasn't a loss on every axis, but for a throughput-first, latency-tolerant batch workload, the "SGLang is faster" headline would have been wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. High concurrency: the crossover is real
&lt;/h3&gt;

&lt;p&gt;bex.co's DGX Spark concurrency sweep found SGLang winning at 1–4 concurrent requests, with &lt;strong&gt;vLLM winning at 6+ concurrent requests&lt;/strong&gt;. And RunPod's blog on the SGLang vs vLLM KV cache comparison (2x H100, DeepSeek-R1-Distill-Llama-70B, 7k context) concluded that a cache hit yields roughly +20% speed — and that on &lt;strong&gt;fresh context the two engines are comparable&lt;/strong&gt;. If your traffic is many short, independent prompts at high concurrency — the classic chatbot-serving shape — the radix tree overhead buys you nothing and vLLM's throughput engine takes the round.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload shape&lt;/th&gt;
&lt;th&gt;Winner (per published results)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Multi-turn agent, long shared system prompt (8k tokens), moderate concurrency&lt;/td&gt;
&lt;td&gt;SGLang, large margin (11.57x vs 5.21x TTFT speedup)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4k prompts, 75% prefix overlap, concurrency 64&lt;/td&gt;
&lt;td&gt;SGLang (4.47x median TTFT, 2x KV hit rate)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unique prompts, no shared prefix, 50 concurrent&lt;/td&gt;
&lt;td&gt;Tie (1,920 vs 1,850 tok/s, TTFT within 20ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short prompts, throughput-first batch, 1x H100&lt;/td&gt;
&lt;td&gt;vLLM (23,500 vs 16,800 tok/s raw throughput)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short prompts, 6+ concurrency (DGX Spark)&lt;/td&gt;
&lt;td&gt;vLLM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fresh context, no cache reuse (RunPod)&lt;/td&gt;
&lt;td&gt;Tie&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The Decision Checklist
&lt;/h2&gt;

&lt;p&gt;Before you switch engines, measure your workload against these four questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How much prefix overlap do you actually have?&lt;/strong&gt; If most of your requests share a long system prompt or conversation history (agents, RAG with fixed instruction blocks, few-shot templates), RadixAttention's finer-grained reuse pays off. If every prompt is unique, the tree is dead weight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's your concurrency?&lt;/strong&gt; Published sweeps show a crossover: SGLang ahead at low concurrency, vLLM ahead as concurrency climbs (around 6+ on DGX Spark in one report — verify against your own hardware). Size for your actual traffic, not the benchmark's.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are you prefill-heavy or decode-heavy?&lt;/strong&gt; Prefix caching only accelerates the prefill phase. If your outputs are long and your prompts are short, most of your time is in decode, and the cache advantage shrinks to a rounding error. RunPod's +20%-on-cache-hit figure is a good mental anchor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which latency percentile matters to you?&lt;/strong&gt; SGLang's biggest reported edge is in TTFT and tail latency (P99 280ms vs 1,250ms in the 75%-overlap scenario). If your SLO is on end-to-end tokens-per-second for batch jobs, that edge may not buy you anything — vLLM's raw throughput win shows the other side of the trade.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The benchmark post's headline number — 38ms vs 92ms TTFT in the multi-turn agent scenario — is correct for that workload, and RadixAttention's radix-tree design is genuinely the better mechanism for shared-prefix traffic. But engines don't run benchmarks; they run your traffic. Unique-prompt serving, short-prompt batch throughput, and high-concurrency chatbot shapes all show the two engines tying or vLLM winning, per bex.co, RunPod, and the second Dev.to comparison. Measure your prefix overlap and concurrency first, then pick the cache that fits.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;We write about production LLM infra and agent systems for builders shipping real products. Follow along here:&lt;/em&gt;&lt;br&gt;
&lt;a href="https://t.me/qisuancloud" rel="noopener noreferrer"&gt;https://t.me/qisuancloud&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Or try our free GPU Advisor: &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;https://qisuanai.com/advisor&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>opensource</category>
      <category>benchmarking</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Your 128K Context Fits on a 4090 — If You Quantize the KV Cache</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Mon, 19 Oct 2026 06:10:55 +0000</pubDate>
      <link>https://dev.to/qisuancloud/your-128k-context-fits-on-a-4090-if-you-quantize-the-kv-cache-51bp</link>
      <guid>https://dev.to/qisuancloud/your-128k-context-fits-on-a-4090-if-you-quantize-the-kv-cache-51bp</guid>
      <description>&lt;p&gt;&lt;em&gt;Researched October 2026. Sizing math from public model cards and the vLLM docs; not my own benchmarks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://dev.to/qisuancloud/your-7b-model-fits-on-a-4090-until-you-open-a-128k-context-window"&gt;last post&lt;/a&gt; I showed that a 128K context window can push a 7B model from 17 GB to 33 GB of VRAM — and that you have three moves, in order of cost-effectiveness: quantize the cache, pick a GQA-heavy architecture, or rent the bigger card. This post is about move #1, the cheapest one. It halves the KV cache with a single flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  The One Flag
&lt;/h2&gt;

&lt;p&gt;In vLLM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vllm serve meta-llama/Llama-3.1-8B-Instruct &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--kv-cache-dtype&lt;/span&gt; fp8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The weights stay in FP16/BF16 — untouched. Only the KV cache is stored as 1 byte per value instead of 2. Per the &lt;a href="https://docs.vllm.ai/en/latest/features/quantization/quantized_kvcache/" rel="noopener noreferrer"&gt;vLLM docs&lt;/a&gt;, &lt;code&gt;fp8&lt;/code&gt; maps to E4M3, and there are three calibration options: no calibration (scales default to 1.0), random-token warmup, or dataset calibration via llm-compressor (recommended for max accuracy).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why FP8 Works for KV Cache
&lt;/h2&gt;

&lt;p&gt;Weight quantization gets all the attention, but KV values are arguably the easier target: within a single attention head, their values live in a narrow, well-behaved range. E4M3's tighter range and 3-bit mantissa match that distribution well; E5M2's wider range is mostly wasted on values that never appear, and its 2-bit mantissa visibly degrades attention scores that compound across layers. In other words, the format choice matters — &lt;code&gt;fp8&lt;/code&gt; (E4M3) is the right default, not &lt;code&gt;fp8_e5m2&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the Math Flips
&lt;/h2&gt;

&lt;p&gt;Llama 3.1 8B, FP16 weights (~16 GB), 2 GB overhead:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;FP16 cache → total&lt;/th&gt;
&lt;th&gt;FP8 cache → total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;32K&lt;/td&gt;
&lt;td&gt;4 GB → ~22 GB ✅&lt;/td&gt;
&lt;td&gt;2 GB → ~20 GB ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;64K&lt;/td&gt;
&lt;td&gt;8 GB → ~26 GB ❌&lt;/td&gt;
&lt;td&gt;4 GB → ~22 GB ✅ fits 4090&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;16 GB → ~34 GB ❌&lt;/td&gt;
&lt;td&gt;8 GB → ~26 GB ❌ still over&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Honest note: at 128K, FP8 cache alone doesn't save Llama 3.1 8B on a 24 GB card — 26 GB is still 26 GB. Your options there: pair it with FP8 weights (8 + 8 + 2 ≈ 18 GB ✅), or pick the GQA-heavy architecture from last post — Qwen2.5 7B at 128K needs ~7 GB of FP16 cache, ~3.5 GB in FP8, for a total around 19 GB ✅. The flag is powerful, not magic; the arithmetic still rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Caveats Before You Ship It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Hardware matters.&lt;/strong&gt; The biggest wins are on Hopper GPUs with native FP8 support. On older cards, check your vLLM version's kernel support — the memory savings are real, but the compute path may not be as optimized.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Calibrate if quality matters.&lt;/strong&gt; Default scales of 1.0 are fine to start, but for production, dataset calibration (llm-compressor) exists for a reason. Per-head quantization — finer-grained than per-tensor — needs the FlashAttention backend plus that calibration path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Measure retrieval, not just perplexity.&lt;/strong&gt; Standard benchmarks show small degradation, but long-context tasks with exact-recall demands (needle-in-a-haystack style document QA) are where you'd notice it first. Run your own eval before and after.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Costs in Practice
&lt;/h2&gt;

&lt;p&gt;The whole point: quantization keeps you on the cheap card. A 64K-context 7B workload that needed an 80 GB card at ~$1.50+/hr in FP16 fits on a 24 GB 4090 at ~$0.35/hr with FP8 cache — same model, same context, roughly a quarter of the hourly cost, for one CLI flag.&lt;/p&gt;




&lt;p&gt;I built a &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;free GPU Advisor&lt;/a&gt; that walks through these tradeoffs (model size, context, quantization tolerance) and recommends the cheapest fitting setup. No signup.&lt;/p&gt;

&lt;p&gt;Have you tried FP8 KV cache in production — and did the quality hold up on your workload? Curious where it breaks in practice.&lt;/p&gt;

</description>
      <category>gpu</category>
      <category>llm</category>
      <category>vllm</category>
      <category>ai</category>
    </item>
    <item>
      <title>Stop Overpaying for GPUs: Spot vs On-Demand for LLM Inference (With Real Numbers)</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Fri, 16 Oct 2026 07:03:05 +0000</pubDate>
      <link>https://dev.to/qisuancloud/stop-overpaying-for-gpus-spot-vs-on-demand-for-llm-inference-with-real-numbers-2eg6</link>
      <guid>https://dev.to/qisuancloud/stop-overpaying-for-gpus-spot-vs-on-demand-for-llm-inference-with-real-numbers-2eg6</guid>
      <description>&lt;h1&gt;
  
  
  Stop Overpaying for GPUs: Spot vs On-Demand for LLM Inference (With Real Numbers)
&lt;/h1&gt;

&lt;p&gt;If you're running LLM inference on rented GPUs, you're probably overpaying. Not by a little — by 2-3x. The culprit isn't which cloud you picked. It's &lt;em&gt;how&lt;/em&gt; you're paying for it.&lt;/p&gt;

&lt;p&gt;I spend my days comparing GPU cloud pricing (it's literally what I do), and the spot vs on-demand decision is where most people leave the most money on the table. Here's the practical breakdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Price Gap Is Bigger Than You Think
&lt;/h2&gt;

&lt;p&gt;Take an RTX 4090 (24GB) — the workhorse for 7B-32B model inference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On-demand&lt;/strong&gt;: ~$0.34–$0.74/hour depending on the cloud&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spot/preemptible&lt;/strong&gt;: ~$0.15–$0.30/hour for the same card&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's a 50-70% discount for the exact same silicon. For an A100 80GB, the gap is similar: ~$1.20/hr on-demand vs ~$0.50/hr spot.&lt;/p&gt;

&lt;p&gt;But cheap isn't free. Here's what you're actually trading.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "Spot" Really Means in Practice
&lt;/h2&gt;

&lt;p&gt;Spot instances can be reclaimed by the provider with little warning (typically 30 seconds to 2 minutes). For LLM inference, that means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model reload time&lt;/strong&gt;: A 70B model takes 3-5 minutes to load into VRAM. If you get preempted twice an hour, you've lost more than you saved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request interruption&lt;/strong&gt;: In-flight requests die. You need retry logic or a queue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability variance&lt;/strong&gt;: During peak hours, spot capacity dries up. Your "cheap" GPU might simply not exist when you need it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Decision Framework
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use spot when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're doing batch inference (embeddings, bulk classification, offline evals)&lt;/li&gt;
&lt;li&gt;Your workload is checkpoint-friendly or stateless&lt;/li&gt;
&lt;li&gt;You can tolerate 5-10 minute interruptions&lt;/li&gt;
&lt;li&gt;You're running experiments and cost matters more than latency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use on-demand when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're serving real users with latency SLAs&lt;/li&gt;
&lt;li&gt;Your model takes &amp;gt;2 minutes to load (large models)&lt;/li&gt;
&lt;li&gt;It's peak hours in US/EU and spot markets are thin&lt;/li&gt;
&lt;li&gt;The cost of an interruption exceeds the savings (do the math!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The hybrid most people should use:&lt;/strong&gt;&lt;br&gt;
Run your baseline traffic on 1-2 on-demand instances, burst with spot. Most inference workloads have a predictable floor and a spiky ceiling. Pay full price for the floor, spot price for the spikes.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Math People Skip
&lt;/h2&gt;

&lt;p&gt;Don't just compare hourly rates. Calculate &lt;strong&gt;effective cost per 1K tokens&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;effective_hourly = (hourly_rate × hours_run + reload_cost) / hours_run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where &lt;code&gt;reload_cost = preemptions × reload_time_hours × hourly_rate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example: $0.20/hr spot, preempted 3x/hour, 4-min reloads on a 70B model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reload overhead: 3 × (4/60) × $0.20 = $0.04/hr extra&lt;/li&gt;
&lt;li&gt;Effective rate: $0.24/hr — still way cheaper than $0.74 on-demand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But with 10 preemptions/hour? Effective rate hits $0.33/hr plus the latency pain. At that point, on-demand wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  One More Thing: Egress Fees
&lt;/h2&gt;

&lt;p&gt;The sneakiest cost isn't compute — it's data transfer out. Some clouds charge $0.05-0.09/GB for egress. If you're doing RAG with large context windows or serving multimodal models, egress can exceed your GPU bill. Always check the egress pricing before committing.&lt;/p&gt;




&lt;p&gt;I track GPU cloud prices weekly and post updates when prices move significantly. If you want the short version without reading pricing pages, I share them on my Telegram channel: &lt;a href="https://t.me/qisuancloud" rel="noopener noreferrer"&gt;https://t.me/qisuancloud&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you want to skip the spreadsheet entirely, our free GPU Advisor picks the cheapest option for your workload in about 30 seconds: &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;https://qisuanai.com/advisor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Prices referenced are from public pricing pages, October 2026. Always verify before you rent — cloud pricing changes fast.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gpu</category>
      <category>llm</category>
      <category>cloud</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Your 7B Model Fits on a 4090 — Until You Open a 128K Context Window</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Sun, 11 Oct 2026 02:41:11 +0000</pubDate>
      <link>https://dev.to/qisuancloud/your-7b-model-fits-on-a-4090-until-you-open-a-128k-context-window-31ag</link>
      <guid>https://dev.to/qisuancloud/your-7b-model-fits-on-a-4090-until-you-open-a-128k-context-window-31ag</guid>
      <description>&lt;p&gt;&lt;em&gt;Researched October 2026. Architecture specs from public model cards; all numbers below are arithmetic, not my own benchmarks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://dev.to/qisuancloud/your-7b-model-doesn-t-need-an-h100-a-practical-gpu-sizing-guide-for-llm-inference"&gt;last post&lt;/a&gt; I showed that a 7B model's weights need ~16 GB in FP16 — a comfortable fit on a 24 GB RTX 4090. Several readers asked the obvious follow-up: &lt;em&gt;then why does my 7B inference server OOM the moment I enable long context?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Because weights are only half the story. The other half is the &lt;strong&gt;KV cache&lt;/strong&gt;, and it scales in a way that surprises almost everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The One Formula
&lt;/h2&gt;

&lt;p&gt;For each token in context, the model must store a key and a value vector per layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KV cache per token = 2 × layers × kv_heads × head_dim × bytes_per_value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take &lt;strong&gt;Llama 3.1 8B&lt;/strong&gt; (32 layers, 8 KV heads, 128 head dim, FP16):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 × 32 × 8 × 128 × 2 bytes = 131,072 bytes ≈ 128 KiB per token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now multiply by context length:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;KV cache (Llama 3.1 8B, FP16)&lt;/th&gt;
&lt;th&gt;+ 16 GB weights → total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;8K&lt;/td&gt;
&lt;td&gt;~1 GB&lt;/td&gt;
&lt;td&gt;~17 GB fits 4090&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32K&lt;/td&gt;
&lt;td&gt;~4 GB&lt;/td&gt;
&lt;td&gt;~21 GB fits 4090&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;~16 GB&lt;/td&gt;
&lt;td&gt;~33 GB needs 48 GB+&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same model, same weights — the context window alone decides whether you need a $0.35/hr card or a $1.50+/hr one. (Prices from my &lt;a href="https://dev.to/qisuancloud/i-compared-5-gpu-clouds-for-llm-inference-in-2026-heres-what-i-found-4884"&gt;provider comparison&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Not All 7B Models Are Equal
&lt;/h2&gt;

&lt;p&gt;KV head count varies wildly between architectures:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Layers&lt;/th&gt;
&lt;th&gt;KV heads&lt;/th&gt;
&lt;th&gt;KiB/token (FP16)&lt;/th&gt;
&lt;th&gt;128K context cache&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Llama 3.1 8B&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;128&lt;/td&gt;
&lt;td&gt;~16 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral 7B v0.3&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;128&lt;/td&gt;
&lt;td&gt;~16 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen2.5 7B&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;56&lt;/td&gt;
&lt;td&gt;~7 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Qwen2.5 7B at 128K needs roughly &lt;strong&gt;half&lt;/strong&gt; the cache of Llama 3.1 8B. Two "7B models," very different GPU bills.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 70B Reality Check
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Llama 3.1 70B&lt;/strong&gt; (80 layers, 8 KV heads): 320 KiB/token → 128K context = &lt;strong&gt;~41 GB of KV cache&lt;/strong&gt;. Add 140 GB of FP16 weights and you're at ~181 GB — that's three 80 GB cards. Even in FP8 (70 GB weights), you're at ~111 GB: still two cards minimum. Long context is where 70B deployments quietly become multi-GPU projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Things Most Guides Skip
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Batch size is a silent multiplier.&lt;/strong&gt; KV cache scales with batch × sequence length. Serving 8 concurrent users at 8K context costs roughly the same cache as 1 user at 64K. Your "fits on a 4090" math breaks the moment traffic grows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. PagedAttention doesn't shrink the cache.&lt;/strong&gt; vLLM's PagedAttention eliminates fragmentation waste, but the bytes are the bytes — it can't make 33 GB fit in 24 GB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Quantize the cache too.&lt;/strong&gt; KV cache in FP8 halves these numbers with minimal quality loss on most workloads. It's the same lever as weight quantization, applied to the forgotten half of VRAM.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 30-Second Sizing Rule
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;context_budget = (VRAM − weights − 2 GB overhead) ÷ KiB_per_token ÷ batch_size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your planned context exceeds the budget, you have three moves: quantize the cache, pick a GQA-heavy architecture, or rent the bigger card — in that order of cost-effectiveness.&lt;/p&gt;

&lt;p&gt;I built a &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;free GPU Advisor&lt;/a&gt; that walks through these tradeoffs with four questions and recommends the cheapest fitting setup. No signup.&lt;/p&gt;

&lt;p&gt;What's the longest context you're actually serving in production — and did the KV cache math surprise you the first time? Curious what caught people off guard.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gpu</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Your 7B Model Doesn't Need an H100: A Practical GPU Sizing Guide for LLM Inference</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Fri, 09 Oct 2026 10:00:34 +0000</pubDate>
      <link>https://dev.to/qisuancloud/your-7b-model-doesnt-need-an-h100-a-practical-gpu-sizing-guide-for-llm-inference-39ia</link>
      <guid>https://dev.to/qisuancloud/your-7b-model-doesnt-need-an-h100-a-practical-gpu-sizing-guide-for-llm-inference-39ia</guid>
      <description>&lt;h1&gt;
  
  
  Your 7B Model Doesn't Need an H100: A Practical GPU Sizing Guide for LLM Inference
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Researched October 2026. Sizing rules from public docs and community practice, not my own benchmarks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The most expensive mistake in LLM inference isn't picking the wrong cloud — it's renting too much GPU. I keep seeing people spin up H100s to serve 7B chatbots. Here's a practical guide to right-sizing your GPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  The One Formula That Matters
&lt;/h2&gt;

&lt;p&gt;Weights in FP16 take roughly &lt;strong&gt;2 bytes per parameter&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model size&lt;/th&gt;
&lt;th&gt;FP16 weights&lt;/th&gt;
&lt;th&gt;Minimum sensible GPU&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;7–8B&lt;/td&gt;
&lt;td&gt;~14–16 GB&lt;/td&gt;
&lt;td&gt;RTX 4090 / L4 (24 GB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13B&lt;/td&gt;
&lt;td&gt;~26 GB&lt;/td&gt;
&lt;td&gt;A100 40GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;34B&lt;/td&gt;
&lt;td&gt;~68 GB&lt;/td&gt;
&lt;td&gt;2× A100 40GB or 1× H100 80GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70B&lt;/td&gt;
&lt;td&gt;~140 GB&lt;/td&gt;
&lt;td&gt;2× A100/H100 80GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Then add ~20–30% headroom for KV cache (grows with context length and batch size). Long-context workloads can double your memory needs — that's the part most guides skip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quantization Changes Everything
&lt;/h2&gt;

&lt;p&gt;FP8 / AWQ / GPTQ roughly halve the memory requirement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A 70B model in FP8 (~70 GB) can fit on a single H100 80GB&lt;/li&gt;
&lt;li&gt;A 13B AWQ model runs comfortably on a 24 GB card&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your accuracy budget allows it, quantization is the single biggest cost lever you have — bigger than switching cloud providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Throughput vs. Latency: Pick Your Bottleneck
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chatbot (low concurrency):&lt;/strong&gt; you need enough VRAM, that's it. A 4090 serving a 7B model at 60+ tok/s is overkill for 5 concurrent users — but cheap overkill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch/API workloads:&lt;/strong&gt; memory bandwidth is king. This is where A100/H100 earn their premium.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't pay for bandwidth you won't use.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Decision Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What's the largest model you'll serve in the next 6 months?&lt;/li&gt;
&lt;li&gt;FP16 or can you quantize?&lt;/li&gt;
&lt;li&gt;Max context length × max batch size → KV cache estimate&lt;/li&gt;
&lt;li&gt;Latency SLA? (real-time chat vs. background jobs)&lt;/li&gt;
&lt;li&gt;Spot-tolerant? (see my &lt;a href="https://dev.to/qisuancloud/i-compared-5-gpu-clouds-for-llm-inference-in-2026-heres-what-i-found-4884"&gt;previous post&lt;/a&gt; on spot pricing)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What This Costs in Practice
&lt;/h2&gt;

&lt;p&gt;Combining sizing with cloud prices (researched Oct 2026): a 7B model on a Vast.ai spot 4090 (~$0.35/hr) vs. an H100 on-demand (~$2.50+/hr) is a &lt;strong&gt;7x cost difference&lt;/strong&gt; for a workload that might not even notice.&lt;/p&gt;




&lt;p&gt;I'm building a free tool that asks about your use case and ranks GPU options: &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;https://qisuanai.com/advisor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What are you serving, and on what? Curious where these rules break down in practice.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>gpu</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Compared 5 GPU Clouds for LLM Inference in 2026 — Here's What I Found</title>
      <dc:creator>Alex Chen</dc:creator>
      <pubDate>Tue, 06 Oct 2026 09:41:57 +0000</pubDate>
      <link>https://dev.to/qisuancloud/i-compared-5-gpu-clouds-for-llm-inference-in-2026-heres-what-i-found-4884</link>
      <guid>https://dev.to/qisuancloud/i-compared-5-gpu-clouds-for-llm-inference-in-2026-heres-what-i-found-4884</guid>
      <description>&lt;h1&gt;
  
  
  I Compared 5 GPU Clouds for LLM Inference in 2026 — Here's What I Found
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Researched October 2026. Prices from public pricing pages and third-party trackers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Running LLMs in production gets expensive fast. I spent a week reviewing public pricing data from GPU cloud providers to find the cheapest way to serve inference workloads. Here are the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Contenders
&lt;/h2&gt;

&lt;p&gt;I looked at five providers that offer on-demand GPU instances suitable for LLM inference:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;RunPod&lt;/strong&gt; — community favorite, wide GPU selection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lambda Labs&lt;/strong&gt; — straightforward pricing, good availability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vast.ai&lt;/strong&gt; — marketplace model, often cheapest&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS&lt;/strong&gt; — the default choice, premium pricing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Cloud&lt;/strong&gt; — strong TPUs, GPU pricing varies&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Price Comparison (A100 80GB, per hour)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;A100 80GB/hr&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vast.ai&lt;/td&gt;
&lt;td&gt;~$1.20&lt;/td&gt;
&lt;td&gt;Marketplace, prices fluctuate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RunPod&lt;/td&gt;
&lt;td&gt;~$1.89&lt;/td&gt;
&lt;td&gt;Secure Cloud pricing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lambda Labs&lt;/td&gt;
&lt;td&gt;~$1.50&lt;/td&gt;
&lt;td&gt;On-demand&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS (p4d)&lt;/td&gt;
&lt;td&gt;~$3.20&lt;/td&gt;
&lt;td&gt;On-demand, us-east-1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GCP (a2-highgpu)&lt;/td&gt;
&lt;td&gt;~$2.90&lt;/td&gt;
&lt;td&gt;On-demand&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Prices are approximate, researched October 2026. Always check current pricing.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What About RTX 4090?
&lt;/h2&gt;

&lt;p&gt;For smaller models (7B-13B), a 4090 is often enough and much cheaper:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;RTX 4090/hr&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vast.ai&lt;/td&gt;
&lt;td&gt;~$0.35&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RunPod&lt;/td&gt;
&lt;td&gt;~$0.69&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A 4090 can handle Llama 3 8B inference comfortably. If your model fits, don't overpay for an A100.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace &amp;gt; fixed pricing&lt;/strong&gt; — Vast.ai is consistently 30-50% cheaper, but you trade reliability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match GPU to model size&lt;/strong&gt; — Don't rent an H100 for a 7B model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spot/preemptible instances&lt;/strong&gt; — Can cut costs another 50-70% if your workload tolerates interruptions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch egress fees&lt;/strong&gt; — Some providers charge heavily for data transfer out&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm building a free tool that recommends the cheapest GPU for your specific workload. Drop a comment with your use case and I'll share early access.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What's your go-to GPU cloud? Am I missing a cheaper option?&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://qisuanai.com" rel="noopener noreferrer"&gt;QisuanCloud blog&lt;/a&gt; — or skip the reading: our &lt;a href="https://qisuanai.com/advisor" rel="noopener noreferrer"&gt;free GPU Advisor&lt;/a&gt; ranks GPU clouds for your workload in about 30 seconds. No signup.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gpu</category>
      <category>llm</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
