AI News

Qwen3.8-27B vs DeepSeek V4 Flash-0731: Real Coding, Agent and Local-Use Tests

Qwen3.8-27B and DeepSeek V4 Flash-0731 are being compared as if they were two substitutes in the same weight class. They are not.

Qwen3.8-27B is a 27.8-billion-parameter dense, multimodal model that can be made fully resident on a 24GB GPU at an appropriate quantization. DeepSeek V4 Flash-0731 is a text-only mixture-of-experts model with 284 billion base parameters, 13 billion active per token and published weight shards totalling roughly 155GiB once its attached speculative-decoding components are included. The official files use packed FP4 experts with FP8 and higher-precision components; all experts still need residency.

That difference produces two valid comparisons:

  1. Local ownership: Which model gives a developer the best private coding and agent experience on hardware they can realistically own?
  2. Capability and cost: Which model completes more demanding work through an appropriate full-quality deployment, and what does each successful task cost?

Mix those lanes and the result becomes nonsense. A 17–18GB Qwen quant running on one consumer GPU is not an equal-residency opponent for a model whose official serving example uses four GB300 accelerators. Conversely, comparing that local Qwen quant with DeepSeek’s first-party API does not tell us which base model is intrinsically better; it tells us which product route is better for the job.

This review keeps the lanes separate.

Testing disclosure: Kingy did not run these models on private API credits or a dedicated multi-GPU lab for this article. The results below are a source-audited synthesis of exact official checkpoints, independent benchmark results and reproducible public local tests available by 18 August 2026. Community measurements are labelled as such. Missing failure transcripts and unmatched harnesses are treated as evidence gaps, not filled with invented numbers.

The verdict in 60 seconds

For a 24GB local coding machine, choose Qwen3.8-27B. A 5-bit-class quant is about 17GB, retains room for a useful KV cache and has public reports around 43–57 output tokens per second on high-end consumer hardware. Qwen is also the only model here with native image and video understanding, which matters for screenshot debugging and computer-use loops.

For the highest agentic ceiling at very low API cost, choose DeepSeek V4 Flash-0731. DeepSeek leads Qwen on the vendors’ published Terminal-Bench, NL2Repo and DeepSWE results, and it scored 50 on Artificial Analysis’s independent Intelligence Index. Its first-party API is aggressively priced at $0.14 per million uncached input tokens, $0.0028 per million cached input tokens and $0.28 per million output tokens.

For an owned 128GB unified-memory workstation, Qwen is still the safer default. DeepSeek can be compressed into that class, but a public 108.2GB 2/3-bit-expert quant lost 17 percentage points on a 200-question MMLU sample against its native teacher. In a separate small public comparison, Qwen’s roughly 5-bit quant beat that DeepSeek quant on MMLU and HumanEval. This is evidence about those quantizations, not proof that Qwen’s full model is stronger.

For long text, DeepSeek has the cleaner specification. DeepSeek is trained and configured for a 1,048,576-token window. Qwen is native to 262,144 tokens and reaches one million through YaRN scaling; Qwen warns that static YaRN can reduce quality on shorter inputs.

There is no honest universal winner. The useful answer is a routing decision:

Scroll or swipe to compare →

Your priority Better first choice Why
Private local coding on one 24GB GPU Qwen3.8-27B Actually fits at a useful quant; full ownership; multimodal input
Maximum agent capability via API DeepSeek V4 Flash-0731 Stronger published agent benchmarks; 1M native context; very low first-party price
Browser/computer use Qwen, provisionally Multimodal architecture and one public browser run favour it, but evidence is thin
Million-token text analysis DeepSeek Native 1M configuration rather than scaled extension
Screenshot or video-grounded work Qwen DeepSeek V4 Flash-0731 is text-only
Low cost per successful repeated task Measure it DeepSeek cache pricing is exceptional; local Qwen wins on privacy and marginal token cost, not necessarily total cost
Commercial self-hosting rights Either Qwen uses Apache 2.0; DeepSeek uses MIT

First, compare the exact models

The names are already causing bad comparisons. “Qwen 3.8” can mean the much larger Qwen3.8-Max API model or the downloadable Qwen3.8-27B checkpoint. “DeepSeek V4 Flash” can mean April’s preview, the dated 0731 release, an API alias that changes over time, or a third-party quant.

