查看中文版 →

Deutsche Version ansehen →

Открыть русскую версию →

Ver versión en español →

Log in
Blog · Model tests

Qwen 3.8 Flash Next vs 27B vs Qwen4-Max: local or API

Qwen 3.8 27B runs at 45–51 tokens/s on a single 24 GB GPU, while the 125B MoE Qwen 3.8 Flash Next needs 128 GB of unified memory just to load Q4 weights. Compare VRAM thresholds, Ollama speeds, coding benchmarks, and 36-month hardware amortization against Qwen4-Max API bills.

Developers building a local coding agent right now usually narrow their Qwen open-weight shortlist down to two models: Qwen 3.8 27B and Qwen 3.8 Flash Next. The 27B dense model fits comfortably on a single RTX 4090 or a 32 GB Mac, while Flash Next is a sparse 125B Mixture-of-Experts preview architecture that activates just 6B parameters per token alongside a 51B N-gram embedding table.

At the same time, Alibaba's closed flagship Qwen4-Max launched in mid-November with cached input pricing down to $0.075 per million tokens internationally (0.5 CNY in mainland China). That price cut shifts the buy-hardware-vs-pay-API break-even point sharply.

Bottom line: If you already own a 24 GB GPU or a 32 GB+ Apple Silicon Mac, run Qwen 3.8 27B locally in Ollama (Q4_K_M is ~18 GB, 45–51 tokens/s on an RTX 4090) for $5–$15/month in electricity. Do not buy a $3,699 128 GB Mac Studio or a $3,999+ DGX Spark purely to save on Qwen 3.8 Flash Next API bills: 3-year hardware amortization starts above $108/month, whereas the hosted Qwen3.8-Flash API costs roughly $59.50/month even at 500M input plus 50M output tokens. Reach for Qwen4-Max API or a multi-model pass when you need deep repository-level fixes without capital outlay.

Specs, memory footprints, and API pricing

All three models share Qwen's hybrid attention heritage, but their hardware profiles sit in completely different tiers. Qwen 3.8 27B (Apache 2.0) is a dense vision-language model with a native 262K context window (extensible to 1M via RoPE). Qwen 3.8 Flash Next pairs Gated DeltaNet (GDN) linear attention with Qwen Sparse Attention (QSA) across 125B total parameters; only 6B activate per token, yet the 51B N-gram lookup table still lives in memory, pushing even a 4-bit GGUF file to ~102 GB. Qwen4-Max scales that design to a 2.4T backbone (71B active + 328B N-gram) and is cloud API only.

Specs, GGUF memory footprints, and API pricing for Qwen 3.8 27B, Qwen 3.8 Flash Next, and Qwen4-Max
AttributeQwen 3.8 27BQwen 3.8 Flash NextQwen4-Max
Weights & licenseOpen-weight (Apache 2.0)Open-weight preview (hosted as Qwen3.8-Flash)Closed (cloud API only)
Parameters (total / active)27B / 27B (dense)125B / 6B (MoE + 51B N-gram)2.4T / 71B (MoE + 328B N-gram)
Context window256K native (up to 1M)256K open-weight / 1M hosted1M
GGUF Q4_K_M size & RAM~16.5–18 GB (24 GB VRAM / 32 GB RAM)~102 GB (128 GB+ unified memory)Not available locally
GGUF Q8_0 size & RAM~31 GB (48–64 GB RAM)~175 GB+ (256 GB unified memory)Not available locally
Cloud API (input / output per 1M)~$0.035–$0.05 / $1.50 (3rd-party)$0.16 / $0.47 (QwenCloud)$1.50 / $4.50 intl (10 / 30 CNY CN)
Cloud cache read (per 1M)Varies by provider$0.05$0.075 intl (0.5 CNY CN)

The memory row settles the hardware divide immediately: 27B is built for mainstream 24 GB GPUs and developer laptops, while Flash Next locks out anything under 128 GB of RAM despite activating only 6B parameters per token.

Quantization quality and local decode speeds

Local decode throughput tracks sustained memory bandwidth. Community and Unsloth evaluations show that Qwen 3.8 27B at Q4_K_M retains near-full parity with BF16 across agentic coding suites, while Dynamic V3.1 quants recover 5%–10% average accuracy over naive low-bit quants at the same file size.

Measured throughput across common developer hardware:

  • NVIDIA RTX 4090 (24 GB VRAM, ~1,008 GB/s): Qwen 3.8 27B Q4_K_M (~16.5–18 GB) fits completely in VRAM with ~5 GB left for KV cache, delivering 45–51 tokens/s. Loading the ~31 GB Q8_0 quant spills layers into system RAM and drops decode speed into single digits. Flash Next does not fit on a single 24 GB card.
  • Mac Studio (128 GB–256 GB unified memory, M-series Max / Ultra): Qwen 3.8 27B runs at 14–22 tokens/s in Q4_K_M and 12–18 tokens/s in Q8_0, with plenty of headroom for long contexts. Qwen 3.8 Flash Next is where sparse MoE shines on Apple Silicon: Q4_K_M hits 40–75 tokens/s on 128 GB+ Max/Ultra machines, while Q8_0 needs 256 GB unified memory and runs at 20–30 tokens/s.
  • NVIDIA DGX Spark (128 GB LPDDR5x, ~273 GB/s, 140 W GB10 TDP): With Ollama's Multi-Token Prediction (MTP) runner enabled, Qwen 3.8 27B reaches 26–50+ tokens/s, and Qwen 3.8 Flash Next (Q4_K_M / UD-Q4_K_XL) lands around 25–47 tokens/s.

