fhyfhy's picture
Add code-release/
3970207 verified
Raw History Blame Contribute Delete
1.21 kB
#!/usr/bin/env bash
# Symbolic two-hop task (Section 3.1 / Table 1a, Section 5.1 / Figure 3): K=2, 3000 epochs.
# discoloop DiscoLoop with a fixed gate (alpha=1, beta=0)
# vanilla vanilla looped transformer
# noloop non-looped baseline: 2 untied copies of the blocks (stacking)
#
# Usage: scripts/symbolic_2hop.sh {discoloop|vanilla|noloop} [train_twin_hyper.sh options]
# e.g. scripts/symbolic_2hop.sh discoloop --gpu 3 --seed 15
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
case "${1:-}" in
discoloop) MODEL_ARGS=(--design looping --loop-scheme discoloop --num-stages 2 --gate-mode fixed --fixed-alpha 1 --fixed-beta 0) ;;
vanilla) MODEL_ARGS=(--design looping --loop-scheme vanillaloop --num-stages 2) ;;
noloop) MODEL_ARGS=(--design stacking --loop-scheme vanillaloop --num-stages 2) ;;
*)
echo "Usage: $0 {discoloop|vanilla|noloop} [train_twin_hyper.sh options]" >&2
exit 1
;;
esac
shift
exec ./train_twin_hyper.sh \
--data data/twin_twohop_truood_diff.500.50.10 \
--max-length 4 \
--train-twohop-count 10000 \
--eval-id-count 2000 \
--eval-ood-count 2000 \
--epochs 3000 \
--loss-compute-method answer \
"${MODEL_ARGS[@]}" \
"$@"