Here is the identity card that every benchmark should publish:

Scroll or swipe to compare →

Specification Qwen3.8-27B DeepSeek V4 Flash-0731
Exact weights Qwen/Qwen3.8-27B deepseek-ai/DeepSeek-V4-Flash-0731
Release 14 August 2026 31 July 2026
Architecture Dense hybrid linear/full attention Sparse MoE with compressed attention
Base parameter count 27.78B 284B total, 13B active/token
Official published weight files BF16: 55.56GB decimal / 51.75GiB Packed FP4/FP8 mixed precision: 166.89GB decimal / 155.43GiB
Hugging Face tensor inventory About 27.8B About 304B including attached drafter/auxiliary tensors
Native context 262,144 1,048,576
Extended context Up to 1,000,000 using YaRN Not required for advertised 1M window
Input Text, image and video Text
Reasoning levels low, medium, xhigh low, high, max
Speculative decoding Multi-step MTP trained in Attached DSpark module
Licence Apache 2.0 MIT
Official first-party 27B API Announced as “coming soon” at cutoff Live as deepseek-v4-flash

Why does the DeepSeek repository show roughly 304 billion tensors when the technical report describes a 284-billion-parameter model? The model card says the 0731 checkpoint carries an attached DSpark speculative-decoding module. The 284B/13B figures describe the base architecture; the repository inventory includes the additional draft and auxiliary tensors. For deployment planning, use the file footprint. For architecture comparisons, use 284B total and 13B active.

The phrase “13B active” also needs care. It explains DeepSeek’s compute efficiency, not its memory footprint. A sparse model can consult a small subset of experts for each token while still requiring all experts to be available for arbitrary future tokens. Activation count does not turn 155GiB of weights into a 13B laptop model.

Architecture: why Qwen fits and DeepSeek reaches higher

Qwen3.8-27B uses 64 language layers: 48 Gated DeltaNet linear-attention layers and 16 gated full-attention layers, arranged as repeated groups of three linear-attention blocks followed by one full-attention block. It has 24 query heads, four key/value heads and a 5,120-wide hidden state. That hybrid design reduces the cost of long-sequence processing while preserving periodic full attention. The checkpoint is trained with multi-token prediction, which serving engines can exploit for faster decoding.

DeepSeek V4 Flash’s base model has 43 layers, 256 routed experts, six routed experts selected per token and a shared expert. Its report combines manifold-constrained hyper-connections, compressed sparse attention and a heavily compressed attention path. DeepSeek trained the V4 family on 32 trillion tokens and extended training to million-token sequences. The attached DSpark drafter proposes multiple future tokens so the target model can accept several at once.

The practical distinction is simple:

  • Qwen spends memory on one dense 27.8B model and is engineered to make long context feasible on limited hardware.
  • DeepSeek spends storage and bandwidth on a far larger pool of learned experts, activates only a fraction for each token, and relies on serious serving infrastructure to turn that scale into throughput.

DeepSeek may have only 13B parameters active per token, but the larger expert pool can encode more specialised knowledge. Qwen cannot conjure the capacity of a 284B model. DeepSeek cannot erase the ownership and latency advantages of a model that sits entirely on one local GPU.

How we judged the evidence

This comparison uses four evidence tiers:

  1. Official specifications: model cards, configuration files, licences, weight manifests, deployment recipes and the DeepSeek V4 technical report.
  2. Independent evaluation: Artificial Analysis’s shared Intelligence Index methodology.
  3. Public head-to-head tests: same-post browser and local benchmark comparisons where exact variants were disclosed.
  4. Community deployment reports: useful for fit and speed, but hardware, thermals, runtime commits and sampling settings can differ.

Official vendor benchmark tables are included because they reveal intended strengths. They are not treated as a clean head-to-head. Qwen ran many coding tasks in a Claude Code harness at xhigh; DeepSeek used its own “minimal mode” harness, which the card says will be released, at max. A five-point difference across unmatched agents can reflect the scaffolding as much as the model.

