[PR #1342] [CLOSED] feat: progressive loading (streaming trunk) baseline #3399

Closed
opened 2026-11-07 14:41:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1342
Author: @cybort
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: cybort-progressive-loading


📝 Commits (2)

  • 4f0aeec feat: progressive loading (streaming trunk) baseline
  • ea3805e fix: memory deallocation and enable TrunkStreamer in generate.cpp

📊 Changes

5 files changed (+1652 additions, -1443 deletions)

View changed files

📝 AGENTS.md (+2 -0)
📝 CMakeLists.txt (+1444 -1443)
➕ include/strata/core/trunk_stream.hpp (+89 -0)
➕ src/core/trunk_stream.cpp (+104 -0)
📝 src/program/generate.cpp (+13 -0)

📄 Description

This PR introduces the baseline implementation for progressive loading (streaming trunk) in Strata.

The goal is to lower the memory floor required to run the engine by avoiding reading the entire dense.bin (trunk weights) into memory at once. Instead, blk.* layers are streamed from disk on demand using a ring buffer.

Changes

  • TrunkStreamer Class: Added trunk_stream.hpp and trunk_stream.cpp to handle asynchronous reading of dense weights via an unbuffered ring buffer slot strategy.
  • Generator Integration: Updated generate.cpp to initialize the TrunkStreamer for dynamic layer mapping alongside the existing WeightTable integration.
  • Memory Management Fixes: Modified trunk_stream.cpp to use standard std::free for deallocating slots.
  • Documentation: Added documentation about the streaming trunk reader to AGENTS.md.
  • CMake: Updated CMakeLists.txt to compile the new trunk_stream.cpp component.

This is a baseline implementation targeting proof-of-concept compilation and validation without breaking existing workflows.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1342 **Author:** [@cybort](https://github.com/cybort) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `cybort-progressive-loading` --- ### 📝 Commits (2) - [`4f0aeec`](https://github.com/Niko1221/Strata/commit/4f0aeec50c6e1af04db99269307a711baa4bebd5) feat: progressive loading (streaming trunk) baseline - [`ea3805e`](https://github.com/Niko1221/Strata/commit/ea3805ee9fac2e001be2d2105b19518560c3a461) fix: memory deallocation and enable TrunkStreamer in generate.cpp ### 📊 Changes **5 files changed** (+1652 additions, -1443 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+2 -0) 📝 `CMakeLists.txt` (+1444 -1443) ➕ `include/strata/core/trunk_stream.hpp` (+89 -0) ➕ `src/core/trunk_stream.cpp` (+104 -0) 📝 `src/program/generate.cpp` (+13 -0) </details> ### 📄 Description This PR introduces the baseline implementation for progressive loading (streaming trunk) in Strata. The goal is to lower the memory floor required to run the engine by avoiding reading the entire `dense.bin` (trunk weights) into memory at once. Instead, `blk.*` layers are streamed from disk on demand using a ring buffer. ### Changes - **TrunkStreamer Class**: Added `trunk_stream.hpp` and `trunk_stream.cpp` to handle asynchronous reading of dense weights via an unbuffered ring buffer slot strategy. - **Generator Integration**: Updated `generate.cpp` to initialize the `TrunkStreamer` for dynamic layer mapping alongside the existing `WeightTable` integration. - **Memory Management Fixes**: Modified `trunk_stream.cpp` to use standard `std::free` for deallocating slots. - **Documentation**: Added documentation about the streaming trunk reader to `AGENTS.md`. - **CMake**: Updated `CMakeLists.txt` to compile the new `trunk_stream.cpp` component. This is a baseline implementation targeting proof-of-concept compilation and validation without breaking existing workflows. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3399
No description provided.