Both open-weight Qwen 3.8 models ship with thinking mode enabled by default in Ollama. Before wiring them into a coding agent, increase Ollama's num_ctx (32K–64K+) so multi-file prompts are not silently truncated.

Coding and reasoning benchmarks

Public coding and reasoning benchmarks draw a clear three-tier staircase across the lineup (scores compiled from Qwen official release evaluations and Artificial Analysis / OpenRouter tracking; Qwen software engineering evaluations run on Claude Code, mini-SWE-agent, or Terminus harnesses):

Coding and reasoning benchmark scores for Qwen 3.8 27B, Qwen 3.8 Flash Next, and Qwen4-Max
BenchmarkQwen 3.8 27BQwen 3.8 Flash NextQwen4-Max
SWE-bench Pro61.762.5Not reported
DeepSWE v1.142.258.775.7
LiveCodeBench v690.391.9Not reported
Terminal-Bench 2.173.086.1See 4.0 below
Terminal-Bench 4.0—25.348.5
GPQA Diamond89.291.7Not reported
Humanity’s Last Exam (HLE)30.835.951.7

Two practical takeaways stand out:

  • For algorithmic coding and scoped edits, 27B punches right next to Flash Next: 90.3 on LiveCodeBench v6 and 61.7 on SWE-bench Pro put the 27B dense model within 0.8–1.6 points of the 125B MoE. On short-horizon data analysis tasks tested by Hacker News user chriddyp, local Qwen 3.8 27B even beat cloud Qwen4-Max by a few points at lower cost.
  • For multi-file agent loops, the gap widens fast: On DeepSWE v1.1, scores climb from 42.2 (27B) to 58.7 (Flash Next) to 75.7 (Qwen4-Max). On Terminal-Bench 4.0, Qwen4-Max (48.5) nearly doubles Flash Next (25.3). When a task requires dozens of tool calls, higher first-pass accuracy saves far more developer time than raw token price suggests.

Hardware amortization vs monthly API bills

To see when local hardware actually pays for itself, we amortize purchase price straight-line over 36 months and add electricity at $0.15/kWh (4 hours/day active inference + 20 hours/day idle). On the cloud side, we model realistic multi-turn coding agent traffic with an 80% prompt cache hit rate.

The monthly formula is straightforward: Monthly bill = (Uncached input M × Input price) + (Cached input M × Cache read price) + (Output M × Output price).

36-month local hardware amortization and electricity vs monthly cloud API bills for Qwen3.8-Flash and Qwen4-Max
Option / Workload tierHardware basis or monthly tokens (80% cache hit)Estimated monthly costNotes
Local: 24 GB GPU rig upgrade~$2,200 amortized + $10–$15/mo power$71–$76 / moRuns 27B Q4 at 45–51 t/s; cannot load Flash Next
Local: Mac Studio 128 GB$3,699 base amortized + $5–$8/mo power$108–$111 / moRuns 27B (Q8) and Flash Next (Q4, 40–75 t/s)
Local: NVIDIA DGX Spark 128 GB$3,999 MSRP (street $6,950–$8,100) + power$115–$200 / mo140 W TDP; runs 27B and Flash Next Q4
API: Light solo dev20M in (4M uncached + 16M cached) + 2M outFlash $2.38 / Qwen4-Max $16.20Far below any dedicated hardware purchase
API: Heavy agentic dev100M in (20M uncached + 80M cached) + 10M outFlash $11.90 / Qwen4-Max $81.00Qwen4-Max roughly matches a 24 GB GPU rig
API: All-day multi-agent / batch500M in (100M uncached + 400M cached) + 50M outFlash $59.50 / Qwen4-Max $405.00Local hardware beats flagship API at batch scale

The break-even numbers are blunt: buying a $3,699 Mac Studio strictly to avoid Qwen3.8-Flash API fees almost never pays off. Even at 500M input and 50M output tokens per month, hosted Qwen3.8-Flash costs $59.50/month, roughly half the monthly amortization of a 128 GB Mac Studio.

Local deployment wins in three concrete cases:

  • You already own the hardware: a 24 GB GPU or high-RAM Mac you already use for work drops marginal cost to $5–$15/month in power
  • Hard offline or zero-retention rules: codebases that cannot leave your local machine or internal network
  • Heavy automated batch pipelines: workloads where flagship cloud billing (Qwen4-Max at $405/month) would exceed dedicated hardware costs