The independent evidence is also not a final word. Artificial Analysis gave Qwen3.8-27B an Intelligence Index score of 52 and DeepSeek V4 Flash-0731 50, but Qwen generated about 160 million output tokens across the suite while DeepSeek used about 206 million. The index controls many things better than a Reddit post, yet reasoning budgets and token use remain part of the product behaviour. “52 beats 50” does not mean Qwen will close more repository issues per dollar.

Lane one: local ownership

Qwen3.8-27B on 24GB

The BF16 checkpoint is roughly 51.75GiB, so the full-precision model does not fit on a 24GB card. The ownership case starts with quantization.

A public True2456 5.0-bits-per-weight AWQ build is 17.36GB. On an M5 Max, its author measured roughly 42.8 tokens/s at a 1K prompt, 56.5 tokens/s at 4K and 54.3 tokens/s at 8K, with peak memory between 17.6GB and 20.2GB. Longer-context results used sparse prefill, so they should not be compared as identical work.

On discrete GPUs, community results are similarly practical. One RTX 4090 report used a Q4_K_M quant, a BF16 vision projector, quantized KV cache and full GPU offload at a reported 47–57 tokens/s with 160K context configured. A separate RTX 3090 result reported 65.3 tokens/s without MTP and 75.1 with MTP2 at 131K context, plus about 705 prompt-processing tokens/s. These are single-user community reports, not Kingy lab replications, but they establish plausibility.

Memory is not just weights. From Qwen’s 16 full-attention layers, four KV heads and 256-dimensional heads, an unquantized KV cache works out to about 64KiB per token for keys plus values. A full 262,144-token cache is therefore about 16GiB in BF16, roughly 8GiB at 8-bit and about 4GiB at 4-bit, before runtime overhead. On 24GB, “fits” always means choosing a context target and cache precision, not merely loading the weight file.

For a stable 24GB coding setup, 32K–96K context is a more defensible default than advertising 262K. Leave headroom for the vision projector, runtime buffers, desktop display use and transient allocations. Increase the window only after measuring peak residency on your own workload.

DeepSeek V4 Flash-0731 locally

DeepSeek’s official vLLM recipe serves the model on one node with four GB300 accelerators. That is local in the deployment sense—your infrastructure, your data path—but not local in the consumer-workstation sense.

The most informative workstation experiment is True2456’s 108.2GB AWQ build. It uses 2/3-bit routed experts and 8-bit precision elsewhere, including a quantized MTP module. On an M5 Max with 128GB unified memory, the author reported about 50.8 tokens/s at a 1K prompt, 49.7 at 4K, 46.4 at 8K and 47.0 at 16K. Peak memory rose from 102.4GB to 106.7GB.

That is an impressive engineering result, but compression quality is the catch. On the author’s 200-question MMLU sample, the native teacher scored 81.5% and the 2/3-bit AWQ model 64.5%: a 17-point drop, with a reported 95% confidence interval of 10.1–23.9 points and McNemar p-value of 3.06×10⁻⁶. A model can decode quickly and still be the wrong deployment choice if compression removes too much of the capability you bought the model for.

So the local-ownership decision is not close:

  • 24GB: Qwen is feasible; DeepSeek is not.
  • 32–64GB: Qwen gains context and precision headroom; DeepSeek still requires heavy offload or impractical compression.
  • 128GB unified memory: both can run in some form, but Qwen is far less compressed and leaves operational headroom.
  • Multi-accelerator server: DeepSeek becomes a serious owned-infrastructure option.

Calling Qwen the “local winner” is not a consolation prize. Privacy, offline availability, fixed routing, inspectable weights and the absence of a provider-side prompt log are capabilities in their own right.

Lane two: capability and cost

Coding and repository work

The official coding-agent numbers favour DeepSeek, with an asterisk the size of the harness:

Scroll or swipe to compare →

Benchmark Qwen3.8-27B vendor result DeepSeek V4 Flash-0731 vendor result
Terminal-Bench 2.1 73.0 82.7
NL2Repo 42.3 54.2
DeepSWE 1.1 42.2 54.4
Agents’ Last Exam 20.4 pass@1 25.2

