r/Vllm • • 8h ago Bravo

Experimental vLLM overlay: KV Cache offload to RAM works with Qwen 3.8 Flash Next

11 Upvotes

A while back I read a post that floated the idea to offload KV cache to RAM with the new architecture proposed in 3.8 FN. I didn't find anything in stock vLLM that would easily allow to do this, but I was really interested in getting this working. I own a 4x3090 rig with 256GB DDR4, so I thought I'll give it a shot.

For this project I used Claude Code entirely, as I was purely trying to see if it would work. After a few weeks and a few thousand commits on more than 1000 test branches, and many engine starts later, I got a stable version running on this ampere setup. To anyone with more skill than me, this might look like a trainwreck, yet it runs stable and shows nice numbers too. Maybe this can help form a basis for a more standardized approach.

I configured TP2xPP2, enabled P2P, I'm using nvlink for the two pairs and been using Intel's W4A16 Autoround quant. It runs at around 480tk/s aggregate on 8 streams, each with a 200k context and about 6.2k tk/s prefill. It also has its limitations. For example the vision encoder needs to sit on a 5th 3090 in my network, it's likely to only run on ampere cards and it is pinned to one vLLM release which isn't the newest either.

Many engines already exist that let you run a model that doesn't fit in VRAM, but not a lot of approaches exist where you barely fit the model in VRAM but offload the KV cache to RAM. Happy to hear your ideas about it, and hopefully this will work for a hopefully soon released Qwen 4 120b-ish model too.

https://github.com/Mr-Moonsilver/crazydiamond-on-ampere


r/Vllm • • 15h ago

People deploying LLMs, what's your biggest inference or infrastructure bottleneck?

Thumbnail
reddit.com
1 Upvotes

r/Vllm • • 20h ago

Inkling 2 Mini on 2× RTX 3090 — Windows 11 + Docker + patched vLLM, 143 tok/s decode

8 Upvotes

Thinking Machines released Inkling 2 Mini (2026-11-20) with native NVFP4/MXFP8 expert weights, and vLLM does not run it on Ampere — the official image targets Hopper/Blackwell/DGX Spark.

This repo is a Dockerfile that patches the official vLLM image (compiled kernels swapped, five source patches, one tuning patch) plus a serving config for two RTX 3090s with an NVLink bridge: tensor parallel 2 with expert parallelism 2, BF16 activations against the native NVFP4/MXFP8 weights, speculative decoding with the bundled DSpark drafter (mtp.safetensors), and a vision tower.

It runs on Windows 11 in Docker (Docker Desktop / container: official image by digest + patches) on two RTX 3090s (sm_86, 24 GB, 300 W, NVLink bridge), and serves on port 1234 with Docker Compose. No API key. The checkpoint is read from a read-only Hugging Face cache; the container never downloads at boot (HF_HUB_OFFLINE=1).

Measured on 2× RTX 3090, TP2:

- 143 tok/s decode without the drafter; 170–306 tok/s with it (prose → JSON tool calls)

- Decode depth: 131 tok/s at 32K, 107 at 120K

- Prefill: ~7,030 tok/s at 8K, ~6,700 at 24K, ~5,170 at 120K (23 s to first token)

- 509 tok/s aggregate at 4 requests, 747 at 8 (8 concurrent)

- GSM8K-200: 98.0%; retrieval 5/5 to 120K; two cards match one card token for token within the model's own decode/prefill noise

Requirements: two 24 GB sm_86 cards (measured on RTX 3090s with an NVLink bridge), Docker with the NVIDIA Container Toolkit, CUDA 13 driver (tested 620.73.04), x86_64 host. Disk: ~26 GB for the image, ~20 GB for the checkpoint.

