mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2823] [CLOSED] Q36: release the GGUF mapping and stop zeroing the overwritten arena #4283
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#4283
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/2823
Author: @ggeorgovassilis
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:dev📝 Commits (10+)
7156cf9Qwen3.6: opt-in int8 (q8_0) K/V cache behind --kv int83a9e6c8Qwen3.6: opt-in single staging buffer and staging placement fixes58ccab1Add Docker build/run scripts and a run.sh test21bf82cdocs: record that STRATA_KQ256 does not cover Q5_K down (tried, measured, dropped)98a66d4docs: the Q36 memory-compaction plan (mapping, arena, kcompactd)2b9f769Q36: memory compaction - mem report, release the mapping, padding-only memset91edaaadocs: the 754 open upstream PRs screened against the 8 GB laptop68add05docs: upstream PR scan - corrections and an implementation plan70d7531tools: strata_profile.py, one command that says where the time goes on this PC (prompt phases, decode window split, hit rate per turn)2d8da65setup: pin -DSTRATA_Q6K_EXPERTS=ON in the CUDA engine build📊 Changes
33 files changed (+6928 additions, -55 deletions)
View changed files
📝
CMakeLists.txt(+23 -2)📝
Dockerfile(+1 -1)➕
bench/results/2026-10-15-profile-rtx-5070-ti-swift-1-5-iq3-s/README.md(+55 -0)➕
bench/results/2026-10-15-profile-rtx-5070-ti-swift-1-5-iq3-s/results.json(+1978 -0)➕
docker/Dockerfile(+171 -0)➕
docker/build.sh(+65 -0)➕
docker/entrypoint.py(+242 -0)➕
docker/run.sh(+292 -0)📝
docs/COMMUNITY_BENCHMARKS.md(+6 -0)📝
docs/DETAILS.md(+64 -0)➕
docs/Q36_INT8_KV.md(+229 -0)➕
docs/Q36_LOAD_TIME.md(+172 -0)➕
docs/Q36_MEMORY_COMPACTION.md(+393 -0)📝
docs/QUANTS.md(+8 -0)➕
docs/UPSTREAM_PR_SCAN.md(+373 -0)📝
include/strata/artifact/gguf_reader.hpp(+31 -0)➕
include/strata/kernels/q36_kv_q8.hpp(+61 -0)➕
include/strata/platform/mem_report.hpp(+104 -0)📝
setup.py(+5 -2)📝
src/artifact/gguf_reader_test.cpp(+61 -0)...and 13 more files
📄 Description
Summary
Implements the Q36 memory-compaction plan (
docs/Q36_MEMORY_COMPACTION.md): the engine reports its own memory/compaction counters, releases the GGUF mapping after load, and stops zeroing the 18.75 GiB expert arena it immediately overwrites. The original goal - quiet thekcompactdchurn - was already met by host settings; the measured engine win is ~18.5 GiB of RAM returned to the OS at no decode cost.What changed
include/strata/platform/mem_report.{hpp,cpp}(new) +src/platform/mem_report_test.cpp: read/proc/meminfo,/proc/vmstatand the THP mode into the engine's own log, behindSTRATA_MEM_REPORT(off by default). A row the kernel does not export prints-, not 0.include/strata/artifact/gguf_reader.hpp:GgufFile::release_pages()/released()andGgufModel::release_pages()/released()—madvise(MADV_DONTNEED)thenposix_fadvise(POSIX_FADV_DONTNEED)(fadvise cannot drop pages that are still mapped).src/qwen35/q36_engine.cu:release_model_mapping()afterplace_experts(), on by default;STRATA_Q36_RELEASE_MAPPING=0reverts. A guard makesexpert_blob()fail loudly if it is ever called after the release. The arena memset now zeroes only the stride padding and thekMmqTailtail (plus an NVFP4 scale tail) instead of the whole 18.75 GiB.tests/core/expert_blob_padding_test.cpp(new): the padding-only zeroing is byte-identical to the whole memset.Extra Notes
Measured on an RTX 4060 Max-Q 8 GiB, Ryzen 7 7735HS, 62 GB, 32K,
--kv int8 --mtp 2:Mlockedstayed 104 KiB throughout -cudaHostAllocon this driver (580.178.04) is memfd/shm-backed, not mlocked, so the plan's "un-pin the arena" phase and its dependent were dropped.Built: CPU suite 44/44, CUDA build, and the native-expert parity suite on the card (14/14). HIP and SYCL builds were not run here (no ROCm/SYCL on this box).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.