DeepSeek also reports 76.7 on CyberGym and 70.3 on Toolathlon-Verified. Qwen reports 61.7 on SWE-bench Pro and 79.0 on its in-house QwenSWEBench. These tables say DeepSeek is probably the higher-ceiling text coding agent when both routes are properly served. They do not quantify the gap under the same repository, agent loop, token budget and stopping rule.

Artificial Analysis complicates the story in a useful way. Its exact Qwen checkpoint scored 52 on the Intelligence Index versus 50 for DeepSeek 0731. DeepSeek nevertheless scored 79% on the independent Terminal-Bench 2.1 component and reached 1559 Elo on GDPval-AA v2. The right interpretation is not “benchmarks disagree, ignore them.” It is that aggregate intelligence, terminal operation and cost-efficient task completion are different targets.

A repository test should count more than whether the final patch looks plausible. A successful task must:

  • reproduce the bug before the change;
  • change only in-scope files;
  • pass the relevant existing tests;
  • add a regression test when appropriate;
  • avoid new type, lint or security failures;
  • explain uncertainty instead of silently guessing;
  • finish within a fixed wall-time and token budget.

Until both models run that same protocol, DeepSeek has the stronger published coding-agent case; Qwen has the stronger single-GPU ownership case.

Tool calling and malformed-tool recovery

Both models are designed for tools, but their integration surfaces differ. Qwen’s card demonstrates OpenAI-compatible requests, configurable reasoning effort and preserved thinking state; its announced hosted edition promises official built-in tools. DeepSeek’s 0731 repository does not ship a Jinja chat template. Instead it supplies a dedicated Python encoder and parser for OpenAI-style messages. That is not inherently worse, but it makes prompt serialization part of the reproducibility surface.

DeepSeek’s official thinking-mode integration guidance exposes a concrete failure mode that generic OpenAI-compatible clients can miss. During thinking-mode tool loops, clients must preserve reasoning_content on prior assistant tool-call messages and keep assistant content non-null; omitting those fields can produce HTTP 400 responses. The same guide says thinking mode rejects tool_choice. These are adapter requirements, not proof of weak model reasoning, and they belong in any DeepSeek failure transcript.

The published numbers do not isolate malformed-tool recovery. Toolathlon-Verified measures tool use more broadly; it does not answer these operational questions:

  • Does the model repair a missing required argument after one schema error?
  • Does it avoid repeating the identical invalid call?
  • Does it preserve state after a tool returns malformed JSON or an HTTP 429?
  • Does it stop after a defined retry ceiling?
  • Does it distinguish a recoverable tool failure from an unsafe action requiring approval?

A serious agent benchmark should inject those failures. Score recovery success, invalid-call count, duplicate side-effect attempts, tokens to recovery and wall time to recovery. A model that succeeds 78% of the time but retries a payment call twice is not better than one that succeeds 74% safely.

At the evidence cutoff, no cited head-to-head publishes complete malformed-tool transcripts for both exact checkpoints. That gap prevents a winner call in this category.

Browser and computer-use tasks

One public BU Bench v1 comparison used the open Visnia browser-agent harness. It reported:

Scroll or swipe to compare →

Model and setting Success Total duration
Qwen3.8-27B, FP8, xhigh 74% 38,863 seconds
DeepSeek V4 Flash, FP8, high 71% 107,372 seconds

The poster later said both models were fully loaded in VRAM on the same GPU type. Qwen won by three percentage points and completed the batch in about 36% of DeepSeek’s reported time. That is promising evidence for Qwen, especially because Qwen natively accepts images while DeepSeek 0731 is text-only.

It is not definitive. The post does not publish enough information about provider hardware, task count, repeated runs, confidence intervals, exact prompt templates or whether DeepSeek’s visual state was mediated by another component. The reasoning levels also differ. Treat it as a public result worth reproducing, not a universal browser leaderboard.

Reasoning and answer verification

Raw answer accuracy rewards lucky guesses. For reasoning tasks, require a verifier that can independently check the result: execute generated code, substitute a numeric answer back into the constraints, query a deterministic solver or compare citations against the supplied document.

Artificial Analysis reported GPQA Diamond scores of 89.2 for Qwen in Qwen’s table and 91% for DeepSeek in its independent 0731 analysis, but those figures come from different reporting contexts. More revealing is DeepSeek’s AA-Omniscience result: its hallucination rate fell relative to the April model but remained 84%, with 37% accuracy. The metric deliberately penalises confident wrong answers. A model can become substantially stronger and still need external verification.

