Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,27 @@ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- gmlx chat --server: chat against a running server as a plain client,
without the assistant's tools and memory (no background requests).
Engages automatically when the config's server is already up and
serves the requested model; --local pins the in-process load. An
explicit GGUF path always loads the file on disk.
- decode_prefill_ratio accepts "auto" and it is the new default: live
streams keep at least half their decode rate while deep prompts admit,
and pacing stands down wherever it would not help (simultaneous
bursts, cheap chunks, stuck queues). A numeric ratio pins the previous
static behavior; GMLX_DECODE_PREFILL_AUTO=0 reverts on a live server.

- GMLX_SERVE_MEMSTATS=path.jsonl writes a per-tick serve memory trace:
MLX counters, free-headroom estimate, and per-owner cache byte
attribution with allocation shapes marked on change, for diagnosing
serve memory growth under load.

- Serve admission is gated on projected memory headroom: a request whose
measured KV and prefill-transient projection does not fit is kept
queued and retried each tick instead of committing memory the box does
not have. Requests are never failed by the gate, an idle server always
admits, and a request deferred past GMLX_ADMIT_DEFER_MAX_S (default
60s) is admitted anyway with a loud log. GMLX_ADMIT_HEADROOM=0
disables.

- /v1/metrics reports residency budget vs resident bytes, live
active/cache/headroom memory, and admission deferral counters.

Expand All @@ -35,19 +37,15 @@ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- mlx-kquant floor raised to 0.3.11: MoE prefill gather runs 12-28%
faster per call at chat-chunk widths, lifting serve prefill 20-43%
shallow and 8-14% deep on many-expert models.

- Bench chart value axes clamp to the data range when a zero anchor
would waste the panel height on empty space; nearby engine lines
now read as visually distinct.

- benchmarks.md tracks builds and measured date per model, and merged
results carry the newest contributing run date: one model rebenched
on newer releases no longer implies the rest was remeasured.

- DeepSeek-V4-Flash IQ2_XXS rebenched on gmlx 0.2.2 + mlx-kquant
0.3.11 vs ds4-server b030961 (2026-08-05): prefill 1.11-1.86x and
decode 1.05-1.59x across the full d512-500k ladder.

- DeepSeek-V4 single-token decode runs its hyper-connection glue as four
native mlx-kquant ops instead of about 176 python kernel launches per
step. `GMLX_HC_M1_FUSED=0` and `GMLX_HC_KQ=0` restore the previous
Expand All @@ -65,6 +63,8 @@ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Fixed

- Chat's bottom toolbar no longer clips the live tok/s readout on
narrow terminals; sampling knobs are dropped first instead.
- The serve free-headroom estimate went negative on models whose load
materializes weights into MLX-tracked memory (the same bytes counted
twice); the loader now registers only the truly untracked mmap
Expand Down
21 changes: 18 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ decode tok/s, MTP acceptance when speculating, and context fill
```sh
gmlx chat model.gguf --temp 0.7 --system-prompt "You are terse."
gmlx chat --assistant # the tool-loop assistant on the managed server
gmlx chat --server # plain server client, no assistant extras
```

With `--assistant` the REPL loads nothing locally: turns run through the
Expand All @@ -285,6 +286,18 @@ positional becomes a served model id (or is omitted for the server default).
unchanged; local-load flags do not apply. Full contract:
[assistant.md](assistant.md#text-chat-gmlx-chat---assistant).

`--server` is the same server-backed REPL minus the assistant extras: no
tools, no memory store, no config `assistant:` block, just plain streamed
turns against the served model. Use it when the terminal should be a thin
client and every server request should come from the conversation itself.

When the config's server is already running, a bare `gmlx chat` (or one
naming a served model id) becomes a `--server` client automatically
instead of loading a second copy in-process; `--local` forces the local
load, and any local-load flag does the same. An explicit GGUF path always
loads the file on disk - if the running server serves that same file, a
note points at the served id. Chat never auto-starts a server this way.

`/exit` (or Ctrl-D) quits, `/reset` restarts the conversation, `/help` lists
every command. The terminal is upgraded on top:

Expand Down Expand Up @@ -399,10 +412,12 @@ every command. The terminal is upgraded on top:

| Flag | Default | Meaning |
|------|---------|---------|
| `gguf` (positional) | - | Path to the GGUF (sharded ok) or a config model id; with `--assistant`, a served model id (optional: server default). |
| `gguf` (positional) | - | Path to the GGUF (sharded ok) or a config model id; with `--assistant`/`--server`, a served model id (optional: server default). |
| `--assistant` | - | Chat through the built-in tool-loop assistant on the managed server: MCP tools + long-term memory from the `assistant:` block ([assistant.md](assistant.md)). Local-load flags don't apply. |
| `--base-url URL` / `--host` / `--port` / `--api-key` | managed server | Assistant mode: target server (as in [`talk`](#gmlx-talk)). |
| `--no-start` / `--start-timeout S` | - / `180` | Assistant mode: never auto-start the server / auto-start wait. |
| `--server` | - | Plain server client: the `--assistant` REPL minus tools, memory, and the config `assistant:` block. Automatic when the config's server is up and serves the request. |
| `--local` | - | Load in-process even when the config's server is running (skips the automatic `--server` mode). |
| `--base-url URL` / `--host` / `--port` / `--api-key` | managed server | Server modes: target server (as in [`talk`](#gmlx-talk)). |
| `--no-start` / `--start-timeout S` | - / `180` | Server modes: never auto-start the server / auto-start wait. |
| `--max-tokens N` | until EOS | Per-reply decode-token cap; default `0` = each reply runs until the model stops (diffusion models fall back to a bounded 2048-token canvas; in `--assistant` mode `0` defers to the server's own default). Pass N to cap (adjustable via `/max-tokens`; `0` removes the cap, and a note says when the cap ended a reply). |
| `--temp` / `--top-p` / `--top-k` / `--min-p` | family default | Sampling; unset flags seed from the model's [family defaults](#family-defaults-intent-and---profile) (`0.0`/`0.95`/`0`/`0.05` under `--no-family-defaults`). All adjustable in-chat. |
| `--xtc-probability` / `--xtc-threshold` | `0.0` | XTC sampling (text path, adjustable in-chat). |
Expand Down
Loading