LLM API Guide

Qwen3.8-27B-FP8 vLLM Deployment Errors: GPU Compatibility, Marlin Kernel Fixes

Fix Qwen3.8-27B-FP8 vLLM deployment errors on RTX 3090, 4090, A100, and L40S with the right Marlin W8A16 kernel flags, VRAM limits, and launch commands.

Summary

  1. Qwen/Qwen3.8-27B-FP8 weighs 28.75 GiB on disk and in VRAM, so a single 24 GB GPU (RTX 3090 or 4090) always OOMs and requires --tensor-parallel-size 2.
  2. Ada Lovelace (SM89), Hopper (SM90), and Blackwell (SM100/120) run native W8A8 FP8, while Ampere (RTX 3090, A100) uses Marlin W8A16.
  3. Startup hangs and crashes are fixed by upgrading to transformers=5.8.0 and vLLM 0.29.0+, setting --enforce-eager.

When vllm serve Qwen/Qwen3.8-27B-FP8 crashes during initialization or hangs indefinitely at warmup, the failure almost always comes down to one of three things: forcing native W8A8 FP8 instructions onto an Ampere GPU (like an RTX 3090 or A100) instead of routing through the Marlin W8A16 kernel, trying to fit 28.75 GiB of weights onto a single 24 GB card, or letting vLLM stall while capturing CUDA graphs across the model's hybrid attention and vision layers.

Before changing your launch flags, check your package versions inside the container or virtual environment. While the official vLLM Qwen3.8 recipe lists base architecture support starting at vLLM 0.17.0+, I run vLLM 0.26.0 as the floor for stable long-context serving and vLLM 0.29.0+ whenever Multi-Token Prediction (MTP) is enabled. You also need transformers>=5.8.0 installed, because the official checkpoint (Qwen3_5ForConditionalGeneration, model_type: qwen3_5) relies on the Qwen3-VL processor classes written against that release.


On this page

Why a Single 24 GB RTX 3090 or 4090 Always Hits OOM

The most common mistake I see when deploying the official Qwen/Qwen3.8-27B-FP8 checkpoint is assuming that a 27-billion-parameter model quantized to 8-bit will fit inside a single 24 GB consumer GPU. It will not, even if you drop --max-model-len to 512.

Although the dense transformer backbone uses fine-grained 128×128 block E4M3 quantization, several large components inside the checkpoint remain unquantized at 16-bit precision to preserve accuracy. Those unquantized modules include the native Vision Encoder, the padded 248,320-token Embedding table, the LM Head, and LayerNorm layers.

Checkpoint Hugging Face Repo Safetensors Shards Exact Weight Size Minimum GPU Setup
FP8 (E4M3 Block 128×128) Qwen/Qwen3.8-27B-FP8 66 30,866,866,928 bytes (28.75 GiB) 2× 24 GB (TP=2) or 1× 48 GB+ (TP=1)
BF16 (Full Precision) Qwen/Qwen3.8-27B 18 55,563,006,776 bytes (51.75 GiB) 2× 48 GB (TP=2) or 1× 80 GB (TP=1)

Because the raw FP8 weights occupy 28.75 GiB before a single byte of KV cache or activation workspace is allocated, a single 24 GB RTX 3090 or RTX 4090 dies during weight loading. To run the official FP8 checkpoint on 24 GB cards, you must use at least two GPUs with --tensor-parallel-size 2. Splitting the model across two 24 GB cards puts roughly 14.4 GiB of weights on each GPU, leaving around 9.6 GiB per card for the KV cache, runtime activations, and speculative decoding heads.

If you only have a single GPU, you need a 48 GB workstation or data center card (such as an L20, L40S, or RTX 6000 Ada) or an 80 GB A100/H100. Even on a 32 GB consumer Blackwell RTX 5090 (which exposes 31.4 GiB of usable VRAM), the 28.75 GiB FP8 checkpoint leaves less than 2.7 GiB for activations and KV cache—making 4-bit NVFP4 (Inferact/Qwen3.8-27B-NVFP4 or unsloth/Qwen3.8-27B-NVFP4) the practical choice for single-card 32 GB setups.


