跪拜 Guibai
← All articles
AI Programming · Artificial Intelligence · Claude

Alibaba's Qwen3.8-27B Brings Claude Opus-Class Coding to a Local Machine

By stormzhangV ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A locally-run coding agent that approaches Opus 4.6 quality removes API costs, rate limits, and data-exfiltration risk in one stroke. For shops where code cannot leave the network, this is the first credible on-prem alternative to a cloud coding assistant.

Summary

Alibaba's Qwen3.8-27B is a 27-billion-parameter dense model released under Apache 2.0 that posts benchmark scores competitive with Claude Opus 4.6—SWE-bench Pro 61.7, Terminal Bench 73.0, and LiveCodeBench 90.3. The model topped Hugging Face's trending chart within 48 hours, hit #1 on Hacker News, and racked up 360,000 Ollama downloads in five days. Cline reports it is already the most-selected local model among its developers.

A hybrid attention design makes local deployment practical: only 16 of 64 layers use full attention, while the remaining 48 use Gated DeltaNet linear attention, cutting the KV cache to roughly a quarter of a same-size dense model. Built-in multi-token prediction (MTP) further boosts throughput, pushing an RTX 5090 past 120 tok/s. A 24 GB GPU or Mac gets you in the door with a 4-bit quant; 48 GB or more lets you run 8-bit near losslessly.

The model's official benchmarks were run inside Claude Code, and Ollama ships first-class integration—two commands swap Claude Code's backend to a local endpoint with no API fees, no rate limits, and no data leaving the machine. The trade-offs are real: default reasoning settings cause extreme overthinking that burns tokens, token consumption can triple versus the previous generation, and the claimed 1M context remains unverified. Still, this is the first local model to land inside the top tier of the Artificial Analysis Agentic Index, scoring 51 and ranking 7th.

Takeaways
SWE-bench Pro 61.7, Terminal Bench 73.0, and LiveCodeBench 90.3 put Qwen3.8-27B within striking distance of Claude Opus 4.6 on official benchmarks.
Only 16 of 64 layers use full attention; the other 48 use Gated DeltaNet linear attention, shrinking the KV cache to about one-quarter of a conventional dense model.
Built-in multi-token prediction (MTP) nearly doubles throughput on compatible hardware—an RTX 5090 jumps from 66 tok/s to 121 tok/s with MTP enabled.
A 24 GB GPU or Mac runs the 4-bit quantized version (~17 GB); 48 GB or more allows 8-bit with near-lossless quality.
Ollama provides first-class Claude Code integration with two commands, letting an agent loop run entirely on-device with no API billing.
Default xhigh reasoning causes severe overthinking—Simon Willison recorded a 21-minute, 20,000-token SVG generation that finished in two minutes with reasoning off.
Token consumption can triple versus the previous Qwen3.6-27B, and the model's claimed 1M context length remains unverified in practice.
The model scored 51 on Artificial Analysis's Agentic Index (7th place) and 42.9% on Agents' Last Exam, retaining over 80% of Qwen3.8-Max's performance.
Conclusions

Official benchmarks run inside Claude Code signal that Alibaba sees Anthropic's agent harness, not its own Qwen Code or Qoder CLI, as the reference runtime—an unusual concession that steers the ecosystem toward a competitor's toolchain.

The hybrid attention trick (16 full-attention layers, 48 Gated DeltaNet layers) is the architectural story that makes local 262K context viable; without it, the KV cache would be four times larger and consumer hardware would be locked out.

Community reports of 3x token bloat versus the previous generation suggest the model's reasoning gains come with a real efficiency regression, which matters less on local hardware but kills the economics for pay-per-token API use.

MTP's speed boost is substantial but eats VRAM and shrinks usable context, so published tok/s numbers without the MTP on/off qualifier are misleading.

Agent fluency on local hardware is bottlenecked by memory bandwidth during context reloads, not raw generation speed—a dynamic that shifts hardware priorities toward unified-memory Macs over high-FLOPS GPUs for long-running agent loops.

Concepts & terms
Gated DeltaNet
A linear attention mechanism that maintains a fixed-size state instead of storing every token's key-value pair. It replaces full attention in 48 of Qwen3.8-27B's 64 layers, cutting the KV cache to roughly one-quarter the size of a conventional dense model.
Multi-Token Prediction (MTP)
A technique where the model predicts several future tokens at once in a draft-then-verify fashion, increasing throughput. It can nearly double generation speed but consumes additional VRAM, reducing the maximum usable context length.
KV cache
The key-value memory that a transformer model accumulates as it processes each token in a sequence. Its size grows linearly with context length and is often the binding constraint for long-context inference on consumer hardware.
YaRN (Yet another RoPE extensioN)
A method for extending a model's context window beyond its trained length by adjusting rotary position embeddings. Qwen3.8-27B uses it to claim 1M context, but the extrapolated range is uncalibrated and remains unverified in practice.
From the discussion
Featured comments
用户015544495830

Solid write-up, especially the point in Section 5 that 'read speed is more valuable than tok/s' — only people who've actually tested it understand this. Many only focus on generation speed, but when running agents with long contexts, it chokes; the bottleneck is actually in the KV cache re-reading part. The author also explains the Gated DeltaNet approach of 'only remembering the balance, not the transaction log' clearly. Two additional real-world details that align perfectly with the article's points: 1. MTP is indeed the biggest speed variable right now. The article says it jumps from 66 to 121 tok/s on a 5090; on my RTX 4090, enabling MTP also roughly doubles the speed, but VRAM usage increases noticeably. In long-context scenarios, you have to weigh the trade-offs yourself — the line 'when you see a high speed claim, first ask if MTP was on' is too real. 2. The overthinking pitfall — tuning reasoning_effort really can save you. The default xhigh can think for 21 minutes just to draw an SVG, exactly like the Simon Willison case. For daily use with Claude Code, I recommend going straight to medium; quality doesn't drop much, and the wait time shrinks dramatically. I also agree with the conclusion in Section 4 that 'if you have enough memory, go 8bit; if it's too slow, go 4bit.' However, my personal trade-off is: for running agent long tasks, prioritize 4bit + enable MTP, because speed carries more weight in agent scenarios; for reasoning tasks that require quality, then switch to 8bit. Just a reference. The best summary is that line from the article — 'Intelligence doesn't need a monthly subscription; it lives right inside your own computer.' Although a 27B model can't yet replace a cloud production workhorse, a local model has touched the threshold of 'usable' for the first time. This signal itself matters far more than benchmark scores.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