Skip to content
Back to blog
qwen3.8Article

llama.cpp or vLLM for Qwen3.8-27B on an RTX 3090?

A patched vLLM profile won one complete Qwen Code task. llama.cpp remained the simpler fallback. Here is what the evidence covers and what it leaves open.

Author

Syntalith

Published Updated 4 min read

On one home RTX 3090, we compared two ways to serve Qwen3.8-27B. On a matched Go repair, the patched-vLLM profile finished in 502.14 seconds and received 100/100. The llama.cpp profile took 1,468.76 seconds and received 98/100. Each result comes from one run.

This is a comparison of complete configurations. Engine, weight format, KV memory and context limit changed together, so the table selects an operating profile for this experiment. It cannot isolate quantization quality or an intrinsic engine advantage.

The full records are available in the benchmark summary and the 150k task metrics. The experiment ran after hours on a home PC with one GPU and one active inference slot.

What is being compared

llama.cpp is an inference engine. This profile used an Unsloth Dynamic V3 Q4_K_M GGUF file. GGUF keeps weights and their settings in one artifact, while llama.cpp can run across different CPUs and GPUs and offload part of the work between CPU and GPU. That path makes moving and reproducing a service straightforward.

vLLM is an inference server. It accepts requests, manages memory for active contexts and exposes client interfaces, including an OpenAI-compatible interface. Our measurement used a frozen third-party patched stack and a fast W4A16 AutoRound weight variant. That artifact is a different format from GGUF.

W4A16 roughly means 4-bit weights with 16-bit activations. A KV cache stores intermediate attention values for tokens already in the context. Its format and size affect how much text fits in GPU memory. A context limit is the maximum token count for a particular serving profile, separate from the model's advertised capability.

The coding-task result

The task repaired two Go paths that ignored json.Marshal errors. The agent had to preserve successful response formats, add deterministic failure behaviour, add regression tests, build the project and update documentation.

Complete profileContextElapsed timeCodex scoreCompactions
llama.cpp, Dynamic V3 Q4_K_M120,0001,468.76 s98/1001
patched vLLM, fast W4A16 AutoRound150,000502.14 s100/1000

Compaction is the harness, the program that conducts an agent session, shortening the conversation when the context window fills. A 0 means the event did not occur in the recorded run; a 1 means it occurred once.

OpenAI Codex assigned both scores under the Syntalith rubric: 40 points for error-handling correctness, 20 for regression tests, 15 for API compatibility, 10 for scope, 10 for test and build verification, and 5 for documentation. A maximum score means Codex found no deduction under that rubric in this run. It is neither an independent laboratory audit nor a repeatability guarantee.

The vLLM profile reached a recorded maximum of 22,539 MiB of VRAM. The card has 24 GB, so the remaining margin was limited. Both timings include the agent, tool calls and checks, rather than a single decode step.

What the long-context test shows

A separate test planted three exact facts near the beginning, middle and end of a synthetic record, then asked for the three values as JSON. All three checked facts were returned for inputs of 50,059, 115,074 and 230,085 tokens.

Length profileInput tokensGenerationWall timePeak VRAM
60k50,05949.24 tok/s59.3 s22,287 MiB
120k115,07440.46 tok/s172.6 s22,649 MiB
250k230,08528.05 tok/s563.4 s23,623 MiB

Tok/s is generated-token throughput. Wall time covers the recorded run, and peak VRAM is the highest observed GPU-memory use. Each length ran once. The evidence file does not assign these rows to llama.cpp or vLLM separately, so they cannot serve as a direct engine ranking. The test checks retrieval of three planted facts; it does not establish comprehension of arbitrary long documents.

When llama.cpp is the right first choice

This path fits a one-GPU pilot, a personal workstation and a service that must move between machines. One GGUF file is easy to archive. Broad hardware support and partial offload provide another recovery path. Fewer private patches reduce upgrade work.

The experiment retained a llama.cpp fallback with Dynamic V3 Q4_K_M and a 120k limit. After switching engines, check the model, context limit and a short response again. A 150k session cannot automatically resume against a 120k server.

When vLLM earns its complexity

The selected vLLM profile is a candidate when long tasks are frequent, its time margin repeats on a fixed acceptance set and the team can maintain the image, weights and interface compatibility. A server also creates a useful base for later queue and multi-request measurements.

The trade-off is ownership. A frozen out-of-tree stack needs its own version record, a post-driver-update test and a verified return to the last working profile. One GPU and one slot in this experiment provide no team-throughput evidence.

A decision grounded in the evidence

NeedFirst candidate
fast pilot on one GPUllama.cpp with GGUF
simple fallbackllama.cpp
long tasks that pass a fixed testmeasured vLLM profile
several usersseparate queue and concurrency test
low ownership costprofile without a private patch

An operational rollout should include the selected profile, weight and image versions, a restart test and a verified recovery path. An AI process audit can define a test around real work, while a free process scan helps identify whether the bottleneck is the model, server or task flow.

Free process scan

Start with a free process scan.

  • A 30-minute call with the engineer who would lead the work.
  • A review of the processes that cost you the most time and money.
  • A written summary of what to automate first and the likely cost range.

The scan chooses one process to assess, and within 2 business days you receive a recommendation, including when a simpler route is the better fit.

€0

30 minutes · written takeaway within 2 business days

Book a free process scan (30 min)

Times are shown in your own time zone. We work with clients across time zones.

Describe the process in the form