DeepSeek Flash ran on my 128 GB Mac, but in the end it was too slow
DeepSeek Flash ran on my 128 GB Mac, but just ended up being too slow. DeepSeek V4.1 Flash 1017 started and answered prompts on M1 Ultra Mac Studio at about 16 tokens per second over 6 channels.
What I tested
I tried short answers, a math question, code, a longer DNS prompt, and a long input. Only two speeds matter: input speed is how fast the model reads the prompt, while generation speed is how fast it writes the answer. A model can read quickly and still write slowly or vice versa.
The full comparison at the workflow model test covers other local models. This article covers separate tests of startup, response speed, and several requests running at once. I did not give DeepSeek a score from the same 70-answer quality test in my initial tests on this hardware it was too slow..
Optimizations I tried
- Automatic RAM/GPU memory fitting.
- Loading model data from SSD only when needed.
- Caching frequently used model parts on the GPU.
- Adjusting processing batch sizes.
- Moving some expert layers to the CPU.
- Trying 16 CPU threads.
- Sharing the working-memory cache between requests.
- Compressing that cache to 8-bit.
- Reusing cached prompts and shared instructions.
- Running six requests at once.
- Replacing the token-memory table with a higher-precision version.
Startup
With the disk-max setup, startup took about 60 seconds. The auto-fit setup started in about 16 seconds. For a short code answer, generation was about 7.0 tokens per second with disk-max and 15.5 with auto-fit.
Short Code Generation
I asked DeepSeek V4.1 Flash to write a Bash function that lists the five largest files in a folder, with readable file sizes, for use on macOS and Linux. On my 128 GB M1 Ultra Mac Studio, generating the answer took 91.7 seconds at 7.0 tokens per second with disk-max, compared with 40.4 seconds at 15.5 tokens per second with auto-fit.
Long input and several requests
For the first long-input requests, the server returned HTTP 400 errors and reported empty or invalid JSON. JSON is the data format used to send the request. These errors told me the request data was rejected; they do not measure the model’s reasoning.
A 22,992-token input took 176.5 seconds to read and 14.4 seconds to generate an answer. One request generated about 14.0 tokens per second. Six software requests at once averaged about 4.8 tokens per second each, with 26.6 tokens per second combined across a 162-second run. A repeat averaged 4.7 per request.
Why I parked it
The whole model was not loaded into memory at once, but it was slow as Christmas to read the incoming requests. Always test with a real trial to measure prompt length, generation speed, startup, and several requests at once.
I kept the model files for future tests. IfI can figure out the read speed this would be a great addition to my local stack.
Why do I think the reads too so long?
DeepSeek’s model files are 233 GB, too large to fit fully in the Mac’s 128 GB of memory. Processing a new prompt likely meant pulling more model data from the SSD, which is slower than using data already in memory. Repeated instructions were much faster because the model could reuse earlier work, but still not close to fast enough