GPU Compatibility: Native W8A8 FP8 vs. Marlin W8A16 Kernel

Having enough VRAM gets the weights onto the cards, but your GPU's compute capability determines how vLLM executes the matrix multiplications. Not every GPU that loads an FP8 checkpoint actually computes in FP8.

Hardware-native FP8 execution (W8A8, where both weights and activations stay in 8-bit floating point) requires fourth- or fifth-generation Tensor Cores found on NVIDIA architectures with Compute Capability 8.9 (SM89) or higher. Older architectures—including Ampere (RTX 3090, A100), Turing (RTX 2080 Ti, T4), and Volta (V100)—only support INT8, FP16, and BF16 in their hardware Tensor Cores.

As detailed in the vLLM FP8 quantization documentation and the Qwen vLLM deployment guide, vLLM bridges this hardware gap on Ampere and Turing cards using the Marlin kernel. Under Marlin, the model runs as W8A16 (weight-only FP8). Your GPU still keeps the weights compressed in 8-bit FP8 inside VRAM—cutting both memory footprint and memory bandwidth bottlenecks in half—but the Marlin kernel dequantizes each 128×128 weight block into FP16 on the fly inside the streaming multiprocessors and multiplies them against FP16 activations.

GPU Architecture Compute Capability Example GPUs FP8 Execution Mode Required vLLM Backend Flags
Blackwell SM100 / SM120 B200, GB200, RTX 5090 Native W8A8 FP8 (CUTLASS) & W4A4 NVFP4 Automatic (vLLM auto-disables DeepGemm for qwen3_5_text and uses CUTLASS)
Hopper SM90 H100, H200, H800 Native W8A8 FP8 Tensor Core GEMM Automatic (no extra linear backend flag needed)
Ada Lovelace SM89 RTX 4090, L20, L40, L40S, RTX 6000 Ada Native W8A8 FP8 Tensor Core GEMM Automatic (falls back to default kernel if specific block shapes lack tuned configs)
Ampere SM80 / SM86 A100, A6000, A10, RTX 3090, RTX 3080 W8A16 (FP8 weights dequantized to FP16 via Marlin) --linear-backend marlin --dtype float16
Turing / Volta SM75 / SM70 T4, RTX 2080 Ti, V100 W8A16 / Emulated Dequantization --linear-backend marlin --dtype float16 (Turing)

If you let an Ampere GPU attempt native W8A8 execution or leave the activation dtype in BF16 when invoking the Marlin backend on older vLLM builds, the engine will crash during kernel dispatch.


Fixing Specific Qwen3.8-27B-FP8 vLLM Deployment Errors

When a deployment fails, match the symptom in your terminal log to the exact parameter fix below.

1. RuntimeError: CUDA error: invalid device function or FP8 GEMM Crash on RTX 3090 / A100

When running Qwen/Qwen3.8-27B-FP8 on two RTX 3090s or an A100, vLLM can fail during the initial forward pass with an invalid device function error or a complaint that hardware FP8 GEMM is unsupported on SM80/SM86.

Force vLLM to use the Marlin W8A16 linear backend and lock the compute dtype to 16-bit floating point:

bash
--linear-backend marlin --dtype float16

If you also pass --kv-cache-dtype fp8 on an older driver or pre-Ada card and see errors regarding missing k_scale / v_scale calibration values or unsupported cache kernels, switch the KV cache flag to --kv-cache-dtype auto.

2. vllm serve Hangs Indefinitely at Startup or Warmup

A silent hang where GPU utilization sits at 0% or 100% without printing an error traceback happens for two reasons on Qwen3.8-27B.

