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#2595
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/357
Author: @sergqwer
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:pr/start-unbuffered📝 Commits (2)
fcdd30aStart: read the expert arena unbuffered when the file cache cannot help (Windows; part 1 of #285)51feb9fload_experts_gguf: the header declares the new parameter📊 Changes
4 files changed (+266 additions, -4 deletions)
View changed files
📝
include/strata/core/expert_source.hpp(+2 -1)📝
include/strata/core/pinned.hpp(+13 -0)📝
src/core/expert_source.cpp(+117 -3)📝
src/core/pinned.cu(+134 -0)📄 Description
Part 1 of the #285 split, on 0.1.31.
A buffered read copies every expert through the file cache. That pays off only when the cache can keep the files for the next start. On a PC whose RAM cannot hold them beside the arena, every start reads the drive anyway, and the copy is pure cost. For example, a 64 GB PC with IQ2_XS has 24 GiB left for 36.5 GiB of files.
What changes:
experts_unbuffered()(pinned.cu) decides the reader.STRATA_UNBUFFERED_LOAD=1/0forces the choice. The log names the reader and why.load_experts_gguf, unbuffered:FILE_FLAG_NO_BUFFERINGinto an aligned buffer and scattered into the blobs;expert_gguf_file()resolves it (split shards);load_experts_direct(pinned.cu): a pack's experts.bin ranges are read unbuffered straight into the arena. If the ranges are not 4 KiB-aligned, it falls back toload_experts_ranges.experts_unbufferedreturns false there, and both unbuffered readers fall back to the buffered ones.Greedy tokens are identical unbuffered, buffered and on 0.1.31 main.
Start times
Setup:
generateof 16 tokens.An emulated 64 GB PC (a locked-pages RAM ballast leaves 58 GiB), large pages, two rounds:
Here the probe finds the files uncached on every start, and 58 GiB cannot keep 36.5 GiB of files beside a 33 GiB arena. So part 1 reads unbuffered both times. 0.1.31's restart reads the drive again too: the cache lost the files to the arena.
128 GB, nothing changed, large pages:
Both of these starts read through the file cache:
STRATA_UNBUFFERED_LOAD=0) as well as on.🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.