new features

This commit is contained in:
Mark Gregory
2026-11-18 13:55:47 +00:00
parent 17bcf178a9
commit a07ddf4d6d
29 changed files with 3457 additions and 306 deletions
+132
View File
@@ -0,0 +1,132 @@
# Local model roadmap
| Phase | Scope |
| --- | --- |
| 1. GGUF engine | Pin and bundle llama.cpp. Run text chat with Metal and retain the existing MLX, Ollama, and compatible API routes. |
| 2. Unified Model Library | Show GGUF files and MLX folders under On This Mac. Keep the Ollama catalog available and show the model selected or in use. |
| 3. Model Import | Accept Finder drops and inspect file contents or folder layout. Register valid models in place and report invalid files. |
| 4. Model Downloads | Look up public Hugging Face repositories by ID. List standalone GGUF assets with file sizes, show progress, support cancellation, and validate downloads before publishing them. |
| 5. Performance | **Next.** Measure and display actual process memory during loading and generation. Add load, prefill, and decode timing and tune model residency. |
| 6. Additional Formats | Core ML text chat available for compatible stateful exports. Apple Foundation Models, ONNX, and additional checkpoints remain on the roadmap. |
| 7. Ollama Independence | Audit startup, onboarding, settings, and recovery for a local-first default. Retain optional Ollama connections. |
| 8. Final Polish | Review accessibility, light and dark appearance, release verification, and documentation. |
## Model families
The pinned [llama.cpp architecture list](https://github.com/ggml-org/llama.cpp/blob/b12248/src/llama-arch.cpp)
includes Meta Llama, MosaicML MPT, Apple OpenELM, Qwen, and Gemma. The installed
GGUF list reads the architecture from the file. Each checkpoint must use a
supported architecture and embedded chat template. Llama has a Metal smoke test.
MPT and OpenELM architecture labels have automated coverage. Generation with
those families still needs a compatible checkpoint smoke test.
[Apple Intelligence's on-device model](https://developer.apple.com/documentation/foundationmodels)
uses Apple's Foundation Models framework. Its listing and inference integration
are pending. OpenELM is a separately distributed model family.
GGUF text chat loads model weights per request, with a default context of up to
4,096 tokens. The current engine uses templates recognized by llama.cpp's native
chat-template implementation. GGUF image inputs, JSON mode, and split GGUF
downloads are outside the current workflow. The Metal working-set number is
a device recommendation. Per-model allocation metrics are part of Phase 5.
## Verification
Run the existing suite with `Scripts/test.sh`. The tests for real Metal inference,
GGUF import by file contents, and atomic download installation take a compatible
local model via `TEST_RUNNER_AISTUDIO_TEST_GGUF_PATH`. The tests use a Llama
architecture model. The downloaded SmolLM2 file can also serve as the local fixture. Use a task-specific temporary build root. The optional network smoke test resolves the repository, downloads
the listed asset with byte progress, validates it, and generates text on Metal.
```sh
TEST_RUNNER_AISTUDIO_TEST_GGUF_HUB_REPO=bartowski/SmolLM2-135M-Instruct-GGUF \
TEST_RUNNER_AISTUDIO_TEST_GGUF_HUB_FILE=SmolLM2-135M-Instruct-Q4_K_M.gguf \
Scripts/test.sh
```
### 18 November 2026 · AI Studio 1.1.20 (22)
Phases 1–4 reached their automated verification milestones. The new GGUF
header, library selection, import, and Hub cases were run in their failing
states before the corresponding implementation. A standalone app check
caught the framework runpath and ad-hoc hardened-runtime problems. Both
Debug and Release now resolve the embedded runtime on direct execution.
The final Xcode suite passed 115 tests with 13 opt-in skips and zero failures.
The local GGUF fixture offloaded 6 of 6 layers. The live Hugging Face test
downloaded 105,454,432 bytes of SmolLM2, checked the Hub checksum, and
generated on Metal with 31 of 31 layers offloaded. The existing native MLX
load, routing fallback, and eviction test passed with the local Qwen model.
Ollama and compatible API regressions ran against the loopback fixtures.
The ARM64 release archive passed its SHA-256 check, strict signature
verification, and standalone executable smoke test after extraction.
The archive used ad-hoc signing. Developer ID signing, notarization,
and interactive visual and Finder gesture checks remain open.
### 18 November 2026 · AI Studio 1.1.21 (23)
The bundled llama.cpp update adds Qwen3.5 GGUF support. The previous runtime
rejected `qwen35` as an unknown architecture. The supplied Qwen3.5-9B Q4_K_M
model generated on Metal with 33 of 33 layers offloaded after the update.
Use **Import LM Studio Library** to register models from `~/.lmstudio/models`.
The scan leaves files in place and skips multimodal projectors. GGUF now supports
browsing and model-name search on Hugging Face alongside direct repository
lookup. MLX search queries the public MLX catalog across publishers.
The Xcode run passed 116 tests with 14 opt-in skips and zero failures. It
covered live Hub discovery for both formats, scanning the actual LM Studio
library, and existing native Qwen2.5 MLX generation and fallback.
### 18 November 2026 · AI Studio 1.1.22 (24)
Build scripts now key compiled output to the bundled llama.cpp manifest. This
avoids reusing framework modules compiled against the previous llama.cpp
binary. The old compiled directory stays available.
MLX Swift LM 3.32.3 adds support for the installed Qwen3.5 MLX architecture.
**Import MLX Models…** scans either a single checkpoint or a parent directory.
The LM Studio scan found both installed MLX checkpoints. Qwen3.5 9B MLX,
Mistral Nemo MLX, and the existing Qwen2.5 Coder MLX all generated successfully.
The installed Qwen3.5 GGUF also completed a chat through the Studio chat
controller with all 33 layers offloaded. The full suite passed 116 tests
with 14 opt-in skips and zero failures.
### 18 November 2026 · AI Studio 1.1.23 (25)
Local GGUF and MLX inference coalesces adjacent turns before rendering a
chat template. This handles histories such as a stopped user turn followed
by a new message. The saved conversation remains intact. The Mistral Nemo
checkpoint reproduced the Jinja exception before the fix.
The chat model button shows the selected backend. Library rows show the
format when available. Compatible Qwen-style GGUF thinking templates expose
Default, Off, and On. Thinking On and Off use the model template’s respective
assistant prefixes. Reasoning streams separately from the answer.
The full Xcode run passed 118 tests with 14 opt-in skips and zero failures.
The installed Mistral Nemo checkpoint passed the consecutive-user regression.
A live Qwen3.5 GGUF chat produced an answer with Thinking Off and emitted
separate reasoning with Thinking On. The installed Qwen3.5 MLX checkpoint
also passed the repeated-turn generation and fallback smoke test.
### 18 November 2026 · AI Studio 1.1.24 (26)
Core ML uses the stateful `inputIds`, `causalMask`, and `logits` contract
documented by [Hugging Face](https://github.com/huggingface/blog/blob/main/mistral-coreml.md)
and published in [Apple’s Mistral model](https://huggingface.co/apple/mistral-coreml).
It keeps a fresh cache per generation using [Core ML state](https://developer.apple.com/documentation/coreml/mlstate).
Source packages compile at load time. Import a compiled model to skip that
step. The direct Hub download includes the matching tokenizer and checks
revision, size, and the published weight checksums.
The red warnings compare weight bytes with the recommended GPU working set
for GGUF and MLX, physical memory for Core ML, and the optional configured
MLX weight limit. A model underneath the budget still needs runtime and
context memory. Remote models depend on the server’s hardware.
The full suite passed 120 tests with 15 opt-in skips and no failures. The
Core ML smoke test used Apple’s published Mistral Int4 weights, generated a
reply through the Studio chat controller, and fetched live Hugging Face
search results. GGUF Metal generation and native MLX generation also passed.
+1 -1
View File
@@ -4,7 +4,7 @@
Run `./Scripts/test.sh`, then `./Scripts/release.sh` from the project directory. The release script builds the arm64 Release configuration, checks the app's code signature, and creates `AIStudio-<version>-macOS-arm64.zip` in the temporary build directory’s `dist` folder with a SHA-256 checksum alongside it. Pass an output directory as the first argument to override `dist`. The default package is ad-hoc signed for local verification.
The scripts keep build products, Swift package checkouts and test results under the OS temporary directory. Set `AISTUDIO_BUILD_ROOT` to reuse a specific temporary build directory across runs. Increment `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION` in the app target’s Debug and Release settings for each completed change. Verify the values in the built app and include both in the completion message.
The scripts keep build products, Swift package checkouts and test results under the OS temporary directory. Set `AISTUDIO_BUILD_ROOT` to reuse a specific temporary build directory across runs. The scripts keep a separate compiled build directory for each bundled llama.cpp dependency to prevent Xcode from reusing older framework modules. If Xcode itself reports a stale framework module after updating llama.cpp, use **Product → Clean Build Folder** in Xcode. Increment `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION` in the app target’s Debug and Release settings for each completed change. Verify the values in the built app and include both in the completion message.
## Developer ID distribution
+11 -1
View File
@@ -6,7 +6,7 @@ Use the repository's `Scripts/train-mlx.py` to validate a local chat dataset, tr
## Use the tools in AI Studio
1. Open **Settings → Model Library → MLX → MLX Tools…**. For an installed model, use **Clone & Train…** to preselect its weights.
1. Open **Training & Images** from the main window toolbar and select **Training**. Use **Tools**, **Convert**, and **Train** to move between setup and a run. From **Settings → Model Library**, **Clone & Train…** still opens the tools with an installed model preselected.
2. Use **Install MLX Tools** once. It uses a native Apple Silicon Python 3.11 or newer to install MLX LM with its training dependencies into a dedicated AI Studio environment. If automatic selection picks the wrong interpreter, use **Choose Python…**.
3. Use **Clone Base…** to write a separate copy to a new folder and add it to the library. Training can also use the original checkpoint while writing adapter weights to a separate run folder.
4. Choose a dataset folder and a run folder. Use **Validate Dataset**, **Train Adapter**, and **Evaluate**. Use **Fuse and Register** to create and register the final checkpoint. The run folder contains the adapter at `adapter` and the fused output at `trained-model`. Pick a fresh run folder for a new experiment.
@@ -142,3 +142,13 @@ Keep it private unless you intend to publish it.
Sources: [MLX LM LoRA guide](https://github.com/ml-explore/mlx-lm/blob/main/mlx_lm/LORA.md) ·
[Hugging Face Hub download guide](https://huggingface.co/docs/huggingface_hub/guides/download) ·
[Ollama import guide](https://docs.ollama.com/import)
## Verification · AI Studio 1.1.25 (27)
A one-iteration LoRA run against the local Qwen3 0.6B MLX model validated
the synthetic datasets, wrote an adapter, evaluated it, and fused a
checkpoint. The UI uses the same bundled runner. The Xcode suite passed
121 tests with 16 opt-in skips, including run logging, cancellation,
composer thinking options, and PNG preview generation. The ARM64
archive passed checksum, signature, and startup verification. The
interactive Apple Image Playground sheet remains a manual check.