If you want lightweight Qwen speed for routine edits plus frontier Claude, GPT, or Gemini models for hard architectural work without buying dedicated hardware, a capped multi-model pass keeps billing predictable. CodingPass puts 25 models behind one Base URL—browse all models or check plans and pricing: Go starts at $10/month (~2,050 Sonnet requests) and Plus is $30/month, metered at official API prices with hard caps so a runaway loop cannot rack up a surprise bill.

Scenario decision table

Hardware and workflow decision table for Qwen 3.8 local vs Qwen4-Max cloud API
Hardware & workflowRecommended pickWhy or trade-off
Existing RTX 4090 / 32 GB Mac, daily edits and testsLocal Qwen 3.8 27B (Q4_K_M)Zero new hardware spend, 45–51 t/s on 4090, 61.7 SWE-bench Pro
Existing 128 GB+ Mac Studio or DGX Spark, offline agentLocal Qwen 3.8 Flash Next (Q4_K_M)40–75 t/s on Apple Silicon, +16.5 DeepSWE over 27B, full privacy
Standard laptop, monthly budget under $20Cloud Qwen3.8-Flash API or CodingPass Go~$11.90/mo even at 100M input tokens; zero upfront hardware cost
Cross-repo refactors, 1M-context code auditsCloud Qwen4-Max API (high default, xhigh for CLI)75.7 DeepSWE and $0.075/M cache reads; xhigh mode is slower
Daily work across OpenCode, Claude Code, and CodexLocal 27B for private drafts + CodingPass for frontier callsKeeps sensitive snippets local while capping cloud spend cleanly

Minimal setup: Ollama and OpenCode / Claude Code

Pull and run either open-weight model locally with Ollama:

ollama-qwen38.sh
# 24 GB VRAM or 32 GB+ unified memory: Qwen 3.8 27B (Q4_K_M, ~18 GB)ollama run qwen3.8:27b # 128 GB+ unified memory (Mac Studio / DGX Spark): Qwen 3.8 Flash Next (Q4_K_M, ~102 GB)ollama run qwen3.8-flash-next:125b-a6b-q4_K_M

In OpenCode (see the full OpenCode setup guide), you can wire both your local Ollama daemon and cloud Qwen endpoints into a single opencode.json and switch models per task:

opencode.json
{  "$schema": "https://opencode.ai/config.json",  "provider": {    "ollama": {      "npm": "@ai-sdk/openai-compatible",      "name": "Ollama (Local)",      "options": {        "baseURL": "http://127.0.0.1:11434/v1"      },      "models": {        "qwen3.8:27b": {          "name": "Qwen 3.8 27B (Local)"        }      }    },    "qwencloud": {      "npm": "@ai-sdk/openai-compatible",      "name": "QwenCloud API",      "options": {        "baseURL": "https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1",        "apiKey": "{env:DASHSCOPE_API_KEY}"      },      "models": {        "qwen3.8-flash": { "name": "Qwen 3.8 Flash (API)" },        "qwen4-max": { "name": "Qwen4-Max (API)" }      }    }  }}

If you run Claude Code in the terminal and want a single capped gateway for cloud frontier models (see the Claude Code setup guide), point ANTHROPIC_BASE_URL at CodingPass:

claude-code-env.sh
export ANTHROPIC_BASE_URL="https://api.codingpass.ai"export ANTHROPIC_API_KEY="cp-live-your-key"claude

FAQ

Can Qwen 3.8 27B run on a 16 GB VRAM GPU?

The standard Q4_K_M quant sits around 16.5–18 GB before KV cache, so it will partially spill into system RAM on a 16 GB card and slow down sharply. On 16 GB VRAM, either use a smaller ~3-bit dynamic quant with an 8K–16K context cap or call the hosted Qwen3.8-Flash API instead.

Is Qwen 3.8 Flash Next identical to the hosted Qwen3.8-Flash API?

They share the same 125B-A6B sparse MoE architecture, but deployment limits differ. The open-weight Qwen 3.8 Flash Next preview ships with a 256K native context window and requires ~102 GB of memory at Q4, whereas hosted Qwen3.8-Flash on QwenCloud exposes a 1M context window out of the box with $0.05/M cache reads.

When is it worth stepping up from Qwen 3.8 to Qwen4-Max?

Stay on local Qwen 3.8 27B or cloud Qwen3.8-Flash for single-file edits, unit tests, and quick debugging. Step up to Qwen4-Max (high by default, xhigh for tough CLI tasks) when your agent needs to refactor across a dozen files, digest a 500K-token repo, or resolve multi-step terminal failures where higher first-pass accuracy beats raw token price.

Boarding

Fast Qwen for daily edits, frontier models for hard calls.

CodingPass gives you models behind one Base URL: Go starts at a month (~ Sonnet requests) and Plus is . No surprise charges, cancel anytime.

  • Request ID on every response
  • Full refund if you've used 5% or less
  • No surprise charges
Choose GoOpenCode setup guide

$10/mo until you cancel.