mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4362] [Engine] dsv41: charge the context to RAM only on an integrated GPU #5023
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#5023
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/4362
Author: @makefunstuff
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:fix/dsv41-store-uma-discrete📝 Commits (1)
62eeb1c[Engine] dsv41: charge the context to RAM only on an integrated GPU📊 Changes
1 file changed (+8 additions, -1 deletions)
View changed files
📝
src/dsv41/ds4_model.cu(+8 -1)📄 Description
Problem and result. On a PC with discrete GPUs, DeepSeek V4.1's automatic RAM store (no
--ssd-cache, noDS4_STORE_GB) is sized as if the GPU shared system RAM.store_gb_now()treats a RAM drop of 4 GB or more during the weight upload as its sign of a unified-memory GPU, then charges 1.1e-4 GB per context token past 16K to RAM. Two discrete RTX 5060 Ti cards on Linux lose about 12 GB of RAM during the upload, so the check fires. At--max-context 262144that took about 27 GB off a store whose context caches live in VRAM:Approach. The context charge now also requires
cudaDeviceProp::integrated, the same test thatring_mb_auto()andalloc_chunks()already use to recognise a unified-memory GPU. The size is unchanged on integrated GPUs and with an explicit--ssd-cache/DS4_STORE_GB. On discrete GPUs, the auto store is RAM free after the upload less the existing 12 GB margin.Validation
Environment: v0.2.7 (
5e8a4cca, the same as main today) plus this commit. Arch Linux with kernel 7.2, Ryzen 5 9600X, 128 GB DDR5-5600, 2× RTX 5060 Ti 16 GB, CUDA sm_120. The model is the IST-DAS 2.00 bpw set packed with the mmproj and read from a 990 PRO.Build (passed):
Run (passed): both binaries use the same arguments as Strata's server config:
strata-dsv41 --serve --pack <pack> --max-context 262144 --eos 1 --dspark auto --dspark-conf 0.65 --experts 5 --layer-split auto. Each load got 8 different chat prompts (code, history, chemistry, French fiction, networking, meal plan, primes, a Russian SQL request), each asGEN 256 <ids>. The arms alternated orig, fixed, orig, fixed. Decode tok/s comes from the engine'sgenerated in … msline:One prompt repeated 7 times gave no measurable difference (orig 24.5-28.8, fixed 25.2-27.6 tok/s after the first), because one prompt's experts fit both stores. MemAvailable stayed above 10 GB with the bigger store.
Not run:
cudaGetDevicePropertiesexactly as the two existing call sites in this file do.integratedbeing reported, which the existing unified-memory paths already rely on. A Strix Halo check of thestore sizedline at a context past 16K would confirm it is unchanged.Limits. The speed gain is one machine and one workload, with modest gains (about +6% median on varied prompts). The default margins are unchanged.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.