frank-primary: never write the stage index through the raw symlink
Run 3 rewrote the staged index THROUGH the relative symlink into the raw checkpoint: the raw index.json was restamped with the stacked layout (605 KB smaller), the raw verify then failed 143/144 and the overnight run died before stacking. Two fixes: - stack-qwen38-official-fp8.py: index/config writes are now temp+os.replace (an atomic swap replaces the symlink itself; the raw tree stays pristine). - build-frank-primary-rad.sh: the stage's index.json is COPIED like config.json; only shards stay relative symlinks.
This commit is contained in:
1 parent
90a08ab4b5
commit
fb1a4fd150
2 files changed
+18
-8
No files matched your search
@@ -98,13 +98,18 @@ dropped = cfg.pop("quantization_config", None)
|
||||
json.dump(cfg, open(dst, "w"), indent=2)
|
||||
print(f"staging config.json written (quantization_config dropped: {dropped is not None})")
|
||||
PY
|
||||
# Everything else is a RELATIVE symlink — relative so the targets resolve
|
||||
# inside the convert container (the stage's parent is mounted at /models).
|
||||
# The index is COPIED like config.json, never symlinked: the reshape step
|
||||
# rewrites the stage's index, and a symlink would write through to the
|
||||
# raw checkpoint (measured 2026-10-05: the raw index was restamped with
|
||||
# the stacked layout and the raw verify failed 143/144). Shards stay
|
||||
# relative symlinks — relative so the targets resolve inside the convert
|
||||
# container (the stage's parent is mounted at /models).
|
||||
for f in "$SRC"/*; do
|
||||
name="$(basename "$f")"
|
||||
[ "$name" = "config.json" ] && continue
|
||||
case "$name" in config.json|model.safetensors.index.json) continue ;; esac
|
||||
ln -sfn "../Qwen/Qwen3.8-Flash-Next-FP8/$name" "$STAGE/$name"
|
||||
done
|
||||
cp "$SRC/model.safetensors.index.json" "$STAGE/"
|
||||
echo "staging dir ready: $STAGE ($(ls "$STAGE" | wc -l) entries)"
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user