feat(uik): publish available memory, the figure a fit decision needs - #66
Merged
Conversation
The dashboard is starting to advise whether a machine can host a local model. On a Mac, `mem_free_gb` is the wrong input for that: this Mini reports 1.5 GB free and ~18 GB available, because the rest is cache the OS returns on demand. A verdict computed from free memory refuses a model the machine holds easily. `mem_available_gb` comes from the OS's own answer — the percentage `memory_pressure` reports on macOS, `MemAvailable` on Linux — and is published alongside free rather than replacing it, since the two mean different things and both are true. This is the field I declined to derive when adding memory: a used-percentage computed from free would have been an alarm the numbers do not support. Asking the OS what is actually available is the honest version of the same question. 39 tests, including the gap itself (available must exceed free by an order of magnitude on a cached Mac), omission when the OS will not answer, and zero treated as a real reading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Petrus is asking the dashboard to advise on running a local model, generalised to a size class and quant. That advice needs an accurate "how much memory can this box actually give a model" number, and the field I shipped this morning is not it.
On this Mini, right now:
mem_total_gbmem_free_gbmem_available_gbfreemem()counts only genuinely free pages; macOS keeps the rest as cache and hands it back on demand. A verdict computed from free memory would tell Petrus every Mac is out of memory while a 35B-A3B at 3-bit fits comfortably.The new field asks the OS instead — the percentage
memory_pressurereports on macOS,MemAvailableon Linux — and is published alongside free, not instead of it, because both are true and they answer different questions.This is deliberately the field I declined to derive when I added memory: a used-percentage computed from
freemem()would have been an alarm the numbers do not support. Asking the OS what is available is the honest form of that question.39 tests pass, covering the gap itself, omission when the OS will not answer, and zero as a real reading.
Note for #98 (already merged): it correctly uses
mem_total_gband explicitly avoidsmem_free_gb. This field gives it a better input on Macs than total-minus-a-guessed-reserve, if @grok wants it.Co-Authored-By: Claude Opus 5 noreply@anthropic.com