跪拜 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

A detailed real-world testing report confirms the article's claims about MTP speed gains and the overthinking pitfall, adding practical trade-offs between 4bit and 8bit quantization for agent versus reasoning workloads. A competing view argues local models will inevitably be degraded to protect cloud business models. Spam and low-effort replies dilute the rest of the thread.

MTP roughly doubles generation speed on consumer GPUs like the RTX 4090 but significantly increases VRAM usage, forcing a trade-off in long-context scenarios.
Setting reasoning_effort to medium instead of xhigh drastically cuts wait times with minimal quality loss, matching observed behavior in tools like Claude Code.
For agent workloads, 4bit quantization with MTP enabled is preferable because speed outweighs precision; for quality-sensitive reasoning tasks, 8bit is the better choice.
Local models reaching a 'usable' threshold is more significant than benchmark scores, even if they cannot yet replace cloud production systems.
Local model capability may be intentionally degraded in the future because it conflicts with the subscription revenue model of cloud-based AI services.
Featured comments
用户015544495830 4 likes

Written very solidly, especially the point in Section 5 that 'read speed is worth more than tok/s' — only people who've actually tested it understand. Many only focus on generation speed, but when running agents with long context it gets stuck, and the bottleneck is actually in the KV cache re-read part. The author also explains Gated DeltaNet's 'only remember the balance, not the transaction log' approach clearly. Two additional real-world testing details that happen to align with points in the article: 1. MTP is indeed the biggest speed variable right now. The article says it goes from 66 to 121 tok/s on a 5090; on my RTX 4090 with MTP on it also roughly doubles, but VRAM usage increases noticeably. In long-context scenarios you have to weigh the trade-off yourself — that line 'when you see a high speed claim, first ask whether MTP was on' is too real. 2. The overthinking pitfall — tuning reasoning_effort really can save you. Default xhigh can think for 21 minutes just to draw an SVG, exactly like that Simon Willison case. For daily use with Claude Code I suggest going straight to medium; quality doesn't drop much, and wait time shrinks dramatically. I also agree with the conclusion in Section 4 that 'if memory is enough go 8bit, if it's too slow go 4bit,' though my personal trade-off is: for running agent long tasks I prioritize 4bit + MTP on, because speed carries more weight in agent scenarios; for reasoning tasks that need quality I go 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 can't yet replace cloud production workhorses, a local model has touched the 'usable' threshold for the first time, and that signal itself matters more than benchmark scores.

下雨天等快递 3 likes

In the near future, locally deployed models will definitely get dumbed down — it conflicts with the business model of cloud models.

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