For production agents, the winner is therefore the route that maximises verified correct answers per dollar, not chain-of-thought length or self-reported confidence. Both models should be paired with deterministic checks whenever a wrong answer can propagate.

Long context: one million tokens is not one million useful tokens

DeepSeek V4 Flash-0731 is configured for 1,048,576 tokens and its technical report describes training at million-token lengths. Qwen3.8-27B is native at 262,144 and can be extended to one million with YaRN. Qwen explicitly warns that commonly available static YaRN applies the scaling factor at every length and can hurt shorter-text performance.

That gives DeepSeek the specification advantage for text-only million-token work. Qwen still has two practical advantages: it can process visual documents natively, and its smaller footprint makes privately owned long-document workflows more accessible—provided the KV cache fits.

Neither context number proves extraction quality. A useful long-document test should place facts at controlled positions, include conflicting near-matches, require cross-document joins and test instruction priority. Report accuracy by position bucket: first 10%, middle 80%, last 10%. Then repeat with distractors and measure citation precision.

The public evidence does not yet provide a clean exact-checkpoint head-to-head for:

  • long-document extraction recall;
  • instruction adherence after 128K, 256K and 512K tokens;
  • multi-hop joins across distant sections;
  • recovery when a late document contradicts an early one;
  • quality at Qwen’s native 262K versus YaRN-scaled one million.

Do not buy a million-token claim on maximum length alone. Measure the longest window at which your required fact-recall and instruction-adherence thresholds still hold.

Quantized versus hosted quality loss

Quantization is part of the model route, not a footnote.

In a small public M5 Max comparison, Qwen’s BF16 and AWQ variants stayed close: 84.0% versus 83.0% on 200 MMLU questions, 92.5% versus 92.0% on 200 GSM8K questions, and 93.9% versus 93.3% on 164 HumanEval tasks. The DeepSeek AWQ variant in the same post scored 61.0%, 94.5% and 84.8% respectively.

Those results do not establish that Qwen full precision beats DeepSeek full precision. The quantizations are radically different. A 27.8B dense model at roughly five bits per weight gives each weight more fidelity than a 284B MoE squeezed into 108GB with 2/3-bit experts. The correct conclusion is narrower and more useful: under these practical workstation compression choices, Qwen retained more of its teacher’s quality and delivered the better local package.

Every comparison should name:

  • repository and exact revision;
  • quantization method and average bits per weight;
  • expert, attention, embedding and output-head precision;
  • KV-cache precision;
  • runtime and commit;
  • context length and batch/concurrency;
  • whether speculative decoding was enabled;
  • the teacher baseline used to compute quality loss.

Without that information, “DeepSeek local” and “Qwen local” are marketing categories, not reproducible configurations.

Speed, first-token latency, memory and energy

The measurements available today are informative but not directly interchangeable:

Scroll or swipe to compare →

Route Public configuration Reported generation Peak/weight memory Important caveat
Qwen local 5.0bpw AWQ, M5 Max 42.8–56.5 tok/s at 1K–4K 17.6–19.2GB Single community maintainer
Qwen local Q4_K_M, RTX 4090, 160K configured 47–57 tok/s About 22.5GB estimate Community report; not replicated here
Qwen local Q4, RTX 3090, 131K 65.3; 75.1 with MTP2 24GB class Runtime-specific result
DeepSeek local 108.2GB AWQ, M5 Max 128GB 46.4–50.8 tok/s 102.4–106.7GB Material quantization loss
DeepSeek official vLLM/SGLang No single comparable number Four-GB300 example Datacentre-class configuration

Tokens per second alone hide prefill. At 8K, the M5 Qwen AWQ card reports roughly 10.1 seconds to first token; the DeepSeek AWQ card reports 12.8 seconds. At 16K, DeepSeek’s reported TTFT rises to about 30.5 seconds. Different runtimes and prefill methods make even these close comparisons provisional.

Energy is the weakest public category. The RTX 3090 Qwen report cites roughly 320W sustained GPU power, but no matched DeepSeek route publishes wall-plug joules for the same successful tasks. A four-accelerator server cannot be compared with a GPU sensor reading from one desktop. The honest result is no energy winner yet.

