mlx-bun 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -20
- package/docs/design/batching-v2-plan.md +515 -0
- package/docs/design/bucketing-stage.md +196 -0
- package/docs/design/compat-cli-surface-design.md +11 -11
- package/docs/design/diffusion-gemma-port.md +602 -0
- package/docs/design/docs-reorg-plan.md +1 -1
- package/docs/design/dreaming-nightly-pipeline.md +291 -0
- package/docs/design/dspark-speculative-decoding.md +106 -0
- package/docs/design/generic-model-support.md +381 -0
- package/docs/design/memory-inference-path.md +422 -0
- package/docs/design/memory-synthesis.md +287 -0
- package/docs/design/minicpm5-decode-megakernel.md +484 -0
- package/docs/design/mlx-lm-tool-parity-plan.md +535 -0
- package/docs/design/orpo-dynamic-lambda.md +41 -0
- package/docs/design/orpo-training.md +35 -5
- package/docs/design/parallel-slots.md +12 -1
- package/docs/design/parity-tier-dag.md +13 -5
- package/docs/design/spec-decode-larger-targets.md +229 -0
- package/docs/design/tauri-desktop-app.md +2 -2
- package/docs/design/the-dreaming-handoff.md +141 -0
- package/docs/design/the-dreaming-master-plan.md +446 -0
- package/docs/design/write-pipeline-entity.md +468 -0
- package/docs/investigations/curve-bisector-routing.md +1 -1
- package/docs/investigations/decode-roofline-lookagain.md +262 -0
- package/docs/investigations/dspark-handoff.md +58 -0
- package/docs/investigations/kernel-perf-review-2026-07.md +92 -0
- package/docs/planning/PRODUCT_ROADMAP.md +2 -2
- package/docs/planning/curve-sampler-research-plan.md +331 -0
- package/docs/planning/memory-docs-and-dag-plan.md +185 -0
- package/docs/planning/pi-integration-review.md +178 -0
- package/docs/planning/release-notes-v0.0.9.md +122 -0
- package/docs/planning/web-ui-pass-plan.md +213 -0
- package/docs/planning/website-readme-pass-plan.md +224 -0
- package/docs/reference/cli.md +255 -0
- package/docs/reference/embedding.md +7 -2
- package/docs/reference/library-api.md +22 -3
- package/docs/reference/memory.md +5 -5
- package/docs/reference/models.md +137 -0
- package/docs/reference/orpo-quickstart.md +6 -0
- package/docs/reference/server-api.md +187 -9
- package/docs/reference/server-config.md +40 -9
- package/docs/reference/training.md +25 -11
- package/package.json +1 -1
- package/src/anthropic.ts +22 -0
- package/src/assets/curve-designer.html +1 -1
- package/src/chat-template.ts +25 -7
- package/src/cli.ts +1029 -86
- package/src/config.ts +54 -3
- package/src/diffusion/diffusion-generate.ts +436 -0
- package/src/download.ts +99 -8
- package/src/embed.ts +77 -0
- package/src/eval/perplexity.ts +164 -0
- package/src/eval/runner.ts +19 -7
- package/src/eval/tasks/bfcl.ts +1 -1
- package/src/generate.ts +196 -19
- package/src/harness-pi.ts +43 -17
- package/src/index.ts +2 -0
- package/src/lora.ts +2 -2
- package/src/memory/article.ts +558 -0
- package/src/memory/chunk-validation.ts +150 -0
- package/src/memory/chunk.ts +305 -12
- package/src/memory/cluster.ts +344 -17
- package/src/memory/coverage.ts +134 -0
- package/src/memory/crosslink.ts +0 -0
- package/src/memory/db.ts +184 -45
- package/src/memory/entity.ts +203 -0
- package/src/memory/gate.ts +187 -0
- package/src/memory/history.ts +152 -0
- package/src/memory/ingest.ts +324 -11
- package/src/memory/model.ts +321 -0
- package/src/memory/normalize.ts +671 -0
- package/src/memory/parse.ts +22 -0
- package/src/memory/pipeline.ts +242 -30
- package/src/memory/prompts.ts +42 -0
- package/src/memory/query.ts +334 -0
- package/src/memory/reconcile.ts +734 -0
- package/src/memory/redirect.ts +108 -0
- package/src/memory/reindex.ts +325 -0
- package/src/memory/resolve.ts +307 -0
- package/src/memory/route.ts +272 -0
- package/src/memory/schedule.ts +6 -4
- package/src/memory/stages.ts +774 -0
- package/src/memory/synthesize.ts +1629 -20
- package/src/memory/tools.ts +446 -96
- package/src/memory/vault.ts +462 -35
- package/src/memory/wikify.ts +1057 -16
- package/src/mlx/ffi.ts +11 -0
- package/src/mlx/ops.ts +113 -0
- package/src/model/compiled-decode.ts +43 -8
- package/src/model/diffusion-gemma.ts +1026 -0
- package/src/model/factory.ts +35 -8
- package/src/model/flash-attention.ts +4 -2
- package/src/model/fused-decode-kernel.ts +14 -7
- package/src/model/fused-mlp-kernel.ts +169 -0
- package/src/model/fused-swiglu-kernel.ts +240 -0
- package/src/model/gemma4-base.ts +62 -6
- package/src/model/gemma4.ts +33 -2
- package/src/model/minicpm5.ts +106 -8
- package/src/model/qwen3.ts +276 -0
- package/src/model/steel-linear-kernel.ts +96 -0
- package/src/model/support.ts +45 -7
- package/src/model/universal/archs.ts +332 -0
- package/src/model/universal/dense.ts +576 -0
- package/src/model/universal/modules.ts +163 -0
- package/src/model/universal/rope.ts +366 -0
- package/src/pi-provider.ts +1 -1
- package/src/pi-terminal.ts +29 -8
- package/src/pi-web.ts +19 -2
- package/src/quantize/config-writer.ts +1 -1
- package/src/registry.ts +215 -7
- package/src/responses.ts +23 -0
- package/src/sampler.ts +220 -9
- package/src/serve/batch-scheduler.ts +272 -80
- package/src/serve/generation-gateway.ts +90 -18
- package/src/server.ts +643 -50
- package/src/spec/drafter.ts +81 -49
- package/src/spec/dspark/data-dflash.ts +156 -0
- package/src/spec/dspark/data.ts +201 -0
- package/src/spec/dspark/generate-dflash.ts +193 -0
- package/src/spec/dspark/generate.ts +290 -0
- package/src/spec/dspark/loss.ts +213 -0
- package/src/spec/dspark/module-dflash.ts +361 -0
- package/src/spec/dspark/module.ts +540 -0
- package/src/spec/dspark/sample.ts +112 -0
- package/src/spec/generate.ts +40 -19
- package/src/status-page.html +1 -1
- package/src/tokenizer.ts +7 -0
- package/src/train/diffusion-lora.ts +216 -0
- package/src/train/flash-cce.ts +70 -15
- package/src/train/fuse.ts +243 -0
- package/src/train/index.ts +3 -0
- package/src/train/job.ts +8 -0
- package/src/train/loss.ts +289 -30
- package/src/train/prefix-shared.ts +33 -5
- package/src/train/segmented.ts +67 -11
- package/src/train/trainer.ts +92 -28
- package/src/vision/diffusion-vision.ts +620 -0
- package/src/web/skills/memory/SKILL.md +40 -17
|
@@ -20,26 +20,49 @@ the user's machine. Nothing about their memory leaves the device.
|
|
|
20
20
|
|
|
21
21
|
When the answer depends on personal continuity — an explicit memory/recall
|
|
22
22
|
request, or a named project, person, decision, preference, or history that is
|
|
23
|
-
not explained in the current chat —
|
|
24
|
-
the user to re-explain.
|
|
23
|
+
not explained in the current chat — look it up **before** answering or asking
|
|
24
|
+
the user to re-explain. Doing the lookup first, instead of answering from first
|
|
25
|
+
principles, is itself the helpful move.
|
|
25
26
|
|
|
26
27
|
Do **not** use memory for weather, current public facts, generic web research,
|
|
27
28
|
or ordinary coding/file tasks when the current files or the web tools answer the
|
|
28
29
|
question. Memory is for user-specific context, not for performing familiarity.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
The read path is **FIND the article → READ it small → answer**. It is
|
|
32
|
+
deterministic navigation — never a vector search, and there is no way to
|
|
33
|
+
query/sort articles by an infobox field (the infobox is facts you *read*, via
|
|
34
|
+
`memory_infobox`, not a filter).
|
|
35
|
+
|
|
36
|
+
1. **FIND the article.**
|
|
37
|
+
- When the user names a specific thing, person, or project, call
|
|
38
|
+
`memory_resolve` with the name as said ("S5 IIX", "the Lumix"). It returns
|
|
39
|
+
the matched stem, title, kind, and lead — no search, no guessing.
|
|
40
|
+
- For "what do I have about X", call `memory_category` with a `category`
|
|
41
|
+
(e.g. `Lenses`), `type`, or `series`. This is membership, not search: it
|
|
42
|
+
lists the articles that are actually about X.
|
|
43
|
+
2. **READ it small (the default).** Call `memory_read` to get the article's TOC
|
|
44
|
+
+ lead, then `memory_section` to read just the **one** section you need. The
|
|
45
|
+
whole article is the exception — pass `force=true` only when you truly need
|
|
46
|
+
all of it. The article is the user's consolidated current position; read it
|
|
47
|
+
rather than reconstructing their view from scattered fragments.
|
|
48
|
+
3. **Follow the graph / read the infobox when useful.** `memory_links` shows
|
|
49
|
+
outgoing links grouped by origin (infobox / series / see also / prose) plus
|
|
50
|
+
backlinks — use it to hop to a neighbour (e.g. from a camera's infobox
|
|
51
|
+
`mount: [[L-Mount]]` to the mount article). `memory_infobox` surfaces the
|
|
52
|
+
structured facts to read. `memory_list` is a bare overview;
|
|
53
|
+
`memory_status` answers setup/schedule/location questions. mlx-bun reference
|
|
54
|
+
docs are separate from personal memory; use `reference_search`,
|
|
55
|
+
`reference_read`, and `reference_list` for those.
|
|
56
|
+
4. **`memory_search` is the LAST resort.** Only fall back to it when
|
|
57
|
+
`memory_resolve` / `memory_category` have failed across a couple of
|
|
58
|
+
phrasings. It is a plain substring scan that doesn't understand meaning.
|
|
59
|
+
5. **Use it silently, as a continuation.** Let what you find shape your response
|
|
60
|
+
like a long-time colleague who already knows the state of things. Speak as a
|
|
61
|
+
continuation, never as a retrieval report: do not preface answers with "per
|
|
62
|
+
the wiki…", "according to the article…", "I checked your memory…", or
|
|
63
|
+
"welcome back, I see you're working on X". Cite an article by name only if
|
|
64
|
+
the user asks where something came from, or to distinguish "the wiki says X"
|
|
65
|
+
from "I think Y".
|
|
43
66
|
|
|
44
67
|
Use memory as an invisible prior: it should narrow relevance and improve the
|
|
45
68
|
answer, not become the topic of the answer. Avoid performative recall — do not
|
|
@@ -85,8 +108,8 @@ wiki, scheduling nightly synthesis). Confirm before each persistent action.
|
|
|
85
108
|
|
|
86
109
|
## What not to do
|
|
87
110
|
|
|
88
|
-
- Don't claim a fact "from memory" that you didn't read in an article —
|
|
89
|
-
and read first, or say you don't have it.
|
|
111
|
+
- Don't claim a fact "from memory" that you didn't read in an article — find
|
|
112
|
+
and read the article first, or say you don't have it.
|
|
90
113
|
- Don't write to or edit the wiki during a normal conversation; the read tools
|
|
91
114
|
are read-only by design. Synthesis is a separate, deliberate step.
|
|
92
115
|
- Do open the wiki or a specific article in Obsidian/Finder if the user asks to
|