#!/usr/bin/env bash # Track 1 measurements on one GPU: the engine lines side by side, each with the same speed client and the same # 200-prompt greedy capture, then every line's tokens compared with the stock line's. # GPU=0 PORT=9000 bash tools/speed_engine.sh (run on the node in tmux) # Lines: stock (no drafting, captured twice), dspark (the engine's own recipe: the draft head in the checkpoint), # dflash (engine/serve.sh: the prepared published drafter, logit cap off), dflash-keepcap (cap as published). set -u R=/data/train/mini GPU=${GPU:-0}; PORT=${PORT:-9000}; NAME=mini-engine-g$GPU export DOCKER=/usr/bin/docker cd $R/src log() { echo "$(date -u +%TZ) $*"; } PY="taskset -c 0-31 $R/venv/bin/python" URL=http://127.0.0.1:$PORT mkdir -p $R/results/raw/speed-engine $R/results/raw/parity [ -d $R/models/Inkling-2-Mini-DFlash2 ] || { echo "download incoai/Inkling-2-Mini-DFlash2 into $R/models/Inkling-2-Mini-DFlash2 first"; exit 1; } measure() { # measure