Skip to content

0.25.1: VRAM-resident models chat under host RAM pressure - #35

Merged
mattbaconz merged 3 commits into
mainfrom
mbcz/resident-vram-host-reserve
Oct 18, 2026
Merged

mattbaconz merged 3 commits into
mainfrom
mbcz/resident-vram-host-reserve

Conversation

@mattbaconz

Copy link
Copy Markdown
Contributor

phonton-cli v0.25.1 — Local runs survive a busy laptop

0.25.0 recommends qwen3.5:4b for 4-6 GB GPUs, but on exactly that hardware
local goal runs often stopped halfway with resource_pressure. 0.25.1 lets a
model that is already loaded in VRAM keep working when the rest of the
machine is busy.

A loaded model keeps working

phonton goal --local refused every model call once available host RAM fell
below 1.5 GiB, even when the exact calibrated model (same digest, same
context) was still loaded entirely in VRAM. That reserve covers starting the
runtime. A model that is already loaded holds its host memory, and the
available-RAM reading already excludes it, so the check counted that memory
twice. Running the project's checks between model calls, such as an offline
npm ci and jest, was enough to trip it with a browser and chat apps open.

A call to a copy held entirely in VRAM now needs 512 MiB of free host RAM.
On Ollama 0.34.2 with an RTX 4050, loading qwen3.5:4b at 16384 tokens took
about 700 MiB of host RAM; a later 7,000-token call to the loaded copy loaded
nothing. Everything else still fails closed:

  • a cold load keeps the 1.5 GiB reserve (2 GiB when the model is partly
    offloaded to the CPU);
  • a resident copy that is partly in RAM keeps the 1.5 GiB reserve;
  • a loaded copy with another digest or a smaller context gets no exception
    and is admitted like a cold load;
  • an unknown memory reading still stops the run before inference.

Residency is still checked again immediately before each call; it is an
observation, not a reservation.

In the 0.25.0 Aider Polyglot run on a 16 GB RAM, 6 GB RTX 4050 laptop, this
check ended 18 of 51 Phonton runs, including 13 of 17 JavaScript runs, about
100 seconds in, after the jest checks.

Tests

  • 018f0b0 adds a repro: at that commit the run ends resource_pressure where review_ready is expected. 5a04d53 makes it pass.
  • fmt and clippy -D warnings pass locally. The full workspace suite runs here in CI, because Bitdefender quarantined cargo.exe on the dev machine.

Goal runs refused every chat once available host RAM fell under 1.5 GiB,
even when the exact calibrated model was still loaded at the calibrated
context entirely in VRAM. That reserve covers starting the runtime; a
loaded copy already holds its host memory, so the reading counted it
twice. A copy entirely in VRAM now needs 512 MiB free. Cold loads, partly
offloaded copies and unknown memory readings keep failing closed.

The flat 1.5 GiB checks at the top of each generation and after strategy
inference are gone: every chat already passes the per-chat admission,
which sees the resident copy.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T05:27:13.692655Z 8b4b78d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mattbaconz
mattbaconz merged commit 4c6e528 into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant