mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5326] [Engine] compare the PLE shard by file identity, not by path string #5386
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#5386
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/5326
Author: @GuideboardLabs
Created: 11/5/2026
Status: 🔄 Open
Base:
main← Head:pr-ple-shard-identity📝 Commits (1)
7be7ab6[Engine] compare the PLE shard by file identity, not by path string📊 Changes
1 file changed (+14 additions, -2 deletions)
View changed files
📝
src/program/generate.cpp(+14 -2)📄 Description
A model whose PLE table is kept outside the model directory fails to load with
native dense: duplicate split shard number, even though the shard list holds no duplicate file.generate.cppappends--ple-ggufto the native dense shard list when its path string is not already in that list. The list is first filled with every shard found beside--nativeby split name. A 28.8 GB PLE table is normally kept on a larger disk, and the model directory then carries a symlink (or a bind mount, or a second mount point) to it, so the same file is discovered under one path and appended again under another. It is admitted twice, andNativeDense::loadrefuses the model on the repeatedsplit.no.Problem:
--ple-ggufnaming the PLE shard by a second path to a file that is also present beside--nativemakes the model unloadable.Environment: Strata 0.1.54, local gfx1010 build of
870aedd9, Ubuntu 24.04, RX 5700 XT 8 GB, RAM 31 GiB. Modelunsloth/Qwen3.8-Flash-Next-GGUF,UD-IQ1_S(37.6 GB transformer in shard 2, 28.8 GB PLE table in shard 3). Flags:--pack <pack> --native <shard 2> --ple-gguf <same shard 3, other disk> --resident-experts --max-context 32768 --kv int8.Reproduce:
-0000N-of-0000M.ggufmatches beside--native.--ple-ggufas the other disk path, not the symlinked path.Expected: the file is one file, so it enters the native dense shard list once and the model loads.
Actual:
exit status 1, before any weights are uploaded.
Evidence: the same model with the same pack loads normally when
--ple-ggufnames the path the discovery already found. That isolates the cause to the string comparison rather than to the shard contents, the split metadata or the pack.Reproduction status: reproduced locally, twice, on the hardware above.
Why this approach: compare with
std::filesystem::equivalent, which resolves symlinks and mount points to the same file. The alternative of deduplicating bysplit.noinsideNativeDense::loadwould also silence the check that exists to catch a genuinely wrong shard in a split family, so the comparison belongs at the point where the list is built.Compatibility: no behaviour change when the two paths are different files.
equivalentreports false through anerror_codewhen either path cannot be stat-ed, so an unreadable path is still appended and fails later exactly as it does today.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.