mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1969
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @oceanio on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4421
What happens
v0.2.7's PLE residency policy (
3b34b6c7) keeps the PLE table in RAM whenavailable_host_bytes()says the machine can hold the table, the expert arena and 8 GiB more. On main the Metal engine has no RAM reading (memory guard: the available RAM cannot be read), so the policy never runs on a Mac. Three open PRs add a macOS reading tosample_host_memory()for the memory guard: #3541 (mine), #3564 and #3231. Any one of them also switches the policy on for the Mac.Measured on an M5 Max (128 GB) with Qwen3.8-Flash-Next IQ3_S,
--max-context 262144,--mmap-experts, resident experts. The build was #3541 rebased onto v0.2.7, before I kept the policy off:--ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 46.8 GiB and 84.5 GiB of RAM is available);I did not measure long-prompt prefill on the Mac. That is where the PC gained.
Two things differ on the Mac:
--mmap-expertsthe experts are not copied into an arena, so the 46.8 GiB in the admission sum is not RAM the engine takes.Question
Should the policy run on Metal? For now #3541 keeps it off there (
allowed = falseunderSTRATA_GPU_METAL, the same as in a build that cannot read the RAM), so the macOS reading serves only the memory guard. If you would rather have it on for the Mac, I can first measure prefill on the M5 Max with the table resident and with direct reads.@oceanio commented on GitHub (Nov 3, 2026):
Thanks:
04e9da60in v0.2.10 answers the question. The policy stays off on the Mac unlessSTRATA_PLE_AUTO_RAM=1, and the commit has the prefill measurement I offered (a cold 4K prompt 10.6% slower with the table in RAM).Checked on v0.2.10 (
ffa80d73), which has its own macOS RAM reading. Setup: M5 Max (128 GB), Qwen3.8-Flash-Next IQ3_S,--max-context 262144 --mmap-experts. The engine reads the PLE table directly: the log hasPLE direct read probe: ... (fine)and no residency-policy line. Its footprint 5 s after load is 16.99 GiB, as on v0.2.9; with the policy on, it was 37.45 GiB (above).Closing.