Not supported upstream — vLLM has an open Ampere PR (vllm-project/vllm#69165). I am not affiliated with Thinking Machines or the vLLM project; this is a port for local use, not a vendor recipe. A pair without an NVLink bridge is a documented, untested configuration.

Numbers, port story and tuning notes: https://github.com/peaster/inkling-2-mini-vllm-2x3090


r/Vllm • • 1d ago

Yet another one-model, one-GPU vLLM fork: Inkling 2 Mini on an RTX 3090

Thumbnail
reddit.com
3 Upvotes

r/Vllm • • 1d ago

My Qwen3.8-Flash-Next-NVFP4 settings in vLLM 0.34.0, under RTX Pro 4500 Blackwell@165W TP=4, PCIE4.0*16*4

Thumbnail
reddit.com
1 Upvotes

r/Vllm • • 1d ago

A recipe for Inkling 2 Small on 8x an DGX Spark cluster at ~55 tok/s with 1M token context window

Thumbnail reddit.com
1 Upvotes

r/Vllm • • 1d ago

Why vLLM burns peak 700W during autoregressive decode (and our open-source C++ NVML pacer to fix it)

7 Upvotes

Hey everyone,

If you run vLLM or Triton on modern accelerators (H100, A100, L40S, etc.), you probably noticed that GPUs stay locked at maximum core clock frequencies (e.g., 1980 MHz on H100) through the entire generation step.

### The Problem: Silicon Asymmetry in Serving

- **Prompt Prefill:** Compute-bound (GEMM). Arithmetic intensity is > 100 FLOPs/Byte. You *need* peak SM clocks to keep TTFT low.

- **Autoregressive Decode:** Memory-bound (GEMV). Arithmetic intensity drops to ≤ 4 FLOPs/Byte. Over 85% of step time is spent stalling on High-Bandwidth Memory (HBM) reads.

Because dynamic CMOS power dissipation scales quadratically with voltage ($P_{dyn} \propto V^2 f$), sustaining peak core clocks while memory stalls burns massive amounts of electricity without improving token latency.

### What we built: TensorPackAI (Community Edition)

We just open-sourced **TensorPackAI**: a zero-overhead C++17 NVML runtime layer with Python bindings:

  1. **Fast NVML Direct Loader:** Direct `dlopen` of `libnvidia-ml.so` (eliminates standard python ctypes latency).

  2. **Prometheus Telemetry:** Exposes windowed `tensorpack_joules_per_token` and `tensorpack_tokens_per_watt` on port `:9100/metrics`.

  3. **CLI Tuner (`tensorpack-tune`):** Inspect real-time per-GPU power and recommend memory-paced decode clocks.

### Quick Test:

```bash

pip install tensorpackai

tensorpack-tune status

```

In our Chatbot Arena benchmark runs, pacing core clocks to memory speeds during decode drops dynamic power by up to **58.1%** while keeping P90 Inter-Token Latency (ITL) strictly under human-perceptible thresholds (<20ms).

- **GitHub (Apache 2.0):** https://github.com/tensorpackai/tensorpackai-community

- **Docs:** https://tensorpackai.com/docs

Would love to hear your thoughts, feedback, and edge cases on different architectures (especially A100/L40S)!


r/Vllm • • 1d ago

Inkling-2-Mini on a single R9700: 196K context, ~110 tok/s, official weights (vLLM port)

Thumbnail
reddit.com
5 Upvotes

r/Vllm • • 2d ago

Inkling 2 Mini on one RTX 3090 with packed GPTQ-Pro, FP8 KV, DSpark, and 227K context

Thumbnail
reddit.com
1 Upvotes

r/Vllm • • 2d ago

I tested 5 "think less" weight-edit builds of Qwen3.8-27B (4-bit, one 3090 @ 250 W). Concept got faster without getting dumber

Thumbnail
reddit.com
1 Upvotes

r/Vllm • • 2d ago

Replaced most inline PTX with MLIR ops, cutting asm regions from 499 to 81 across 20 kernels.

Thumbnail reddit.com
1 Upvotes

r/Vllm • • 2d ago

Qwen3.8-Flash-Next-Single-DGX-Spark-Strix

Thumbnail
github.com
8 Upvotes

I remastered an open recipe for running Qwen3.8-Flash-Next (99 GiB NVFP4 VLM) on a single DGX Spark (TP=1), tuned to drive the Strix security agent for SAST + DAST scans. The main change: the default engine moves to stock vLLM 0.34.0, which now ships natively what the old pinned build needed patches for — so it boots 2.7× faster (662s → 241s), cold prefill is 30–55% quicker, per-turn latency roughly halves, and there’s ~5 GiB more free memory. It’s AGPL, built on Mia’a AI Lab’s original recipe, and the remaster was done by Claude (Anthropic).

Repo + numbers: https://github.com/CipherCloak/Qwen3.8-Flash-Next-Single-DGX-Spark-Strix.


r/Vllm • • 2d ago

Inkling-2-Mini NVFP4 on a single RTX 3090 (24 GB): working port, 128k context, DSpark - vLLM

Post image
1 Upvotes

r/Vllm • • 2d ago

vLLM vs Ollama, llama.cpp and LM Studio on a 3090 with Qwen3.8-27B: most output at 32 requests (345.8 tok/s), but the smallest context

Thumbnail
homebrewserver.club
4 Upvotes

I ran the same model (Qwen3.8-27B) on one RTX 3090 in four servers and sent each the same questions. vLLM used the AWQ version of the model, the others the GGUF version.

Where vLLM was best

  • Many users at once. With 32 questions at the same time, vLLM gave the most answers per second. llama.cpp came close.

  • Answers started the fastest.

  • It never dropped a question. When it was full, it made the extra questions wait.

Where vLLM was worst

  • It holds the least text. On a 24 GB card it fit about a third of what llama.cpp fit.

  • No speed boost for one person. The others got faster with a trick called MTP, but it didn't fit in vLLM's memory. So one person chatting was about a third slower than on LM Studio or llama.cpp.

  • Slow to start: about 45 seconds, and over 2.5 minutes the first time.

In short: run vLLM if many people share your server. For just you, the others are faster.


r/Vllm • • 4d ago

vLLM's default 0.92 took 21 GB of my 3090. At 0.6 it ran just as fast: 1,728 vs 1,730 tok/s with 32 requests

Thumbnail
homebrewserver.club
12 Upvotes

I ran vLLM 0.33.0 in Docker on an RTX 3090 (24 GB) with cyankiwi/Qwen3.5-9B-AWQ-4bit and compared it with Ollama. Three things I learned about its memory.

1. The default 0.92 doesn't buy speed. With --max-model-len 32768, vLLM held 20.3 to 21.0 GiB. The weights were 8.4 GiB; almost all the rest was KV cache (315,332 tokens).

SettingGPU memory1 request32 at once (total)
defaults (0.92)20.3 to 21.0 GiB114.2 tok/s1,730 tok/s
0.6, --max-num-seqs 3212.7 GiB114 tok/s1,728 tok/s

2. Lowering it took two settings.

  • 0.5: refused to start. One 32k request needed 1.11 GiB of KV cache and 0.78 GiB was left. Lower --max-model-len for that one.

  • 0.6: refused with a different error. The default of 256 requests per batch didn't fit: Qwen3.5 needs a cache block per request for some of its layers, and only 196 were left. --max-num-seqs 32 fixed it.

3. The full context needs 0.8. Qwen3.5 accepts 262,144 tokens.

  • At 0.6, --max-model-len 262144 refused to start: one request that long needs 8.1 GiB of KV cache, 3.73 GiB was left, and vLLM suggested 118,800.

  • At 0.8 it started with about 16.5 GiB and a 273,609-token pool, so 1.04 full-length requests at a time. Shorter requests share the same pool.

  • A 252,038-token prompt with a number at the start came back with the right number after 139 s, almost all of it reading the prompt.

--max-model-len is only the cap per request; vLLM gives each request blocks for the tokens it uses. So 0.6 is fine for many short requests, and the memory only pays off with many long ones at once.


r/Vllm • • 4d ago

Need help with a local document processing application

Thumbnail reddit.com
1 Upvotes

r/Vllm • • 4d ago

Stanford's New AI Framework Could Change How We Use the Internet

Thumbnail
youtu.be
1 Upvotes

r/Vllm • • 4d ago

Kvark Flash 1.0: a small proxy that makes DeepSeek V4.1-Flash think 30–50% less (same weights, H100 + 2x DGX Spark, all logs public)

Thumbnail
reddit.com
3 Upvotes

r/Vllm • • 6d ago

Gemma 4 31B fine-tune for drug-level sentiment in medical text, appreciate feedback

6 Upvotes

I fine-tuned Gemma 4 31B for drug-level sentiment.

Input: a pharma or medical text plus a list of drugs.

Output: one Positive/Neutral/Negative label per drug, as JSON. I'm looking for people to test it on their own data.

Apache 2.0. Gated with automatic approval (you tick a box saying you won't use it for diagnosis or treatment decisions).

Sentiment, 473 held-out labels

ModelAccuracy
This fine-tune91.3%
Gemma 4 31B base90.5%
Qwen3.8-27B83.5%
Qwen3-32B83.3%
MedGemma 27B82.9%
Llama 3.1 8B76.3%

The other models were asked about one drug at a time with a long labelling prompt. Asked for all drugs at once in JSON, base Gemma scored 32% because 59% of its answers didn't parse. The fine-tune had no malformed JSON in 1,500 test answers. Negative precision: 84% vs 71% for base (45 Negatives in the test set).

Medical benchmarks

BenchmarksThis fine-tuneBest frontier score found
MedQA (thinking)94.296.5 (o1)
MedMCQA, 1k sample (thinking)81.483.9 (o1-preview)
MMLU medical (step by step)94.296.0 (GPT-5)
PubMedQA (thinking)80.282.0 (GPT-4 + Medprompt)

Frontier scores are from the Vals.ai MedQA leaderboard and published papers. Fine-tuning kept Gemma's medical knowledge: the scores match the base model.

Testing

Use the prompt format from the model card, thinking off and temperature 0. The FP8 build runs on vLLM (command on the card) and needs about 31 GiB of VRAM for the weights. I've only run it on a 96 GB RTX PRO 6000.

Useful feedback:

  • wrong labels, with the text, the drugs and the label you expected

  • document types, languages or lengths (over 4k tokens) it wasn't trained on

  • hardware and VRAM reports, especially from 48 GB cards

Trained on ~50k curated pharma and medical documents, LoRA rank 16.


r/Vllm • • 6d ago

kill -9 on a vLLM replica mid-answer: 94 of 94 answers finished on another replica with the same tokens (batch invariance on)

6 Upvotes

I wrote a small router that sits in front of vLLM replicas and keeps an answer going when a replica dies mid-stream.

The replay itself is not new: NVIDIA Dynamo has request migration and LiteLLM has a mid-stream fallback. What I wanted to check is whether the resumed tail can be exactly the tokens the dead replica would have produced. With vLLM's batch invariance it was, in every case I ran.

The router logs the token IDs of every answer. If a replica is killed or hangs, it sends the prompt IDs plus the IDs already emitted to another replica with the same seed, and the stream picks up at the next token.

Tested on vLLM 0.33.0 with two rented RTX 4090 (the 48 GB modded kind) on two separate machines. Models: Qwen2.5-1.5B, Qwen2.5-7B and Qwen3-1.7B in bf16. A later check on a fourth machine with a different driver version gave the same tokens for the same requests, and so did vLLM 0.34.0 on the one request I tried.

With VLLM_BATCH_INVARIANT=1 the resumed answer matched a control run token for token in 2124 cuts out of 2124, logprobs bit-identical. In 300 of those the answer started on one machine and finished on the other.

kill -9 on a replica in the middle of an answer: 94 answers out of 94 came out identical to the control. The client saw a pause of 30 to 80 ms on the pilot machines and about 180 ms on the machine in the video. On that one most of the pause is the OS closing the dead process's connection. A hung replica costs about a second, that is my stall timeout.

Without batch invariance, which is how vLLM runs by default, the answer still finishes after a failure: no errors in 185 runs through the router. But 55 to 65% of resumed answers drift away from the control, the text just goes somewhere else.

Batch invariance is not free. At 16 concurrent streams throughput dropped 3.3x on Qwen2.5-1.5B, 2.7x on Qwen3-1.7B and 2.1x on Qwen2.5-7B. These are short series, not a load test.

So there are two modes. Fast is the default: full speed, the answer survives, the tail is a different sample. Strict costs throughput and gives the same tokens.

Things that break the resume: presence_penalty, frequency_penalty, structured outputs, and requests with no seed. top_p, top_k, min_p, repetition_penalty, logit_bias and stop strings survive it. That is measured against vLLM directly. The router itself forwards only temperature, top_p, seed and max_tokens for now and answers 400 to the rest.

Not tested yet: replicas on different GPU models, quantized weights, tensor parallelism, real spot preemption.

This is the first piece of something bigger: I want inference to move between cheap interruptible GPUs without dropping answers.

Code and raw logs are here: https://github.com/Pessimist228/undead. If you know a case where this should fall apart, tell me and I will run it.


r/Vllm • • 6d ago

Looking for a fast, open-source LLM under 5B for Markdown-to-JSON extraction

Thumbnail reddit.com
3 Upvotes

r/Vllm • • 7d ago

Ling-3.0-flash-Sante FP8 across two DGX Sparks: vLLM setup and a completed smoke test

Thumbnail
gallery
9 Upvotes

This local run loads AntLing's Ling-3.0-flash-Sante using the official 128.4 GB FP8 checkpoint across two DGX Spark machines, with 256 GB of unified memory in total. The model has 124B parameters, 5.1B active per token and a 256K context specification.
The attached configuration records vLLM 0.34, tensor parallelism of 2 and MTP with 3 speculative tokens. The reported single-stream smoke test reaches 59.6 tokens per second with 0.22 seconds to the first token.
The test question asks how kidneys regulate blood pressure. The run reports an explanation covering the renin and aldosterone steps, with 1,087 thinking tokens on that question.
This gives a concrete configuration to compare against for a local deployment: checkpoint size, machine count, serving version, parallelism and MTP settings, followed by an actual question and its timings. Keeping the question and those settings with the speed reading makes subsequent runs easier to compare.


r/Vllm • • 7d ago

I tested running 8 AI requests at once instead of 1 on one GPU. The server did about 3x the work.

Thumbnail reddit.com
0 Upvotes