mlx-bun 0.3.0 → 0.4.0

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.
Files changed (150) hide show
  1. package/docs/README.md +4 -1
  2. package/docs/archive/investigations/openjarvis-fit.md +198 -0
  3. package/docs/archive/investigations/qwen38-27b-campaign-log.md +1092 -0
  4. package/docs/design/batching.md +1321 -49
  5. package/docs/design/decode-speed-program.md +331 -1163
  6. package/docs/design/generic-model-support.md +79 -3
  7. package/docs/design/kv-cache.md +198 -54
  8. package/docs/design/speculative-decoding.md +387 -24
  9. package/docs/design/turboquant.md +123 -13
  10. package/docs/design/unified-engine-frontier-plan.md +144 -142
  11. package/docs/planning/PRODUCT_ROADMAP.md +16 -0
  12. package/docs/planning/release-notes-v0.4.0.md +45 -0
  13. package/docs/reference/benchmarks.md +2457 -6
  14. package/docs/reference/cli.md +41 -2
  15. package/docs/reference/distribution.md +16 -9
  16. package/docs/reference/environment.md +55 -5
  17. package/docs/reference/models.md +13 -4
  18. package/docs/reference/server-api.md +79 -25
  19. package/docs/reference/server-config.md +178 -84
  20. package/docs/reference/troubleshooting.md +13 -21
  21. package/package.json +1 -1
  22. package/src/backends/mlx/assistant-target.ts +46 -0
  23. package/src/backends/mlx/autoregressive-draft-rows.ts +120 -0
  24. package/src/backends/mlx/batch-group.ts +368 -224
  25. package/src/backends/mlx/cache-attachment.ts +67 -0
  26. package/src/backends/mlx/cache-layout.ts +31 -0
  27. package/src/backends/mlx/checkpoint-state.ts +53 -0
  28. package/src/backends/mlx/continuation-persistence.ts +106 -0
  29. package/src/backends/mlx/continuation-request.ts +43 -0
  30. package/src/backends/mlx/continuation.ts +77 -0
  31. package/src/backends/mlx/draft-target.ts +7 -22
  32. package/src/backends/mlx/full-kv-row-append.ts +32 -0
  33. package/src/backends/mlx/full-kv-row-donor.ts +54 -0
  34. package/src/backends/mlx/full-transitioning-kv-rows.ts +65 -0
  35. package/src/backends/mlx/gateway-binding.ts +77 -18
  36. package/src/backends/mlx/kv-codec.ts +9 -0
  37. package/src/backends/mlx/kv-maintenance.ts +133 -0
  38. package/src/backends/mlx/kv-tensor-rows.ts +212 -0
  39. package/src/backends/mlx/model-serving.ts +1 -1
  40. package/src/backends/mlx/prefill-cohort.ts +89 -0
  41. package/src/backends/mlx/prefill-rows.ts +200 -0
  42. package/src/backends/mlx/prefill.ts +1 -1
  43. package/src/backends/mlx/projected-context-rows.ts +72 -0
  44. package/src/backends/mlx/request-state-policy.ts +41 -0
  45. package/src/backends/mlx/rollback.ts +41 -3
  46. package/src/backends/mlx/row-sampling.ts +49 -0
  47. package/src/backends/mlx/serial-executor.ts +35 -66
  48. package/src/backends/mlx/speculative-group.ts +359 -0
  49. package/src/backends/mlx/speculative-round.ts +161 -0
  50. package/src/backends/mlx/state-rows.ts +104 -0
  51. package/src/backends/mlx/state-views.ts +21 -1
  52. package/src/backends/mlx/target-layout-capability.ts +35 -0
  53. package/src/backends/mlx/transitioning-kv-rows.ts +165 -0
  54. package/src/cli.ts +11 -36
  55. package/src/contracts/execution.ts +11 -0
  56. package/src/contracts/prefix-cache.ts +23 -0
  57. package/src/contracts/resources.ts +7 -0
  58. package/src/contracts/sampling.ts +23 -0
  59. package/src/contracts/scheduling.ts +18 -0
  60. package/src/engine/execution-plan.ts +18 -16
  61. package/src/engine/resources.ts +12 -1
  62. package/src/engine/scheduler.ts +10 -5
  63. package/src/fit.ts +29 -15
  64. package/src/generate.ts +77 -173
  65. package/src/inference/draft-acceptance.ts +41 -0
  66. package/src/inference/draft-output.ts +49 -0
  67. package/src/inference/rollback.ts +2 -2
  68. package/src/kv-scheme.ts +70 -12
  69. package/src/kv-store.ts +70 -16
  70. package/src/lab/paged-kv/paged-kv-rows.ts +83 -0
  71. package/src/lab/paged-kv/paged-kv.ts +25 -11
  72. package/src/mlx/array.ts +2 -1
  73. package/src/model/artifact-identity.ts +73 -0
  74. package/src/model/batched-kv.ts +235 -0
  75. package/src/model/batched-mask.ts +12 -4
  76. package/src/model/batched-quant.ts +8 -2
  77. package/src/model/batched-quantized-kv.ts +144 -0
  78. package/src/model/batched-rotating-quant.ts +76 -15
  79. package/src/model/batched-rotating-state.ts +76 -0
  80. package/src/model/batched-rotating.ts +64 -22
  81. package/src/model/batched-row-storage.ts +52 -0
  82. package/src/model/batched-ssm.ts +52 -0
  83. package/src/model/batched-turboquant-kv.ts +93 -0
  84. package/src/model/compiled-decode.ts +7 -1
  85. package/src/model/decoded-kv-donor.ts +12 -0
  86. package/src/model/delayed-quantized-kv.ts +72 -0
  87. package/src/model/delayed-rotating-quantized-kv.ts +93 -0
  88. package/src/model/delayed-turboquant-kv.ts +55 -0
  89. package/src/model/full-prefill-padding.ts +56 -0
  90. package/src/model/full-prefill-row.ts +105 -0
  91. package/src/model/gemma4-base.ts +162 -80
  92. package/src/model/gemma4.ts +34 -26
  93. package/src/model/generated/gemma4-12b.ts +4 -1
  94. package/src/model/generated/gemma4-26b.ts +4 -1
  95. package/src/model/generated/gemma4-e4b.ts +4 -1
  96. package/src/model/glm52-cache.ts +80 -4
  97. package/src/model/glm52-mla.ts +12 -6
  98. package/src/model/glm52.ts +19 -40
  99. package/src/model/kv-attention-view.ts +67 -0
  100. package/src/model/minicpm5.ts +11 -7
  101. package/src/model/qwen3-delta-state.ts +74 -0
  102. package/src/model/qwen3-delta.ts +59 -36
  103. package/src/model/qwen3_5.ts +82 -42
  104. package/src/model/rotating-kv-donor.ts +35 -0
  105. package/src/model/rotating-kv-layout.ts +262 -0
  106. package/src/model/rotating-row-transaction.ts +35 -0
  107. package/src/model/speculative-rotating-kv.ts +101 -0
  108. package/src/model/ssm-prefill-padding.ts +39 -0
  109. package/src/model/trellis-linear.ts +2 -2
  110. package/src/model/turboquant-codec.ts +83 -0
  111. package/src/model/universal/dense.ts +14 -13
  112. package/src/preflight.ts +31 -15
  113. package/src/prompt-cache.ts +42 -44
  114. package/src/sampler.ts +36 -25
  115. package/src/serve/chat-stage.ts +2 -2
  116. package/src/serve/generation-gateway.ts +39 -30
  117. package/src/serve/model-host.ts +3 -4
  118. package/src/serve/request-plan.ts +4 -3
  119. package/src/serve/request-prep.ts +2 -4
  120. package/src/serve/text-completion-stage.ts +2 -2
  121. package/src/server.ts +64 -108
  122. package/src/spec/assistant-rows.ts +92 -0
  123. package/src/spec/assistant-source.ts +28 -18
  124. package/src/spec/cache-identity.ts +22 -0
  125. package/src/spec/deepspec-rows.ts +29 -0
  126. package/src/spec/deepspec-source.ts +12 -10
  127. package/src/spec/dflash-source.ts +28 -4
  128. package/src/spec/drafter.ts +153 -142
  129. package/src/spec/dspark/deepspec-module.ts +95 -120
  130. package/src/spec/dspark/module-dflash.ts +126 -170
  131. package/src/spec/glm52-mtp-graph.ts +29 -0
  132. package/src/spec/glm52-mtp-rows.ts +132 -0
  133. package/src/spec/glm52-mtp-source.ts +53 -136
  134. package/src/spec/glm52-mtp-state.ts +33 -0
  135. package/src/spec/ngram-source.ts +92 -20
  136. package/src/spec/projected-draft-rows.ts +73 -0
  137. package/src/spec/qwen-mtp-module.ts +171 -0
  138. package/src/spec/qwen-mtp-rows.ts +219 -0
  139. package/src/spec/qwen-mtp-source.ts +81 -226
  140. package/src/spec/qwen-mtp-state.ts +30 -0
  141. package/src/spec/serve-loop.ts +70 -68
  142. package/src/spec/source.ts +80 -15
  143. package/src/spec/two-model-rows.ts +61 -0
  144. package/src/spec/two-model.ts +43 -101
  145. package/src/ssd-cache.ts +33 -21
  146. package/src/ssd-durability.ts +11 -7
  147. package/src/web/app.js +57 -57
  148. package/src/backends/mlx/memory-guard.ts +0 -40
  149. package/src/spec/prefix-state.ts +0 -45
  150. /package/docs/{planning → archive/planning}/release-notes-v0.3.0.md +0 -0
