Retrieved article excerpt
Open article · Retrieved 2026-10-23T22:28:16.452578+00:00
# Kimi-K3 on Apple Silicon / MLX
[tests](https://github.com/sjdthree/kimi-k3-mlx-macmini/actions/workflows/tests.yml)
[Three private-document cases run locally on the Mac mini: medical records in 3.3 days, customer data in 3.0 days, trade secrets and patents in 4.7 days](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md)
**A 2.8-trillion-parameter model on a 64 GB Mac. Slow enough to take days. Useful enough
that days might be fast.**
> *"RAM is expensive! But my SSD can hold a 1.5 TB model — can't I run it off that?"*
>
> **Yes!**
This repository runs the **complete Kimi-K3 checkpoint** (2.8 trillion parameters,
~1.42 TiB of MXFP4 weights, all **93 text-model layers**, no pruned experts) locally on a
**64 GB M4 Pro Mac mini**. The mixture-of-experts weights stream from an external SSD,
expert by expert, and run natively in MLX and Metal on Apple Silicon.
The best measured configuration decoded at **~32.4 seconds/token** with **~15 GiB peak MLX
allocator memory**. That memory number is the MLX high-water mark, not total application
footprint or system memory, and it excludes the OS file cache; the long-context demo runs
below peaked at 22–24 GiB during prefill.
**That's seconds per token, not tokens per second.** Yes, it's slow. What did you expect?
For interactive chat, 32 seconds per token is impractical. But some confidential work
already waits days, weeks or months for a specialist, an attorney or patent counsel. For
that work the useful measure may be **time to useful analysis**, not tokens per second.
[Three applications](https://github.com/sjdthree/kimi-k3-mlx-macmini#why-run-it-locally-three-applications) below, each tested end to
end on the Mac mini with a synthetic case.
This project was **inspired by and extends [AirLLM](https://github.com/lyogavin/airllm)
and Gavin Li’s Kimi-K3 streaming work**, described in his article
[*Unbelievable! Run Kimi K3–2.8 Trillion Parameters — on a Single 4GB GPU*](https://aiadvances.org/unbelievable-run-kimi-k3-2-8-trillion-parameters-on-a-single-4gb-gpu-23590e7a16c2).
SSD, layer, and expert streaming are prior work; see also
[flash-moe](https://github.com/danveloper/flash-moe), which streams a large MoE model from
SSD on a MacBook. The contributions here are the Apple Silicon implementation, K3 architecture
port, fused Metal MXFP4 kernel, latent MLA cache implementation, and measurement and
validation tooling. [Attribution and licenses](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/docs/licensing.md).
The full upstream MXFP4 checkpoint is used, without pruning experts or reducing
language-model depth. “Complete” describes the checkpoint and text model; the included
vision tower is **not executed**. The CUDA/FlashAttention/Triton paths in the reference
implementation do not run on Metal, so the text architecture is implemented with MLX
operations and a Metal kernel instead.
## Why run it locally? Three applications
Each application below starts with the situation that motivates it. Each was then
tested with a two-page synthetic "confidential" package that hides a planted conclusion
across several sections, among deliberate distractors. No real patient, client or
company data is involved. The synthetic case is the closest test of the skill each
application needs; it is not a test of that exact workflow.
### 1. Medical records and incidents
> I need a highly specialized doctor, and I don't want years of private test results in
> the open cloud.
> See a specialist? **Best I can do is three months!**
> In the meantime, my Mac can read my complete history (labs, medications, reports,
> notes) locally. A report takes about three days.
>
> **I'll take the 3 days.**
The intended output is an organized briefing for the appointment: a chronology, possible
inconsistencies, and questions to raise with the physician. It is **not a diagnosis**, it
does not replace the doctor, and it cannot tell anyone whether waiting is safe. Urgent
symptoms need prompt professional care.
*What was tested:* an adverse-event investigation at a hospital using a clinical AI
system, with synthetic patient data. The local run found the planted cause, a **stale
machine-readable clinical-policy configuration rather than a model or coding defect**, and
separated model, software, policy, change-control and human contributions. It took 3.3 days.
Material like this is often handled under peer-review or legal protections, which is
part of why an organization may not want it on an outside service.
[Medical-AI case](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md#what-the-model-found)
### 2. Confidential client and customer documents
> I have highly confidential documents and client data. A leak would be the end. My
> attorneys can get back to me in a week or two.
> In the meantime, my Mac can analyze the whole corpus locally in about three days.
>
> **I'll take the 3 days.**
The intended output is preparation for counsel: contract issues, contradictions,
timelines, missing information and questions to ask. Whether sharing a document with an
outside AI service affects privilege or confidentiality depends on the facts, the terms
of the service and the jurisdiction; that is a question for counsel. Local inference
avoids sending the corpus to an external inference provider. It does not by itself meet
any other security, contractual or legal obligation.
*What was tested:* a semiconductor fab excursion, the kind of record a company keeps
quiet because it shows how its chips are made and which customers are affected before
anything has been disclosed. The local run traced the planted chain (chamber maintenance,
a **mis-seated edge gas-ring seal**, edge thinning, bridge defects) and set aside the
distractors. It took 3.0 days. Neither the local nor the cloud run noticed that the
package contradicts itself about one wafer's chamber.
[Semiconductor case](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md#what-the-model-found)
### 3. R&D and trade-secret invention strategy
> I have trade secrets, patents, unfiled inventions and competitor patents. I need a deep
> dive on keep-it-secret versus patent-it. Patent counsel needs a month for all this.
>
> **I'll take the 5 days.**
Engineering knowledge is spread across experiments, manufacturing procedures, firmware,
control algorithms and existing patents. A trade secret stays protected only while the
company takes reasonable steps to keep it secret, and careless disclosure can also damage
a patent strategy. A local model can spend days on the whole corpus and come back with
candidate inventions, technical combinations, likely trade secrets, disclosure risks and
questions for counsel.
*What was tested:* a board-level package about liquid-cooled AI compute modules. The
local run took 4.7 days and:
- found **all four planted concepts** that the existing patent claims do not cover;
- argued that a **combination of three of them** is more defensible than any one, citing
the >12% pre-charge sensitivity as evidence of synergy;
- flagged a **supplier-side leak path**: statistical aggregation of the machining
coordinates the supplier receives;
- proposed its own additions, such as a "virtual sensor" built on already-claimed
pressure sensors, labeling one of them an untested hypothesis.
The cloud reference run also found all four and the combination argument. It proposed a
different extra concept, a self-diagnostic use of the compressibility estimator to detect
pre-charge drift. These are **candidate** inventions, not established patentability; each
would still need a prior-art search and legal review.
[R&D case](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md#what-the-model-found)
### Results
| Application | Synthetic case: what the model was asked | Planted conclusion recovered (local / cloud) | Local run on the Mac mini | Cloud reference | Outputs |
| --- | --- | --- | --- | --- | --- |
| Medical | Medical-AI adverse event: reconstruct it and separate model, software, policy, change-control and human causes | Yes / Yes | 79.9 h (3.3 days), 8,225 tokens | 72 s, $0.106 | [local](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/runs/demo-local/medical_ai/answer.md) · [cloud](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cloud-reference/results.md) · [package](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cases/02_medical_ai_confidential_incident.pdf) |
| Client / customer data | Semiconductor excursion: find the physical mechanism, rank alternatives, propose tests | Yes / Yes | 72.6 h (3.0 days), 7,623 tokens | 187 s, $0.069 | [local](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/runs/demo-local/semiconductor/answer.md) · [cloud](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cloud-reference/results.md) · [package](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cases/01_semiconductor_confidential_excursion.pdf) |
| R&D / trade secret | Find unclaimed inventions and weigh patent versus trade secret | Yes, all four / Yes, all four | 112.5 h (4.7 days), 11,651 tokens | 99 s, $0.151 | [local](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/runs/demo-local/rd_tradesecret/answer.md) · [cloud](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cloud-reference/results.md) · [package](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/cases/03_rd_tradesecret_invention_strategy.pdf) |
- **Local** means every token was generated on the Mac mini by this repository, at 34–35
s/token median. Local times are generation time; the semiconductor run also lost 70
hours to a USB enclosure dropout, which is excluded.
- **Cloud reference** is the same model through OpenRouter (2026-09-22), run first because
the documents are synthetic. It is not a local result.
- **Recovered** is one reviewer's reading against the planted conclusions described in
the [demo README](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md#what-the-model-found). The
local answers were not scored, and the private evaluator guide holding the answer key
is not published. Each run is a single sample per case.
[All local answers](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/local-results/results.md) ·
[side-by-side comparison](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/README.md#what-the-model-found) ·
[methodology](https://github.com/sjdthree/kimi-k3-mlx-macmini/blob/main/demos/private-document-analysis/evaluation/methodology.md)
## When is three days faster than three months?
Cloud inference is fast and cheap: the reference run of all three cases took about six
minutes and cost about **$0.327**. Local inference on this Mac took 3–5 days per case.
If the documents can go to the cloud, use the cloud.
The local case is for material that an organization or a person would rather not send
to a cloud inference provider: medical histories, confidential client files, unpublished
R&D, trade secrets. Then the comparison is not local tokens per second against cloud
tokens per second. It is time to a useful analysis against the time the existing
professional workflow takes: a three-month wait for a specialist, two weeks for
attorneys, a month for patent counsel.
Local inference is not automatically secure or compliant. It removes one party, the
inference provider, from the data flow. The machine, its disks, its backups and the people
with access to it still matter. And these results do not show that a 2.8T model is
necessary: no s