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#3039
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/1117
Author: @imanu86
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:contrib/elastic-core-040📝 Commits (1)
c7f2b44OPUS-CACHE-Porta su upstream 0.1.40 la cache elastica automatica con nucleo fisso📊 Changes
8 files changed (+768 additions, -24 deletions)
View changed files
📝
CMakeLists.txt(+10 -0)➕
docs/ELASTIC_CACHE.md(+72 -0)📝
include/strata/core/expert_cache.hpp(+30 -0)📝
include/strata/prefill/prefill.hpp(+4 -1)📝
src/core/expert_cache.cpp(+182 -2)📝
src/prefill/prefill.cpp(+10 -7)📝
src/program/generate.cpp(+389 -14)➕
tests/core/expert_cache_elastic_test.cpp(+71 -0)📄 Description
Resubmission of #1030 (closed by the history cleanup), cherry-picked onto the new
main(82f46a8) as you suggested,and brought up to 0.1.40.
What it is.
--elastic(opt-in): an automatic elastic expert cache for a card that is shared with desktop programswhose VRAM use comes and goes while the server runs. The cache is a VMM arena: a fixed core filled from the profile,
plus a tail that grows when VRAM has stayed free and shrinks (in steps, between decode rounds) when it is needed back,
keeping a reserve free. It never opens together with
--vram-elastic(#533), which stays the manual control.Design notes:
docs/ELASTIC_CACHE.md.Since #1030
elastic_vmm_(0.1.40 addedstd::unique_ptr<VmmRange> vmm_);--batch: the elastic step also runs between two batch windows (refused only with--batch-groups > 1);cuMemCreateout of memory) retries up to 4 times, 512 MiBsmaller each, before falling back to the fixed cache;
--kv-growstays off with--elastic(the K/V would be sized before the arena that it grows into).Verified (RTX 2080 Ti 22 GB, sm_75, Windows, CUDA 12.6, Qwen3.8-Flash-Next IQ3_XXS):
--elastic, fixed-placement teacher forcing (two prompts, 169 and 595 positions) is byte-identical toupstream 0.1.40;
expert_cache_elastic_test,_per_layer_test,_segmented_test,expert_profile_save_test);process the tail shrinks between rounds (8.3 -> 5.7 GB) while two answers keep going, then grows back.
Happy to split it into smaller pieces if you prefer (for example the arena alone).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.