package/docs/README.md CHANGED
@@ -20,6 +20,7 @@ Frozen history — read-only, never extended in place; recover raw data via git
20
20
  - [investigations/kernel-perf-review-2026-07.md](../docs/archive/investigations/kernel-perf-review-2026-07.md) — Kernel/perf deep review — 2026-07-01 (condensed, tracked record)
21
21
  - [investigations/lab-build-journal.md](../docs/archive/investigations/lab-build-journal.md) — Build journal — mlx-bun Lab (web UI + native quantize/train/dataset + pi web chat)
22
22
  - [investigations/minicpm5-decode-megakernel.md](../docs/archive/investigations/minicpm5-decode-megakernel.md) — MiniCPM5 Decode Megakernel — end-to-end build plan (handoff)
23
+ - [investigations/openjarvis-fit.md](../docs/archive/investigations/openjarvis-fit.md) — OpenJarvis research and fit with mlx-bun
23
24
  - [investigations/openwiki-evaluation.md](../docs/archive/investigations/openwiki-evaluation.md) — OpenWiki — evaluation & fit analysis
24
25
  - [investigations/optimization_plan.md](../docs/archive/investigations/optimization_plan.md) — mlx-bun: gemma4.ts decompose & optimize — action plan
25
26
  - [investigations/orpo-base-uf-experiment-and-directions.md](../docs/archive/investigations/orpo-base-uf-experiment-and-directions.md) — ORPO from-base on UltraFeedback (mixed-5bpw) — results + research directions
