$22,000 Mac Studio Local AI Test: Can It Replace the Cloud?

The $22,299 512GB M5 Ultra Mac Studio buys localization, not stronger capability.
The article examines the $22,299 top-spec M5 Ultra Mac Studio and tests its feasibility as a replacement for running Claude Code in Anthropic's cloud. On cost, the 512GB memory alone adds $15,500, 70% of the total price, driven by DRAM contract prices rising 90%-95% in a single quarter and HBM crowding out capacity. On performance, the M5 Ultra's neural accelerators speed up long-prompt prefill three to four times, but it still trails two DGX Sparks; prompt caching cuts follow-up time to first token from 21 seconds to 3, yet is extremely sensitive to prefix consistency. Generation speed is constrained by memory bandwidth, and concurrency peaks at four users, declining at eight. On Terminal Bench 4.0, GLM 5.3 scores 41.82, 23 points behind Opus 5.5, and the extra memory money buys only about 6 points. The conclusion: it suits one or two heavy local-agent users, but for frontier capability or multi-user sharing, the cloud is still the choice.
Apple's new-generation Mac Studio (M5 Ultra chip, 512GB memory) is priced at $22,299, and overseas bloggers and developers have put it through a round of intensive hands-on testing. There's only one core question: moving a single Claude Code request from Anthropic's servers to this machine on the desktop—is it actually worth it?

Price Breakdown: Most of the Money Goes to Memory
The cheapest M5 Ultra Mac Studio costs $5,499, while the 512GB version is only available with the top-tier chip, and the memory upgrade alone adds $15,500—about 70% of the total price. By comparison, the M3 Ultra with the same capacity was priced at $9,499 in March 2025, with the memory upgrade portion at $4,000.
The price hike is driven by an overall rise in DRAM contract prices. TrendForce data shows conventional DRAM contract prices rose 90% to 95% in a single quarter; HBM now occupies about one-fifth of DRAM wafer capacity, and both SK Hynix and Micron have said their 2026 HBM capacity is sold out. Apple's response was to discontinue the 512GB and 256GB options of the older M3 Ultra. On the new machine, upgrading from 256GB to 512GB costs $11,500, which works out to about $45 per additional GB. WCCFtech reports that long-term contract prices for phone memory are close to $21 per GB—compared side by side, Apple's pricing looks quite aggressive.
The Reality of Running Models Locally: Quantization, Memory Limits, and Model Choice
Open-source model weights are publicly downloadable, but large models can't fit into a local machine as-is and need quantization compression. QESMA ran agentic coding tests on the 27-billion-parameter Qwen model: the 4-bit version performed comparably to the full model, the 1-bit version suffered a cliff-edge drop in quality, and making the 1-bit model "think longer" actually made it worse—it would keep reasoning until it ran out of tokens.
Not all memory is usable either. By default, macOS allows the GPU to use about three-quarters, which can be raised via a terminal command, but it reverts after a restart. Calculated at 4-bit quantization: GLM 5.3 is about 418GB—it fits, but with little headroom; DeepSeekAd V4.1 Flash is about 432GB, of which 196 billion parameters are a massive n-gram lookup table, and Unsloth points out that this table can be placed on the SSD, letting the 4-bit model run in about 305GB of memory; Kimi K3 has 2.8 trillion parameters, and its smallest file is the 466GB 1-bit version; Meta's Muse Spark Open requires 533GB at 4-bit and doesn't fit at all—Meta's own launch article ran it on two M5 Ultra Mac Studios. None of the above models can run at 4-bit on a 256GB Mac—that's exactly the space bought by that $11,500.
Quantization refers to compressing model weights from high-precision floating point (e.g., FP16, 2 bytes per parameter) into lower-bit representations, greatly reducing VRAM/memory usage. Common 4-bit quantization compresses each parameter to about 0.5 bytes, paired with block-wise scaling factors to preserve dynamic range, which is why the 744-billion-parameter GLM 5.3 can fit into about 418GB of memory. The cost is precision loss: 4-bit is usually close to the original model's performance, 2-bit begins to degrade noticeably, and 1-bit often shows a cliff-edge drop in quality, with errors accumulating more severely the longer the reasoning chain—this is exactly why "the 1-bit model gets worse the longer it thinks" in the text. After quantization, the format must also match the inference engine (e.g., GGUF, MLX weights); differences in quantization schemes and kernel optimizations across engines can also cause the same model to differ by more than 2x in decoding speed on different software.
Time to First Token: Prefill Is the Mac's Weak Spot, Caching Is the Cure
Each round, Claude Code sends instructions, the full tool list, and the files being worked on. One M3 Ultra user measured that a system prompt of about 16,000 tokens took about 90 seconds to get a response. This stage is called prefill, which depends on raw compute, and Macs have historically been memory-rich but weaker in compute than large GPUs.
The M5 Ultra's improvement lies in neural accelerators newly added within the GPU cores. Apple claims prompt processing speeds up to four times that of the previous generation. Ziskind measured a three-to-four-fold improvement on long prompts, but only 1.6x on short prompts; MacStories measured about 2.5x on a 16,000-token prompt, with time to first token dropping from 13.9 seconds to 5.6 seconds. But Nvidia solutions are still faster: Ziskind tested DeepSeek V4 Flash with a 32,000-token codebase (14 Python files), and the 256GB M5 Ultra took about 50 seconds to first token, while two DGX Sparks totaling about $10,000 needed only 17 seconds.

