motif64

m64_8b0f715a688c / start.sh

37 lines, 2.2 KBraw
1#!/usr/bin/env bash2# qwen38-flash-next-strata-gb10 entrypoint. Runs inside the container; takes no arguments.3# `strata launch` prepares the model (its 1.5 GB pack, made from shard 1 at every start) and serves it on4# 127.0.0.1:8080; proxy.py puts it on $M64_PORT. The GGUF shards are mounted read-only under /weights;5# nothing is fetched at runtime. On a GB10 setup picks the settings Strata measured on the DGX Spark itself6# (experts read in place from the model file, --mmap-experts; 32K prompt chunks; 4-bit draft layer).7set -eu8QUANT=${QUANT:-IQ3_S}9CONTEXT=${CONTEXT:-65536}10VISION=${VISION:-on}11export M64_MODEL_NAME=${M64_MODEL_NAME:-qwen3.8-flash-next-iq3_s-strata}12status() { printf '{"phase":"%s","detail":"%s"}\n' "$1" "$2" >> "$M64_STATUS"; }13status loading "preparing the model folder"1415# Strata's state, settings, install folder and data all live in this run's /scratch.16export HOME=/scratch/home XDG_STATE_HOME=/scratch/state XDG_CONFIG_HOME=/scratch/config17export STRATA_INSTALL_DIR=/scratch/install18D=/scratch/Strata-data M=/scratch/model19mkdir -p "$HOME" "$XDG_STATE_HOME" "$XDG_CONFIG_HOME" "$STRATA_INSTALL_DIR/third_party" "$D" "$M"20ln -sfn /opt/strata/seed/third_party/llama.cpp "$STRATA_INSTALL_DIR/third_party/llama.cpp"21# The draft layer made in the image; setup rewrites its vocabulary subset, so it gets a writable copy (0.8 GB).22cp -r /opt/strata/mtp "$D/mtp"2324# The shards and the picture reader, under the names setup knows. m64 checked them against their Hugging Face25# SHA-256 (the ones setup.py pins), so they get finish marks and are not hashed again at every start.26for f in /weights/qwen38fn/"$QUANT"/*.gguf /weights/qwen38fn/mmproj-Qwen3.8-Flash-Next-BF16.gguf; do27  ln -sf "$f" "$M/"; printf 'm64 verified\n' > "$M/$(basename "$f").done"28done2930status loading "preparing the $QUANT pack and starting the engine (a few minutes)"31# --access local: Strata listens on 127.0.0.1 only and needs no key; proxy.py is the way in.32/opt/strata/terminal/bin/strata launch --no-tui --yes \33  --family qwen --model "$QUANT" --model-path "$M" --data-dir "$D" \34  --context "$CONTEXT" --vision "$VISION" --parallel "${PARALLEL:-1}" --tune skip \35  --access local --port 8080 --save-preset m643637exec /opt/strata/terminal/python/bin/python3 -u /capsule/proxy.py