@@ -28,6 +29,7 @@ Frozen history — read-only, never extended in place; recover raw data via git
28
29
  - [investigations/pareto-specialized-runtime-findings.md](../docs/archive/investigations/pareto-specialized-runtime-findings.md) — Pareto-specialized runtime findings
29
30
  - [investigations/pi-builtin-investigation.md](../docs/archive/investigations/pi-builtin-investigation.md) — Investigation: pi as a "built-in" terminal for mlx-bun
30
31
  - [investigations/pre-colibri-stabilization.md](../docs/archive/investigations/pre-colibri-stabilization.md) — Pre-Colibri stabilization program
32
+ - [investigations/qwen38-27b-campaign-log.md](../docs/archive/investigations/qwen38-27b-campaign-log.md) — Qwen3.8-27B optimization campaign — execution log (2026-09-04 → 2026-09-08)
31
33
  - [investigations/segmented-backward-handoff.md](../docs/archive/investigations/segmented-backward-handoff.md) — Handoff — segmented backward training (2026-06-16)
32
34
  - [investigations/starter-model-port-handoff.md](../docs/archive/investigations/starter-model-port-handoff.md) — Handoff: the sub-GB starter model port (publishing gate 1)
33
35
  - [investigations/steel-flash-cce-handoff.md](../docs/archive/investigations/steel-flash-cce-handoff.md) — Steel flash-CCE — handoff
