Files
leleka/scripts/e2e/decode/single-copy-holder.sh

21 lines
1.6 KiB
Bash

#!/usr/bin/env bash
# Start the lab holder with the fast, page-cache-free seal (see single-copy-holder.py). Same MODEL.lock contract as run_holder2.sh.
# single-copy-holder.sh [BIN_DIR] BIN_DIR holds `leleka` (default /data/leleka-e2e/decode/dt/bin-singlecopy)
# The memfd is SPARSE by default (`--sparse-ple`: only the 14.9 GiB the serve path reads; holes elsewhere), the form of profile rtx5090-32g. A full 55.3 GB memfd is a second
# copy of model bytes next to the resident expert bank (36.6 GiB nobody reads; the 2026-11-09 server measurement), and `leleka run`
# now refuses it for a ple_only profile. HOLDER_MEMFD=full restores the full copy (jobs whose profile is memfd_extents=full, with LELEKA_ALLOW_FULL_MEMFD=1 where needed).
# Run it detached: cd ~/work/gpu-runs/holder2 && rm -f jobs/STOP && setsid nohup bash /data/leleka-e2e/single-copy/tools/single-copy-holder.sh > holder3.out 2>&1 &
set -u
BIN=${1:-/data/leleka-e2e/decode/dt/bin-singlecopy}
T=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
KAR=/home/para/work/leleka/models/leleka-gates/assets/qwen-iq3-s-l2-v4.kar
JOBS=$HOME/work/gpu-runs/holder2/jobs
until mkdir "$HOME/work/gpu-runs/MODEL.lock" 2>/dev/null; do sleep 20; done
trap 'rmdir "$HOME/work/gpu-runs/MODEL.lock"' EXIT
cd "$HOME/work/gpu-runs/holder2" || exit 1
rm -f "$JOBS/READY"
exec_start=$(date +%s)
SPARSE=--sparse-ple; [ "${HOLDER_MEMFD:-sparse}" = full ] && SPARSE=
LELEKA_LOAD_THREADS=${LELEKA_LOAD_THREADS:-8} "$BIN/leleka" seal-exec --file "$KAR" --expect-bytes 55295529472 $SPARSE -- python3 "$T/single-copy-holder.py" '{FD}' "$JOBS"
echo "holder3 ended rc=$? after $(( $(date +%s) - exec_start )) s"