Measure wall energy as:

joules per successful task = average wall watts × elapsed seconds ÷ verified successes

Include the host CPU, memory, accelerators and cooling overhead in the meter boundary. For API routes, providers generally do not expose task-level energy, so report cost and latency rather than inventing an environmental estimate.

Cost per successful task

DeepSeek’s first-party API prices deepseek-v4-flash at:

  • $0.0028 per million cache-hit input tokens;
  • $0.14 per million cache-miss input tokens;
  • $0.28 per million output tokens.

Suppose a coding-agent attempt uses 50,000 new input tokens and 10,000 output tokens. The token bill is:

0.05 × $0.14 + 0.01 × $0.28 = $0.0098

If 45,000 of those input tokens hit the cache and only 5,000 are new:

0.045 × $0.0028 + 0.005 × $0.14 + 0.01 × $0.28 = $0.003626

Now include outcome quality. If 100 uncached attempts cost $0.98 and 70 pass independent verification, token cost per successful task is $0.014. If the cache-heavy route costs $0.3626 and also yields 70 verified successes, it is about $0.0052 per success. Retries, tool fees, browser infrastructure and engineer review still need to be added.

For a 500K-token document plus 20K output, DeepSeek costs about $0.0756 with uncached input, or about $0.007 if that full input is a cache hit. That cache discount can dominate repeated repository or document workloads.

Qwen’s exact 27B hosted service was still marked “coming soon” on its official model card at the evidence cutoff. A gateway route named qwen/qwen3.8-27b may exist, but gateway price, quantization, context and provider can change independently. It would be false precision to compare DeepSeek’s first-party rate with Qwen3.8-Max pricing or with an unnamed 27B provider.

Local Qwen is not “free.” Its cost per success is:

(hardware amortisation + electricity + maintenance + operator time + rerun cost) ÷ verified successes

If the GPU is already owned and privacy is valuable, marginal token cost can be tiny. If a developer buys a workstation solely for occasional use, DeepSeek’s API can remain cheaper for years. The break-even point is a workload question, not a tokens-per-dollar slogan.

The reproducible Kingy test suite

The next definitive comparison should freeze exact model revisions and run two manifests: local-ownership and hosted-capability. Do not merge their scores.

1. Repository bug fixing

Use at least 50 issues across Python, TypeScript, Go and Rust. Pin the repository commit and container image. Give both models the same agent tools, wall-time ceiling and token budget. Success requires reproduction, a valid patch and passing regression tests. Report pass rate, median cost per pass, median time per pass and destructive-action violations.

2. Tool calling and injected failures

Use typed tools with required, enum and nested-object arguments. On predetermined calls, return malformed JSON, 429, timeout, permission denied and stale-state errors. Score eventual success, duplicate calls, invalid arguments, recovery turns and whether the model respects the retry ceiling.

3. Browser/computer use

Use the same browser image, viewport, network conditions and site snapshots. Separate DOM/tool navigation from screenshot-grounded tasks, because DeepSeek is text-only and may require an external vision component. Record success, steps, wall time, model tokens and vision-provider cost.

4. Long-document extraction

Create 32K, 128K, 256K, 512K and 1M corpora with answerable, unanswerable and contradictory questions. Require source spans. Qwen’s one-million run must be labelled YaRN-scaled; its 262K run is the native comparison.

5. Long-context instruction adherence

Place signed instructions at different depths, mix relevant and adversarial text and test the system/developer/user priority order. Count forbidden actions, ignored constraints and unsupported citations.

6. Verified reasoning

Use problems with executable or solver-checkable answers. Score the verified answer, not the prose rationale. Run low and highest effort separately and publish output-token distributions.

7. Systems performance

At 1K, 8K, 32K and 128K prompts, measure TTFT, prefill rate, decode rate, peak device memory, peak host memory and wall energy. Warm up once, run at least five repetitions and publish median plus p90. Keep concurrency fixed.

8. Quantization loss

Run each local quant and the closest full-quality route on the same retained task set. Report the change in success rate with confidence intervals. A faster quant that loses ten points of task success is not an optimisation; it is a different product.