@@ -46,6 +48,7 @@ Frozen history — read-only, never extended in place; recover raw data via git
46
48
  - [planning/release-notes-v0.0.13.md](../docs/archive/planning/release-notes-v0.0.13.md) — v0.0.13 release notes
47
49
  - [planning/release-notes-v0.0.9.md](../docs/archive/planning/release-notes-v0.0.9.md) — v0.0.9 release notes (DRAFT — Josh edits + publishes)
48
50
  - [planning/release-notes-v0.2.0.md](../docs/archive/planning/release-notes-v0.2.0.md) — mlx-bun v0.2.0
51
+ - [planning/release-notes-v0.3.0.md](../docs/archive/planning/release-notes-v0.3.0.md) — mlx-bun v0.3.0
49
52
  - [planning/web-ui-pass-plan.md](../docs/archive/planning/web-ui-pass-plan.md) — Web UI pass — ranked fix list (2026-07-01 audit)
50
53
  - [planning/website-readme-pass-plan.md](../docs/archive/planning/website-readme-pass-plan.md) — Website + README pass — audit findings and fix plan (2026-07-01)
51
54
 
@@ -70,7 +73,7 @@ Living product/vision docs (USING side).
70
73
 
71
74
  - [PRODUCT_ROADMAP.md](../docs/planning/PRODUCT_ROADMAP.md) — PRODUCT ROADMAP
72
75
  - [ResearchTopics.md](../docs/planning/ResearchTopics.md) — Research Topics
73
- - [release-notes-v0.3.0.md](../docs/planning/release-notes-v0.3.0.md) — mlx-bun v0.3.0
76
+ - [release-notes-v0.4.0.md](../docs/planning/release-notes-v0.4.0.md) — mlx-bun v0.4.0
74
77
  - [video-series.md](../docs/planning/video-series.md) — mlx-bun video series
75
78
 
76
79
  ## docs/reference/