What really saves the day is prompt caching. The beginning sent by the agent each round is almost identical, so the server only needs to read the newly added portion. OMLX keeps the cache in memory and then writes it to the SSD, so it persists after a restart. In Ziskind's test, the first question took 21 seconds, while follow-ups took only 3 seconds. But caching only works if the beginning is exactly identical—change a single character near the start and the model has to re-read everything. Some users found that Claude Code versions before 2.1.181 placed per-request tokens at the top of the system prompt when pointing at their own server, causing the local server to re-read the entire prompt every round; SpicyNeuron found that Claude Code reorders tools between rounds, so they modified the template to enforce ordering; another OMLX user's agent dropped an old message while organizing history, shifting all subsequent content and dropping the cache hit rate to 10%, with time to first token at 206.9 seconds—returning to 3.1 seconds after the fix. When requests go to Anthropic, Anthropic handles the caching problem; when it's on your own desk, you have to carry it yourself.
Prefill and decode are the two stages of LLM inference. Prefill runs the entire input prompt through the forward computation at once to generate the KV cache; it's highly parallel matrix multiplication that consumes compute (FLOPS). Decode generates tokens autoregressively one at a time, computing only one token per step, limited by memory bandwidth. Therefore, time to first token on long prompts is mainly determined by prefill, while generation speed is mainly determined by bandwidth—this explains why the Mac, with memory bandwidth as high as 1.2TB/s, is not weak at decoding yet has to wait tens of seconds on a 16,000-token system prompt. The KV cache is the product of prefill, caching attention key-value pairs to avoid recomputation; prompt caching goes a step further, reusing the computation results of identical prefixes wholesale, so that when it hits, only the newly added tokens need processing—this is the key to bringing time to first token from the 20-second range down to 3 seconds in multi-turn agent conversations.
Generation Speed: Memory Bandwidth Sets the Ceiling, Concurrency Is the Achilles' Heel
For every token generated, the chip must fetch the model's active portion from memory, so generation speed depends on memory speed. Apple rates the M5 Ultra's memory bandwidth at 1.2TB/s, and Ziskind measured 1,039GB/s, with generation speed about 1.5x that of the M3 Ultra. The key metric is the number of active parameters: GLM 5.3 has about 744 billion total parameters, but only activates 40 billion per token; GLM 5.3 Flash needs only 18 billion per token, so it's faster. MacStories measured GLM 5.3 Flash at between 31 and 41 tokens per second on a 256GB review unit; there is no public data yet for the full GLM 5.3 on a 512GB machine, since it only started shipping in December.
Speculative decoding is another speed-up method: a small model drafts a few words first, and the large model verifies the entire draft at once; code is highly predictable, so the hit rate is high. In OMLX community benchmarks, GLM 5.3 Flash generated Python code faster than English code on the M5 Ultra. Software iteration is also fast: Max Weinbach posted that his decoding speed nearly doubled within a day; Inco.ai claims its new engine Splash is twice as fast as OMLX, but one user ran a real coding session with 9 prompts on an M5 Max, and OMLX finished first, while Splash had the slowest decoding among the three engines.

