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#2549
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/285
Author: @sergqwer
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/faster-start📝 Commits (1)
119b7c7Start: read the expert arena unbuffered, register it while it loads, on its own thread📊 Changes
6 files changed (+387 additions, -53 deletions)
View changed files
📝
include/strata/core/pinned.hpp(+18 -0)📝
include/strata/prefill/gemm.hpp(+4 -0)📝
src/core/expert_source.cpp(+165 -5)📝
src/core/pinned.cu(+100 -0)📝
src/prefill/gemm.cu(+32 -2)📝
src/program/generate.cpp(+68 -46)📄 Description
Summary
The expert arena's load was the start's long pole. It was a buffered read, then one CUDA registration of the whole
arena; registering 63 GiB of 4 KiB pages alone took 6.6 s. This PR changes four things:
experts.binis read withFILE_FLAG_NO_BUFFERINGstraight into the arena (16 readers, 8 MiB each).experts.bin, and its GGUF branchread through MSVC's
std::ifstreamin 4095-byte pieces: 0.02 GiB/s, 42 minutes in #230. Each chunk's 4 KiB-alignedwindow is now read unbuffered into an aligned buffer and scattered into the blobs. Off Windows the old reader
stays.
the readers (
PinnedArena::Deferred+register_slices). A reader waits for its slice: writing pages whilecudaHostRegisterruns on them corrupted the arena under WDDM, even on large pages.the MTP drafter and the native head.
gemm_prewarm()creates the handle and runs its first GEMM off the critical path.Measured
Measured on current main (0.1.29,
d6708a4) with ISTA-DASLab's IQ2_XS, RTX 5090 32 GB, Ryzen 9 9950X3D, 128 GB DDR5, Windows 11. KL is first-token KL divergence (STRATA_DUMP_FIRST_LOGITS, #276); two runs of main itself differ by 0 on 5 of 6 short prompts and by 0.00013 on the sixth. IQ2_XS withoutexperts.bin(setup's default pack), a 1K-token prompt and 64 tokens:main had the advantage of the OS file cache here (128 GB of RAM). The 0.02 GiB/s of #230 appears on a cold start,
or when RAM is too small to cache the shards; the unbuffered reader does not depend on either. A pack with
experts.bin(fork, PCIe 5 drive, 63 GiB): 11.8 GiB/s instead of 3.3, first token after ~8 s instead of ~10.Correctness
STRATA_VERIFY_ARENA=1prints a checksum of the loaded arena. The unbuffered GGUF loader and the buffered one givethe same checksum (
5217dac097a1751f), and the generated tokens are unchanged.Switch
STRATA_BUFFERED_LOAD=1keeps the old loaders.🤖 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.