@@ -0,0 +1,198 @@
1
+ # OpenJarvis research and fit with mlx-bun
2
+
3
+ Inspected September 8, 2026. OpenJarvis source revision
4
+ [`e25e77d36ee487aa456978e7a7f19a7f6d712260`](https://github.com/open-jarvis/OpenJarvis/tree/e25e77d36ee487aa456978e7a7f19a7f6d712260).
5
+ mlx-bun revision `673b43f39b88d8f6438e625aaaceca00851d0fbf`.
6
+ This is a source/documentation review, not a reproduced benchmark or a verified
7
+ live integration. No servers, model downloads, inference, or training ran.
8
+
9
+ OpenJarvis is useful both as a possible consumer of mlx-bun and as prior work
10
+ for the local adaptation research. Its most useful architectural idea is a
11
+ versioned configuration that can be evaluated and changed across model,
12
+ agent, tools, memory, and runtime settings. mlx-bun already supplies several
13
+ of those components. The remaining opportunity is to connect them through
14
+ replayable task evidence and controlled updates.
15
+
16
+ ## What the diagram means for this project
17
+
18
+ The [architecture documentation][architecture] separates five configurable
19
+ components. Interfaces and hardware surround them. The table maps those
20
+ roles to documented mlx-bun capabilities; it does not claim identical scope.
21
+
22
+ | OpenJarvis component | Existing mlx-bun contribution | Work above or around the engine |
23
+ |---|---|---|
24
+ | Intelligence | Supported model graphs, model discovery, quantization and adapters | Task-aware model/adapter selection, with measured loading and switching costs |
25
+ | Engine | Native MLX inference, HTTP serving, TypeScript library, caching and batching | An OpenJarvis compatibility check and an adapter for richer runtime measurements |
26
+ | Agents | Built-in Pi and integration with an external Pi | Compare task loops, including bounded RLM, outside numerical inference code |
27
+ | Tools and memory | Pi tools, embeddings, personal Markdown wiki and synthesis | Common tool contracts, evidence provenance and replayable memory snapshots |
28
+ | Learning | LoRA SFT/DPO/ORPO training and adapter serving | Verified data collection, candidate evaluation, retention tests and promotion |
29
+ | User interfaces | CLI and browser application | Messaging/desktop integrations only when a concrete workload needs them |
30
+
31
+ Local sources: [CLI](../../reference/cli.md),
32
+ [library API](../../reference/library-api.md),
33
+ [server API](../../reference/server-api.md),
34
+ [memory](../../reference/memory.md), [training](../../reference/training.md).
35
+ The Dreaming is memory synthesis, not weight training. Its current
36
+ [`runPipeline`](../../../src/memory/pipeline.ts) assumes conversations are
37
+ already ingested; closing that ingestion gap remains existing work.
38
+ Serving a model does not imply its architecture supports every training path.
39
+
40
+ ## RLM implementation and its limits
41
+
42
+ OpenJarvis includes a concrete [`RLMAgent`][rlm] with a persistent Python
43
+ [`RLMRepl`][repl]. It installs external context in a variable, executes
44
+ model-written code, exposes `llm_query` and `llm_batch`, and can return an
45
+ answer through `FINAL`, `FINAL_VAR`, or the `answer` dictionary.
46
+
47
+ This is a useful reference for the bounded external-context experiment in
48
+ the existing `harness_research/RESEARCH_PROGRAM.md`. It belongs in the task
49
+ execution loop. A separate optimizer could improve its prompt, decomposition
50
+ rules or tool configuration over time.
51
+
52
+ The inspected implementation has several details an experiment must account for:
53
+
54
+ - `llm_batch` runs subqueries sequentially. Its name does not imply engine
55
+ batching or parallel execution.
56
+ - Subqueries call `engine.generate` directly and can resolve one round of
57
+ returned tool calls. They do not create child REPL agents. This path should
58
+ not be described as arbitrary-depth recursive RLM execution.
59
+ - `AgentResult.metadata` accumulates root-call usage. `_make_sub_query`
60
+ returns text and does not add leaf or follow-up usage to that accumulator.
61
+ Measure every backend request independently for whole-task accounting.
62
+ - Root turns and per-call output tokens have limits, but these methods do not
63
+ impose one shared subcall/token/deadline budget. A single REPL program can
64
+ request many leaves. Enforce shared admission limits in a request broker.
65
+ - The REPL checks prohibited substrings and then invokes in-process Python
66
+ `exec`. Output truncation happens after execution. These mechanisms are not
67
+ process isolation or a hard execution/memory deadline. The project has
68
+ separate sandbox facilities; a benchmark must explicitly select isolation
69
+ and keep authoritative evaluation data outside the candidate environment.
70
+ - `_resolve_context` reads `AgentContext.metadata["context"]` or memory
71
+ results, while the normal user input still enters the root prompt.
72
+ Put the large corpus in the external-context field, not the user question.
73
+ Existing conversation messages are also retained by
74
+ [`BaseAgent._build_messages`][base-agent].
75
+
76
+ The appropriate comparison remains retrieval versus an external-context
77
+ REPL without subcalls versus bounded depth-1 RLM, on dense document
78
+ aggregation. Small lookup tasks establish connectivity but give weak
79
+ evidence about RLM's value. On a serial Mac GPU, extra model calls can erase
80
+ the benefit of smaller contexts; measure complete tasks.
81
+
82
+ ## Self-improvement is several separate implementations
83
+
84
+ | Mechanism | What the inspected source establishes |
85
+ |---|---|
86
+ | Learned routing | [`LearnedRouterPolicy`][routing] maps coarse query classes to models using trace outcomes and feedback. This is distinct from training language-model weights. |
87
+ | Configuration search | [`SpecSearchOrchestrator`][search] connects diagnosis, typed edit planning, execution, evaluation and recording. Runtime dependencies must be supplied. |
88
+ | Candidate gate | [`BenchmarkGate`][gate] compares overall score and per-cluster regressions using a versioned benchmark and repeatable subsample seed. |
89
+ | Weight training | [`SFTTrainer`][sft] delegates LoRA training to a separate trainer. [`GRPOTrainer`][grpo] contains a Torch/Transformers training loop with policy and reference models. Neither was executed in this review. |
90
+ | Weight updates inside spec search | [`LoraStubApplier`][lora-stub] rejects `LORA_FINETUNE` and raises `NotImplementedError` if applied. Separate trainers do not establish an integrated spec-search training cycle. |
91
+
92
+ The [spec-search guide][search-guide] describes a teacher diagnosing local
93
+ student failures and proposing changes. Its quickstart uses fake
94
+ teacher/student/judge components. It illustrates the orchestration, not
95
+ measured improvement by a deployed learning system.
96
+
97
+ There is documentation drift worth preserving in a reproduction. The guide's
98
+ gate predicate requires improvement on the targeted failure cluster. The
99
+ inspected `BenchmarkGate.evaluate` instead requires improvement in overall
100
+ score and rejects excessive per-cluster regressions; it receives no target
101
+ cluster argument. Its constructor defaults to a 0.05 regression allowance,
102
+ while the guide's configuration uses 0.01. `from_config` forwards the supplied
103
+ value. Pin the actual configuration and predicate instead of assuming that
104
+ the prose, constructor defaults, and configured execution are interchangeable.
105
+
106
+ The [learning architecture page][learning] also describes older router names
107
+ and a GRPO router stub. Current learned routing is consolidated in
108
+ `learning/routing/learned_router.py`, while the separate intelligence GRPO
109
+ trainer has implementation code. A blanket claim that "GRPO is a stub"
110
+ would therefore be misleading.
111
+
112
+ The [paper][paper] is close prior work for the research program: it studies
113
+ typed specifications and teacher-guided edits across several components,
114
+ with local inference after search. Its reported experiments span multiple
115
+ models and hardware classes, including Macs and larger workstations.
116
+ They do not establish the same gains on our M1 Max or M4 Pro, or prove that
117
+ the checked-out code reproduces every reported experiment. Its acknowledged
118
+ limitations include judge bias, statistical precision and search convergence.
119
+ We should reproduce a bounded comparison before adopting performance claims.
120
+
121
+ ## Integration path
122
+
123
+ The current [engine registry][engines] already registers `MLXEngine` through
124
+ the shared [`_OpenAICompatibleEngine`][http-engine]. That class accepts a
125
+ host URL, probes `/v1/models`, and calls `/v1/chat/completions`. The generic
126
+ `OpenAICompatEngine` offers the same interface for explicit endpoints.
127
+ This makes using mlx-bun as the inference backend a plausible small
128
+ integration, without importing OpenJarvis into the inference engine.
129
+
130
+ For a future smoke test, construct the generic engine with mlx-bun's origin
131
+ URL, without `/v1`, and choose the exact model ID from `list_models()`.
132
+ Check plain completion, tool-call round trips, streaming completion/error
133
+ handling, cancellation, reasoning output, model identity and usage against
134
+ raw HTTP responses. This review did not perform that test.
135
+
136
+ Two adapter behaviors need special attention:
137
+
138
+ - Synchronous generation retries a tool-bearing HTTP 400 without `tools`
139
+ and `tool_choice`. A successful retry does not establish tool compatibility.
140
+ - It takes the maximum of reported prompt tokens and an estimate, and labels
141
+ reported prompt tokens as `prompt_tokens_evaluated`. Those fields cannot
142
+ establish actual prefill work or cache reuse. Retain raw server measurements.
143
+
144
+ Use HTTP for the first comparison. A direct TypeScript implementation can
145
+ later use mlx-bun's library if measured requirements justify it.
146
+
147
+ ## Recommended direction
148
+
149
+ Keep mlx-bun responsible for inference correctness, resource management,
150
+ training execution and adapter lifecycle. Keep experimental task loops and
151
+ the process that changes them in `harness_research` initially. Use the same
152
+ backend for Pi, a controlled loop and OpenJarvis comparisons.
153
+
154
+ The next useful steps extend the existing research program:
155
+
156
+ 1. Complete the already proposed repeated-failure-feedback experiment in
157
+ `harness_research/NEXT_EXPERIMENT.md`. OpenJarvis strengthens the case for
158
+ including both a prompt-only comparison and executable loop changes.
159
+ 2. Define an immutable run identity covering model artifact, quantization,
160
+ adapter, agent code, prompts, tools, memory snapshot, runtime settings,
161
+ task revision and evaluation revision. Record all root/leaf/teacher calls.
162
+ 3. Add an OpenJarvis baseline through HTTP after the compatibility checks.
163
+ Preserve its full configuration and raw request trace.
164
+ 4. Run the separate RLM ablation with one shared request budget, isolated
165
+ execution and serial GPU admission. Include forced finalization in costs.
166
+ 5. Introduce typed candidate edits, frozen evaluation and rollback. Start with
167
+ bounded prompt/tool/loop changes before searching many dimensions together.
168
+ 6. Connect verified examples to existing LoRA training only after the fixed
169
+ task loop is measurable. Compare frozen, controller-only, adapter-only and
170
+ combined adaptation, including retention and collection/training/eval cost.
171
+
172
+ Personal memory, task scratch state, training data and learned adapters need
173
+ separate identities. A useful memory article is not automatically a training
174
+ example, and a plausible answer is not automatically a verified success.
175
+ Background synthesis, judging and training all consume the same Mac budget.
176
+ The existing serialized scheduling proposal remains appropriate for the first
177
+ study; this research supplies no evidence for concurrent training and serving.
178
+
179
+ The opportunity is a local system that improves verified task outcomes while
180
+ remaining usable on a personal Mac. OpenJarvis provides a close comparison
181
+ and concrete implementation ideas. Our differentiator must be demonstrated
182
+ through that complete operating loop, including its costs and failures.
183
+
184
+ [architecture]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/docs/architecture/overview.md
185
+ [learning]: https://open-jarvis.github.io/OpenJarvis/architecture/learning/
186
+ [paper]: https://arxiv.org/html/2605.17172v1
187
+ [rlm]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/agents/rlm.py
188
+ [repl]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/agents/rlm_repl.py
189
+ [base-agent]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/agents/_stubs.py
190
+ [routing]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/routing/learned_router.py
191
+ [search]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/spec_search/orchestrator.py
192
+ [gate]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/spec_search/gate/benchmark_gate.py
193
+ [sft]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/intelligence/sft_trainer.py
194
+ [grpo]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/intelligence/grpo_trainer.py
195
+ [lora-stub]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/learning/spec_search/execute/appliers/lora_stub.py
196
+ [search-guide]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/docs/user-guide/llm-guided-spec-search.md
197
+ [engines]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/engine/openai_compat_engines.py
198
+ [http-engine]: https://github.com/open-jarvis/OpenJarvis/blob/e25e77d36ee487aa456978e7a7f19a7f6d712260/src/openjarvis/engine/_openai_compat.py