Apple-Silicon-native Bread baking/OPSD MLX LoRA training experiments.
  • Python 84.7%
  • Shell 15.3%
Find a file
2026-06-07 21:30:46 -07:00
artifacts Seed local Bread MLX repo 2026-06-02 03:01:33 -07:00
recipes Record OpenCode local Bread MLX runs 2026-06-07 21:30:46 -07:00
reports Record OpenCode local Bread MLX runs 2026-06-07 21:30:46 -07:00
runs Record OpenCode local Bread MLX runs 2026-06-07 21:30:46 -07:00
scripts Record OpenCode local Bread MLX runs 2026-06-07 21:30:46 -07:00
src/local_bread_mlx Add chat JSONL import for local bakes 2026-06-04 02:05:28 -07:00
.gitignore Record OpenCode local Bread MLX runs 2026-06-07 21:30:46 -07:00
pyproject.toml Seed local Bread MLX repo 2026-06-02 03:01:33 -07:00
README.md Add local experiment metrics export 2026-06-02 03:26:10 -07:00
uv.lock Seed local Bread MLX repo 2026-06-02 03:01:33 -07:00

local-bread-mlx

Apple-Silicon-native Bread bake experiments for the Mac Studio.

This repo is the new local successor path for Bread/BReaDv3 ideas. It treats /Users/brixton/repos/Bread_2025 as reference architecture, not as code to rerun. The first goal is deliberately small: create a real local LoRA adapter with mlx_lm.lora, track the recipe and run metadata in git, and keep large artifacts in ignored runs/ directories until an LFS/R2 policy is verified.

Current Target

  • Base model: /Users/brixton/self/local-llm/models/Qwen3.6-27B-OptiQ-4bit
  • Training command: /Users/brixton/self/local-llm/.venv/bin/mlx_lm.lora
  • First recipe: recipes/pirate_overfit.json
  • First output class: tiny LoRA adapter under runs/<run-id>/adapters/

Concept Contract

Bread's useful abstraction is the paired context:

  • u: privileged teacher context.
  • v: minimal student/inference context.
  • y: response trajectory.
  • stim: produces paired contexts and target metadata.
  • rollout: samples or records trajectories.
  • bake: trains an adapter/checkpoint so behavior under v moves toward the target induced by u.

The initial mlx_lm.lora path is supervised and only uses the final chat messages as the training surface. The run manifest still records u, v, and target metadata so later KL/OPSD-style token distribution matching can reuse the same experiment structure.

Commands

Generate the first run data:

uv run local-bread-mlx build-data --recipe recipes/pirate_overfit.json

Print the MLX LoRA command without training:

uv run local-bread-mlx train-lora --run-id pirate-overfit-001 --print-command

Start the tiny LoRA smoke:

uv run local-bread-mlx train-lora \
  --run-id pirate-overfit-001 \
  --iters 2 \
  --num-layers 2 \
  --val-batches 1 \
  --clear-cache-threshold 8GB

Run a direct generation probe with an adapter:

uv run local-bread-mlx probe \
  --adapter-path runs/pirate-overfit-001/adapters \
  --prompt "Write a two sentence project status update."

Serve the promptless adapter as an OpenAI-compatible local chat backend:

scripts/serve_promptless_chat.sh

The Brixton local site proxies this backend at /api/local-bread/v1 and exposes the browser chat UI at /local-bread-chat/.

Repository Policy

  • Commit source, recipes, small manifests, reports, and status summaries.
  • Do not commit raw logs with secrets, API keys, browser profiles, Tailscale state, or private SSH material.
  • Keep adapter weights and model outputs under ignored runs/ until LFS/R2 handling is explicitly verified.
  • Prefer local MLX runs before Tinker/OpenRouter spend.