fix(inkling): measure RAM on Windows so auto-cap is not 16 experts - #1726
Merged
Merged
Conversation
Windows took mem_avail_bytes()'s #else return 0 branch, so coli serve with no --cap always used 16 experts/layer and /health reported 0.0 GB. Use the shared probe (compat_mem_available_gb / compat_meminfo_gb).
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.
Symptom
On Windows,
coli serve --model <inkling>with no--capalways sizes the expert LRU to 16 experts/layer, and/healthreportsram_total_gb: 0.0/ram_avail_gb: 0.0. This host had 13 GB free while that happened. macOS already measured RAM; Windows took the#else return 0branch.The auto path is:
Zero available RAM is treated as "use 16". There was no warning.
This is the Inkling half of the same class as #1601 (OLMoE Linux-only probe). It does not overlap #1611, which changes
olmoe.c.Fix
mem_avail_bytes()callscompat_mem_available_gb()(Linux MemAvailable, macOS free+inactive+purgeable, Windows ullAvailPhys/commit). If that is still 0, print one line and keep the historical 16-slot fallback.serve_hwinfo()fills total/available fromcompat_meminfo_gb()when/proc/meminfois absent, so/healthstops reporting 0.0 GB. Windows also fillscores; Darwin fills the CPU brand.--capis unchanged.Tests
tests/test_inkling_mem_probe.py:mem_avail_bytesmust call the shared probe and must not have#else return 0serve_hwinfomust callcompat_meminfo_gbtests/test_inkling_cache_index.c(CImake test-c) assertsmem_avail_bytes()is > 0 and within 0.25 GB of the shared probe.Fail-before on unfixed
dev:Validation
python -m unittest tests.test_inkling_mem_probefails on unfixeddev, passes aftertests.test_resource_plan tests.test_env_defaults tests.test_inkling_mem_probe-- 106 OKmake -C c check-- local Windows host has no gcc/make; the Python pin is the gate here.test_inkling_cache_indexis already inTEST_BINS.make -C c cuda-test(not applicable)Compatibility
AI-assisted (Grok)