Concurrency is the ceiling of this machine. Claude Code launches auxiliary agents that each send requests concurrently. Ziskind tested DeepSeek V4 Flash by gradually increasing the number of users: the Mac's total throughput peaked at four users and actually declined at eight, while two DGX Sparks kept climbing; with eight users and chat history, each person's time to first token exceeded one minute, after which it was only about 5 tokens per second. His conclusion is that the Mac is a machine for one or two people. SpicyNeuron, after six months of use, wrote that when running larger models, the Mac Studio effectively supports only one concurrent user. The gains from speculative decoding also decay with concurrency: one user got a 76% speedup with a single request, but only 7% remained with four concurrent requests.
Speculative decoding uses a small draft model to guess several tokens in a row, then has the large model verify them all in parallel at once; accepted tokens are adopted directly, and rejected ones are regenerated from the point of divergence. Since the large model can verify multiple positions in one forward pass, and structured text like code is highly predictable with a high acceptance rate, the gains are obvious in programming scenarios. The speedup ratio depends on the acceptance rate and draft length, with a theoretical upper limit of roughly "average accepted tokens + 1." The cost is that the draft model itself takes memory and compute, and when concurrent requests increase and the GPU is already near saturation, draft computation crowds out main-model resources, causing the speedup to decay—this is exactly the mechanism behind the 76% for a single request versus only 7% for four requests in the text.
Capability Gap: $11,500 More Buys a Few More Points
Terminal Bench 4.0 scores AI agents on real terminal tasks. Both Claude and GLM were tested within Claude Code, with a consistent evaluation framework. Claude Opus 5.5 scored 64.85%, and GLM 5.3, as the highest-scoring open-source model, scored 41.82%—a gap of 23 points; GLM 5.3 sits between Opus 4.8 and Opus 5; GLM 5.3 Flash, which can run on a 256GB Mac, scored 35.76, and that was achieved with thinking mode turned off. In other words, the extra $11,500 spent on memory buys only about 6 points. The leaderboard also lists API running costs: a full run of Opus 5.5 costs $4,718, GLM 5.3 costs $2,727, and GLM 5.3 Flash costs $118. Epoch AI's capability index shows that the current strongest open-source model, DeepSeek V4.1 Flash (updated October 17), is on par with Claude Opus 4.8, lagging the frontier by about four and a half months.

A common alternative suggested on forums is not to buy 512GB but to buy two 256GB machines instead. Two top-spec 256GB machines total $21,598, which is $701 cheaper. The problem lies in the interconnect: Thunderbolt 5 is about 10GB/s, while the M5 Ultra's memory bandwidth is 1.2TB/s—a difference of about 120x. In Apple's test of a 128-billion-parameter model announced on October 15, a single machine achieved 7.70 tokens/s, and two machines each holding half the layers also achieved 7.70, with no gain; switching to low-latency RDMA so that both machines process every layer together reached 13.69 tokens/s, 1.78x that of a single machine. Enabling RDMA requires booting each Mac into recovery mode and running commands. The well-known Mac cluster application EXO went several months this year without a new release. Jeff Geerling's assessment after setting up a four-machine cluster last December was: it's great when it works.
Doing the Math: When It Pays Off, and When It Doesn't
Claude Max 20X costs $200 per month and now includes a $200 monthly API allowance, which makes $22,299 look almost negligible. Ziskind measured DeepSeek V4 Flash at about 53 tokens per second on the M5 Ultra; if it generated continuously all year, that would be about 1.7 billion tokens; at OpenRouter's price of 18 cents per million output tokens for this model, a full year of nonstop generation would be worth about $304. Electricity isn't much either: about 400 watts at full load, calculated at 8 hours a day and the U.S. average electricity price, comes to about $212 a year.
The secondhand market is rather anomalous: the 512GB M3 Ultra is listed on eBay at about $19,000 to $25,000, far above its $9,499 launch price, and a Hacker News user posted asking how to sell one safely. Some users have genuinely maxed out this machine: MacStories' Federico Vittici ran a research agent team on DeepSeek V4 Flash on the Mac Studio, running 24 hours a day for 99 consecutive days to prepare for an iOS 27 review—in his words, the total cost was $0. He also said he can now hand simple programming tasks to local models and then have frontier cloud models review the results.
Privacy is another reason. Anthropic's documentation states that data from Claude's code execution tool is retained for up to 30 days and does not meet HIPAA requirements; with the Mac in the office, prompts and code stay on a machine in the same room the whole time. Among the loaded models, DeepSeek V4.1 Flash and GLM 5.3 Flash both use the MIT license. SpicyNeuron, after six months of using a 512GB Mac Studio, wrote: local AI is absolutely not a plug-and-play replacement for cloud APIs. Vittici, in the same review, called the M5 Ultra a dream machine for local AI agents, but also admitted that this setup is a lot of fiddling, and he wouldn't recommend it to people who just want to pay $20 a month to use Claude.
DRAM and HBM capacity crowding-out is the deep reason behind this round of memory price increases. HBM stacks multiple layers of DRAM through through-silicon vias (TSV) and packages them together with the GPU; the wafer area consumed per unit of capacity is far higher than ordinary DDR5, and yields are lower. When demand for AI accelerator cards exploded, Samsung, SK Hynix, and Micron all shifted capacity to HBM, compressing conventional DRAM supply and sending contract prices jumping. Apple's unified memory architecture (UMA) lets the CPU and GPU share the same high-bandwidth memory pool, and its LPDDR chips are likewise affected by this round of price increases; moreover, the soldered-to-the-motherboard design means capacity must be chosen once at purchase and cannot be expanded later—this is also the structural background for why the 512GB option is priced so aggressively and why used M3 Ultras command a premium.
Conclusion
What this $22,299 machine buys is not a "faster Claude," but data that never leaves the room, marginal costs approaching zero, and an experimental platform you can tinker with at any time. It trades a score gap of less than half for full localization, at the cost of time to first token, concurrency limits, cache tuning, and a lot of manual configuration. For one or two heavy local-agent users, it may be the most convenient all-in-one solution available today; for teams pursuing frontier capability or shared use among many people, cloud APIs are still cheaper and stronger.
Related articles

Gemini 4 Neon Hands-On: Value King or Confident Catastrophe?
Gemini 4 Neon review: 1M-token context, four thinking levels, 201 files in one KingBench4 pass at one-tenth Fable 5.2's cost—but it hallucinates fake data, leaves 7 symlink escapes, and bricks keyboards.

Google Gemini 4 Neon Hands-On: 6 3D Works That Impress and Fail
Hands-on with Google Gemini 4 Neon on a 3060 laptop: 6 3D works tested. Sunshower Fishing Harbor and mechanical keyboard impress; soft-body physics and faces fall short.

Gemini 4 Neo Web Novel Writing Test: Faint AI Flavor, Textured Dialogue
Bilibili creator's first-look review of Gemini 4 Neo for Chinese web novel writing: testing a Three Kingdoms transmigration opening with faint AI flavor, emotionally textured dialogue, and strong crisis building, plus comparison of 4A/4H/4C models and full workflow demos.