First, Qwen3.8-27B uses a 64-layer hybrid architecture: only 16 layers run standard Gated Attention (full_attention_interval: 4), while the other 48 layers run recurrent Gated DeltaNet linear attention. Capturing CUDA graphs across this mixed layer stack—especially over consumer dual-GPU PCIe setups operating through a PCIe Host Bridge (PHB) without NVLink or P2P—frequently deadlocks.

Second, because Qwen3_5ForConditionalGeneration includes a vision_config, vLLM initializes the multimodal processor and runs dummy image/video warmup passes at startup.

Add both of these flags to break the hang:

bash
--enforce-eager --language-model-only

--enforce-eager disables CUDA graph capture so the server boots reliably in PyTorch eager mode (which also saves around 0.89 GiB of unmanaged graph memory per GPU). --language-model-only tells vLLM to skip loading and warming up the vision encoder completely when you only need a text and coding API.

3. ValueError: Unrecognized model or Qwen3-VL Processor Import Failure

If vLLM crashes immediately while reading config.json or instantiating the tokenizer processor, your transformers package is outdated. Even though vLLM parses the model configuration with its own internal Qwen3_5Config class, it still imports the Qwen3-VL processor classes from Hugging Face transformers.

Upgrade transformers to 5.8.0 or newer before starting the container:

bash
uv pip install -U "transformers>=5.8.0"

If you run a pinned Docker image such as vllm/vllm-openai:v0.26.0-cu129, run this check before allocating GPUs to confirm both the package version and model registry support:

bash
python3 -c 'import transformers, vllm; from vllm.model_executor.models import ModelRegistry; print(transformers.__version__, vllm.__version__, "Qwen3_5ForConditionalGeneration" in ModelRegistry.get_supported_archs())'

4. torch.OutOfMemoryError During KV Cache Profiling or Graph Capture

Qwen3.8-27B ships with a native context window of 262,144 tokens in config.json. If you do not pass --max-model-len, vLLM tries to validate workspace and KV allocation for a 262K window at startup, immediately exhausting VRAM on 2× 24 GB or 1× 48 GB setups.

Another subtle OOM happens during CUDA graph capture on tight VRAM budgets (such as 2× 24 GB RTX 3090s or a single 32 GB RTX 5090): raising or lowering --gpu-memory-utilization from 0.80 to 0.93 will not save a failing startup, because --gpu-memory-utilization only budgets for weights and the KV cache, whereas CUDA graph capture allocates roughly 780 MiB to 900 MiB outside that budget.

Fix initialization OOMs by capping the context window, limiting concurrent sequences, and turning off CUDA graphs:

bash
--max-model-len 32768 --max-num-seqs 4 --gpu-memory-utilization 0.90 --enforce-eager

5. Infinite Token Loops with Multi-Token Prediction (MTP) or Missing Answers

Qwen3.8-27B includes an in-checkpoint Multi-Token Prediction head that drafts tokens ahead to speed up generation. On vLLM versions prior to 0.29.0, combining block-wise FP8 weights with --speculative-config can trigger a verification bug where the model repeats the same sentence endlessly. If you hit repetition loops, upgrade to vLLM 0.29.0+ or remove --speculative-config until your image is updated.

In addition, Qwen3.8-27B enables thinking mode by default and opens every assistant turn with <think>. If you omit --reasoning-parser qwen3, the entire chain-of-thought block lands inside message.content, which can burn through a 2,048-token max_tokens client limit before the actual answer or tool call even starts.


Tested vLLM Launch Commands and Throughput Tuning

Prices in this section are as of 2026-11-16.

Once you match the flags to your hardware, you can tune concurrency and speculative decoding.

Dual RTX 3090 / 4090 (2× 24 GB Consumer Setup)

On a dual RTX 3090 host connected over PCIe (x16 and x4 lanes via PHB, no NVLink), Tensor Parallelism (TP=2) outperforms Pipeline Parallelism (PP=2) for interactive coding and local API serving. Use the command below on vLLM 0.29.0+:

bash
vllm serve Qwen/Qwen3.8-27B-FP8 \
  --served-model-name qwen3.8-27b \
  --tensor-parallel-size 2 \
  --pipeline-parallel-size 1 \
  --distributed-executor-backend mp \
  --dtype float16 \
  --linear-backend marlin \
  --max-model-len 32768 \
  --max-num-seqs 4 \
  --max-num-batched-tokens 2048 \
  --gpu-memory-utilization 0.90 \
  --kv-cache-dtype fp8 \
  --enable-prefix-caching \
  --enforce-eager \
  --language-model-only \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_coder \
  --speculative-config '{"method":"mtp","num_speculative_tokens":2}'

With both RTX 3090s power-capped at 150W, enabling the in-checkpoint MTP head (num_speculative_tokens: 2) alongside the Marlin kernel increases single-stream output speed from 13.45 tok/s to 25.14 tok/s—an 86.96% throughput gain while cutting approximate GPU energy per token by 10.23%. Time to first token (TTFT) only increases slightly from 185 ms to 219 ms. If you are running RTX 4090s instead of 3090s, you can drop --linear-backend marlin --dtype float16 so vLLM uses native Ada SM89 FP8 kernels. For deeper multi-card scaling numbers up to 4 GPUs, see our Qwen3.8-27B RTX 3090 1-to-4 GPU benchmarks.

Single L40S / L20 (48 GB) or A100 / H100 (80 GB) High-Concurrency Server

On a single 48 GB Ada Lovelace card (such as an L20 or L40S) or an 80 GB Hopper H100, you no longer need tensor parallelism or --enforce-eager. On a 48 GB GPU (46,068 MiB usable), loading Qwen/Qwen3.8-27B-FP8 takes 27.64 GiB for model weights, 2.62 GiB for peak activations, and 0.89 GiB for CUDA graphs, leaving 8.69 GiB for an FP8 KV cache that holds 219,666 tokens (supporting ~6.7× concurrency at a full 32K context length).

Use this configuration to maximize multi-request throughput with chunked prefill and prefix caching:

bash
vllm serve Qwen/Qwen3.8-27B-FP8 \
  --host 0.0.0.0 \
  --port 8000 \
  --served-model-name qwen3.8-27b \
  --tensor-parallel-size 1 \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.92 \
  --max-num-seqs 16 \
  --max-num-batched-tokens 8192 \
  --kv-cache-dtype fp8 \
  --enable-prefix-caching \
  --enable-chunked-prefill \
  --language-model-only \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_coder \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3}'

If you deploy this single-GPU profile on an 80 GB A100 (Ampere SM80) instead of an L40S or H100, append --linear-backend marlin --dtype float16 so the A100 uses the Marlin W8A16 path.

When tuning num_speculative_tokens between 2 and 3, check the Prometheus metric vllm:spec_decode_num_accepted_tokens_total divided by vllm:spec_decode_num_draft_tokens_total on your /metrics endpoint. On FP8 weights, an MTP acceptance rate around 0.75 to 0.77 confirms the drafter head is actively accelerating decode steps rather than adding rejected draft overhead.

Once your vLLM server is listening on port 8000 with --tool-call-parser qwen3_coder and --reasoning-parser qwen3, you can wire it directly into agentic coding tools. Because Qwen3.8-27B hits 61.7 on SWE-bench Pro and 73.0 on Terminal-Bench 2.1 under the Apache 2.0 license, running it locally avoids the $0.50 per 1M input tokens and $3.00 per 1M output tokens charged by hosted providers (see our Qwen API pricing breakdown for the full cost comparison). To connect your local endpoint to an editor agent, follow our step-by-step setup on how to use Qwen 27B in Claude Code.

Sources and checks

  1. official vLLM Qwen3.8 recipe
  2. official Qwen/Qwen3.8-27B-FP8 checkpoint
  3. vLLM FP8 quantization documentation
  4. Qwen vLLM deployment guide