mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #818] [CLOSED] Windows: opt-in release of mapped expert pages after GPU uploads #2850
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#2850
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/818
Author: @jordicor
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:codex/windows-mapped-expert-release📝 Commits (1)
929b90eAdd opt-in Windows mapped expert page release📊 Changes
11 files changed (+2450 additions, -0 deletions)
View changed files
➕
bench/results/2026-10-04-windows-mapped-release/README.md(+144 -0)➕
bench/results/2026-10-04-windows-mapped-release/benchmark.py(+381 -0)➕
bench/results/2026-10-04-windows-mapped-release/measurements.json(+1463 -0)➕
bench/results/2026-10-04-windows-mapped-release/monitor_windows.py(+139 -0)➕
bench/results/2026-10-04-windows-mapped-release/test_benchmark.py(+179 -0)📝
docs/DETAILS.md(+9 -0)📝
include/strata/core/expert_source.hpp(+3 -0)📝
src/core/expert_source.cpp(+52 -0)📝
src/program/generate.cpp(+9 -0)📝
tests/core/expert_layout_test.cpp(+11 -0)📝
tests/core/file_expert_source_test.cpp(+60 -0)📄 Description
On a 32 GB Windows 11 laptop with an RTX 4080 Laptop and a Thunderbolt RTX 3090, file-backed expert pages remained in the engine's working set after their GPU copies. With IQ2_XS and the existing layer split, available RAM stayed near 0.5 GiB during the measured workload.
This adds opt-in Windows mapped-page release via
STRATA_ARENA_RELEASE=1. Unset or0preserves the current behavior.FileExpertSource::release()forexperts.binand direct GGUF file views using Windows working-set trimming. Preserve shared boundary pages and never trim private/pinned staging buffers.Measured result
The same prototype executable was run with explicit release OFF and ON: one warmup and three fresh requests each at 1K, 4K and 16K prompt tokens, 256 output tokens, context 32768, int8 KV, MTP,
--mmap-experts --layer-split 12 --trim-stage-weights.Prefill throughput was 3.7-4.4% lower. This improves physical-memory availability on this machine; it does not reduce commit, demonstrate fewer SSD reads, or establish a general speed improvement. Runs were sequential, the OS file cache was retained, and generated code-explanation responses differed. The submitted patch defaults to OFF; the measured prototype defaulted to ON, but both benchmark arms set the switch explicitly.
Full configuration, individual timings, hashes, reproduction commands and limitations: measurement report.
Validation
file_expert_source_testandexpert_layout_testpass in separate processes with the switch unset,0, and1: page alignment and working-set behavior, unchanged bytes after repeated reads, invalid indices, closed sources, and three GGUF roles across two shards.The prototype also completed 30 functional requests without runtime errors. All 24 objective responses/statuses matched the official engine at the same placement: 21 passes and three unchanged Markdown-fenced-JSON failures; six prose responses were unscored. These limited checks do not prove general output parity.
Related prior work: #467 and #640. The existing multi-GPU implementation is reused; this PR contributes Windows mapped-page release.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.