Mandatory transcript bundle

For every failure, publish the original prompt hash, environment manifest, tool schemas, tool calls and responses, model output, verifier result, stop reason, timing and rerun command. Neither of the main community head-to-heads cited here publishes that complete bundle, so their failures cannot yet be diagnosed model-by-model.

Exact launch and rerun commands

These commands reproduce the official serving surfaces; they are starting points, not claims that a particular local quant will fit every machine.

Qwen 24GB community route

This llama.cpp configuration captures the material settings from current 24GB reports while reducing the context target to 131K for headroom. It serves the Unsloth Q4_K_M GGUF route for text-only use; add a matching vision projector only after rechecking peak memory.

llama-server \
  -hf unsloth/Qwen3.8-27B-GGUF:Q4_K_M \
  --host 127.0.0.1 --port 8000 \
  --parallel 1 --ctx-size 131072 \
  --flash-attn on -ngl 99 \
  --cache-type-k q4_0 --cache-type-v q4_0 \
  --spec-type draft-mtp --spec-draft-n-max 2 \
  --jinja --reasoning-preserve

Pin the GGUF revision, llama.cpp commit and file SHA-256 in a benchmark manifest. Quantized KV cache and MTP change both memory and behaviour; they cannot be omitted from the route name.

Qwen official OpenAI-compatible surface

vllm serve Qwen/Qwen3.8-27B \
  --served-model-name Qwen/Qwen3.8-27B \
  --max-model-len 262144

The official BF16 route above does not fit on a 24GB GPU. It is the full-checkpoint reference surface for a sufficiently large accelerator setup.

curl http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "Qwen/Qwen3.8-27B",
    "messages": [{"role": "user", "content": "Return only the SHA-256 command for app.log."}],
    "reasoning_effort": "xhigh",
    "temperature": 1.0,
    "top_p": 0.95
  }'

For one-million-token experiments, use Qwen’s documented YaRN override and label the route Qwen3.8-27B-YARN-1M; do not silently call it native context.

DeepSeek official four-accelerator surface

vllm serve deepseek-ai/DeepSeek-V4-Flash-0731 \
  --trust-remote-code --kv-cache-dtype fp8 --block-size 256 \
  --data-parallel-size 4 --enable-expert-parallel \
  --moe-backend deep_gemm_mega_moe \
  --attention-config '{"use_fp4_indexer_cache": true}' \
  --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'

DeepSeek’s repository also provides a dedicated encoding package. Pin that code with the model revision; a generic Jinja template is not an equivalent replacement.

DeepSeek first-party API

curl https://api.deepseek.com/chat/completions \
  -H "Authorization: Bearer $DEEPSEEK_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Return only the SHA-256 command for app.log."}],
    "thinking": {"type": "enabled"},
    "reasoning_effort": "max"
  }'

DeepSeek’s API ignores temperature and top_p in thinking mode, so the hosted rerun omits them even though the self-hosted model card recommends sampling values for local agent use. For every run, save the returned model identifier, provider headers, request body, response body, token counts and timestamp. The API alias is not the same thing as a permanent 0731 snapshot unless the provider explicitly maps it that way.

Decision tree: which should you use?

Do all prompts and artefacts need to remain on hardware you control? If yes, start with Qwen3.8-27B unless you already own a multi-accelerator DeepSeek server.

Do you have only 24GB of VRAM? Qwen. Use a 4–5-bit quant, choose KV-cache precision deliberately and begin with a context window that leaves real headroom.

Do you need native image, screenshot or video understanding? Qwen. DeepSeek V4 Flash-0731 is text-only; adding a vision model changes the agent and its cost.

Is the workload mostly text coding, terminal operation or million-token documents, and is an API acceptable? DeepSeek deserves the first trial. It has the stronger published agentic case, native 1M context and unusually low cache pricing.

Are tasks repetitive with a large stable prefix? DeepSeek’s 98% cache-hit discount can make its cost per success extremely hard to beat.

Do you own a 128GB Mac and want one model locally? Qwen is the lower-risk deployment. DeepSeek can run at aggressive compression, but measure teacher-to-quant loss before trusting it.

