Download tools/run3.sh from RightNowAI/duplex-v0: direct link, hf CLI and curl.
- Browser
- Download file 5.18 kB
-
https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/run3.sh
- Command line
-
hf download hf://RightNowAI/duplex-v0/tools/run3.sh
-
curl -L -o run3.sh https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/run3.sh
5.18 kB
| # Third run (2026-11-30, 05:34Z to 06:14Z): cut the 9 to 11 s of silence before a reasoned answer. Results: docs/numbers.md. | |
| # Needs the eight baseline copies up (docs/runbook.md, second run) and tests/test_listen_think.py passing. | |
| # | |
| # bash tools/run3.sh arms | arms2 | one | round3 | round3b | round4 what was actually run, in that order (docs/numbers.md) | |
| # bash tools/run3.sh arms four arms at once, each on two copies, 100 questions per arm | |
| # bash tools/run3.sh confirm <arm> the best arm again with the fast audio settings, the second run's | |
| # reference arm again beside it, and the held-out caller turns | |
| # | |
| # Every copy answers four questions at a time, as the reference arm did in the second run | |
| # (judge_v1_think: 97 of 100, answer after 10.7 s), so the latencies can be compared. | |
| cd /data/train/duplex && . /data/train/venv/bin/activate | |
| J="--judge-prompt v1" | |
| declare -A ARGS=( | |
| [carry]="--carry-thought --thought-min-chars 0" # only: a withdrawn reply keeps its reasoning | |
| [listen_bare]="--listen-think --listen-stance bare --thought-min-chars 0" # also reason while the caller speaks, three wordings | |
| [listen_plain]="--listen-think --listen-stance plain --thought-min-chars 0" | |
| [listen_notes]="--listen-think --listen-stance notes --thought-min-chars 0" | |
| # fourth round, after Whisper found short answers cut off: short replies decoded in one piece, longer lead-ins allowed | |
| [lead_gate_300]="--lead-in --lead-in-after-ms 1200 --lead-in-max-tokens 300" | |
| [reference]="" # the second run's arm, unchanged | |
| # second round, after the first showed remarks piling up (serving/listen_think.py, MIN_KEEP): short additions dropped | |
| [carry2]="--carry-thought --listen-stance bare" | |
| [listen_bare2]="--listen-think --listen-stance bare" | |
| [listen_check2]="--listen-think --listen-stance check" | |
| [listen_notes2]="--listen-think --listen-stance notes" | |
| [lead]="--lead-in --lead-in-after-ms 0" # third round: one spoken sentence while the reply reasons, played at once | |
| [lead_gate]="--lead-in --lead-in-after-ms 1200 --lead-in-max-tokens 150" # the same, not played before 1.2 s of quiet (no pause inside these questions is longer than 1.44 s; 6 of 788 reach 1.2 s) | |
| ) | |
| arm() { # <first gpu> <name in ARGS> <result name> | |
| for i in 0 1; do OUT=bba3 SHARD=$i NSHARDS=2 CONC=4 bash tools/bba_arm.sh $(( $1 + i )) "$3" judge think "$J ${ARGS[$2]}" & done | |
| } | |
| arm4() { # the same on four copies | |
| for i in 0 1 2 3; do OUT=bba3 SHARD=$i NSHARDS=4 CONC=4 bash tools/bba_arm.sh $(( $1 + i )) "$3" judge think "$J ${ARGS[$2]}" & done | |
| } | |
| case "${1:-}" in | |
| arms) | |
| python -m tests.test_listen_think || exit 1 | |
| arm 0 carry carry; arm 2 listen_bare listen_bare; arm 4 listen_plain listen_plain; arm 6 listen_notes listen_notes | |
| wait | |
| for a in carry listen_bare listen_plain listen_notes; do echo "== $a"; python -m tools.bba_merge eval/results/bba3/$a/judge; done | |
| ;; | |
| arms2) | |
| python -m tests.test_listen_think || exit 1 | |
| arm 0 carry2 carry2; arm 2 listen_bare2 listen_bare2; arm 4 listen_check2 listen_check2; arm 6 listen_notes2 listen_notes2 | |
| wait | |
| python -m tools.show_run3 eval/results/bba3 | |
| ;; | |
| one) # one arm on two copies: tools/run3.sh one <first gpu> <arm in ARGS> <result name> | |
| arm "$2" "$3" "$4"; wait | |
| ;; | |
| round3) # the old arm again, and the gated lead-in with the released and with the fast audio settings | |
| python -m tests.test_listen_think || exit 1 | |
| arm 0 reference reference_again | |
| arm 2 lead_gate lead_gate | |
| PROMPT=runs/prompt_af_heart_short.wav FIRST_CHUNK=12 MIN_CHUNK=12 LOW_WATER=500 WORKERS=4 arm 6 lead_gate lead_gate_fast_audio | |
| wait | |
| python -m tools.show_run3 eval/results/bba3 | |
| ;; | |
| round3b) # 40 held-out caller turns (the second run's judge_v1_think arm), with the gated lead-in and without | |
| OUT=latency3 TURNS=40 CONC=4 bash tools/latency_arm.sh 4 judge_v1_think_lead_gate judge think "$J ${ARGS[lead_gate]}" & | |
| OUT=latency3 TURNS=40 CONC=4 bash tools/latency_arm.sh 5 judge_v1_think_again judge think "$J" & | |
| wait | |
| ;; | |
| round4) # the answer asked for as a short sentence (eval/eval_bba.py --system sentence), each arm on four copies | |
| EVAL_ARGS="--system sentence" arm4 0 lead_gate_300 lead_gate_sentence | |
| EVAL_ARGS="--system sentence" arm4 4 reference reference_sentence | |
| wait | |
| python -m tools.show_run3 eval/results/bba3 reference_again lead_gate reference_sentence lead_gate_sentence | |
| ;; | |
| confirm) | |
| best=$2 | |
| arm 0 reference reference_again | |
| PROMPT=runs/prompt_af_heart_short.wav FIRST_CHUNK=12 MIN_CHUNK=12 LOW_WATER=500 WORKERS=4 arm 2 "$best" "${best}_fast_audio" | |
| OUT=latency3 TURNS=100 CONC=3 bash tools/latency_arm.sh 4 "$best" judge think "$J ${ARGS[$best]}" & | |
| OUT=latency3 TURNS=100 CONC=3 bash tools/latency_arm.sh 5 "${best}_keep_interrupted" judge think "$J ${ARGS[$best]} --keep-interrupted" & | |
| wait | |
| for a in reference_again "${best}_fast_audio"; do echo "== $a"; python -m tools.bba_merge eval/results/bba3/$a/judge; done | |
| ;; | |
| *) echo "usage: tools/run3.sh arms | confirm <arm>"; exit 2 ;; | |
| esac | |
| date -u +%FT%TZ | |