Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 03 Sep 18:02
· 66 commits to main since this release

Added

  • An OpenAI-compatible backend, and it is now the default. mlx_lm.server,
    llama.cpp's llama-server, vLLM and Ollama's own /v1 all take
    POST /v1/chat/completions, so one backend covers every way a model gets
    served on hardware somebody owns -- including the fine-tune this project is
    heading for, which Ollama cannot host without being taught about it first.
    The promise was never Ollama; it is that the weights stay on a machine the
    user controls, and local points at localhost, so it holds unchanged.
    Pointing it at another machine on the network is the arrangement the
    fine-tune needs: the Mac with the memory serves, everything else drives.

    Three places a naive port breaks, each with a test: the stream is SSE and
    ends with a literal [DONE] that is not JSON; tool-call arguments arrive as
    a string split across deltas keyed by index, so appending rather than
    assigning is load-bearing; and usage appears at all only with
    stream_options.include_usage.

  • coder dataset -- a training corpus built out of the agent sessions
    already on the machine. coder's own, Claude Code's and Codex's, read into one
    shape and written as mlx_lm.lora takes it.

    Translation is the substance rather than the plumbing. A model trained on
    Read(file_path=) learns a call coder has no tool for; mapped to
    read_file(path=) it learns the one that exists. So the live registry
    decides what an argument is, not a table; parallel calls are serialised into
    coder's one-call-per-reply protocol; narration before a call is dropped,
    because under a protocol that says a call reply is the JSON and nothing else
    it is a worked example of the forbidden thing in the position a model
    imitates most readily; and harness furniture goes with it. Length is handled
    the way the loop handles it -- results capped at coder's own output budget,
    and an over-long example elided by context.elide_tool_results itself, which
    took the corpus from 33 examples to 148 without truncating one. Every
    rendered call is parsed back through parsing.parse_tool_calls, and one that
    does not survive is dropped: a fine-tune whose calls coder cannot read is
    worse than none.

  • A training pipeline under training/ -- a LoRA on a 4-bit 14b, fused
    into one directory and served on 0.0.0.0. Every number in lora.yaml is a
    memory decision before it is a quality one, and the README says which to turn
    first when a run does not fit rather than leaving it to be discovered three
    hours in. max_seq_length and dataset build --max-tokens have to agree,
    and the comment in both places says so. mlx-lm is an optional extra: the
    machine that trains a model is not the machine that runs one.

  • The prompt and the outcome are written to the transcript. A transcript is
    only a training example if the input half survives, and the input half is the
    system prompt -- assembled per session from the registry, the tree, the
    instructions and the skills, and reconstructable from none of them later. A
    resumed session appends a second prompt record rather than replacing the
    first, so a file spanning two tool sets says so in order. Beside it, an
    outcome record per turn, because the message list cannot tell a turn that
    answered from one that hit the iteration cap, and anything choosing
    trajectories to imitate needs exactly that difference. Recorded, never
    replayed: resume still rebuilds against the tools it has now.

  • A fallback to Ollama when nothing is serving the default. A first session
    that fails to connect to a server nobody was told to start teaches nothing
    except that this does not work. Only the built-in default falls back --
    --provider local against a dead server stays an error, and so does one
    pinned in a config file, because quietly answering with a different model
    than the one somebody typed is the worse failure. Announced on every path,
    never silent.

Changed

  • A bare pytest no longer runs the live tests. The live marker already
    existed and was already applied; what was missing was a default, so the
    command CONTRIBUTING tells you to run before a commit collected the model-
    backed suite along with everything else. pytest -m live runs them, and
    pytest reports the deselected count on every run, so nothing is skipped
    quietly.

  • doctor chooses its checks by what a backend is rather than by whether it
    is the one listed first. The old provider != DEFAULT_PROVIDER test read
    correctly only for as long as the default happened to be Ollama; with the
    default moved it inverted exactly, checking Ollama for a command on PATH and
    asking the new default for /api/tags. local gets three checks where
    Ollama gets four -- the missing one is placement, and it stays missing,
    because the OpenAI API has no notion of where a model is resident and this
    file already spent a release learning not to invent that number.

  • for_review asks whether a backend can turn sampling off instead of what
    type it is. Determinism is a property a backend either offers or does not,
    and the isinstance check silently stopped applying the moment the default
    moved.

  • coder config's declared defaults for model and host now come from the same
    table _follow_provider reads, so it cannot show a model the session is not
    running.

Measured

Three full runs of the old default, on qwen2.5-coder:14b: 41, 46 and 49
minutes
. The same tree with the live tests deselected: 9.1 seconds, 1372
passed. Coverage is identical -- 11 tests moved from "run by default" to "run
on request", and the slowest test remaining in the default arm takes 1.0 s.

Where the 46 minutes went, from --durations:

1118s  test_review_corpus.py::test_recall_on_planted_bugs
 787s  test_review_corpus.py::test_precision_on_clean_code
 297s  test_live.py::test_reads_the_file_instead_of_asking_for_it
 222s  test_live.py::test_fixes_a_real_bug_and_the_fixed_code_runs
 171s  test_live.py::test_answers_a_question_by_reading_the_code

Five tests, 45 of the 46 minutes.