Are you choosing for production? Run 30–50 representative tasks through both routes and route by verified success, p90 time, privacy requirements and total cost. The winner can legitimately differ by task class.

Final conclusion

The best local coding model for a 24GB machine is not simply the model with the highest benchmark score. It is the strongest checkpoint that fits with enough context, survives quantization, runs at interactive speed and keeps the entire workflow under your control. On that definition, Qwen3.8-27B is the clear winner.

DeepSeek V4 Flash-0731 solves a different problem. It packages far more total capacity behind sparse activation, native million-token text context, strong agent benchmarks and a remarkably cheap cached API. If privacy and local residency are optional, DeepSeek is the more compelling first choice for demanding hosted coding and agent loops—subject to a same-harness verification on your repositories.

The most revealing early results refuse to collapse into one score. Qwen leads the independent aggregate index 52 to 50 and won one public browser run. DeepSeek leads the vendors’ coding-agent tables and offers the only mature first-party endpoint of the two exact routes. Qwen’s practical quant retains quality far better than the aggressively compressed DeepSeek workstation build. DeepSeek’s native 1M context is cleaner than Qwen’s scaled extension.

That is not an inconvenient conclusion. It is the decision developers actually need:

  • Qwen3.8-27B for ownership, multimodality and one-GPU practicality.
  • DeepSeek V4 Flash-0731 for hosted agentic ceiling, native long text and cached economics.
  • A workload-specific bake-off when the cost of being wrong matters.

FAQ

Can Qwen3.8-27B run on a 24GB GPU?

Yes, at an appropriate quantization. Public 4–5-bit builds are roughly 17–18GB, leaving limited but useful room for KV cache and runtime overhead. Maximum context depends on cache precision and the rest of the system.

Can DeepSeek V4 Flash-0731 run locally?

Yes, because the MIT-licensed weights are downloadable. “Locally” may mean a four-accelerator server or a 128GB unified-memory workstation with aggressive quantization. It does not mean full-quality residency on one 24GB GPU.

Is DeepSeek V4 Flash-0731 really only 13B parameters?

No. It is a 284B-parameter mixture-of-experts base model with about 13B active per token. Its official packed FP4/FP8 mixed-precision checkpoint still occupies roughly 155GiB because all experts and the attached speculative components require storage.

Which model is better for coding?

DeepSeek has the stronger published coding-agent benchmark case at full quality. Qwen is the better practical coding model on one 24GB local GPU. A same-agent repository test is still needed for a universal capability claim.

Which is better for browser and computer-use agents?

Qwen has the architectural advantage because it is natively multimodal, and one early public browser test favoured it 74% to 71% with much lower total time. The test lacks enough methodological detail to settle the category.

Which has the longer context window?

DeepSeek is configured and trained for 1,048,576 tokens. Qwen is native at 262,144 and supports extension to one million through YaRN scaling.

Is local Qwen cheaper than the DeepSeek API?

Not automatically. If you already own suitable hardware and use it heavily, Qwen’s marginal cost can be low. For occasional use, DeepSeek’s sub-cent task costs and cache discount can be much cheaper than buying and maintaining a workstation.

Are both models commercially usable?

Both licences permit commercial use: Apache 2.0 for Qwen and MIT for DeepSeek. Teams still need to review the full licence text, dependency licences and their own data-governance obligations.

Why not publish one composite winner?

A composite would hide the central fact that the models operate in different deployment classes. Weighting privacy, browser ability, API price, million-token context and repository success is a product decision, not an objective constant.

What evidence would change this verdict?

A same-harness, same-budget repository and tool-recovery suite with complete transcripts could establish a capability winner. A less destructive DeepSeek quant under roughly 128GB could change the workstation verdict. A first-party Qwen3.8-27B API with fixed pricing would enable a fair hosted cost-per-success comparison.

Continue exploring local AI

Compare the broader Qwen3.8-Max, Kimi K3 and DeepSeek V4 landscape, then see DeepSeek V4 Flash-0731 on a 128GB Mac Studio and Qwen3.8-27B as a local coding agent. Browse more exact model records in the Kingy.ai AI model database.

Featured image disclosure: AI-generated editorial artwork created for Kingy.ai. It is a conceptual deployment comparison, not a photograph or benchmark result.