From 76b9cddf4e94402c1c757b5a1c9fa2e6e463dbdb Mon Sep 17 00:00:00 2001 From: Simon Marcus Date: Fri, 20 Mar 2026 13:37:58 -0400 Subject: [PATCH 1/3] Add leader-core parity and 1xH100 screening artifacts --- launch_leadercore_ablation_runpod.sh | 70 + launch_leadercore_screen_runpod.sh | 103 ++ .../README.md | 33 + .../launch_leadercore_screen_runpod.sh | 103 ++ .../runpod_tmp_base/train.log | 135 ++ .../runpod_tmp_base/train.pid | 1 + .../screen_batch.log | 115 ++ .../screen_tmp_base/train.log | 98 ++ .../screen_tmp_base/train.pid | 1 + .../screen_tmp_embedlr08/train.log | 60 + .../screen_tmp_embedlr08/train.pid | 1 + .../screen_tmp_gradclip03/train.log | 60 + .../screen_tmp_gradclip03/train.pid | 1 + .../screen_tmp_matrixlr006/train.log | 60 + .../screen_tmp_matrixlr006/train.pid | 1 + .../screen_tmp_muon099/train.log | 66 + .../screen_tmp_muon099/train.pid | 1 + .../screen_tmp_warmdown800/train.log | 58 + .../screen_tmp_warmdown800/train.pid | 1 + .../train_gpt.py | 1256 +++++++++++++++++ run_leadercore_screen_batch_runpod.sh | 30 + setup_local_parity_data_runpod.sh | 29 + 22 files changed, 2283 insertions(+) create mode 100755 launch_leadercore_ablation_runpod.sh create mode 100644 launch_leadercore_screen_runpod.sh create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/launch_leadercore_screen_runpod.sh create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_batch.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.pid create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py create mode 100644 run_leadercore_screen_batch_runpod.sh create mode 100755 setup_local_parity_data_runpod.sh diff --git a/launch_leadercore_ablation_runpod.sh b/launch_leadercore_ablation_runpod.sh new file mode 100755 index 000000000..f3da05774 --- /dev/null +++ b/launch_leadercore_ablation_runpod.sh @@ -0,0 +1,70 @@ +#!/bin/bash +set -euo pipefail + +VARIANT="${1:-base}" +DATA_ROOT_MODE="${DATA_ROOT_MODE:-workspace}" + +cd /workspace/parameter-golf + +SCRIPT_PATH="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py" +RECORD_ROOT="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search" + +case "$DATA_ROOT_MODE" in + workspace) + export DATA_PATH=/workspace/parameter-golf/data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/workspace/parameter-golf/data/tokenizers/fineweb_1024_bpe.model + ;; + tmp) + export DATA_PATH=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model + ;; + *) + echo "DATA_ROOT_MODE must be one of: workspace, tmp" + exit 1 + ;; +esac + +export MAX_WALLCLOCK_SECONDS=600 +export VAL_LOSS_EVERY=0 +export TRAIN_LOG_EVERY=200 +export VOCAB_SIZE=1024 +export INT8_KEEP_TOK_EMB_FP16=1 + +case "$VARIANT" in + base) + export RUN_ID=leadercore10l_valid_base + OUT_DIR="$RECORD_ROOT/runpod_${DATA_ROOT_MODE}_base" + ;; + embedlr08) + export RUN_ID=leadercore10l_valid_embedlr08 + export TIED_EMBED_LR=0.08 + OUT_DIR="$RECORD_ROOT/runpod_${DATA_ROOT_MODE}_embedlr08" + ;; + matrixlr005) + export RUN_ID=leadercore10l_valid_matrixlr005 + export MATRIX_LR=0.05 + OUT_DIR="$RECORD_ROOT/runpod_${DATA_ROOT_MODE}_matrixlr005" + ;; + warmdown1800) + export RUN_ID=leadercore10l_valid_warmdown1800 + export WARMDOWN_ITERS=1800 + OUT_DIR="$RECORD_ROOT/runpod_${DATA_ROOT_MODE}_warmdown1800" + ;; + tokemb_int8) + export RUN_ID=leadercore10l_valid_tokemb_int8 + export INT8_KEEP_TOK_EMB_FP16=0 + OUT_DIR="$RECORD_ROOT/runpod_${DATA_ROOT_MODE}_tokemb_int8" + ;; + *) + echo "Usage: $0 {base|embedlr08|matrixlr005|warmdown1800|tokemb_int8}" + exit 1 + ;; +esac + +mkdir -p "$OUT_DIR" + +nohup python3 -m torch.distributed.run --standalone --nproc_per_node=8 "$SCRIPT_PATH" \ + > "$OUT_DIR/train.log" 2>&1 < /dev/null & +PID=$! +echo "$PID" > "$OUT_DIR/train.pid" +echo "started $RUN_ID data_root_mode=$DATA_ROOT_MODE pid=$PID log=$OUT_DIR/train.log" diff --git a/launch_leadercore_screen_runpod.sh b/launch_leadercore_screen_runpod.sh new file mode 100644 index 000000000..e55258b83 --- /dev/null +++ b/launch_leadercore_screen_runpod.sh @@ -0,0 +1,103 @@ +#!/bin/bash +set -euo pipefail + +VARIANT="${1:-base}" +DATA_ROOT_MODE="${DATA_ROOT_MODE:-tmp}" +SCREEN_SECONDS="${SCREEN_SECONDS:-180}" +NPROC_PER_NODE="${NPROC_PER_NODE:-1}" + +cd /workspace/parameter-golf + +SCRIPT_PATH="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py" +RECORD_ROOT="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search" + +case "$DATA_ROOT_MODE" in + workspace) + export DATA_PATH=/workspace/parameter-golf/data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/workspace/parameter-golf/data/tokenizers/fineweb_1024_bpe.model + ;; + tmp) + export DATA_PATH=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model + ;; + *) + echo "DATA_ROOT_MODE must be one of: workspace, tmp" + exit 1 + ;; +esac + +export MAX_WALLCLOCK_SECONDS="$SCREEN_SECONDS" +export VAL_LOSS_EVERY=0 +export TRAIN_LOG_EVERY=25 +export VOCAB_SIZE=1024 +export INT8_KEEP_TOK_EMB_FP16=1 +export PROXY_SKIP_EXPORT=1 + +case "$VARIANT" in + base) + export RUN_ID=leadercore10l_screen_base + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_base" + ;; + embedlr08) + export RUN_ID=leadercore10l_screen_embedlr08 + export TIED_EMBED_LR=0.08 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_embedlr08" + ;; + matrixlr005) + export RUN_ID=leadercore10l_screen_matrixlr005 + export MATRIX_LR=0.05 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_matrixlr005" + ;; + matrixlr006) + export RUN_ID=leadercore10l_screen_matrixlr006 + export MATRIX_LR=0.06 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_matrixlr006" + ;; + warmdown1800) + export RUN_ID=leadercore10l_screen_warmdown1800 + export WARMDOWN_ITERS=1800 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_warmdown1800" + ;; + warmdown800) + export RUN_ID=leadercore10l_screen_warmdown800 + export WARMDOWN_ITERS=800 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_warmdown800" + ;; + gradclip03) + export RUN_ID=leadercore10l_screen_gradclip03 + export GRAD_CLIP_NORM=0.3 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_gradclip03" + ;; + muon099) + export RUN_ID=leadercore10l_screen_muon099 + export MUON_MOMENTUM=0.99 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_muon099" + ;; + muonwarm300) + export RUN_ID=leadercore10l_screen_muonwarm300 + export MUON_MOMENTUM_WARMUP_STEPS=300 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_muonwarm300" + ;; + qkgain17) + export RUN_ID=leadercore10l_screen_qkgain17 + export QK_GAIN_INIT=1.7 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_qkgain17" + ;; + width520) + export RUN_ID=leadercore10l_screen_width520 + export MODEL_DIM=520 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_width520" + ;; + *) + echo "Usage: $0 {base|embedlr08|matrixlr005|matrixlr006|warmdown1800|warmdown800|gradclip03|muon099|muonwarm300|qkgain17|width520}" + exit 1 + ;; +esac + +mkdir -p "$OUT_DIR" + +nohup python3 -m torch.distributed.run --standalone --nproc_per_node="$NPROC_PER_NODE" "$SCRIPT_PATH" \ + > "$OUT_DIR/train.log" 2>&1 < /dev/null & +PID=$! +echo "$PID" > "$OUT_DIR/train.pid" +echo "started $RUN_ID data_root_mode=$DATA_ROOT_MODE nproc_per_node=$NPROC_PER_NODE screen_seconds=$SCREEN_SECONDS pid=$PID log=$OUT_DIR/train.log" diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md new file mode 100644 index 000000000..893201998 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md @@ -0,0 +1,33 @@ +This directory contains the leader-core merge candidate rooted in the official `2026-03-19_SlidingWindow_FP16Emb_10L_MuonWD_OvertoneInit` training recipe, with validity-safe final eval and the stronger local int8 export plus temperature-only post-quant search. + +Primary file: +- `train_gpt.py` + +First ablation batch: +- `base` +- `embedlr08` +- `matrixlr005` +- `warmdown1800` +- `tokemb_int8` + +RunPod launcher: +```bash +bash /workspace/parameter-golf/launch_leadercore_ablation_runpod.sh base +``` + +For timing-parity runs, first stage data/tokenizer to local disk on the pod: +```bash +bash /workspace/parameter-golf/setup_local_parity_data_runpod.sh +DATA_ROOT_MODE=tmp bash /workspace/parameter-golf/launch_leadercore_ablation_runpod.sh base +``` + +Variant names map to these env changes: +- `base`: no overrides beyond the merged defaults +- `embedlr08`: `TIED_EMBED_LR=0.08` +- `matrixlr005`: `MATRIX_LR=0.05` +- `warmdown1800`: `WARMDOWN_ITERS=1800` +- `tokemb_int8`: `INT8_KEEP_TOK_EMB_FP16=0` + +Data root modes: +- `workspace`: use `/workspace/parameter-golf/data/...` +- `tmp`: use `/tmp/parameter-golf-data/...` after local staging diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/launch_leadercore_screen_runpod.sh b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/launch_leadercore_screen_runpod.sh new file mode 100644 index 000000000..e55258b83 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/launch_leadercore_screen_runpod.sh @@ -0,0 +1,103 @@ +#!/bin/bash +set -euo pipefail + +VARIANT="${1:-base}" +DATA_ROOT_MODE="${DATA_ROOT_MODE:-tmp}" +SCREEN_SECONDS="${SCREEN_SECONDS:-180}" +NPROC_PER_NODE="${NPROC_PER_NODE:-1}" + +cd /workspace/parameter-golf + +SCRIPT_PATH="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py" +RECORD_ROOT="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search" + +case "$DATA_ROOT_MODE" in + workspace) + export DATA_PATH=/workspace/parameter-golf/data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/workspace/parameter-golf/data/tokenizers/fineweb_1024_bpe.model + ;; + tmp) + export DATA_PATH=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024 + export TOKENIZER_PATH=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model + ;; + *) + echo "DATA_ROOT_MODE must be one of: workspace, tmp" + exit 1 + ;; +esac + +export MAX_WALLCLOCK_SECONDS="$SCREEN_SECONDS" +export VAL_LOSS_EVERY=0 +export TRAIN_LOG_EVERY=25 +export VOCAB_SIZE=1024 +export INT8_KEEP_TOK_EMB_FP16=1 +export PROXY_SKIP_EXPORT=1 + +case "$VARIANT" in + base) + export RUN_ID=leadercore10l_screen_base + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_base" + ;; + embedlr08) + export RUN_ID=leadercore10l_screen_embedlr08 + export TIED_EMBED_LR=0.08 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_embedlr08" + ;; + matrixlr005) + export RUN_ID=leadercore10l_screen_matrixlr005 + export MATRIX_LR=0.05 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_matrixlr005" + ;; + matrixlr006) + export RUN_ID=leadercore10l_screen_matrixlr006 + export MATRIX_LR=0.06 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_matrixlr006" + ;; + warmdown1800) + export RUN_ID=leadercore10l_screen_warmdown1800 + export WARMDOWN_ITERS=1800 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_warmdown1800" + ;; + warmdown800) + export RUN_ID=leadercore10l_screen_warmdown800 + export WARMDOWN_ITERS=800 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_warmdown800" + ;; + gradclip03) + export RUN_ID=leadercore10l_screen_gradclip03 + export GRAD_CLIP_NORM=0.3 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_gradclip03" + ;; + muon099) + export RUN_ID=leadercore10l_screen_muon099 + export MUON_MOMENTUM=0.99 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_muon099" + ;; + muonwarm300) + export RUN_ID=leadercore10l_screen_muonwarm300 + export MUON_MOMENTUM_WARMUP_STEPS=300 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_muonwarm300" + ;; + qkgain17) + export RUN_ID=leadercore10l_screen_qkgain17 + export QK_GAIN_INIT=1.7 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_qkgain17" + ;; + width520) + export RUN_ID=leadercore10l_screen_width520 + export MODEL_DIM=520 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_width520" + ;; + *) + echo "Usage: $0 {base|embedlr08|matrixlr005|matrixlr006|warmdown1800|warmdown800|gradclip03|muon099|muonwarm300|qkgain17|width520}" + exit 1 + ;; +esac + +mkdir -p "$OUT_DIR" + +nohup python3 -m torch.distributed.run --standalone --nproc_per_node="$NPROC_PER_NODE" "$SCRIPT_PATH" \ + > "$OUT_DIR/train.log" 2>&1 < /dev/null & +PID=$! +echo "$PID" > "$OUT_DIR/train.pid" +echo "started $RUN_ID data_root_mode=$DATA_ROOT_MODE nproc_per_node=$NPROC_PER_NODE screen_seconds=$SCREEN_SECONDS pid=$PID log=$OUT_DIR/train.log" diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.log new file mode 100644 index 000000000..4f8757d28 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.log @@ -0,0 +1,135 @@ + +***************************************** +Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. +***************************************** +logs/leadercore10l_valid_base.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:8 grad_accum_steps:1 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:600.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9338 train_time:59ms step_avg:59.20ms +step:2/20000 train_loss:23.6114 train_time:102ms step_avg:50.77ms +step:3/20000 train_loss:9.4291 train_time:155ms step_avg:51.79ms +step:4/20000 train_loss:6.3084 train_time:210ms step_avg:52.56ms +step:5/20000 train_loss:6.2336 train_time:269ms step_avg:53.87ms +step:6/20000 train_loss:7.4515 train_time:326ms step_avg:54.25ms +step:7/20000 train_loss:6.4829 train_time:381ms step_avg:54.41ms +step:8/20000 train_loss:6.4743 train_time:437ms step_avg:54.62ms +step:9/20000 train_loss:6.4677 train_time:493ms step_avg:54.76ms +step:10/20000 train_loss:6.3989 train_time:552ms step_avg:55.15ms +step:200/20000 train_loss:2.9609 train_time:9844ms step_avg:49.22ms +step:400/20000 train_loss:2.3939 train_time:19633ms step_avg:49.08ms +step:600/20000 train_loss:2.5684 train_time:29437ms step_avg:49.06ms +step:800/20000 train_loss:2.3120 train_time:39252ms step_avg:49.07ms +step:1000/20000 train_loss:2.3890 train_time:49078ms step_avg:49.08ms +step:1200/20000 train_loss:2.3992 train_time:58899ms step_avg:49.08ms +step:1400/20000 train_loss:2.4517 train_time:68727ms step_avg:49.09ms +step:1600/20000 train_loss:2.1230 train_time:78541ms step_avg:49.09ms +step:1800/20000 train_loss:2.2210 train_time:88373ms step_avg:49.10ms +step:2000/20000 train_loss:2.2758 train_time:98208ms step_avg:49.10ms +step:2200/20000 train_loss:2.1043 train_time:108051ms step_avg:49.11ms +step:2400/20000 train_loss:2.2241 train_time:117885ms step_avg:49.12ms +step:2600/20000 train_loss:2.4459 train_time:127716ms step_avg:49.12ms +step:2800/20000 train_loss:2.2728 train_time:137568ms step_avg:49.13ms +step:3000/20000 train_loss:2.2626 train_time:147419ms step_avg:49.14ms +step:3200/20000 train_loss:2.2248 train_time:157263ms step_avg:49.14ms +step:3400/20000 train_loss:2.2004 train_time:167121ms step_avg:49.15ms +step:3600/20000 train_loss:2.1576 train_time:176973ms step_avg:49.16ms +step:3800/20000 train_loss:2.2605 train_time:186823ms step_avg:49.16ms +step:4000/20000 train_loss:2.2055 train_time:196666ms step_avg:49.17ms +step:4200/20000 train_loss:2.2172 train_time:206584ms step_avg:49.19ms +step:4400/20000 train_loss:2.1595 train_time:216436ms step_avg:49.19ms +step:4600/20000 train_loss:2.0208 train_time:226276ms step_avg:49.19ms +step:4800/20000 train_loss:2.3089 train_time:236116ms step_avg:49.19ms +step:5000/20000 train_loss:2.0822 train_time:245940ms step_avg:49.19ms +step:5200/20000 train_loss:2.2239 train_time:255789ms step_avg:49.19ms +step:5400/20000 train_loss:2.2386 train_time:265632ms step_avg:49.19ms +step:5600/20000 train_loss:2.2448 train_time:275471ms step_avg:49.19ms +step:5800/20000 train_loss:2.2023 train_time:285319ms step_avg:49.19ms +step:6000/20000 train_loss:2.2771 train_time:295166ms step_avg:49.19ms +step:6200/20000 train_loss:2.1481 train_time:305112ms step_avg:49.21ms +step:6400/20000 train_loss:2.2230 train_time:315291ms step_avg:49.26ms +step:6600/20000 train_loss:2.1850 train_time:325354ms step_avg:49.30ms +step:6800/20000 train_loss:2.2484 train_time:335188ms step_avg:49.29ms +step:7000/20000 train_loss:2.2824 train_time:345024ms step_avg:49.29ms +step:7200/20000 train_loss:2.2705 train_time:354865ms step_avg:49.29ms +step:7400/20000 train_loss:2.1805 train_time:364724ms step_avg:49.29ms +step:7600/20000 train_loss:2.0558 train_time:374575ms step_avg:49.29ms +step:7800/20000 train_loss:2.2058 train_time:384425ms step_avg:49.29ms +step:8000/20000 train_loss:2.1789 train_time:394278ms step_avg:49.28ms +step:8200/20000 train_loss:2.2392 train_time:404124ms step_avg:49.28ms +step:8400/20000 train_loss:2.1916 train_time:414038ms step_avg:49.29ms +step:8600/20000 train_loss:2.1971 train_time:423869ms step_avg:49.29ms +step:8800/20000 train_loss:2.1686 train_time:433695ms step_avg:49.28ms +step:9000/20000 train_loss:2.0882 train_time:443523ms step_avg:49.28ms +step:9200/20000 train_loss:2.1524 train_time:453349ms step_avg:49.28ms +step:9400/20000 train_loss:2.2079 train_time:463184ms step_avg:49.27ms +step:9600/20000 train_loss:2.2176 train_time:473019ms step_avg:49.27ms +step:9800/20000 train_loss:2.1388 train_time:482848ms step_avg:49.27ms +step:10000/20000 train_loss:2.1700 train_time:492683ms step_avg:49.27ms +step:10200/20000 train_loss:2.1104 train_time:502532ms step_avg:49.27ms +step:10400/20000 train_loss:2.1323 train_time:512400ms step_avg:49.27ms +step:10600/20000 train_loss:1.9918 train_time:522257ms step_avg:49.27ms +step:10800/20000 train_loss:2.1971 train_time:532108ms step_avg:49.27ms +step:11000/20000 train_loss:2.1169 train_time:541969ms step_avg:49.27ms +step:11200/20000 train_loss:2.0650 train_time:551815ms step_avg:49.27ms +step:11400/20000 train_loss:2.0376 train_time:561658ms step_avg:49.27ms +step:11600/20000 train_loss:2.0310 train_time:571498ms step_avg:49.27ms +step:11800/20000 train_loss:2.0487 train_time:581340ms step_avg:49.27ms +step:12000/20000 train_loss:2.0150 train_time:591412ms step_avg:49.28ms +step:12167/20000 val_loss:2.0354 val_bpb:1.2055 train_time:600014ms step_avg:49.31ms +stopping_early: wallclock_cap train_time:600014ms step:12167/20000 +peak memory allocated: 11262 MiB reserved: 11450 MiB +Serialized model: 74573987 bytes +Code size: 53685 bytes +Total submission size: 74627672 bytes +Serialized model int8+zlib: 15240635 bytes (payload:19569472 raw_torch:19619451 payload_ratio:3.81x) +Total submission size int8+zlib: 15294320 bytes +final_eval_mode:non_overlapping_validity_safe +temp_search: temp=0.85 val_bpb=1.2064 +temp_search: temp=0.90 val_bpb=1.2064 +temp_search: temp=0.95 val_bpb=1.2064 +temp_search: temp=1.00 val_bpb=1.2064 +temp_search: temp=1.05 val_bpb=1.2064 +temp_search: temp=1.10 val_bpb=1.2064 +temp_search: temp=1.15 val_bpb=1.2064 +temp_search_fine: temp=0.81 val_bpb=1.2064 +temp_search_fine: temp=0.82 val_bpb=1.2064 +temp_search_fine: temp=0.83 val_bpb=1.2064 +temp_search_fine: temp=0.84 val_bpb=1.2064 +temp_search_fine: temp=0.86 val_bpb=1.2064 +temp_search_fine: temp=0.87 val_bpb=1.2064 +temp_search_fine: temp=0.88 val_bpb=1.2064 +temp_search_fine: temp=0.89 val_bpb=1.2064 +temp_search: best_temp=0.85 +temp_rerefine: temp=0.84 val_bpb=1.2064 +temp_rerefine: temp=0.86 val_bpb=1.2064 +temp_rerefine: best_temp=0.85 +final_int8_zlib_roundtrip val_loss:2.0369 val_bpb:1.2064 eval_time:1555ms +final_int8_zlib_roundtrip_exact val_loss:2.03694804 val_bpb:1.20639536 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.pid new file mode 100644 index 000000000..ea6d98f43 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/runpod_tmp_base/train.pid @@ -0,0 +1 @@ +1853 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_batch.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_batch.log new file mode 100644 index 000000000..7f5507d21 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_batch.log @@ -0,0 +1,115 @@ +=== 2026-03-20T16:29:21+00:00 starting warmdown800 === +started leadercore10l_screen_warmdown800 data_root_mode=tmp nproc_per_node=1 screen_seconds=180 pid=8063 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.log +=== 2026-03-20T16:33:22+00:00 finished warmdown800 === +step:8/20000 train_loss:6.0850 train_time:4720ms step_avg:590.04ms +step:9/20000 train_loss:6.1977 train_time:5260ms step_avg:584.43ms +step:10/20000 train_loss:6.2945 train_time:5867ms step_avg:586.67ms +step:25/20000 train_loss:5.7394 train_time:13972ms step_avg:558.89ms +step:50/20000 train_loss:4.5933 train_time:26490ms step_avg:529.80ms +step:75/20000 train_loss:4.1527 train_time:39698ms step_avg:529.31ms +step:100/20000 train_loss:3.6883 train_time:52964ms step_avg:529.64ms +step:125/20000 train_loss:3.4315 train_time:66696ms step_avg:533.57ms +step:150/20000 train_loss:3.2955 train_time:79660ms step_avg:531.06ms +step:175/20000 train_loss:3.0852 train_time:92074ms step_avg:526.14ms +step:200/20000 train_loss:2.9517 train_time:105404ms step_avg:527.02ms +step:225/20000 train_loss:2.9200 train_time:118789ms step_avg:527.95ms +step:250/20000 train_loss:2.8466 train_time:131352ms step_avg:525.41ms +step:275/20000 train_loss:2.7482 train_time:143991ms step_avg:523.60ms +step:300/20000 train_loss:2.7056 train_time:157070ms step_avg:523.57ms +step:325/20000 train_loss:2.7185 train_time:170370ms step_avg:524.22ms +step:344/20000 val_loss:2.6989 val_bpb:1.5984 train_time:180091ms step_avg:523.52ms +stopping_early: wallclock_cap train_time:180091ms step:344/20000 +peak memory allocated: 11398 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval +=== 2026-03-20T16:33:22+00:00 starting muon099 === +started leadercore10l_screen_muon099 data_root_mode=tmp nproc_per_node=1 screen_seconds=180 pid=10154 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log +=== 2026-03-20T16:34:02+00:00 finished muon099 === + run(args) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 927, in run + elastic_launch( + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 156, in __call__ + return launch_agent(self._config, self._entrypoint, list(args)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 284, in launch_agent + result = agent.run() + ^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 138, in wrapper + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 717, in run + result = self._invoke_run(role) + ^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 881, in _invoke_run + time.sleep(monitor_interval) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 85, in _terminate_process_handler + raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval) +torch.distributed.elastic.multiprocessing.api.SignalException: Process 10154 got signal: 15 +=== 2026-03-20T16:34:02+00:00 starting gradclip03 === +started leadercore10l_screen_gradclip03 data_root_mode=tmp nproc_per_node=1 screen_seconds=180 pid=11151 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.log +=== 2026-03-20T16:37:57+00:00 finished gradclip03 === +step:10/20000 train_loss:8.8367 train_time:5150ms step_avg:514.96ms +step:25/20000 train_loss:5.5308 train_time:12728ms step_avg:509.10ms +step:50/20000 train_loss:4.8507 train_time:24929ms step_avg:498.58ms +step:75/20000 train_loss:4.4544 train_time:36779ms step_avg:490.39ms +step:100/20000 train_loss:4.2221 train_time:47802ms step_avg:478.02ms +step:125/20000 train_loss:4.0530 train_time:60098ms step_avg:480.78ms +step:150/20000 train_loss:3.8084 train_time:72103ms step_avg:480.69ms +step:175/20000 train_loss:3.5278 train_time:84408ms step_avg:482.33ms +step:200/20000 train_loss:3.3552 train_time:96432ms step_avg:482.16ms +step:225/20000 train_loss:3.3047 train_time:107716ms step_avg:478.74ms +step:250/20000 train_loss:3.1962 train_time:119689ms step_avg:478.76ms +step:275/20000 train_loss:3.0782 train_time:131488ms step_avg:478.14ms +step:300/20000 train_loss:3.0115 train_time:143484ms step_avg:478.28ms +step:325/20000 train_loss:3.0014 train_time:155797ms step_avg:479.38ms +step:350/20000 train_loss:2.9793 train_time:166989ms step_avg:477.11ms +step:375/20000 train_loss:3.0041 train_time:179102ms step_avg:477.61ms +step:377/20000 val_loss:2.9488 val_bpb:1.7464 train_time:180136ms step_avg:477.81ms +stopping_early: wallclock_cap train_time:180136ms step:377/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval +=== 2026-03-20T16:37:57+00:00 starting matrixlr006 === +started leadercore10l_screen_matrixlr006 data_root_mode=tmp nproc_per_node=1 screen_seconds=180 pid=13156 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.log +=== 2026-03-20T16:41:53+00:00 finished matrixlr006 === +step:10/20000 train_loss:6.7316 train_time:5668ms step_avg:566.75ms +step:25/20000 train_loss:5.9085 train_time:12938ms step_avg:517.54ms +step:50/20000 train_loss:5.0580 train_time:24763ms step_avg:495.26ms +step:75/20000 train_loss:4.5001 train_time:37066ms step_avg:494.21ms +step:100/20000 train_loss:4.1957 train_time:48459ms step_avg:484.59ms +step:125/20000 train_loss:3.9334 train_time:60094ms step_avg:480.75ms +step:150/20000 train_loss:3.6464 train_time:71965ms step_avg:479.77ms +step:175/20000 train_loss:3.3970 train_time:83689ms step_avg:478.22ms +step:200/20000 train_loss:3.2289 train_time:95390ms step_avg:476.95ms +step:225/20000 train_loss:3.1594 train_time:106685ms step_avg:474.15ms +step:250/20000 train_loss:3.0588 train_time:117884ms step_avg:471.54ms +step:275/20000 train_loss:2.9408 train_time:130096ms step_avg:473.08ms +step:300/20000 train_loss:2.8829 train_time:141556ms step_avg:471.85ms +step:325/20000 train_loss:2.8828 train_time:153475ms step_avg:472.23ms +step:350/20000 train_loss:2.8588 train_time:165394ms step_avg:472.55ms +step:375/20000 train_loss:2.8798 train_time:176695ms step_avg:471.19ms +step:382/20000 val_loss:2.8284 val_bpb:1.6751 train_time:180132ms step_avg:471.55ms +stopping_early: wallclock_cap train_time:180132ms step:382/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval +=== 2026-03-20T16:41:53+00:00 starting embedlr08 === +started leadercore10l_screen_embedlr08 data_root_mode=tmp nproc_per_node=1 screen_seconds=180 pid=15118 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.log +=== 2026-03-20T16:45:48+00:00 finished embedlr08 === +step:10/20000 train_loss:7.1500 train_time:5359ms step_avg:535.89ms +step:25/20000 train_loss:5.8306 train_time:12584ms step_avg:503.36ms +step:50/20000 train_loss:5.2623 train_time:24283ms step_avg:485.66ms +step:75/20000 train_loss:4.7269 train_time:36251ms step_avg:483.35ms +step:100/20000 train_loss:4.3589 train_time:47980ms step_avg:479.80ms +step:125/20000 train_loss:4.1810 train_time:58981ms step_avg:471.85ms +step:150/20000 train_loss:3.9782 train_time:70683ms step_avg:471.22ms +step:175/20000 train_loss:3.6893 train_time:82947ms step_avg:473.98ms +step:200/20000 train_loss:3.4928 train_time:94881ms step_avg:474.41ms +step:225/20000 train_loss:3.4269 train_time:106567ms step_avg:473.63ms +step:250/20000 train_loss:3.3102 train_time:117656ms step_avg:470.62ms +step:275/20000 train_loss:3.1939 train_time:129244ms step_avg:469.98ms +step:300/20000 train_loss:3.1182 train_time:141179ms step_avg:470.60ms +step:325/20000 train_loss:3.1049 train_time:153087ms step_avg:471.04ms +step:350/20000 train_loss:3.0768 train_time:165041ms step_avg:471.55ms +step:375/20000 train_loss:3.1011 train_time:175986ms step_avg:469.30ms +step:384/20000 val_loss:3.0392 val_bpb:1.8000 train_time:180154ms step_avg:469.15ms +stopping_early: wallclock_cap train_time:180154ms step:384/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.log new file mode 100644 index 000000000..4af0599ee --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.log @@ -0,0 +1,98 @@ +logs/leadercore10l_screen_base.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:510ms step_avg:509.72ms +step:2/20000 train_loss:23.4389 train_time:997ms step_avg:498.31ms +step:3/20000 train_loss:20.8529 train_time:1554ms step_avg:518.05ms +step:4/20000 train_loss:17.6746 train_time:2002ms step_avg:500.62ms +step:5/20000 train_loss:14.6945 train_time:2501ms step_avg:500.28ms +step:6/20000 train_loss:11.8918 train_time:3080ms step_avg:513.34ms +step:7/20000 train_loss:9.6789 train_time:3677ms step_avg:525.23ms +step:8/20000 train_loss:8.2658 train_time:4289ms step_avg:536.13ms +step:9/20000 train_loss:7.2451 train_time:4910ms step_avg:545.58ms +step:10/20000 train_loss:6.6220 train_time:5473ms step_avg:547.26ms +step:25/20000 train_loss:5.9419 train_time:12592ms step_avg:503.69ms +step:50/20000 train_loss:5.2297 train_time:24356ms step_avg:487.11ms +step:75/20000 train_loss:4.6892 train_time:35861ms step_avg:478.14ms +step:100/20000 train_loss:4.3444 train_time:47066ms step_avg:470.66ms +step:125/20000 train_loss:4.1833 train_time:58451ms step_avg:467.61ms +step:150/20000 train_loss:4.0123 train_time:70170ms step_avg:467.80ms +step:175/20000 train_loss:3.7108 train_time:81999ms step_avg:468.57ms +step:200/20000 train_loss:3.4993 train_time:94374ms step_avg:471.87ms +step:225/20000 train_loss:3.4207 train_time:105990ms step_avg:471.06ms +step:250/20000 train_loss:3.3039 train_time:117665ms step_avg:470.66ms +step:275/20000 train_loss:3.1833 train_time:129976ms step_avg:472.64ms +step:300/20000 train_loss:3.1110 train_time:141973ms step_avg:473.24ms +step:325/20000 train_loss:3.0967 train_time:154110ms step_avg:474.18ms +step:350/20000 train_loss:3.0704 train_time:165360ms step_avg:472.46ms +step:375/20000 train_loss:3.0924 train_time:177075ms step_avg:472.20ms +step:382/20000 val_loss:3.0350 val_bpb:1.7975 train_time:180550ms step_avg:472.64ms +stopping_early: wallclock_cap train_time:180550ms step:382/20000 +peak memory allocated: 11395 MiB reserved: 11892 MiB +Serialized model: 74573987 bytes +Code size: 53685 bytes +Total submission size: 74627672 bytes +Serialized model int8+zlib: 9266911 bytes (payload:19553600 raw_torch:19603451 payload_ratio:3.81x) +Total submission size int8+zlib: 9320596 bytes +final_eval_mode:non_overlapping_validity_safe +temp_search: temp=0.85 val_bpb=1.8360 +temp_search: temp=0.90 val_bpb=1.8360 +W0320 16:29:20.891000 1631 torch/distributed/elastic/agent/server/api.py:725] Received 15 death signal, shutting down workers +W0320 16:29:20.895000 1631 torch/distributed/elastic/multiprocessing/api.py:908] Sending process 1705 closing signal SIGTERM +Traceback (most recent call last): + File "", line 198, in _run_module_as_main + File "", line 88, in _run_code + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 940, in + main() + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 357, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 936, in main + run(args) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 927, in run + elastic_launch( + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 156, in __call__ + return launch_agent(self._config, self._entrypoint, list(args)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 284, in launch_agent + result = agent.run() + ^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 138, in wrapper + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 717, in run + result = self._invoke_run(role) + ^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 881, in _invoke_run + time.sleep(monitor_interval) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 85, in _terminate_process_handler + raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval) +torch.distributed.elastic.multiprocessing.api.SignalException: Process 1631 got signal: 15 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.pid new file mode 100644 index 000000000..10084337e --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_base/train.pid @@ -0,0 +1 @@ +1631 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.log new file mode 100644 index 000000000..b5cf65202 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.log @@ -0,0 +1,60 @@ +logs/leadercore10l_screen_embedlr08.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.08 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:565ms step_avg:565.10ms +step:2/20000 train_loss:22.3522 train_time:1056ms step_avg:527.89ms +step:3/20000 train_loss:20.4461 train_time:1586ms step_avg:528.53ms +step:4/20000 train_loss:17.8954 train_time:2159ms step_avg:539.70ms +step:5/20000 train_loss:15.3519 train_time:2747ms step_avg:549.34ms +step:6/20000 train_loss:12.9001 train_time:3280ms step_avg:546.72ms +step:7/20000 train_loss:10.8176 train_time:3791ms step_avg:541.54ms +step:8/20000 train_loss:9.2704 train_time:4281ms step_avg:535.14ms +step:9/20000 train_loss:8.0255 train_time:4776ms step_avg:530.69ms +step:10/20000 train_loss:7.1500 train_time:5359ms step_avg:535.89ms +step:25/20000 train_loss:5.8306 train_time:12584ms step_avg:503.36ms +step:50/20000 train_loss:5.2623 train_time:24283ms step_avg:485.66ms +step:75/20000 train_loss:4.7269 train_time:36251ms step_avg:483.35ms +step:100/20000 train_loss:4.3589 train_time:47980ms step_avg:479.80ms +step:125/20000 train_loss:4.1810 train_time:58981ms step_avg:471.85ms +step:150/20000 train_loss:3.9782 train_time:70683ms step_avg:471.22ms +step:175/20000 train_loss:3.6893 train_time:82947ms step_avg:473.98ms +step:200/20000 train_loss:3.4928 train_time:94881ms step_avg:474.41ms +step:225/20000 train_loss:3.4269 train_time:106567ms step_avg:473.63ms +step:250/20000 train_loss:3.3102 train_time:117656ms step_avg:470.62ms +step:275/20000 train_loss:3.1939 train_time:129244ms step_avg:469.98ms +step:300/20000 train_loss:3.1182 train_time:141179ms step_avg:470.60ms +step:325/20000 train_loss:3.1049 train_time:153087ms step_avg:471.04ms +step:350/20000 train_loss:3.0768 train_time:165041ms step_avg:471.55ms +step:375/20000 train_loss:3.1011 train_time:175986ms step_avg:469.30ms +step:384/20000 val_loss:3.0392 val_bpb:1.8000 train_time:180154ms step_avg:469.15ms +stopping_early: wallclock_cap train_time:180154ms step:384/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.pid new file mode 100644 index 000000000..5c0ea13e5 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_embedlr08/train.pid @@ -0,0 +1 @@ +15118 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.log new file mode 100644 index 000000000..9153b94e1 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.log @@ -0,0 +1,60 @@ +logs/leadercore10l_screen_gradclip03.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:551ms step_avg:551.40ms +step:2/20000 train_loss:23.4402 train_time:1023ms step_avg:511.35ms +step:3/20000 train_loss:22.0008 train_time:1514ms step_avg:504.56ms +step:4/20000 train_loss:19.8250 train_time:2035ms step_avg:508.66ms +step:5/20000 train_loss:17.5589 train_time:2536ms step_avg:507.27ms +step:6/20000 train_loss:15.1621 train_time:3112ms step_avg:518.74ms +step:7/20000 train_loss:13.0563 train_time:3711ms step_avg:530.20ms +step:8/20000 train_loss:11.4333 train_time:4188ms step_avg:523.48ms +step:9/20000 train_loss:10.0109 train_time:4628ms step_avg:514.27ms +step:10/20000 train_loss:8.8367 train_time:5150ms step_avg:514.96ms +step:25/20000 train_loss:5.5308 train_time:12728ms step_avg:509.10ms +step:50/20000 train_loss:4.8507 train_time:24929ms step_avg:498.58ms +step:75/20000 train_loss:4.4544 train_time:36779ms step_avg:490.39ms +step:100/20000 train_loss:4.2221 train_time:47802ms step_avg:478.02ms +step:125/20000 train_loss:4.0530 train_time:60098ms step_avg:480.78ms +step:150/20000 train_loss:3.8084 train_time:72103ms step_avg:480.69ms +step:175/20000 train_loss:3.5278 train_time:84408ms step_avg:482.33ms +step:200/20000 train_loss:3.3552 train_time:96432ms step_avg:482.16ms +step:225/20000 train_loss:3.3047 train_time:107716ms step_avg:478.74ms +step:250/20000 train_loss:3.1962 train_time:119689ms step_avg:478.76ms +step:275/20000 train_loss:3.0782 train_time:131488ms step_avg:478.14ms +step:300/20000 train_loss:3.0115 train_time:143484ms step_avg:478.28ms +step:325/20000 train_loss:3.0014 train_time:155797ms step_avg:479.38ms +step:350/20000 train_loss:2.9793 train_time:166989ms step_avg:477.11ms +step:375/20000 train_loss:3.0041 train_time:179102ms step_avg:477.61ms +step:377/20000 val_loss:2.9488 val_bpb:1.7464 train_time:180136ms step_avg:477.81ms +stopping_early: wallclock_cap train_time:180136ms step:377/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.pid new file mode 100644 index 000000000..369e48dc1 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_gradclip03/train.pid @@ -0,0 +1 @@ +11151 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.log new file mode 100644 index 000000000..db5d7103d --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.log @@ -0,0 +1,60 @@ +logs/leadercore10l_screen_matrixlr006.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.06 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:557ms step_avg:556.62ms +step:2/20000 train_loss:23.2934 train_time:1078ms step_avg:539.15ms +step:3/20000 train_loss:20.8584 train_time:1581ms step_avg:527.07ms +step:4/20000 train_loss:17.8342 train_time:2092ms step_avg:522.92ms +step:5/20000 train_loss:14.8052 train_time:2677ms step_avg:535.40ms +step:6/20000 train_loss:12.0006 train_time:3377ms step_avg:562.77ms +step:7/20000 train_loss:9.8180 train_time:3980ms step_avg:568.60ms +step:8/20000 train_loss:8.4361 train_time:4579ms step_avg:572.37ms +step:9/20000 train_loss:7.3967 train_time:5170ms step_avg:574.43ms +step:10/20000 train_loss:6.7316 train_time:5668ms step_avg:566.75ms +step:25/20000 train_loss:5.9085 train_time:12938ms step_avg:517.54ms +step:50/20000 train_loss:5.0580 train_time:24763ms step_avg:495.26ms +step:75/20000 train_loss:4.5001 train_time:37066ms step_avg:494.21ms +step:100/20000 train_loss:4.1957 train_time:48459ms step_avg:484.59ms +step:125/20000 train_loss:3.9334 train_time:60094ms step_avg:480.75ms +step:150/20000 train_loss:3.6464 train_time:71965ms step_avg:479.77ms +step:175/20000 train_loss:3.3970 train_time:83689ms step_avg:478.22ms +step:200/20000 train_loss:3.2289 train_time:95390ms step_avg:476.95ms +step:225/20000 train_loss:3.1594 train_time:106685ms step_avg:474.15ms +step:250/20000 train_loss:3.0588 train_time:117884ms step_avg:471.54ms +step:275/20000 train_loss:2.9408 train_time:130096ms step_avg:473.08ms +step:300/20000 train_loss:2.8829 train_time:141556ms step_avg:471.85ms +step:325/20000 train_loss:2.8828 train_time:153475ms step_avg:472.23ms +step:350/20000 train_loss:2.8588 train_time:165394ms step_avg:472.55ms +step:375/20000 train_loss:2.8798 train_time:176695ms step_avg:471.19ms +step:382/20000 val_loss:2.8284 val_bpb:1.6751 train_time:180132ms step_avg:471.55ms +stopping_early: wallclock_cap train_time:180132ms step:382/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.pid new file mode 100644 index 000000000..5c895d180 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_matrixlr006/train.pid @@ -0,0 +1 @@ +13156 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log new file mode 100644 index 000000000..2de0cdd65 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log @@ -0,0 +1,66 @@ +logs/leadercore10l_screen_muon099.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:492ms step_avg:491.81ms +step:2/20000 train_loss:23.4389 train_time:943ms step_avg:471.30ms +step:3/20000 train_loss:20.7538 train_time:1391ms step_avg:463.83ms +step:4/20000 train_loss:17.4015 train_time:1886ms step_avg:471.40ms +W0320 16:33:57.138000 10154 torch/distributed/elastic/agent/server/api.py:725] Received 15 death signal, shutting down workers +W0320 16:33:57.145000 10154 torch/distributed/elastic/multiprocessing/api.py:908] Sending process 10233 closing signal SIGTERM +Traceback (most recent call last): + File "", line 198, in _run_module_as_main + File "", line 88, in _run_code + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 940, in + main() + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 357, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 936, in main + run(args) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 927, in run + elastic_launch( + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 156, in __call__ + return launch_agent(self._config, self._entrypoint, list(args)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 284, in launch_agent + result = agent.run() + ^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 138, in wrapper + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 717, in run + result = self._invoke_run(role) + ^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 881, in _invoke_run + time.sleep(monitor_interval) + File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 85, in _terminate_process_handler + raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval) +torch.distributed.elastic.multiprocessing.api.SignalException: Process 10154 got signal: 15 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid new file mode 100644 index 000000000..c82e8c6d5 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid @@ -0,0 +1 @@ +10154 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.log new file mode 100644 index 000000000..cc3c88ef1 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.log @@ -0,0 +1,58 @@ +logs/leadercore10l_screen_warmdown800.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.04 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:576ms step_avg:575.58ms +step:2/20000 train_loss:23.4389 train_time:1182ms step_avg:591.01ms +step:3/20000 train_loss:16.3040 train_time:1856ms step_avg:618.65ms +step:4/20000 train_loss:10.3673 train_time:2431ms step_avg:607.69ms +step:5/20000 train_loss:7.3563 train_time:2950ms step_avg:589.98ms +step:6/20000 train_loss:6.3345 train_time:3483ms step_avg:580.54ms +step:7/20000 train_loss:5.9729 train_time:4085ms step_avg:583.56ms +step:8/20000 train_loss:6.0850 train_time:4720ms step_avg:590.04ms +step:9/20000 train_loss:6.1977 train_time:5260ms step_avg:584.43ms +step:10/20000 train_loss:6.2945 train_time:5867ms step_avg:586.67ms +step:25/20000 train_loss:5.7394 train_time:13972ms step_avg:558.89ms +step:50/20000 train_loss:4.5933 train_time:26490ms step_avg:529.80ms +step:75/20000 train_loss:4.1527 train_time:39698ms step_avg:529.31ms +step:100/20000 train_loss:3.6883 train_time:52964ms step_avg:529.64ms +step:125/20000 train_loss:3.4315 train_time:66696ms step_avg:533.57ms +step:150/20000 train_loss:3.2955 train_time:79660ms step_avg:531.06ms +step:175/20000 train_loss:3.0852 train_time:92074ms step_avg:526.14ms +step:200/20000 train_loss:2.9517 train_time:105404ms step_avg:527.02ms +step:225/20000 train_loss:2.9200 train_time:118789ms step_avg:527.95ms +step:250/20000 train_loss:2.8466 train_time:131352ms step_avg:525.41ms +step:275/20000 train_loss:2.7482 train_time:143991ms step_avg:523.60ms +step:300/20000 train_loss:2.7056 train_time:157070ms step_avg:523.57ms +step:325/20000 train_loss:2.7185 train_time:170370ms step_avg:524.22ms +step:344/20000 val_loss:2.6989 val_bpb:1.5984 train_time:180091ms step_avg:523.52ms +stopping_early: wallclock_cap train_time:180091ms step:344/20000 +peak memory allocated: 11398 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.pid new file mode 100644 index 000000000..f78a334bb --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800/train.pid @@ -0,0 +1 @@ +8063 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py new file mode 100644 index 000000000..9b1239e9d --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/train_gpt.py @@ -0,0 +1,1256 @@ +""" +The `train_gpt.py` and `train_gpt_mlx.py` scripts are intended as good launching-off points for new participants, not SOTA configs. We'll accept PRs that tune, improve, or simplify these scripts without significantly increasing complexity, but competitive submissions should stay in the `/records` folder. + +Hard stop: `train_gpt.py` and `train_gpt_mlx.py` must never be longer than 1500 lines. +""" + +from __future__ import annotations + +import copy +import glob +import io +import math +import os +import random +import subprocess +import sys +import time +import uuid +import zlib +from pathlib import Path + +import numpy as np +import sentencepiece as spm +import torch +import torch.distributed as dist +import torch.nn.functional as F +from torch import Tensor, nn +from torch.nn.parallel import DistributedDataParallel as DDP + +# ----------------------------- +# HYPERPARAMETERS +# ----------------------------- +# Default Simple Baseline run: +# - 9 transformer blocks at width 512 +# - 8 attention heads with 4 KV heads (GQA) and 2x MLP expansion +# - vocab size 1024, sequence length 1024, tied embeddings +# - 524,288 train tokens per step for 20,000 iterations with a ~10 minute cap + +class Hyperparameters: + # Data paths are shard globs produced by the existing preprocessing pipeline. + data_path = os.environ.get("DATA_PATH", "./data/datasets/fineweb10B_sp1024") + train_files = os.path.join(data_path, "fineweb_train_*.bin") + val_files = os.path.join(data_path, "fineweb_val_*.bin") + tokenizer_path = os.environ.get("TOKENIZER_PATH", "./data/tokenizers/fineweb_1024_bpe.model") + run_id = os.environ.get("RUN_ID", str(uuid.uuid4())) + seed = int(os.environ.get("SEED", 1337)) + + # Validation cadence and batch size. Validation always uses the full fineweb_val split. + val_batch_size = int(os.environ.get("VAL_BATCH_SIZE", 524_288)) + val_loss_every = int(os.environ.get("VAL_LOSS_EVERY", 1000)) + train_log_every = int(os.environ.get("TRAIN_LOG_EVERY", 200)) + + # Training length. + iterations = int(os.environ.get("ITERATIONS", 20000)) + warmdown_iters = int(os.environ.get("WARMDOWN_ITERS", 2500)) + warmup_steps = int(os.environ.get("WARMUP_STEPS", 20)) + train_batch_tokens = int(os.environ.get("TRAIN_BATCH_TOKENS", 524_288)) + train_seq_len = int(os.environ.get("TRAIN_SEQ_LEN", 1024)) + max_wallclock_seconds = float(os.environ.get("MAX_WALLCLOCK_SECONDS", 600.0)) + qk_gain_init = float(os.environ.get("QK_GAIN_INIT", 1.5)) + + # Model shape. + vocab_size = int(os.environ.get("VOCAB_SIZE", 1024)) + num_layers = int(os.environ.get("NUM_LAYERS", 10)) + num_kv_heads = int(os.environ.get("NUM_KV_HEADS", 4)) + model_dim = int(os.environ.get("MODEL_DIM", 512)) + num_heads = int(os.environ.get("NUM_HEADS", 8)) + mlp_mult = int(os.environ.get("MLP_MULT", 2)) + tie_embeddings = bool(int(os.environ.get("TIE_EMBEDDINGS", "1"))) + rope_base = float(os.environ.get("ROPE_BASE", 10000.0)) + logit_softcap = float(os.environ.get("LOGIT_SOFTCAP", 30.0)) + + # Optimizer hyperparameters. + embed_lr = float(os.environ.get("EMBED_LR", 0.6)) + head_lr = float(os.environ.get("HEAD_LR", 0.008)) + tied_embed_lr = float(os.environ.get("TIED_EMBED_LR", 0.10)) + tied_embed_init_std = float(os.environ.get("TIED_EMBED_INIT_STD", 0.005)) + matrix_lr = float(os.environ.get("MATRIX_LR", 0.04)) + scalar_lr = float(os.environ.get("SCALAR_LR", 0.04)) + muon_momentum = float(os.environ.get("MUON_MOMENTUM", 0.95)) + muon_backend_steps = int(os.environ.get("MUON_BACKEND_STEPS", 5)) + muon_momentum_warmup_start = float(os.environ.get("MUON_MOMENTUM_WARMUP_START", 0.85)) + muon_momentum_warmup_steps = int(os.environ.get("MUON_MOMENTUM_WARMUP_STEPS", 500)) + beta1 = float(os.environ.get("BETA1", 0.9)) + beta2 = float(os.environ.get("BETA2", 0.95)) + adam_eps = float(os.environ.get("ADAM_EPS", 1e-8)) + grad_clip_norm = float(os.environ.get("GRAD_CLIP_NORM", 0.0)) + +# ----------------------------- +# MUON OPTIMIZER +# ----------------------------- +# +# As borrowed from modded-nanogpt +# Background on Muon: https://kellerjordan.github.io/posts/muon/ + +def zeropower_via_newtonschulz5(G: Tensor, steps: int = 10, eps: float = 1e-7) -> Tensor: + # Orthogonalize a 2D update matrix with a fast Newton-Schulz iteration. + # Muon uses this to normalize matrix-shaped gradients before applying them. + a, b, c = (3.4445, -4.7750, 2.0315) + X = G.bfloat16() + X /= X.norm() + eps + transposed = G.size(0) > G.size(1) + if transposed: + X = X.T + for _ in range(steps): + A = X @ X.T + B = b * A + c * A @ A + X = a * X + B @ X + return X.T if transposed else X + + +class Muon(torch.optim.Optimizer): + def __init__(self, params, lr: float, momentum: float, backend_steps: int, nesterov: bool = True): + super().__init__( + params, + dict(lr=lr, momentum=momentum, backend_steps=backend_steps, nesterov=nesterov), + ) + + @torch.no_grad() + def step(self, closure=None): + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + distributed = dist.is_available() and dist.is_initialized() + world_size = dist.get_world_size() if distributed else 1 + rank = dist.get_rank() if distributed else 0 + + for group in self.param_groups: + params = group["params"] + if not params: + continue + lr = group["lr"] + momentum = group["momentum"] + backend_steps = group["backend_steps"] + nesterov = group["nesterov"] + + total_params = sum(int(p.numel()) for p in params) + updates_flat = torch.zeros(total_params, device=params[0].device, dtype=torch.bfloat16) + + curr = 0 + for i, p in enumerate(params): + if i % world_size == rank and p.grad is not None: + g = p.grad + state = self.state[p] + if "momentum_buffer" not in state: + state["momentum_buffer"] = torch.zeros_like(g) + buf = state["momentum_buffer"] + buf.mul_(momentum).add_(g) + if nesterov: + g = g.add(buf, alpha=momentum) + g = zeropower_via_newtonschulz5(g, steps=backend_steps) + # Scale correction from Muon reference implementations. + g *= max(1, g.size(0) / g.size(1)) ** 0.5 + updates_flat[curr : curr + p.numel()] = g.reshape(-1) + curr += p.numel() + + if distributed: + dist.all_reduce(updates_flat, op=dist.ReduceOp.SUM) + + curr = 0 + for p in params: + g = updates_flat[curr : curr + p.numel()].view_as(p).to(dtype=p.dtype) + p.add_(g, alpha=-lr) + curr += p.numel() + + return loss + + +# ----------------------------- +# TOKENIZER-AGNOSTIC EVALUATION SETUP +# ----------------------------- +# +# It's common for small models have a large fraction of their parameters be embeddings, since the 2 * d_model * d_vocab vectors can be gigantic. +# Instead of locking the tokenizer, we let you bring your own and calculate our validation metrics on the average compression of the validation set. +# We calculate BPB (bits-per-byte) instead of validation loss, so we need methods to count the number of bits per token in the tokenizer. +# Note: Submissions that edit the tokenizer will be examined more carefully, since screwing this up might unjustly improve your score. + +def build_sentencepiece_luts( + sp: spm.SentencePieceProcessor, vocab_size: int, device: torch.device +) -> tuple[Tensor, Tensor, Tensor]: + sp_vocab_size = int(sp.vocab_size()) + table_size = max(sp_vocab_size, vocab_size) + base_bytes_np = np.zeros((table_size,), dtype=np.int16) + has_leading_space_np = np.zeros((table_size,), dtype=np.bool_) + is_boundary_token_np = np.ones((table_size,), dtype=np.bool_) + for token_id in range(sp_vocab_size): + if sp.is_control(token_id) or sp.is_unknown(token_id) or sp.is_unused(token_id): + continue + is_boundary_token_np[token_id] = False + if sp.is_byte(token_id): + base_bytes_np[token_id] = 1 + continue + piece = sp.id_to_piece(token_id) + if piece.startswith("▁"): + has_leading_space_np[token_id] = True + piece = piece[1:] + base_bytes_np[token_id] = len(piece.encode("utf-8")) + return ( + torch.tensor(base_bytes_np, dtype=torch.int16, device=device), + torch.tensor(has_leading_space_np, dtype=torch.bool, device=device), + torch.tensor(is_boundary_token_np, dtype=torch.bool, device=device), + ) + + +def load_validation_tokens(pattern: str, seq_len: int) -> Tensor: + files = [Path(p) for p in sorted(glob.glob(pattern))] + if not files: + raise FileNotFoundError(f"No files found for pattern: {pattern}") + # The export pipeline writes the fixed first-50k-doc validation set to fineweb_val_*. + tokens = torch.cat([load_data_shard(file) for file in files]).contiguous() + usable = ((tokens.numel() - 1) // seq_len) * seq_len + if usable <= 0: + raise ValueError(f"Validation split is too short for TRAIN_SEQ_LEN={seq_len}") + return tokens[: usable + 1] + + +def eval_val( + args: Hyperparameters, + model: nn.Module, + rank: int, + world_size: int, + device: torch.device, + grad_accum_steps: int, + val_tokens: Tensor, + base_bytes_lut: Tensor, + has_leading_space_lut: Tensor, + is_boundary_token_lut: Tensor, + seq_len_override: int = 0, +) -> tuple[float, float]: + # Validation computes two metrics: + # - val_loss: token cross-entropy (natural log) + # - val_bpb: tokenizer-agnostic compression metric used by the challenge + seq_len = seq_len_override if seq_len_override > 0 else args.train_seq_len + local_batch_tokens = args.val_batch_size // (world_size * grad_accum_steps) + if local_batch_tokens < seq_len: + raise ValueError( + "VAL_BATCH_SIZE must provide at least one sequence per rank; " + f"got VAL_BATCH_SIZE={args.val_batch_size}, WORLD_SIZE={world_size}, " + f"GRAD_ACCUM_STEPS={grad_accum_steps}, seq_len={seq_len}" + ) + local_batch_seqs = local_batch_tokens // seq_len + total_seqs = (val_tokens.numel() - 1) // seq_len + seq_start = (total_seqs * rank) // world_size + seq_end = (total_seqs * (rank + 1)) // world_size + val_loss_sum = torch.zeros((), device=device, dtype=torch.float64) + val_token_count = torch.zeros((), device=device, dtype=torch.float64) + val_byte_count = torch.zeros((), device=device, dtype=torch.float64) + + model.eval() + with torch.inference_mode(): + for batch_seq_start in range(seq_start, seq_end, local_batch_seqs): + batch_seq_end = min(batch_seq_start + local_batch_seqs, seq_end) + raw_start = batch_seq_start * seq_len + raw_end = batch_seq_end * seq_len + 1 + local = val_tokens[raw_start:raw_end].to(device=device, dtype=torch.int64, non_blocking=True) + x = local[:-1].reshape(-1, seq_len) + y = local[1:].reshape(-1, seq_len) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + batch_loss = model(x, y).detach() + batch_token_count = float(y.numel()) + val_loss_sum += batch_loss.to(torch.float64) * batch_token_count + val_token_count += batch_token_count + prev_ids = x.reshape(-1) + tgt_ids = y.reshape(-1) + token_bytes = base_bytes_lut[tgt_ids].to(dtype=torch.int16) + token_bytes += (has_leading_space_lut[tgt_ids] & ~is_boundary_token_lut[prev_ids]).to(dtype=torch.int16) + val_byte_count += token_bytes.to(torch.float64).sum() + + if dist.is_available() and dist.is_initialized(): + dist.all_reduce(val_loss_sum, op=dist.ReduceOp.SUM) + dist.all_reduce(val_token_count, op=dist.ReduceOp.SUM) + dist.all_reduce(val_byte_count, op=dist.ReduceOp.SUM) + + val_loss = val_loss_sum / val_token_count + bits_per_token = val_loss.item() / math.log(2.0) + tokens_per_byte = val_token_count.item() / val_byte_count.item() + model.train() + return float(val_loss.item()), float(bits_per_token * tokens_per_byte) + +# ----------------------------- +# POST-TRAINING QUANTIZATION +# ----------------------------- +# +# It's silly to export our model, which is trained in bf16 and fp32, at that same precision. +# Instead, we get approximately the same model (with a small hit) by quantizing the model to int8 & zlib compressing. +# We can then decompress the model and run in higher precision for evaluation, after closing in under the size limit. + +CONTROL_TENSOR_NAME_PATTERNS = tuple( + pattern + for pattern in os.environ.get( + "CONTROL_TENSOR_NAME_PATTERNS", + "attn_scale,attn_scales,mlp_scale,mlp_scales,resid_mix,resid_mixes,q_gain,skip_weight,skip_weights", + ).split(",") + if pattern +) +INT8_KEEP_FLOAT_FP32_NAME_PATTERNS = tuple( + pattern + for pattern in os.environ.get( + "INT8_KEEP_FLOAT_FP32_NAME_PATTERNS", + ",".join(CONTROL_TENSOR_NAME_PATTERNS), + ).split(",") + if pattern +) +INT8_KEEP_FLOAT_MAX_NUMEL = 65_536 +INT8_KEEP_FLOAT_STORE_DTYPE = torch.float16 +INT8_PER_ROW_SCALE_DTYPE = torch.float16 +INT8_CLIP_PERCENTILE = 99.5 +INT8_CLIP_Q = INT8_CLIP_PERCENTILE / 100.0 +INT8_KEEP_TOK_EMB_FP16 = bool(int(os.environ.get("INT8_KEEP_TOK_EMB_FP16", "1"))) +PROXY_SKIP_EXPORT = bool(int(os.environ.get("PROXY_SKIP_EXPORT", "0"))) + +def tensor_nbytes(t: Tensor) -> int: + return int(t.numel()) * int(t.element_size()) + +def keep_float_tensor(name: str, t: Tensor, passthrough_orig_dtypes: dict[str, str]) -> Tensor: + if any(pattern in name for pattern in INT8_KEEP_FLOAT_FP32_NAME_PATTERNS): + return t.float().contiguous() + if t.dtype in {torch.float32, torch.bfloat16}: + passthrough_orig_dtypes[name] = str(t.dtype).removeprefix("torch.") + return t.to(dtype=INT8_KEEP_FLOAT_STORE_DTYPE).contiguous() + return t + +def _mse_optimal_int8_per_row(t32: Tensor) -> tuple[Tensor, Tensor]: + """Per-row MSE-optimal int8 quantization via two-pass coarse-to-fine search.""" + amax = t32.abs().amax(dim=1) + num_rows = t32.shape[0] + best_scale = (amax / 127.0).clamp_min(1.0 / 127.0) + best_mse = torch.full((num_rows,), float("inf")) + best_frac = torch.ones(num_rows) + + n_coarse = 61 + coarse_fracs = torch.linspace(0.30, 1.0, n_coarse) + for frac in coarse_fracs: + clip_abs = amax * float(frac) + scale_cand = (clip_abs / 127.0).clamp_min(1.0 / 127.0) + scale_cand = scale_cand.to(INT8_PER_ROW_SCALE_DTYPE).float() + clip_eff = scale_cand * 127.0 + clipped = t32.clamp(-clip_eff[:, None], clip_eff[:, None]) + q_f = (clipped / scale_cand[:, None]).round().clamp(-127, 127) + mse = (t32 - q_f * scale_cand[:, None]).square().mean(dim=1) + better = mse < best_mse + best_mse = torch.where(better, mse, best_mse) + best_scale = torch.where(better, scale_cand, best_scale) + best_frac = torch.where(better, torch.full_like(best_frac, float(frac)), best_frac) + + coarse_step = 0.70 / (n_coarse - 1) + n_fine = 61 + fine_offsets = torch.linspace(-coarse_step, coarse_step, n_fine) + for offset in fine_offsets: + frac_per_row = (best_frac + float(offset)).clamp(0.10, 1.0) + clip_abs = amax * frac_per_row + scale_cand = (clip_abs / 127.0).clamp_min(1.0 / 127.0) + scale_cand = scale_cand.to(INT8_PER_ROW_SCALE_DTYPE).float() + clip_eff = scale_cand * 127.0 + clipped = t32.clamp(-clip_eff[:, None], clip_eff[:, None]) + q_f = (clipped / scale_cand[:, None]).round().clamp(-127, 127) + mse = (t32 - q_f * scale_cand[:, None]).square().mean(dim=1) + better = mse < best_mse + best_mse = torch.where(better, mse, best_mse) + best_scale = torch.where(better, scale_cand, best_scale) + + clip_best = best_scale * 127.0 + clipped = t32.clamp(-clip_best[:, None], clip_best[:, None]) + q = (clipped / best_scale[:, None]).round().clamp(-127, 127).to(torch.int8).contiguous() + return q, best_scale.to(dtype=INT8_PER_ROW_SCALE_DTYPE).contiguous() + +def quantize_float_tensor(t: Tensor) -> tuple[Tensor, Tensor, bool]: + t32 = t.float() + if t32.ndim == 2: + if not t32.numel(): + return ( + torch.empty_like(t32, dtype=torch.int8).contiguous(), + torch.empty((t32.shape[0],), dtype=INT8_PER_ROW_SCALE_DTYPE).contiguous(), + False, + ) + q_row, s_row = _mse_optimal_int8_per_row(t32) + q_col, s_col = _mse_optimal_int8_per_row(t32.T.contiguous()) + deq_row = q_row.float() * s_row.float()[:, None] + deq_col_t = q_col.float() * s_col.float()[:, None] + mse_row = (t32 - deq_row).square().mean().item() + mse_col = (t32.T.contiguous() - deq_col_t).square().mean().item() + if mse_col < mse_row: + return q_col, s_col, True + return q_row, s_row, False + + # Vectors / scalars use a simpler per-tensor scale. + clip_abs = float(torch.quantile(t32.abs().flatten(), INT8_CLIP_Q).item()) if t32.numel() else 0.0 + scale = torch.tensor(clip_abs / 127.0 if clip_abs > 0 else 1.0, dtype=torch.float32) + q = torch.clamp(torch.round(torch.clamp(t32, -clip_abs, clip_abs) / scale), -127, 127).to(torch.int8).contiguous() + return q, scale, False + +def quantize_state_dict_int8(state_dict: dict[str, Tensor]): + # Single supported clean-script export format: + # - per-row int8 for 2D float tensors + # - per-tensor int8 for other float tensors + # - exact passthrough for non-floats + # - passthrough for small float tensors, stored as fp16 to save bytes + quantized: dict[str, Tensor] = {} + scales: dict[str, Tensor] = {} + dtypes: dict[str, str] = {} + passthrough: dict[str, Tensor] = {} + passthrough_orig_dtypes: dict[str, str] = {} + qmeta: dict[str, dict[str, object]] = {} + stats = dict.fromkeys( + ("param_count", "num_tensors", "num_float_tensors", "num_nonfloat_tensors", "baseline_tensor_bytes", "int8_payload_bytes"), + 0, + ) + + for name, tensor in state_dict.items(): + t = tensor.detach().to("cpu").contiguous() + stats["param_count"] += int(t.numel()) + stats["num_tensors"] += 1 + stats["baseline_tensor_bytes"] += tensor_nbytes(t) + + if not t.is_floating_point(): + stats["num_nonfloat_tensors"] += 1 + passthrough[name] = t + stats["int8_payload_bytes"] += tensor_nbytes(t) + continue + + # The tied embedding serves both input and output paths, so keeping it in fp16 + # can improve BPB at the cost of some extra bytes. + if INT8_KEEP_TOK_EMB_FP16 and "tok_emb" in name: + kept = t.to(dtype=torch.float16).contiguous() + passthrough[name] = kept + passthrough_orig_dtypes[name] = str(t.dtype).removeprefix("torch.") + stats["int8_payload_bytes"] += tensor_nbytes(kept) + continue + + # Small float tensors are cheap enough to keep directly. We still downcast + # fp32/bf16 passthrough tensors to fp16 so metadata does not dominate size. + if t.numel() <= INT8_KEEP_FLOAT_MAX_NUMEL: + kept = keep_float_tensor(name, t, passthrough_orig_dtypes) + passthrough[name] = kept + stats["int8_payload_bytes"] += tensor_nbytes(kept) + continue + + stats["num_float_tensors"] += 1 + q, s, transposed = quantize_float_tensor(t) + if s.ndim > 0: + meta = {"scheme": "per_row", "axis": 0} + if transposed: + meta["transposed"] = True + qmeta[name] = meta + quantized[name] = q + scales[name] = s + dtypes[name] = str(t.dtype).removeprefix("torch.") + stats["int8_payload_bytes"] += tensor_nbytes(q) + tensor_nbytes(s) + + obj: dict[str, object] = { + "__quant_format__": "int8_clean_per_row_v1", + "quantized": quantized, + "scales": scales, + "dtypes": dtypes, + "passthrough": passthrough, + } + if qmeta: + obj["qmeta"] = qmeta + if passthrough_orig_dtypes: + obj["passthrough_orig_dtypes"] = passthrough_orig_dtypes + return obj, stats + +def dequantize_state_dict_int8(obj: dict[str, object]) -> dict[str, Tensor]: + out: dict[str, Tensor] = {} + qmeta = obj.get("qmeta", {}) + passthrough_orig_dtypes = obj.get("passthrough_orig_dtypes", {}) + for name, q in obj["quantized"].items(): + dtype = getattr(torch, obj["dtypes"][name]) + s = obj["scales"][name] + if qmeta.get(name, {}).get("scheme") == "per_row" or s.ndim > 0: + s = s.to(dtype=torch.float32) + # Broadcast the saved row scale back across trailing dimensions. + deq = (q.float() * s.view(q.shape[0], *([1] * (q.ndim - 1)))).to(dtype=dtype) + if qmeta.get(name, {}).get("transposed"): + deq = deq.T + out[name] = deq.contiguous() + else: + scale = float(s.item()) + out[name] = (q.float() * scale).to(dtype=dtype).contiguous() + for name, t in obj["passthrough"].items(): + # Restore small tensors, undoing the temporary fp16 storage cast if needed. + out_t = t.detach().to("cpu").contiguous() + orig_dtype = passthrough_orig_dtypes.get(name) + if isinstance(orig_dtype, str): + out_t = out_t.to(dtype=getattr(torch, orig_dtype)).contiguous() + out[name] = out_t + return out + + +# ----------------------------- +# DATA LOADING +# ----------------------------- + +def load_data_shard(file: Path) -> Tensor: + header_bytes = 256 * np.dtype(" None: + self.file_idx = (self.file_idx + 1) % len(self.files) + self.tokens = load_data_shard(self.files[self.file_idx]) + self.pos = 0 + + def take(self, n: int) -> Tensor: + chunks: list[Tensor] = [] + remaining = n + while remaining > 0: + avail = self.tokens.numel() - self.pos + if avail <= 0: + self._advance_file() + continue + k = min(remaining, avail) + chunks.append(self.tokens[self.pos : self.pos + k]) + self.pos += k + remaining -= k + return chunks[0] if len(chunks) == 1 else torch.cat(chunks) + + +class DistributedTokenLoader: + # Each call consumes a contiguous chunk from the shared token stream, then slices out + # one disjoint span per rank. The extra "+1" token lets us build (x, y) by shifting. + def __init__(self, pattern: str, rank: int, world_size: int, device: torch.device): + self.rank = rank + self.world_size = world_size + self.device = device + self.stream = TokenStream(pattern) + + def next_batch(self, global_tokens: int, seq_len: int, grad_accum_steps: int) -> tuple[Tensor, Tensor]: + local_tokens = global_tokens // (self.world_size * grad_accum_steps) + per_rank_span = local_tokens + 1 + chunk = self.stream.take(per_rank_span * self.world_size) + start = self.rank * per_rank_span + local = chunk[start : start + per_rank_span].to(dtype=torch.int64) + x = local[:-1].reshape(-1, seq_len) + y = local[1:].reshape(-1, seq_len) + return x.to(self.device, non_blocking=True), y.to(self.device, non_blocking=True) + +# ----------------------------- +# TRANSFORMER MODULES +# ----------------------------- + +class RMSNorm(nn.Module): + def __init__(self, eps: float | None = None): + super().__init__() + self.eps = eps + + def forward(self, x: Tensor) -> Tensor: + return F.rms_norm(x, (x.size(-1),), eps=self.eps) + + +class CastedLinear(nn.Linear): + # Keep weights in fp32 for optimizer/state quality, cast at matmul time for bf16 compute. + def forward(self, x: Tensor) -> Tensor: + bias = self.bias.to(x.dtype) if self.bias is not None else None + return F.linear(x, self.weight.to(x.dtype), bias) + + +def restore_low_dim_params_to_fp32(module: nn.Module) -> None: + # Keep small/control parameters in fp32 even when the model body runs in bf16. + with torch.no_grad(): + for name, param in module.named_parameters(): + if (param.ndim < 2 or any(pattern in name for pattern in CONTROL_TENSOR_NAME_PATTERNS)) and param.dtype != torch.float32: + param.data = param.data.float() + + +class Rotary(nn.Module): + # Caches cos/sin tables per sequence length on the current device. + def __init__(self, dim: int, base: float = 10000.0): + super().__init__() + inv_freq = 1.0 / (base ** (torch.arange(0, dim, 2, dtype=torch.float32) / dim)) + self.register_buffer("inv_freq", inv_freq, persistent=False) + self._seq_len_cached = 0 + self._cos_cached: Tensor | None = None + self._sin_cached: Tensor | None = None + + def forward(self, seq_len: int, device: torch.device, dtype: torch.dtype) -> tuple[Tensor, Tensor]: + if ( + self._cos_cached is None + or self._sin_cached is None + or self._seq_len_cached != seq_len + or self._cos_cached.device != device + ): + t = torch.arange(seq_len, device=device, dtype=self.inv_freq.dtype) + freqs = torch.outer(t, self.inv_freq.to(device)) + self._cos_cached = freqs.cos()[None, None, :, :] + self._sin_cached = freqs.sin()[None, None, :, :] + self._seq_len_cached = seq_len + return self._cos_cached.to(dtype=dtype), self._sin_cached.to(dtype=dtype) + + +def apply_rotary_emb(x: Tensor, cos: Tensor, sin: Tensor) -> Tensor: + half = x.size(-1) // 2 + x1, x2 = x[..., :half], x[..., half:] + return torch.cat((x1 * cos + x2 * sin, x1 * (-sin) + x2 * cos), dim=-1) + + +class CausalSelfAttention(nn.Module): + def __init__( + self, + dim: int, + num_heads: int, + num_kv_heads: int, + rope_base: float, + qk_gain_init: float, + ): + super().__init__() + if dim % num_heads != 0: + raise ValueError("model_dim must be divisible by num_heads") + if num_heads % num_kv_heads != 0: + raise ValueError("num_heads must be divisible by num_kv_heads") + self.num_heads = num_heads + self.num_kv_heads = num_kv_heads + self.head_dim = dim // num_heads + if self.head_dim % 2 != 0: + raise ValueError("head_dim must be even for RoPE") + kv_dim = self.num_kv_heads * self.head_dim + self.c_q = CastedLinear(dim, dim, bias=False) + self.c_k = CastedLinear(dim, kv_dim, bias=False) + self.c_v = CastedLinear(dim, kv_dim, bias=False) + self.proj = CastedLinear(dim, dim, bias=False) + self.proj._zero_init = True + self.q_gain = nn.Parameter(torch.full((num_heads,), qk_gain_init, dtype=torch.float32)) + self.rotary = Rotary(self.head_dim, base=rope_base) + + def forward(self, x: Tensor) -> Tensor: + bsz, seqlen, dim = x.shape + q = self.c_q(x).reshape(bsz, seqlen, self.num_heads, self.head_dim).transpose(1, 2) + k = self.c_k(x).reshape(bsz, seqlen, self.num_kv_heads, self.head_dim).transpose(1, 2) + v = self.c_v(x).reshape(bsz, seqlen, self.num_kv_heads, self.head_dim).transpose(1, 2) + q = F.rms_norm(q, (q.size(-1),)) + k = F.rms_norm(k, (k.size(-1),)) + cos, sin = self.rotary(seqlen, x.device, q.dtype) + q = apply_rotary_emb(q, cos, sin) + k = apply_rotary_emb(k, cos, sin) + q = q * self.q_gain.to(dtype=q.dtype)[None, :, None, None] + y = F.scaled_dot_product_attention( + q, + k, + v, + attn_mask=None, + is_causal=True, + enable_gqa=(self.num_kv_heads != self.num_heads), + ) + y = y.transpose(1, 2).contiguous().reshape(bsz, seqlen, dim) + return self.proj(y) + + +class MLP(nn.Module): + # relu^2 MLP from the original modded-nanogpt setup + def __init__(self, dim: int, mlp_mult: int): + super().__init__() + hidden = mlp_mult * dim + self.fc = CastedLinear(dim, hidden, bias=False) + self.proj = CastedLinear(hidden, dim, bias=False) + self.proj._zero_init = True + + def forward(self, x: Tensor) -> Tensor: + x = torch.relu(self.fc(x)) + return self.proj(x.square()) + + +class Block(nn.Module): + def __init__( + self, + dim: int, + num_heads: int, + num_kv_heads: int, + mlp_mult: int, + rope_base: float, + qk_gain_init: float, + ): + super().__init__() + self.attn_norm = RMSNorm() + self.mlp_norm = RMSNorm() + self.attn = CausalSelfAttention(dim, num_heads, num_kv_heads, rope_base, qk_gain_init) + self.mlp = MLP(dim, mlp_mult) + self.attn_scale = nn.Parameter(torch.ones(dim, dtype=torch.float32)) + self.mlp_scale = nn.Parameter(torch.ones(dim, dtype=torch.float32)) + self.resid_mix = nn.Parameter(torch.stack((torch.ones(dim), torch.zeros(dim))).float()) + + def forward(self, x: Tensor, x0: Tensor) -> Tensor: + mix = self.resid_mix.to(dtype=x.dtype) + x = mix[0][None, None, :] * x + mix[1][None, None, :] * x0 + attn_out = self.attn(self.attn_norm(x)) + x = x + self.attn_scale.to(dtype=x.dtype)[None, None, :] * attn_out + x = x + self.mlp_scale.to(dtype=x.dtype)[None, None, :] * self.mlp(self.mlp_norm(x)) + return x + + +class GPT(nn.Module): + def __init__( + self, + vocab_size: int, + num_layers: int, + model_dim: int, + num_heads: int, + num_kv_heads: int, + mlp_mult: int, + tie_embeddings: bool, + tied_embed_init_std: float, + logit_softcap: float, + rope_base: float, + qk_gain_init: float, + ): + super().__init__() + if logit_softcap <= 0.0: + raise ValueError(f"logit_softcap must be positive, got {logit_softcap}") + self.tie_embeddings = tie_embeddings + self.tied_embed_init_std = tied_embed_init_std + self.logit_softcap = logit_softcap + self.tok_emb = nn.Embedding(vocab_size, model_dim) + self.num_encoder_layers = num_layers // 2 + self.num_decoder_layers = num_layers - self.num_encoder_layers + self.num_skip_weights = min(self.num_encoder_layers, self.num_decoder_layers) + self.skip_weights = nn.Parameter(torch.ones(self.num_skip_weights, model_dim, dtype=torch.float32)) + self.blocks = nn.ModuleList( + [ + Block( + model_dim, + num_heads, + num_kv_heads, + mlp_mult, + rope_base, + qk_gain_init, + ) + for i in range(num_layers) + ] + ) + self.final_norm = RMSNorm() + self.lm_head = None if tie_embeddings else CastedLinear(model_dim, vocab_size, bias=False) + if self.lm_head is not None: + self.lm_head._zero_init = True + self.register_buffer('eval_temperature', torch.tensor(1.0), persistent=False) + self._init_weights() + + def _init_weights(self) -> None: + if self.tie_embeddings: + nn.init.normal_(self.tok_emb.weight, mean=0.0, std=self.tied_embed_init_std) + # Overtone init: shape embedding spectrum to power-law decay (like guitar harmonics) + with torch.no_grad(): + U, S, V = torch.linalg.svd(self.tok_emb.weight.data, full_matrices=False) + target_S = S[0] * (1.0 / torch.arange(1, S.shape[0] + 1, dtype=S.dtype)) ** 0.5 + self.tok_emb.weight.data = (U * target_S[None, :]) @ V + for module in self.modules(): + if isinstance(module, nn.Linear) and getattr(module, "_zero_init", False): + nn.init.zeros_(module.weight) + # Phase-transition resid_mix: early layers trust x0 more, late layers trust residual + num_layers = len(self.blocks) + for i, block in enumerate(self.blocks): + with torch.no_grad(): + phase = torch.sigmoid(torch.tensor(3.0 * (i / max(num_layers - 1, 1) - 0.5))) + block.resid_mix.data[0] = phase * torch.ones(block.resid_mix.shape[1]) + block.resid_mix.data[1] = (1 - phase) * torch.ones(block.resid_mix.shape[1]) + + def forward(self, input_ids: Tensor, target_ids: Tensor) -> Tensor: + x = self.tok_emb(input_ids) + x = F.rms_norm(x, (x.size(-1),)) + x0 = x + skips: list[Tensor] = [] + + # First half stores skips; second half reuses them in reverse order. + for i in range(self.num_encoder_layers): + x = self.blocks[i](x, x0) + skips.append(x) + for i in range(self.num_decoder_layers): + if skips: + x = x + self.skip_weights[i].to(dtype=x.dtype)[None, None, :] * skips.pop() + x = self.blocks[self.num_encoder_layers + i](x, x0) + + x_norm = self.final_norm(x) + x_flat = x_norm.reshape(-1, x_norm.size(-1)) + targets = target_ids.reshape(-1) + if self.tie_embeddings: + logits_proj = F.linear(x_flat, self.tok_emb.weight) + else: + if self.lm_head is None: + raise RuntimeError("lm_head is required when tie_embeddings=False") + logits_proj = self.lm_head(x_flat) + logits = self.logit_softcap * torch.tanh(logits_proj / self.logit_softcap) + loss = F.cross_entropy(logits.float(), targets, reduction="mean") + return loss + + + +# ----------------------------- +# TRAINING +# ----------------------------- + +def main() -> None: + global zeropower_via_newtonschulz5 + + code = Path(__file__).read_text(encoding="utf-8") + args = Hyperparameters() + zeropower_via_newtonschulz5 = torch.compile(zeropower_via_newtonschulz5) + + # ----------------------------- + # DISTRIBUTED + CUDA SETUP + # ----------------------------- + + distributed = "RANK" in os.environ and "WORLD_SIZE" in os.environ + rank = int(os.environ.get("RANK", "0")) + world_size = int(os.environ.get("WORLD_SIZE", "1")) + local_rank = int(os.environ.get("LOCAL_RANK", "0")) + if world_size <= 0: + raise ValueError(f"WORLD_SIZE must be positive, got {world_size}") + if 8 % world_size != 0: + raise ValueError(f"WORLD_SIZE={world_size} must divide 8 so grad_accum_steps stays integral") + grad_accum_steps = 8 // world_size + grad_scale = 1.0 / grad_accum_steps + if not torch.cuda.is_available(): + raise RuntimeError("CUDA is required") + device = torch.device("cuda", local_rank) + torch.cuda.set_device(device) + if distributed: + dist.init_process_group(backend="nccl", device_id=device) + dist.barrier() + master_process = rank == 0 + + # Fast math knobs + torch.backends.cuda.matmul.allow_tf32 = True + torch.backends.cudnn.allow_tf32 = True + from torch.backends.cuda import enable_cudnn_sdp, enable_flash_sdp, enable_math_sdp, enable_mem_efficient_sdp + + enable_cudnn_sdp(False) + enable_flash_sdp(True) + enable_mem_efficient_sdp(False) + enable_math_sdp(False) + + logfile = None + if master_process: + os.makedirs("logs", exist_ok=True) + logfile = f"logs/{args.run_id}.txt" + print(logfile) + + def log0(msg: str, console: bool = True) -> None: + if not master_process: + return + if console: + print(msg) + if logfile is not None: + with open(logfile, "a", encoding="utf-8") as f: + print(msg, file=f) + + log0(code, console=False) + log0("=" * 100, console=False) + log0(f"Running Python {sys.version}", console=False) + log0(f"Running PyTorch {torch.__version__}", console=False) + log0( + subprocess.run(["nvidia-smi"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False).stdout, + console=False, + ) + log0("=" * 100, console=False) + + # ----------------------------- + # TOKENIZER + VALIDATION METRIC SETUP + # ----------------------------- + + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.cuda.manual_seed_all(args.seed) + + if not args.tokenizer_path.endswith(".model"): + raise ValueError(f"Script only setup for SentencePiece .model file: {args.tokenizer_path}") + sp = spm.SentencePieceProcessor(model_file=args.tokenizer_path) + if int(sp.vocab_size()) != args.vocab_size: + raise ValueError( + f"VOCAB_SIZE={args.vocab_size} does not match tokenizer vocab_size={int(sp.vocab_size())}" + ) + dataset_dir = Path(args.data_path).resolve() + actual_train_files = len(list(dataset_dir.glob("fineweb_train_*.bin"))) + val_tokens = load_validation_tokens(args.val_files, args.train_seq_len) + base_bytes_lut, has_leading_space_lut, is_boundary_token_lut = build_sentencepiece_luts( + sp, args.vocab_size, device + ) + log0(f"val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path={args.tokenizer_path}") + log0(f"train_loader:dataset:{dataset_dir.name} train_shards:{actual_train_files}") + log0(f"val_loader:shards pattern={args.val_files} tokens:{val_tokens.numel() - 1}") + + # ----------------------------- + # MODEL + OPTIMIZER SETUP + # ----------------------------- + + base_model = GPT( + vocab_size=args.vocab_size, + num_layers=args.num_layers, + model_dim=args.model_dim, + num_heads=args.num_heads, + num_kv_heads=args.num_kv_heads, + mlp_mult=args.mlp_mult, + tie_embeddings=args.tie_embeddings, + tied_embed_init_std=args.tied_embed_init_std, + logit_softcap=args.logit_softcap, + rope_base=args.rope_base, + qk_gain_init=args.qk_gain_init, + ).to(device).bfloat16() + for module in base_model.modules(): + if isinstance(module, CastedLinear): + module.float() + restore_low_dim_params_to_fp32(base_model) + compiled_model = torch.compile(base_model, dynamic=False, fullgraph=True) + model: nn.Module = DDP(compiled_model, device_ids=[local_rank], broadcast_buffers=False) if distributed else compiled_model + + # Optimizer split: + # - token embedding uses AdamW at EMBED_LR / TIED_EMBED_LR + # - untied lm_head uses Adam at HEAD_LR + # - matrix params in transformer blocks use MATRIX_LR via Muon + # - vectors/scalars use AdamW at SCALAR_LR + block_named_params = list(base_model.blocks.named_parameters()) + matrix_params = [ + p + for name, p in block_named_params + if p.ndim == 2 and not any(pattern in name for pattern in CONTROL_TENSOR_NAME_PATTERNS) + ] + scalar_params = [ + p + for name, p in block_named_params + if p.ndim < 2 or any(pattern in name for pattern in CONTROL_TENSOR_NAME_PATTERNS) + ] + if base_model.skip_weights.numel() > 0: + scalar_params.append(base_model.skip_weights) + token_lr = args.tied_embed_lr if args.tie_embeddings else args.embed_lr + optimizer_tok = torch.optim.AdamW( + [{"params": [base_model.tok_emb.weight], "lr": token_lr, "base_lr": token_lr}], + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + weight_decay=0.01, + fused=True, + ) + optimizer_muon = Muon( + matrix_params, + lr=args.matrix_lr, + momentum=args.muon_momentum, + backend_steps=args.muon_backend_steps, + ) + for group in optimizer_muon.param_groups: + group["base_lr"] = args.matrix_lr + optimizer_scalar = torch.optim.AdamW( + [{"params": scalar_params, "lr": args.scalar_lr, "base_lr": args.scalar_lr}], + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + weight_decay=0.01, + fused=True, + ) + optimizers: list[torch.optim.Optimizer] = [optimizer_tok, optimizer_muon, optimizer_scalar] + if base_model.lm_head is not None: + optimizer_head = torch.optim.Adam( + [{"params": [base_model.lm_head.weight], "lr": args.head_lr, "base_lr": args.head_lr}], + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + fused=True, + ) + optimizers.insert(1, optimizer_head) + + n_params = sum(p.numel() for p in base_model.parameters()) + log0(f"model_params:{n_params}") + log0(f"world_size:{world_size} grad_accum_steps:{grad_accum_steps}") + log0("sdp_backends:cudnn=False flash=True mem_efficient=False math=False") + log0(f"attention_mode:gqa num_heads:{args.num_heads} num_kv_heads:{args.num_kv_heads}") + log0( + f"tie_embeddings:{args.tie_embeddings} embed_lr:{token_lr} " + f"head_lr:{args.head_lr if base_model.lm_head is not None else 0.0} " + f"matrix_lr:{args.matrix_lr} scalar_lr:{args.scalar_lr}" + ) + log0( + f"train_batch_tokens:{args.train_batch_tokens} train_seq_len:{args.train_seq_len} " + f"iterations:{args.iterations} warmup_steps:{args.warmup_steps} " + f"max_wallclock_seconds:{args.max_wallclock_seconds:.3f}" + ) + log0(f"seed:{args.seed}") + + # ----------------------------- + # DATA LOADER & MODEL WARMUP + # ----------------------------- + + train_loader = DistributedTokenLoader(args.train_files, rank, world_size, device) + + def zero_grad_all() -> None: + for opt in optimizers: + opt.zero_grad(set_to_none=True) + + max_wallclock_ms = 1000.0 * args.max_wallclock_seconds if args.max_wallclock_seconds > 0 else None + + def lr_mul(step: int, elapsed_ms: float) -> float: + if args.warmdown_iters <= 0: + return 1.0 + if max_wallclock_ms is None: + warmdown_start = max(args.iterations - args.warmdown_iters, 0) + return max((args.iterations - step) / max(args.warmdown_iters, 1), 0.0) if warmdown_start <= step < args.iterations else 1.0 + step_ms = elapsed_ms / max(step, 1) + warmdown_ms = args.warmdown_iters * step_ms + remaining_ms = max(max_wallclock_ms - elapsed_ms, 0.0) + return remaining_ms / max(warmdown_ms, 1e-9) if remaining_ms <= warmdown_ms else 1.0 + + # Warmup primes the compiled forward/backward/optimizer paths, then we restore the + # initial weights/optimizer state so measured training starts from the true init. + if args.warmup_steps > 0: + initial_model_state = {name: tensor.detach().cpu().clone() for name, tensor in base_model.state_dict().items()} + initial_optimizer_states = [copy.deepcopy(opt.state_dict()) for opt in optimizers] + model.train() + for warmup_step in range(args.warmup_steps): + zero_grad_all() + for micro_step in range(grad_accum_steps): + if distributed: + model.require_backward_grad_sync = micro_step == grad_accum_steps - 1 + x, y = train_loader.next_batch(args.train_batch_tokens, args.train_seq_len, grad_accum_steps) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + warmup_loss = model(x, y) + (warmup_loss * grad_scale).backward() + for opt in optimizers: + opt.step() + zero_grad_all() + if args.warmup_steps <= 20 or (warmup_step + 1) % 10 == 0 or warmup_step + 1 == args.warmup_steps: + log0(f"warmup_step:{warmup_step + 1}/{args.warmup_steps}") + base_model.load_state_dict(initial_model_state, strict=True) + for opt, state in zip(optimizers, initial_optimizer_states, strict=True): + opt.load_state_dict(state) + zero_grad_all() + if distributed: + model.require_backward_grad_sync = True + train_loader = DistributedTokenLoader(args.train_files, rank, world_size, device) + + # ----------------------------- + # MAIN TRAINING LOOP + # ----------------------------- + + training_time_ms = 0.0 + stop_after_step: int | None = None + torch.cuda.synchronize() + t0 = time.perf_counter() + + step = 0 + while True: + last_step = step == args.iterations or (stop_after_step is not None and step >= stop_after_step) + + should_validate = last_step or (args.val_loss_every > 0 and step % args.val_loss_every == 0) + if should_validate: + torch.cuda.synchronize() + training_time_ms += 1000.0 * (time.perf_counter() - t0) + val_loss, val_bpb = eval_val( + args, + model, + rank, + world_size, + device, + grad_accum_steps, + val_tokens, + base_bytes_lut, + has_leading_space_lut, + is_boundary_token_lut, + ) + log0( + f"step:{step}/{args.iterations} val_loss:{val_loss:.4f} val_bpb:{val_bpb:.4f} " + f"train_time:{training_time_ms:.0f}ms step_avg:{training_time_ms / max(step, 1):.2f}ms" + ) + torch.cuda.synchronize() + t0 = time.perf_counter() + + if last_step: + if stop_after_step is not None and step < args.iterations: + log0( + f"stopping_early: wallclock_cap train_time:{training_time_ms:.0f}ms " + f"step:{step}/{args.iterations}" + ) + break + + elapsed_ms = training_time_ms + 1000.0 * (time.perf_counter() - t0) + scale = lr_mul(step, elapsed_ms) + zero_grad_all() + train_loss = torch.zeros((), device=device) + for micro_step in range(grad_accum_steps): + if distributed: + model.require_backward_grad_sync = micro_step == grad_accum_steps - 1 + x, y = train_loader.next_batch(args.train_batch_tokens, args.train_seq_len, grad_accum_steps) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + loss = model(x, y) + train_loss += loss.detach() + (loss * grad_scale).backward() + train_loss /= grad_accum_steps + + frac = min(step / args.muon_momentum_warmup_steps, 1.0) if args.muon_momentum_warmup_steps > 0 else 1.0 + muon_momentum = (1 - frac) * args.muon_momentum_warmup_start + frac * args.muon_momentum + for group in optimizer_muon.param_groups: + group["momentum"] = muon_momentum + + for opt in optimizers: + for group in opt.param_groups: + group["lr"] = group["base_lr"] * scale + + if args.grad_clip_norm > 0: + torch.nn.utils.clip_grad_norm_(base_model.parameters(), args.grad_clip_norm) + for opt in optimizers: + opt.step() + # Decoupled weight decay for Muon-optimized matrix params (not built into Muon) + with torch.no_grad(): + for p in matrix_params: + p.mul_(1.0 - 0.02 * optimizer_muon.param_groups[0]["lr"]) + zero_grad_all() + + step += 1 + approx_training_time_ms = training_time_ms + 1000.0 * (time.perf_counter() - t0) + should_log_train = ( + args.train_log_every > 0 + and (step <= 10 or step % args.train_log_every == 0 or stop_after_step is not None) + ) + if should_log_train: + log0( + f"step:{step}/{args.iterations} train_loss:{train_loss.item():.4f} " + f"train_time:{approx_training_time_ms:.0f}ms step_avg:{approx_training_time_ms / step:.2f}ms" + ) + + # Needed to sync whether we've reached the wallclock cap. + reached_cap = max_wallclock_ms is not None and approx_training_time_ms >= max_wallclock_ms + if distributed and max_wallclock_ms is not None: + reached_cap_tensor = torch.tensor(int(reached_cap), device=device) + dist.all_reduce(reached_cap_tensor, op=dist.ReduceOp.MAX) + reached_cap = bool(reached_cap_tensor.item()) + if stop_after_step is None and reached_cap: + stop_after_step = step + + log0( + f"peak memory allocated: {torch.cuda.max_memory_allocated() // 1024 // 1024} MiB " + f"reserved: {torch.cuda.max_memory_reserved() // 1024 // 1024} MiB" + ) + + if PROXY_SKIP_EXPORT: + log0("proxy_mode:skip_serialization_and_roundtrip_eval") + if distributed: + dist.destroy_process_group() + return + + # ----------------------------- + # SERIALIZATION + ROUNDTRIP VALIDATION + # ----------------------------- + # Save the raw state, then produce the compressed int8+zlib artifact. + export_state = dict(base_model.state_dict()) + + if master_process: + torch.save(export_state, "final_model.pt") + model_bytes = os.path.getsize("final_model.pt") + code_bytes = len(code.encode("utf-8")) + log0(f"Serialized model: {model_bytes} bytes") + log0(f"Code size: {code_bytes} bytes") + log0(f"Total submission size: {model_bytes + code_bytes} bytes") + + quant_obj, quant_stats = quantize_state_dict_int8(export_state) + quant_buf = io.BytesIO() + torch.save(quant_obj, quant_buf) + quant_raw = quant_buf.getvalue() + quant_blob = zlib.compress(quant_raw, level=9) + quant_raw_bytes = len(quant_raw) + if master_process: + with open("final_model.int8.ptz", "wb") as f: + f.write(quant_blob) + quant_file_bytes = os.path.getsize("final_model.int8.ptz") + code_bytes = len(code.encode("utf-8")) + ratio = quant_stats["baseline_tensor_bytes"] / max(quant_stats["int8_payload_bytes"], 1) + log0( + f"Serialized model int8+zlib: {quant_file_bytes} bytes " + f"(payload:{quant_stats['int8_payload_bytes']} raw_torch:{quant_raw_bytes} payload_ratio:{ratio:.2f}x)" + ) + log0(f"Total submission size int8+zlib: {quant_file_bytes + code_bytes} bytes") + + if distributed: + dist.barrier() + with open("final_model.int8.ptz", "rb") as f: + quant_blob_disk = f.read() + quant_state = torch.load(io.BytesIO(zlib.decompress(quant_blob_disk)), map_location="cpu") + base_model.load_state_dict(dequantize_state_dict_int8(quant_state), strict=True) + log0("final_eval_mode:non_overlapping_validity_safe") + _best_temp = 1.0 + _best_bpb = float("inf") + for _temp in [0.85, 0.90, 0.95, 1.0, 1.05, 1.10, 1.15]: + base_model.eval_temperature.fill_(_temp) + _, _bpb = eval_val( + args, model, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + log0(f"temp_search: temp={_temp:.2f} val_bpb={_bpb:.4f}") + if _bpb < _best_bpb: + _best_bpb = _bpb + _best_temp = _temp + for _temp in [_best_temp + d for d in [-0.04, -0.03, -0.02, -0.01, 0.01, 0.02, 0.03, 0.04]]: + if _temp <= 0: + continue + base_model.eval_temperature.fill_(_temp) + _, _bpb = eval_val( + args, model, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + log0(f"temp_search_fine: temp={_temp:.2f} val_bpb={_bpb:.4f}") + if _bpb < _best_bpb: + _best_bpb = _bpb + _best_temp = _temp + base_model.eval_temperature.fill_(_best_temp) + log0(f"temp_search: best_temp={_best_temp:.2f}") + for _temp in [_best_temp - 0.01, _best_temp + 0.01]: + if _temp <= 0: + continue + base_model.eval_temperature.fill_(_temp) + _, _bpb = eval_val( + args, model, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + log0(f"temp_rerefine: temp={_temp:.2f} val_bpb={_bpb:.4f}") + if _bpb < _best_bpb: + _best_bpb = _bpb + _best_temp = _temp + base_model.eval_temperature.fill_(_best_temp) + log0(f"temp_rerefine: best_temp={_best_temp:.2f}") + + torch.cuda.synchronize() + t_qeval = time.perf_counter() + q_val_loss, q_val_bpb = eval_val( + args, model, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + + torch.cuda.synchronize() + log0( + f"final_int8_zlib_roundtrip val_loss:{q_val_loss:.4f} val_bpb:{q_val_bpb:.4f} " + f"eval_time:{1000.0 * (time.perf_counter() - t_qeval):.0f}ms" + ) + log0(f"final_int8_zlib_roundtrip_exact val_loss:{q_val_loss:.8f} val_bpb:{q_val_bpb:.8f}") + + if distributed: + dist.destroy_process_group() + + +if __name__ == "__main__": + main() diff --git a/run_leadercore_screen_batch_runpod.sh b/run_leadercore_screen_batch_runpod.sh new file mode 100644 index 000000000..73bba5ec3 --- /dev/null +++ b/run_leadercore_screen_batch_runpod.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -euo pipefail + +DATA_ROOT_MODE="${DATA_ROOT_MODE:-tmp}" +SCREEN_SECONDS="${SCREEN_SECONDS:-180}" +NPROC_PER_NODE="${NPROC_PER_NODE:-1}" + +if [ "$#" -eq 0 ]; then + set -- base warmdown800 muon099 gradclip03 matrixlr006 embedlr08 +fi + +cd /workspace/parameter-golf + +for variant in "$@"; do + echo "=== $(date -Is) starting $variant ===" + DATA_ROOT_MODE="$DATA_ROOT_MODE" SCREEN_SECONDS="$SCREEN_SECONDS" NPROC_PER_NODE="$NPROC_PER_NODE" \ + bash ./launch_leadercore_screen_runpod.sh "$variant" + + record_root="/workspace/parameter-golf/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search" + log_path="$record_root/screen_${DATA_ROOT_MODE}_${variant}/train.log" + pid_path="$record_root/screen_${DATA_ROOT_MODE}_${variant}/train.pid" + pid="$(cat "$pid_path")" + + while kill -0 "$pid" 2>/dev/null; do + sleep 5 + done + + echo "=== $(date -Is) finished $variant ===" + tail -n 20 "$log_path" || true +done diff --git a/setup_local_parity_data_runpod.sh b/setup_local_parity_data_runpod.sh new file mode 100755 index 000000000..88da55733 --- /dev/null +++ b/setup_local_parity_data_runpod.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -euo pipefail + +SRC_ROOT="${1:-/workspace/parameter-golf/data}" +DEST_ROOT="${2:-/tmp/parameter-golf-data}" +VARIANT="${3:-fineweb10B_sp1024}" +TOKENIZER_BASENAME="${4:-fineweb_1024_bpe}" + +SRC_DATASET_DIR="$SRC_ROOT/datasets/$VARIANT" +SRC_TOKENIZER_DIR="$SRC_ROOT/tokenizers" +DEST_DATASET_DIR="$DEST_ROOT/datasets/$VARIANT" +DEST_TOKENIZER_DIR="$DEST_ROOT/tokenizers" + +mkdir -p "$DEST_DATASET_DIR" "$DEST_TOKENIZER_DIR" + +echo "staging dataset from $SRC_DATASET_DIR to $DEST_DATASET_DIR" +cp -a "$SRC_DATASET_DIR"/. "$DEST_DATASET_DIR"/ + +echo "staging tokenizer from $SRC_TOKENIZER_DIR to $DEST_TOKENIZER_DIR" +cp -a "$SRC_TOKENIZER_DIR/$TOKENIZER_BASENAME.model" "$DEST_TOKENIZER_DIR/" +if [ -f "$SRC_TOKENIZER_DIR/$TOKENIZER_BASENAME.vocab" ]; then + cp -a "$SRC_TOKENIZER_DIR/$TOKENIZER_BASENAME.vocab" "$DEST_TOKENIZER_DIR/" +fi + +echo "local parity data ready" +echo "DATA_PATH=$DEST_ROOT/datasets/$VARIANT" +echo "TOKENIZER_PATH=$DEST_ROOT/tokenizers/$TOKENIZER_BASENAME.model" +echo "dataset_files=$(find "$DEST_DATASET_DIR" -maxdepth 1 -type f | wc -l)" +echo "dataset_bytes=$(du -sh "$DEST_DATASET_DIR" | cut -f1)" From a6e0704f3ba119f7996ce7573ca100da3938118e Mon Sep 17 00:00:00 2001 From: Simon Marcus Date: Fri, 20 Mar 2026 13:59:52 -0400 Subject: [PATCH 2/3] Update leader-core proxy findings --- launch_leadercore_screen_runpod.sh | 8 ++- .../README.md | 24 +++++++ .../screen_tmp_muon099/train.log | 66 +++++++++---------- .../screen_tmp_muon099/train.pid | 2 +- .../train.log | 62 +++++++++++++++++ .../train.pid | 1 + 6 files changed, 126 insertions(+), 37 deletions(-) create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.log create mode 100644 records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.pid diff --git a/launch_leadercore_screen_runpod.sh b/launch_leadercore_screen_runpod.sh index e55258b83..62acc3e01 100644 --- a/launch_leadercore_screen_runpod.sh +++ b/launch_leadercore_screen_runpod.sh @@ -73,6 +73,12 @@ case "$VARIANT" in export MUON_MOMENTUM=0.99 OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_muon099" ;; + warmdown800_matrixlr006) + export RUN_ID=leadercore10l_screen_warmdown800_matrixlr006 + export WARMDOWN_ITERS=800 + export MATRIX_LR=0.06 + OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_warmdown800_matrixlr006" + ;; muonwarm300) export RUN_ID=leadercore10l_screen_muonwarm300 export MUON_MOMENTUM_WARMUP_STEPS=300 @@ -89,7 +95,7 @@ case "$VARIANT" in OUT_DIR="$RECORD_ROOT/screen_${DATA_ROOT_MODE}_width520" ;; *) - echo "Usage: $0 {base|embedlr08|matrixlr005|matrixlr006|warmdown1800|warmdown800|gradclip03|muon099|muonwarm300|qkgain17|width520}" + echo "Usage: $0 {base|embedlr08|matrixlr005|matrixlr006|warmdown1800|warmdown800|warmdown800_matrixlr006|gradclip03|muon099|muonwarm300|qkgain17|width520}" exit 1 ;; esac diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md index 893201998..00576956d 100644 --- a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/README.md @@ -3,6 +3,25 @@ This directory contains the leader-core merge candidate rooted in the official ` Primary file: - `train_gpt.py` +Saved full 8xH100 parity result: +- `runpod_tmp_base`: `final_int8_zlib_roundtrip_exact val_bpb: 1.20639536` +- `runpod_tmp_base`: `Total submission size int8+zlib: 15294320 bytes` +- `runpod_tmp_base`: `step_avg: 49.31ms` + +Saved 1xH100 proxy screens on the same line: +- `screen_tmp_base`: `val_bpb: 1.7975`, `step_avg: 472.64ms` +- `screen_tmp_gradclip03`: `val_bpb: 1.7464`, `step_avg: 477.81ms` +- `screen_tmp_matrixlr006`: `val_bpb: 1.6751`, `step_avg: 471.55ms` +- `screen_tmp_muon099`: `val_bpb: 1.6582`, `step_avg: 416.73ms` +- `screen_tmp_warmdown800`: `val_bpb: 1.5984`, `step_avg: 523.52ms` +- `screen_tmp_warmdown800_matrixlr006`: `val_bpb: 1.4874`, `step_avg: 423.34ms` +- `screen_tmp_embedlr08`: `val_bpb: 1.8000`, `step_avg: 469.15ms` + +Current proxy read: +- strongest single change: `warmdown800` +- strongest low-risk single change: `matrixlr006` +- strongest tested combination so far: `warmdown800 + matrixlr006` + First ablation batch: - `base` - `embedlr08` @@ -25,7 +44,12 @@ Variant names map to these env changes: - `base`: no overrides beyond the merged defaults - `embedlr08`: `TIED_EMBED_LR=0.08` - `matrixlr005`: `MATRIX_LR=0.05` +- `matrixlr006`: `MATRIX_LR=0.06` - `warmdown1800`: `WARMDOWN_ITERS=1800` +- `warmdown800`: `WARMDOWN_ITERS=800` +- `warmdown800_matrixlr006`: `WARMDOWN_ITERS=800`, `MATRIX_LR=0.06` +- `gradclip03`: `GRAD_CLIP_NORM=0.3` +- `muon099`: `MUON_MOMENTUM=0.99` - `tokemb_int8`: `INT8_KEEP_TOK_EMB_FP16=0` Data root modes: diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log index 2de0cdd65..7332b3e08 100644 --- a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.log @@ -29,38 +29,34 @@ warmup_step:17/20 warmup_step:18/20 warmup_step:19/20 warmup_step:20/20 -step:1/20000 train_loss:6.9337 train_time:492ms step_avg:491.81ms -step:2/20000 train_loss:23.4389 train_time:943ms step_avg:471.30ms -step:3/20000 train_loss:20.7538 train_time:1391ms step_avg:463.83ms -step:4/20000 train_loss:17.4015 train_time:1886ms step_avg:471.40ms -W0320 16:33:57.138000 10154 torch/distributed/elastic/agent/server/api.py:725] Received 15 death signal, shutting down workers -W0320 16:33:57.145000 10154 torch/distributed/elastic/multiprocessing/api.py:908] Sending process 10233 closing signal SIGTERM -Traceback (most recent call last): - File "", line 198, in _run_module_as_main - File "", line 88, in _run_code - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 940, in - main() - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 357, in wrapper - return f(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^ - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 936, in main - run(args) - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 927, in run - elastic_launch( - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 156, in __call__ - return launch_agent(self._config, self._entrypoint, list(args)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 284, in launch_agent - result = agent.run() - ^^^^^^^^^^^ - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 138, in wrapper - result = f(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^ - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 717, in run - result = self._invoke_run(role) - ^^^^^^^^^^^^^^^^^^^^^^ - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 881, in _invoke_run - time.sleep(monitor_interval) - File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 85, in _terminate_process_handler - raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval) -torch.distributed.elastic.multiprocessing.api.SignalException: Process 10154 got signal: 15 +step:1/20000 train_loss:6.9337 train_time:397ms step_avg:396.87ms +step:2/20000 train_loss:23.4389 train_time:830ms step_avg:415.14ms +step:3/20000 train_loss:20.0768 train_time:1259ms step_avg:419.68ms +step:4/20000 train_loss:16.3525 train_time:1699ms step_avg:424.71ms +step:5/20000 train_loss:12.9355 train_time:2126ms step_avg:425.25ms +step:6/20000 train_loss:10.2189 train_time:2577ms step_avg:429.43ms +step:7/20000 train_loss:8.2637 train_time:2997ms step_avg:428.19ms +step:8/20000 train_loss:7.1695 train_time:3433ms step_avg:429.11ms +step:9/20000 train_loss:6.4713 train_time:3925ms step_avg:436.08ms +step:10/20000 train_loss:6.1345 train_time:4392ms step_avg:439.24ms +step:25/20000 train_loss:5.9491 train_time:10729ms step_avg:429.17ms +step:50/20000 train_loss:5.1697 train_time:21237ms step_avg:424.74ms +step:75/20000 train_loss:4.5915 train_time:31797ms step_avg:423.96ms +step:100/20000 train_loss:4.2740 train_time:42283ms step_avg:422.83ms +step:125/20000 train_loss:4.0908 train_time:52501ms step_avg:420.01ms +step:150/20000 train_loss:3.8380 train_time:62891ms step_avg:419.27ms +step:175/20000 train_loss:3.5410 train_time:73392ms step_avg:419.38ms +step:200/20000 train_loss:3.3518 train_time:83897ms step_avg:419.48ms +step:225/20000 train_loss:3.2722 train_time:94178ms step_avg:418.57ms +step:250/20000 train_loss:3.1507 train_time:104281ms step_avg:417.12ms +step:275/20000 train_loss:3.0154 train_time:114628ms step_avg:416.83ms +step:300/20000 train_loss:2.9405 train_time:125078ms step_avg:416.93ms +step:325/20000 train_loss:2.9236 train_time:135384ms step_avg:416.57ms +step:350/20000 train_loss:2.8827 train_time:145895ms step_avg:416.84ms +step:375/20000 train_loss:2.8869 train_time:156231ms step_avg:416.62ms +step:400/20000 train_loss:2.6673 train_time:166680ms step_avg:416.70ms +step:425/20000 train_loss:2.7960 train_time:177096ms step_avg:416.70ms +step:432/20000 val_loss:2.7998 val_bpb:1.6582 train_time:180026ms step_avg:416.73ms +stopping_early: wallclock_cap train_time:180026ms step:432/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid index c82e8c6d5..625ff799d 100644 --- a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_muon099/train.pid @@ -1 +1 @@ -10154 +31435 diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.log b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.log new file mode 100644 index 000000000..5fbbca392 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.log @@ -0,0 +1,62 @@ +logs/leadercore10l_screen_warmdown800_matrixlr006.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:18897488 +world_size:1 grad_accum_steps:8 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.1 head_lr:0.0 matrix_lr:0.06 scalar_lr:0.04 +train_batch_tokens:524288 train_seq_len:1024 iterations:20000 warmup_steps:20 max_wallclock_seconds:180.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/20000 train_loss:6.9337 train_time:414ms step_avg:413.84ms +step:2/20000 train_loss:23.2934 train_time:841ms step_avg:420.30ms +step:3/20000 train_loss:13.5942 train_time:1295ms step_avg:431.83ms +step:4/20000 train_loss:7.8606 train_time:1720ms step_avg:430.10ms +step:5/20000 train_loss:6.2285 train_time:2200ms step_avg:440.02ms +step:6/20000 train_loss:6.1770 train_time:2615ms step_avg:435.91ms +step:7/20000 train_loss:6.1629 train_time:3036ms step_avg:433.74ms +step:8/20000 train_loss:6.3011 train_time:3509ms step_avg:438.61ms +step:9/20000 train_loss:6.3716 train_time:3914ms step_avg:434.89ms +step:10/20000 train_loss:6.3967 train_time:4396ms step_avg:439.56ms +step:25/20000 train_loss:5.3099 train_time:10528ms step_avg:421.13ms +step:50/20000 train_loss:4.2992 train_time:20690ms step_avg:413.80ms +step:75/20000 train_loss:3.7467 train_time:30923ms step_avg:412.31ms +step:100/20000 train_loss:3.4172 train_time:42539ms step_avg:425.39ms +step:125/20000 train_loss:3.2591 train_time:53436ms step_avg:427.49ms +step:150/20000 train_loss:3.1590 train_time:63637ms step_avg:424.24ms +step:175/20000 train_loss:2.9483 train_time:73898ms step_avg:422.27ms +step:200/20000 train_loss:2.8227 train_time:83897ms step_avg:419.49ms +step:225/20000 train_loss:2.8063 train_time:94192ms step_avg:418.63ms +step:250/20000 train_loss:2.7400 train_time:104518ms step_avg:418.07ms +step:275/20000 train_loss:2.6407 train_time:114905ms step_avg:417.84ms +step:300/20000 train_loss:2.6006 train_time:125411ms step_avg:418.04ms +step:325/20000 train_loss:2.6046 train_time:135594ms step_avg:417.21ms +step:350/20000 train_loss:2.5821 train_time:145748ms step_avg:416.42ms +step:375/20000 train_loss:2.5814 train_time:156509ms step_avg:417.36ms +step:400/20000 train_loss:2.3716 train_time:168079ms step_avg:420.20ms +step:425/20000 train_loss:2.5041 train_time:179834ms step_avg:423.14ms +step:426/20000 val_loss:2.5115 val_bpb:1.4874 train_time:180343ms step_avg:423.34ms +stopping_early: wallclock_cap train_time:180343ms step:426/20000 +peak memory allocated: 11397 MiB reserved: 11760 MiB +proxy_mode:skip_serialization_and_roundtrip_eval diff --git a/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.pid b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.pid new file mode 100644 index 000000000..abb240864 --- /dev/null +++ b/records/track_10min_16mb/2026-03-20_LeaderCore10L_ValidEval_TempOnly_Int8Search/screen_tmp_warmdown800_matrixlr006/train.pid @@ -0,0 +1 @@ +32299 From 4ac6bcf10c7bd638ba72b5fbdd7f56dc1d40cf6a Mon Sep 17 00:00:00 2001 From: Simon Marcus Date: Tue, 24 Mar 2026 20:23:09 -0400 Subject: [PATCH 3/3] Add non-record streaming legal TTT submission --- .../README.md | 76 + .../preflight.log | 202 ++ .../runpod_launch.log | 3 + .../submission.json | 11 + .../train_gpt.py | 2138 +++++++++++++++++ .../train_seed1337.log | 1029 ++++++++ 6 files changed, 3459 insertions(+) create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/README.md create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/preflight.log create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/runpod_launch.log create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/submission.json create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_gpt.py create mode 100644 records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_seed1337.log diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/README.md b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/README.md new file mode 100644 index 000000000..26256a4b2 --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/README.md @@ -0,0 +1,76 @@ +This directory contains a non-record submission built from the March 23 leader, with the same base model and training recipe but a different legal test-time training protocol. + +## Non-Record Submission + +This run is intentionally submitted as a non-record result. + +The goal is to contribute a clear data point on streaming legal TTT: + +- same base model as the March 23 leader +- same `LeakyReLU(0.5)^2` activation +- same 8xH100 / 10-minute training setup +- different legal TTT procedure at evaluation + +The hope is that this helps the community separate: + +- gains from the underlying trained model +- gains from the exact legal TTT protocol + +## What Changed + +Relative to `2026-03-23_LeakyReLU_LegalTTT_ParallelMuon`, this submission changes the eval-time adaptation path in two ways: + +- `TTT_MODE=stream` instead of chunked score-first TTT +- `TTT_PARAM_MODE=late_blocks` with `TTT_LAST_N_BLOCKS=4` + +The resulting run adapts online on the newly scored suffix of each sliding-window evaluation batch, and only updates the last 4 transformer blocks during TTT. The candidate code also adds explicit bank-gradient masking so the late-block restriction applies correctly to the parameter-bank tensors. + +Training, architecture, export, and activation were otherwise kept aligned with the March 23 leader starting point. + +## Why This Is Interesting + +The final result was slightly worse than the March 23 leader on the final `legal_ttt_exact` metric, but only by a small margin: + +- this run: `1.12082320` +- March 23 leader seed-1337: `1.11922988` + +The intermediate metrics were very close: + +- this run `DIAGNOSTIC post_ema`: `1.1366` +- leader seed-1337 `DIAGNOSTIC post_ema`: `1.1369` +- this run `final_int6_sliding_window_exact`: `1.12125572` +- leader seed-1337 `final_int6_sliding_window_exact`: `1.12165091` + +That makes this a useful negative or near-neutral result: the underlying trained model remained competitive, but the specific switch from chunked all-block TTT to streaming late-block TTT did not beat the incumbent TTT recipe in this full run. + +## Exact Run Settings + +The promoted run used: + +- `TTT_MODE=stream` +- `TTT_PARAM_MODE=late_blocks` +- `TTT_LAST_N_BLOCKS=4` +- `TTT_LR=0.0005` +- `TTT_EPOCHS=1` +- `TTT_LR_SCHEDULE=constant` +- `DATA_ROOT_MODE=tmp` +- `NPROC_PER_NODE=8` + +## Results + +From `train_seed1337.log`: + +- `DIAGNOSTIC post_ema val_bpb: 1.1366` +- `final_int6_roundtrip_exact val_bpb: 1.14466312` +- `final_int6_sliding_window_exact val_bpb: 1.12125572` +- `legal_ttt_exact val_bpb: 1.12082320` +- `Total submission size int6+lzma: 15867004` +- `Code size: 101140` + +## Included Files + +- `train_gpt.py` +- `train_seed1337.log` +- `runpod_launch.log` +- `preflight.log` +- `submission.json` diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/preflight.log b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/preflight.log new file mode 100644 index 000000000..7d1d35737 --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/preflight.log @@ -0,0 +1,202 @@ +=== Streaming TTT RunPod Preflight === +=== Parameter Golf — RunPod Setup === +Requirement already satisfied: numpy in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 1)) (2.4.3) +Requirement already satisfied: tqdm in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 2)) (4.67.3) +Collecting torch==2.10 (from -r requirements.txt (line 3)) + Downloading torch-2.10.0-3-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (31 kB) +Requirement already satisfied: huggingface-hub in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 4)) (1.7.2) +Requirement already satisfied: kernels in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 5)) (0.12.3) +Requirement already satisfied: setuptools in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 6)) (80.9.0) +Requirement already satisfied: typing-extensions==4.15.0 in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 7)) (4.15.0) +Requirement already satisfied: datasets in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 8)) (4.8.4) +Requirement already satisfied: tiktoken in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 9)) (0.12.0) +Requirement already satisfied: sentencepiece in /usr/local/lib/python3.12/dist-packages (from -r requirements.txt (line 10)) (0.2.1) +Requirement already satisfied: filelock in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (3.20.1) +Requirement already satisfied: sympy>=1.13.3 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (1.14.0) +Requirement already satisfied: networkx>=2.5.1 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (3.6.1) +Requirement already satisfied: jinja2 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (3.1.6) +Requirement already satisfied: fsspec>=0.8.5 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (2025.12.0) +Collecting cuda-bindings==12.9.4 (from torch==2.10->-r requirements.txt (line 3)) + Downloading cuda_bindings-12.9.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (2.6 kB) +Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.8.93 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.93) +Requirement already satisfied: nvidia-cuda-runtime-cu12==12.8.90 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.90) +Requirement already satisfied: nvidia-cuda-cupti-cu12==12.8.90 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.90) +Requirement already satisfied: nvidia-cudnn-cu12==9.10.2.21 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (9.10.2.21) +Requirement already satisfied: nvidia-cublas-cu12==12.8.4.1 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.4.1) +Requirement already satisfied: nvidia-cufft-cu12==11.3.3.83 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (11.3.3.83) +Requirement already satisfied: nvidia-curand-cu12==10.3.9.90 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (10.3.9.90) +Requirement already satisfied: nvidia-cusolver-cu12==11.7.3.90 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (11.7.3.90) +Requirement already satisfied: nvidia-cusparse-cu12==12.5.8.93 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.5.8.93) +Requirement already satisfied: nvidia-cusparselt-cu12==0.7.1 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (0.7.1) +Requirement already satisfied: nvidia-nccl-cu12==2.27.5 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (2.27.5) +Collecting nvidia-nvshmem-cu12==3.4.5 (from torch==2.10->-r requirements.txt (line 3)) + Downloading nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.1 kB) +Requirement already satisfied: nvidia-nvtx-cu12==12.8.90 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.90) +Requirement already satisfied: nvidia-nvjitlink-cu12==12.8.93 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (12.8.93) +Requirement already satisfied: nvidia-cufile-cu12==1.13.1.3 in /usr/local/lib/python3.12/dist-packages (from torch==2.10->-r requirements.txt (line 3)) (1.13.1.3) +Collecting triton==3.6.0 (from torch==2.10->-r requirements.txt (line 3)) + Downloading triton-3.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (1.7 kB) +Collecting cuda-pathfinder~=1.1 (from cuda-bindings==12.9.4->torch==2.10->-r requirements.txt (line 3)) + Downloading cuda_pathfinder-1.5.0-py3-none-any.whl.metadata (1.9 kB) +Requirement already satisfied: hf-xet<2.0.0,>=1.4.2 in /usr/local/lib/python3.12/dist-packages (from huggingface-hub->-r requirements.txt (line 4)) (1.4.2) +Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.12/dist-packages (from huggingface-hub->-r requirements.txt (line 4)) (0.28.1) +Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.12/dist-packages (from huggingface-hub->-r requirements.txt (line 4)) (25.0) +Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.12/dist-packages (from huggingface-hub->-r requirements.txt (line 4)) (6.0.3) +Requirement already satisfied: typer in /usr/local/lib/python3.12/dist-packages (from huggingface-hub->-r requirements.txt (line 4)) (0.24.1) +Requirement already satisfied: anyio in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface-hub->-r requirements.txt (line 4)) (4.12.0) +Requirement already satisfied: certifi in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface-hub->-r requirements.txt (line 4)) (2025.11.12) +Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface-hub->-r requirements.txt (line 4)) (1.0.9) +Requirement already satisfied: idna in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface-hub->-r requirements.txt (line 4)) (3.11) +Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.12/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->huggingface-hub->-r requirements.txt (line 4)) (0.16.0) +Requirement already satisfied: pyarrow>=21.0.0 in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (23.0.1) +Requirement already satisfied: dill<0.4.2,>=0.3.0 in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (0.4.1) +Requirement already satisfied: pandas in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (3.0.1) +Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (2.32.5) +Requirement already satisfied: xxhash in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (3.6.0) +Requirement already satisfied: multiprocess<0.70.20 in /usr/local/lib/python3.12/dist-packages (from datasets->-r requirements.txt (line 8)) (0.70.19) +Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in /usr/local/lib/python3.12/dist-packages (from fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (3.13.3) +Requirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.12/dist-packages (from tiktoken->-r requirements.txt (line 9)) (2026.2.28) +Requirement already satisfied: aiohappyeyeballs>=2.5.0 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (2.6.1) +Requirement already satisfied: aiosignal>=1.4.0 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (1.4.0) +Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (25.4.0) +Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (1.8.0) +Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (6.7.1) +Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (0.4.1) +Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.12/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<=2026.2.0,>=2023.1.0->datasets->-r requirements.txt (line 8)) (1.23.0) +Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.12/dist-packages (from requests>=2.32.2->datasets->-r requirements.txt (line 8)) (3.4.4) +Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.12/dist-packages (from requests>=2.32.2->datasets->-r requirements.txt (line 8)) (2.6.2) +Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.12/dist-packages (from sympy>=1.13.3->torch==2.10->-r requirements.txt (line 3)) (1.3.0) +Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/dist-packages (from jinja2->torch==2.10->-r requirements.txt (line 3)) (3.0.3) +Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.12/dist-packages (from pandas->datasets->-r requirements.txt (line 8)) (2.9.0.post0) +Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas->datasets->-r requirements.txt (line 8)) (1.16.0) +Requirement already satisfied: click>=8.2.1 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface-hub->-r requirements.txt (line 4)) (8.3.1) +Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface-hub->-r requirements.txt (line 4)) (1.5.4) +Requirement already satisfied: rich>=12.3.0 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface-hub->-r requirements.txt (line 4)) (14.3.3) +Requirement already satisfied: annotated-doc>=0.0.2 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface-hub->-r requirements.txt (line 4)) (0.0.4) +Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.12/dist-packages (from rich>=12.3.0->typer->huggingface-hub->-r requirements.txt (line 4)) (4.0.0) +Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.12/dist-packages (from rich>=12.3.0->typer->huggingface-hub->-r requirements.txt (line 4)) (2.19.2) +Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.12/dist-packages (from markdown-it-py>=2.2.0->rich>=12.3.0->typer->huggingface-hub->-r requirements.txt (line 4)) (0.1.2) +Downloading torch-2.10.0-3-cp312-cp312-manylinux_2_28_x86_64.whl (915.6 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 915.6/915.6 MB 207.5 MB/s 0:00:03 +Downloading cuda_bindings-12.9.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (12.2 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 249.1 MB/s 0:00:00 +Downloading nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (139.1 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.1/139.1 MB 237.2 MB/s 0:00:00 +Downloading triton-3.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (188.3 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 188.3/188.3 MB 217.7 MB/s 0:00:00 +Downloading cuda_pathfinder-1.5.0-py3-none-any.whl (49 kB) +Installing collected packages: triton, nvidia-nvshmem-cu12, cuda-pathfinder, cuda-bindings, torch + Attempting uninstall: triton + Found existing installation: triton 3.5.1 + Uninstalling triton-3.5.1: + Successfully uninstalled triton-3.5.1 + Attempting uninstall: nvidia-nvshmem-cu12 + Found existing installation: nvidia-nvshmem-cu12 3.3.20 + Uninstalling nvidia-nvshmem-cu12-3.3.20: + Successfully uninstalled nvidia-nvshmem-cu12-3.3.20 + Attempting uninstall: torch + Found existing installation: torch 2.9.1+cu128 + Uninstalling torch-2.9.1+cu128: + Successfully uninstalled torch-2.9.1+cu128 + +ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. +torchaudio 2.9.1+cu128 requires torch==2.9.1, but you have torch 2.10.0 which is incompatible. +Successfully installed cuda-bindings-12.9.4 cuda-pathfinder-1.5.0 nvidia-nvshmem-cu12-3.4.5 torch-2.10.0 triton-3.6.0 +WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. +WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/anthropic/ +WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/anthropic/ +WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/anthropic/ +Collecting anthropic + Downloading anthropic-0.86.0-py3-none-any.whl.metadata (3.0 kB) +Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.12/dist-packages (from anthropic) (4.12.0) +Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from anthropic) (1.9.0) +Collecting docstring-parser<1,>=0.15 (from anthropic) + Downloading docstring_parser-0.17.0-py3-none-any.whl.metadata (3.5 kB) +Requirement already satisfied: httpx<1,>=0.25.0 in /usr/local/lib/python3.12/dist-packages (from anthropic) (0.28.1) +Collecting jiter<1,>=0.4.0 (from anthropic) + Downloading jiter-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.2 kB) +Collecting pydantic<3,>=1.9.0 (from anthropic) + Downloading pydantic-2.12.5-py3-none-any.whl.metadata (90 kB) +Collecting sniffio (from anthropic) + Downloading sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB) +Requirement already satisfied: typing-extensions<5,>=4.14 in /usr/local/lib/python3.12/dist-packages (from anthropic) (4.15.0) +Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.12/dist-packages (from anyio<5,>=3.5.0->anthropic) (3.11) +Requirement already satisfied: certifi in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.25.0->anthropic) (2025.11.12) +Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.25.0->anthropic) (1.0.9) +Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.12/dist-packages (from httpcore==1.*->httpx<1,>=0.25.0->anthropic) (0.16.0) +Collecting annotated-types>=0.6.0 (from pydantic<3,>=1.9.0->anthropic) + Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB) +Collecting pydantic-core==2.41.5 (from pydantic<3,>=1.9.0->anthropic) + Downloading pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.3 kB) +Collecting typing-inspection>=0.4.2 (from pydantic<3,>=1.9.0->anthropic) + Downloading typing_inspection-0.4.2-py3-none-any.whl.metadata (2.6 kB) +Downloading anthropic-0.86.0-py3-none-any.whl (469 kB) +Downloading docstring_parser-0.17.0-py3-none-any.whl (36 kB) +Downloading jiter-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360 kB) +Downloading pydantic-2.12.5-py3-none-any.whl (463 kB) +Downloading pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 58.0 MB/s 0:00:00 +Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB) +Downloading typing_inspection-0.4.2-py3-none-any.whl (14 kB) +Downloading sniffio-1.3.1-py3-none-any.whl (10 kB) +Installing collected packages: typing-inspection, sniffio, pydantic-core, jiter, docstring-parser, annotated-types, pydantic, anthropic + +Successfully installed annotated-types-0.7.0 anthropic-0.86.0 docstring-parser-0.17.0 jiter-0.13.0 pydantic-2.12.5 pydantic-core-2.41.5 sniffio-1.3.1 typing-inspection-0.4.2 +WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. +Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.12/dist-packages (1.7.2) +Requirement already satisfied: sentencepiece in /usr/local/lib/python3.12/dist-packages (0.2.1) +Requirement already satisfied: filelock>=3.10.0 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (3.20.1) +Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (2025.12.0) +Requirement already satisfied: hf-xet<2.0.0,>=1.4.2 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (1.4.2) +Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (0.28.1) +Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (25.0) +Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (6.0.3) +Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (4.67.3) +Requirement already satisfied: typer in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (0.24.1) +Requirement already satisfied: typing-extensions>=4.1.0 in /usr/local/lib/python3.12/dist-packages (from huggingface_hub) (4.15.0) +Requirement already satisfied: anyio in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface_hub) (4.12.0) +Requirement already satisfied: certifi in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface_hub) (2025.11.12) +Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface_hub) (1.0.9) +Requirement already satisfied: idna in /usr/local/lib/python3.12/dist-packages (from httpx<1,>=0.23.0->huggingface_hub) (3.11) +Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.12/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->huggingface_hub) (0.16.0) +Requirement already satisfied: click>=8.2.1 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface_hub) (8.3.1) +Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface_hub) (1.5.4) +Requirement already satisfied: rich>=12.3.0 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface_hub) (14.3.3) +Requirement already satisfied: annotated-doc>=0.0.2 in /usr/local/lib/python3.12/dist-packages (from typer->huggingface_hub) (0.0.4) +Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.12/dist-packages (from rich>=12.3.0->typer->huggingface_hub) (4.0.0) +Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.12/dist-packages (from rich>=12.3.0->typer->huggingface_hub) (2.19.2) +Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.12/dist-packages (from markdown-it-py>=2.2.0->rich>=12.3.0->typer->huggingface_hub) (0.1.2) +WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. +Skipping dataset download. +Set RUNPOD_DOWNLOAD_DATA=1 to download shards on this pod. +Preferred flow: prepare data on a cheap pod or volume, then stage to /tmp on the expensive pod. + +=== Setup complete === + +To run autoresearch: + export ANTHROPIC_API_KEY=sk-ant-... + + # Single GPU, 3-min experiments (for fast iteration): + python3 autoresearch.py + + # Single GPU, custom time: + EXPERIMENT_SECONDS=120 python3 autoresearch.py + + # 8×GPU, full 10-min runs (for final validation): + GPUS=8 EXPERIMENT_SECONDS=600 python3 autoresearch.py +removed_bad_shards=0 +verified train_shards=80 val_shards=1 +verified tokenizer=/workspace/parameter-golf/data/tokenizers/fineweb_1024_bpe.model +staging dataset from /workspace/parameter-golf/data/datasets/fineweb10B_sp1024 to /tmp/parameter-golf-data/datasets/fineweb10B_sp1024 +staging tokenizer from /workspace/parameter-golf/data/tokenizers to /tmp/parameter-golf-data/tokenizers +local parity data ready +DATA_PATH=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024 +TOKENIZER_PATH=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +dataset_files=81 +dataset_bytes=16G +verified train_shards=80 val_shards=1 +verified tokenizer=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +workspace verification: ok +tmp verification: ok +No smoke variant requested. +=== Preflight complete === diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/runpod_launch.log b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/runpod_launch.log new file mode 100644 index 000000000..e68192e53 --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/runpod_launch.log @@ -0,0 +1,3 @@ +verified train_shards=80 val_shards=1 +verified tokenizer=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +started streamttt_stream_late4 data_root_mode=tmp pid=1510 log=/workspace/parameter-golf/records/track_10min_16mb/2026-03-24_StreamingTTT_Candidate/runpod_tmp_stream_late4/train.log diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/submission.json b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/submission.json new file mode 100644 index 000000000..7d4e163bb --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/submission.json @@ -0,0 +1,11 @@ +{ + "author": "Simon Marcus", + "github_id": "simon-marcus", + "name": "Streaming Legal TTT + Late-Block Adaptation (Non-Record)", + "blurb": "Non-record submission built from the March 23 LeakyReLU^2 + Legal TTT + Parallel Muon leader. Keeps the same trained model stack and activation, but switches eval-time adaptation to streaming legal TTT with last-4-block updates only. Final result is slightly behind the leader, but provides a useful community data point on how streaming suffix-only TTT compares to chunked all-block legal TTT.", + "date": "2026-03-24", + "val_loss": 1.89245802, + "val_bpb": 1.12082320, + "bytes_total": 15867004, + "bytes_code": 101140 +} diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_gpt.py b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_gpt.py new file mode 100644 index 000000000..ebd55c258 --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_gpt.py @@ -0,0 +1,2138 @@ +from __future__ import annotations +import copy +import glob +import io +import lzma +import math +import os +import random +import subprocess +import sys +import time +import uuid +import zlib +from pathlib import Path +try: + import zstandard + _COMPRESSOR = "zstd" +except ImportError: + _COMPRESSOR = "zlib" +import numpy as np +import sentencepiece as spm +import torch +import torch.distributed as dist +import torch.nn.functional as F +from torch import Tensor, nn +from torch.nn.parallel import DistributedDataParallel as DDP +from flash_attn_interface import flash_attn_func as flash_attn_3_func +class Hyperparameters: + data_path = os.environ.get("DATA_PATH", "./data/datasets/fineweb10B_sp1024") + train_files = os.path.join(data_path, "fineweb_train_*.bin") + val_files = os.path.join(data_path, "fineweb_val_*.bin") + tokenizer_path = os.environ.get("TOKENIZER_PATH", "./data/tokenizers/fineweb_1024_bpe.model") + run_id = os.environ.get("RUN_ID", str(uuid.uuid4())) + seed = int(os.environ.get("SEED", 1337)) + val_batch_size = int(os.environ.get("VAL_BATCH_SIZE", 524_288)) + val_tokens_limit = int(os.environ.get("VAL_TOKENS_LIMIT", 0)) + val_loss_every = int(os.environ.get("VAL_LOSS_EVERY", 4000)) + train_log_every = int(os.environ.get("TRAIN_LOG_EVERY", 500)) + iterations = int(os.environ.get("ITERATIONS", 20000)) + warmdown_iters = int(os.environ.get("WARMDOWN_ITERS", 3500)) + warmup_steps = int(os.environ.get("WARMUP_STEPS", 20)) + train_batch_tokens = int(os.environ.get("TRAIN_BATCH_TOKENS", 786_432)) + train_seq_len = int(os.environ.get("TRAIN_SEQ_LEN", 2048)) + eval_seq_len = int(os.environ.get("EVAL_SEQ_LEN", 2048)) + max_wallclock_seconds = float(os.environ.get("MAX_WALLCLOCK_SECONDS", 600.0)) + qk_gain_init = float(os.environ.get("QK_GAIN_INIT", 1.5)) + vocab_size = int(os.environ.get("VOCAB_SIZE", 1024)) + num_layers = int(os.environ.get("NUM_LAYERS", 11)) + num_kv_heads = int(os.environ.get("NUM_KV_HEADS", 4)) + model_dim = int(os.environ.get("MODEL_DIM", 512)) + num_heads = int(os.environ.get("NUM_HEADS", 8)) + mlp_mult = float(os.environ.get("MLP_MULT", 3.0)) + tie_embeddings = bool(int(os.environ.get("TIE_EMBEDDINGS", "1"))) + rope_base = float(os.environ.get("ROPE_BASE", 10000.0)) + logit_softcap = float(os.environ.get("LOGIT_SOFTCAP", 30.0)) + embed_lr = float(os.environ.get("EMBED_LR", 0.6)) + head_lr = float(os.environ.get("HEAD_LR", 0.008)) + tied_embed_lr = float(os.environ.get("TIED_EMBED_LR", 0.035)) + tied_embed_init_std = float(os.environ.get("TIED_EMBED_INIT_STD", 0.005)) + matrix_lr = float(os.environ.get("MATRIX_LR", 0.025)) + scalar_lr = float(os.environ.get("SCALAR_LR", 0.025)) + muon_momentum = float(os.environ.get("MUON_MOMENTUM", 0.99)) + muon_backend_steps = int(os.environ.get("MUON_BACKEND_STEPS", 5)) + muon_momentum_warmup_start = float(os.environ.get("MUON_MOMENTUM_WARMUP_START", 0.92)) + muon_momentum_warmup_steps = int(os.environ.get("MUON_MOMENTUM_WARMUP_STEPS", 1500)) + beta1 = float(os.environ.get("BETA1", 0.9)) + beta2 = float(os.environ.get("BETA2", 0.95)) + adam_eps = float(os.environ.get("ADAM_EPS", 1e-8)) + grad_clip_norm = float(os.environ.get("GRAD_CLIP_NORM", 0.3)) + eval_stride = int(os.environ.get("EVAL_STRIDE", 64)) + mtp_num_heads = int(os.environ.get("MTP_NUM_HEADS", 0)) + mtp_loss_weight = float(os.environ.get("MTP_LOSS_WEIGHT", 0.2)) + muon_beta2 = float(os.environ.get("MUON_BETA2", 0.95)) + swa_enabled = bool(int(os.environ.get("SWA_ENABLED", "1"))) + swa_every = int(os.environ.get("SWA_EVERY", 50)) + lawa_enabled = bool(int(os.environ.get("LAWA_ENABLED", "0"))) + lawa_k = int(os.environ.get("LAWA_K", 10)) + lawa_freq = int(os.environ.get("LAWA_FREQ", 100)) + muon_wd = float(os.environ.get("MUON_WD", 0.04)) + adam_wd = float(os.environ.get("ADAM_WD", 0.04)) + qat_enabled = bool(int(os.environ.get("QAT_ENABLED", "0"))) + bigram_vocab_size = int(os.environ.get("BIGRAM_VOCAB_SIZE", 2048)) + bigram_dim = int(os.environ.get("BIGRAM_DIM", 128)) + xsa_last_n = int(os.environ.get("XSA_LAST_N", 4)) + rope_dims = int(os.environ.get("ROPE_DIMS", 16)) + ln_scale = bool(int(os.environ.get("LN_SCALE", "1"))) + dtg_enabled = bool(int(os.environ.get("DTG_ENABLED", "0"))) + late_qat_threshold = float(os.environ.get("LATE_QAT_THRESHOLD", 0.15)) + ve_enabled = bool(int(os.environ.get("VE_ENABLED", "1"))) + ve_dim = int(os.environ.get("VE_DIM", 128)) + ve_layers = os.environ.get("VE_LAYERS", "9,10") + gated_attention = bool(int(os.environ.get("GATED_ATTENTION", "0"))) + value_residual = bool(int(os.environ.get("VALUE_RESIDUAL", "0"))) + activation_mode = os.environ.get("ACTIVATION_MODE", "leaky_relu_sq") + activation_neg_slope = float(os.environ.get("ACTIVATION_NEG_SLOPE", 0.5)) + asymmetric_square_init = float(os.environ.get("ASYMMETRIC_SQUARE_INIT", 0.25)) + gated_square_beta_init = float(os.environ.get("GATED_SQUARE_BETA_INIT", 1.0)) + ttt_enabled = bool(int(os.environ.get("TTT_ENABLED", "0"))) + ttt_lr = float(os.environ.get("TTT_LR", 0.002)) + ttt_epochs = int(os.environ.get("TTT_EPOCHS", 3)) + ttt_chunk_tokens = int(os.environ.get("TTT_CHUNK_TOKENS", 32768)) + ttt_freeze_blocks = int(os.environ.get("TTT_FREEZE_BLOCKS", 2)) + ttt_mode = os.environ.get("TTT_MODE", "chunk") + ttt_param_mode = os.environ.get("TTT_PARAM_MODE", "freeze_first_n") + ttt_last_n_blocks = int(os.environ.get("TTT_LAST_N_BLOCKS", 4)) + ttt_lr_schedule = os.environ.get("TTT_LR_SCHEDULE", "chunk_cosine") + ttt_momentum = float(os.environ.get("TTT_MOMENTUM", 0.9)) + ttt_batch_seqs = int(os.environ.get("TTT_BATCH_SEQS", 32)) + ttt_grad_clip = float(os.environ.get("TTT_GRAD_CLIP", 1.0)) + +# --- Batched Newton-Schulz orthogonalization --- + +def zeropower_via_newtonschulz5(G: Tensor, steps: int = 5, eps: float = 1e-7) -> Tensor: + """Batched Newton-Schulz orthogonalization. G: (B,M,N) or (M,N).""" + a, b, c = (3.4445, -4.7750, 2.0315) + was_2d = G.ndim == 2 + if was_2d: + G = G.unsqueeze(0) + X = G.bfloat16() + transposed = X.size(-2) > X.size(-1) + if transposed: + X = X.mT + X = X / (X.norm(dim=(-2, -1), keepdim=True) + eps) + for _ in range(steps): + A = X @ X.mT + B = b * A + c * (A @ A) + X = a * X + B @ X + if transposed: + X = X.mT + if was_2d: + X = X.squeeze(0) + return X + +# --- Parallel Muon optimizer --- + +class Muon(torch.optim.Optimizer): + """Parallel Muon: post-backward reduce-scatter -> local NS5 -> all-gather. + + No DDP for bank params. After backward, this optimizer: + 1. Launches async reduce-scatter for all banks (biggest first) + 2. Returns control so Adam can step on small params while RS is in-flight + 3. Waits for each RS, runs local NS5 on the shard, launches async all-gather + 4. Each all-gather overlaps with next bank's NS5 + """ + def __init__(self, params, lr: float, momentum: float, backend_steps: int, + nesterov: bool = True, weight_decay: float = 0.0): + super().__init__( + params, + dict(lr=lr, momentum=momentum, backend_steps=backend_steps, + nesterov=nesterov, weight_decay=weight_decay), + ) + self._built = False + + def _build(self): + self._distributed = dist.is_available() and dist.is_initialized() + self._world_size = dist.get_world_size() if self._distributed else 1 + self._rank = dist.get_rank() if self._distributed else 0 + ws = self._world_size + + self._bank_meta = [] + for group in self.param_groups: + for p in group["params"]: + B = p.shape[0] + padded_B = ((B + ws - 1) // ws) * ws + shard_B = padded_B // ws + tail = p.shape[1:] + dev = p.device + self._bank_meta.append({ + 'p': p, + 'B': B, + 'padded_grad': torch.zeros(padded_B, *tail, device=dev, dtype=torch.bfloat16), + 'shard': torch.zeros(shard_B, *tail, device=dev, dtype=torch.bfloat16), + 'shard_mom': torch.zeros(shard_B, *tail, device=dev, dtype=torch.bfloat16), + 'full_update': torch.zeros(padded_B, *tail, device=dev, dtype=torch.bfloat16), + 'scale': max(1, p.shape[-2] / p.shape[-1]) ** 0.5, + }) + # Sort by size descending -- launch biggest reduce-scatters first + self._bank_meta.sort(key=lambda m: -m['p'].numel()) + self._built = True + + def launch_reduce_scatters(self): + """Phase 1: launch async reduce-scatter for all banks. Call right after backward.""" + if not self._built: + self._build() + if not self._distributed: + return + self._rs_futures = [] + for m in self._bank_meta: + p = m['p'] + if p.grad is None: + self._rs_futures.append(None) + continue + pg = m['padded_grad'] + pg[:m['B']].copy_(p.grad.bfloat16()) + if pg.shape[0] > m['B']: + pg[m['B']:].zero_() + fut = dist.reduce_scatter_tensor(m['shard'], pg, op=dist.ReduceOp.AVG, async_op=True) + self._rs_futures.append(fut) + + @torch.no_grad() + def step(self, closure=None): + """Phase 3: wait for RS, local NS5, all-gather. Call AFTER Adam steps.""" + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + if not self._built: + self._build() + + for group in self.param_groups: + lr = group["lr"] + momentum = group["momentum"] + backend_steps = group["backend_steps"] + nesterov = group["nesterov"] + wd = group.get("weight_decay", 0.0) + + prev_ag_handle = None + prev_m = None + + sharded = self._distributed and hasattr(self, '_rs_futures') + + for i, m in enumerate(self._bank_meta): + p = m['p'] + if p.grad is None: + continue + + if prev_ag_handle is not None: + prev_ag_handle.wait() + pp = prev_m['p'] + upd = prev_m['full_update'][:prev_m['B']] + if wd > 0.0: + pp.data.mul_(1.0 - lr * wd) + pp.add_(upd.to(dtype=pp.dtype), alpha=-lr * prev_m['scale']) + + if sharded and self._rs_futures[i] is not None: + self._rs_futures[i].wait() + g = m['shard'] + buf = m['shard_mom'] + else: + g = p.grad.bfloat16() + state = self.state[p] + if "momentum_buffer" not in state: + state["momentum_buffer"] = torch.zeros_like(g) + buf = state["momentum_buffer"] + + buf.mul_(momentum).add_(g) + if nesterov: + update = g.add(buf, alpha=momentum) + else: + update = buf + + update = zeropower_via_newtonschulz5(update, steps=backend_steps) + + if sharded: + prev_ag_handle = dist.all_gather_into_tensor( + m['full_update'], update, async_op=True) + prev_m = m + else: + if wd > 0.0: + p.data.mul_(1.0 - lr * wd) + p.add_(update.to(dtype=p.dtype), alpha=-lr * m['scale']) + + if prev_ag_handle is not None: + prev_ag_handle.wait() + pp = prev_m['p'] + upd = prev_m['full_update'][:prev_m['B']] + if wd > 0.0: + pp.data.mul_(1.0 - lr * wd) + pp.add_(upd.to(dtype=pp.dtype), alpha=-lr * prev_m['scale']) + + if hasattr(self, '_rs_futures'): + del self._rs_futures + + return loss + +# --- Tokenizer evaluation helpers --- + +def build_sentencepiece_luts( + sp: spm.SentencePieceProcessor, vocab_size: int, device: torch.device +) -> tuple[Tensor, Tensor, Tensor]: + sp_vocab_size = int(sp.vocab_size()) + table_size = max(sp_vocab_size, vocab_size) + base_bytes_np = np.zeros((table_size,), dtype=np.int16) + has_leading_space_np = np.zeros((table_size,), dtype=np.bool_) + is_boundary_token_np = np.ones((table_size,), dtype=np.bool_) + for token_id in range(sp_vocab_size): + if sp.is_control(token_id) or sp.is_unknown(token_id) or sp.is_unused(token_id): + continue + is_boundary_token_np[token_id] = False + if sp.is_byte(token_id): + base_bytes_np[token_id] = 1 + continue + piece = sp.id_to_piece(token_id) + if piece.startswith("\u2581"): + has_leading_space_np[token_id] = True + piece = piece[1:] + base_bytes_np[token_id] = len(piece.encode("utf-8")) + return ( + torch.tensor(base_bytes_np, dtype=torch.int16, device=device), + torch.tensor(has_leading_space_np, dtype=torch.bool, device=device), + torch.tensor(is_boundary_token_np, dtype=torch.bool, device=device), + ) +def load_validation_tokens(pattern: str, seq_len: int, token_limit: int = 0) -> Tensor: + files = [Path(p) for p in sorted(glob.glob(pattern))] + if not files: + raise FileNotFoundError(f"No files found for pattern: {pattern}") + tokens = torch.cat([load_data_shard(file) for file in files]).contiguous() + if token_limit > 0: + tokens = tokens[: min(tokens.numel(), token_limit + 1)] + usable = ((tokens.numel() - 1) // seq_len) * seq_len + if usable <= 0: + raise ValueError(f"Validation split is too short for TRAIN_SEQ_LEN={seq_len}") + return tokens[: usable + 1] +def eval_val( + args: Hyperparameters, + model: nn.Module, + rank: int, + world_size: int, + device: torch.device, + grad_accum_steps: int, + val_tokens: Tensor, + base_bytes_lut: Tensor, + has_leading_space_lut: Tensor, + is_boundary_token_lut: Tensor, + eval_seq_len: int | None = None, +) -> tuple[float, float]: + seq_len = eval_seq_len or args.train_seq_len + local_batch_tokens = args.val_batch_size // (world_size * grad_accum_steps) + if local_batch_tokens < seq_len: + raise ValueError( + "VAL_BATCH_SIZE must provide at least one sequence per rank; " + f"got VAL_BATCH_SIZE={args.val_batch_size}, WORLD_SIZE={world_size}, " + f"GRAD_ACCUM_STEPS={grad_accum_steps}, seq_len={seq_len}" + ) + local_batch_seqs = local_batch_tokens // seq_len + total_seqs = (val_tokens.numel() - 1) // seq_len + seq_start = (total_seqs * rank) // world_size + seq_end = (total_seqs * (rank + 1)) // world_size + val_loss_sum = torch.zeros((), device=device, dtype=torch.float64) + val_token_count = torch.zeros((), device=device, dtype=torch.float64) + val_byte_count = torch.zeros((), device=device, dtype=torch.float64) + model.eval() + with torch.inference_mode(): + for batch_seq_start in range(seq_start, seq_end, local_batch_seqs): + batch_seq_end = min(batch_seq_start + local_batch_seqs, seq_end) + raw_start = batch_seq_start * seq_len + raw_end = batch_seq_end * seq_len + 1 + local = val_tokens[raw_start:raw_end].to(device=device, dtype=torch.int64, non_blocking=True) + x = local[:-1].reshape(-1, seq_len) + y = local[1:].reshape(-1, seq_len) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + batch_loss = model(x, y).detach() + batch_token_count = float(y.numel()) + val_loss_sum += batch_loss.to(torch.float64) * batch_token_count + val_token_count += batch_token_count + prev_ids = x.reshape(-1) + tgt_ids = y.reshape(-1) + token_bytes = base_bytes_lut[tgt_ids].to(dtype=torch.int16) + token_bytes += (has_leading_space_lut[tgt_ids] & ~is_boundary_token_lut[prev_ids]).to(dtype=torch.int16) + val_byte_count += token_bytes.to(torch.float64).sum() + if dist.is_available() and dist.is_initialized(): + dist.all_reduce(val_loss_sum, op=dist.ReduceOp.SUM) + dist.all_reduce(val_token_count, op=dist.ReduceOp.SUM) + dist.all_reduce(val_byte_count, op=dist.ReduceOp.SUM) + val_loss = val_loss_sum / val_token_count + bits_per_token = val_loss.item() / math.log(2.0) + tokens_per_byte = val_token_count.item() / val_byte_count.item() + model.train() + return float(val_loss.item()), float(bits_per_token * tokens_per_byte) + +# --- Quantization helpers --- + +CONTROL_TENSOR_NAME_PATTERNS = tuple( + pattern + for pattern in os.environ.get( + "CONTROL_TENSOR_NAME_PATTERNS", + "attn_scale,attn_scales,mlp_scale,mlp_scales,resid_mix,resid_mixes,q_gain,skip_weight,skip_weights,smear,dtg_gate,ve_layer_scales,ve_shared.scale,attn_gate,vr_lambda", + ).split(",") + if pattern +) +INT8_KEEP_FLOAT_FP32_NAME_PATTERNS = tuple( + pattern + for pattern in os.environ.get( + "INT8_KEEP_FLOAT_FP32_NAME_PATTERNS", + ",".join(CONTROL_TENSOR_NAME_PATTERNS), + ).split(",") + if pattern +) +INT8_KEEP_FLOAT_MAX_NUMEL = 65_536 +INT8_KEEP_FLOAT_STORE_DTYPE = torch.float16 +INT8_PER_ROW_SCALE_DTYPE = torch.float16 +INT8_CLIP_PERCENTILE = 99.99984 +INT8_CLIP_Q = INT8_CLIP_PERCENTILE / 100.0 +def tensor_nbytes(t: Tensor) -> int: + return int(t.numel()) * int(t.element_size()) +def keep_float_tensor(name: str, t: Tensor, passthrough_orig_dtypes: dict[str, str]) -> Tensor: + if any(pattern in name for pattern in INT8_KEEP_FLOAT_FP32_NAME_PATTERNS): + return t.float().contiguous() + if t.dtype in {torch.float32, torch.bfloat16}: + passthrough_orig_dtypes[name] = str(t.dtype).removeprefix("torch.") + return t.to(dtype=INT8_KEEP_FLOAT_STORE_DTYPE).contiguous() + return t +def quantize_float_tensor(t: Tensor) -> tuple[Tensor, Tensor]: + t32 = t.float() + if t32.ndim == 2: + clip_abs = ( + torch.quantile(t32.abs(), INT8_CLIP_Q, dim=1) + if t32.numel() + else torch.empty((t32.shape[0],), dtype=torch.float32) + ) + clipped = torch.maximum(torch.minimum(t32, clip_abs[:, None]), -clip_abs[:, None]) + scale = (clip_abs / 127.0).clamp_min(1.0 / 127.0) + q = torch.clamp(torch.round(clipped / scale[:, None]), -127, 127).to(torch.int8).contiguous() + return q, scale.to(dtype=INT8_PER_ROW_SCALE_DTYPE).contiguous() + clip_abs = float(torch.quantile(t32.abs().flatten(), INT8_CLIP_Q).item()) if t32.numel() else 0.0 + scale = torch.tensor(clip_abs / 127.0 if clip_abs > 0 else 1.0, dtype=torch.float32) + q = torch.clamp(torch.round(torch.clamp(t32, -clip_abs, clip_abs) / scale), -127, 127).to(torch.int8).contiguous() + return q, scale +def quantize_state_dict_int8(state_dict: dict[str, Tensor]): + quantized: dict[str, Tensor] = {} + scales: dict[str, Tensor] = {} + dtypes: dict[str, str] = {} + passthrough: dict[str, Tensor] = {} + passthrough_orig_dtypes: dict[str, str] = {} + qmeta: dict[str, dict[str, object]] = {} + stats = dict.fromkeys( + ("param_count", "num_tensors", "num_float_tensors", "num_nonfloat_tensors", "baseline_tensor_bytes", "int8_payload_bytes"), + 0, + ) + for name, tensor in state_dict.items(): + t = tensor.detach().to("cpu").contiguous() + stats["param_count"] += int(t.numel()) + stats["num_tensors"] += 1 + stats["baseline_tensor_bytes"] += tensor_nbytes(t) + if not t.is_floating_point(): + stats["num_nonfloat_tensors"] += 1 + passthrough[name] = t + stats["int8_payload_bytes"] += tensor_nbytes(t) + continue + if t.numel() <= INT8_KEEP_FLOAT_MAX_NUMEL: + kept = keep_float_tensor(name, t, passthrough_orig_dtypes) + passthrough[name] = kept + stats["int8_payload_bytes"] += tensor_nbytes(kept) + continue + stats["num_float_tensors"] += 1 + q, s = quantize_float_tensor(t) + if s.ndim > 0: + qmeta[name] = {"scheme": "per_row", "axis": 0} + quantized[name] = q + scales[name] = s + dtypes[name] = str(t.dtype).removeprefix("torch.") + stats["int8_payload_bytes"] += tensor_nbytes(q) + tensor_nbytes(s) + obj: dict[str, object] = { + "__quant_format__": "int8_clean_per_row_v1", + "quantized": quantized, + "scales": scales, + "dtypes": dtypes, + "passthrough": passthrough, + } + if qmeta: + obj["qmeta"] = qmeta + if passthrough_orig_dtypes: + obj["passthrough_orig_dtypes"] = passthrough_orig_dtypes + return obj, stats +def dequantize_state_dict_int8(obj: dict[str, object]) -> dict[str, Tensor]: + out: dict[str, Tensor] = {} + qmeta = obj.get("qmeta", {}) + passthrough_orig_dtypes = obj.get("passthrough_orig_dtypes", {}) + for name, q in obj["quantized"].items(): + dtype = getattr(torch, obj["dtypes"][name]) + s = obj["scales"][name] + if qmeta.get(name, {}).get("scheme") == "per_row" or s.ndim > 0: + s = s.to(dtype=torch.float32) + out[name] = (q.float() * s.view(q.shape[0], *([1] * (q.ndim - 1)))).to(dtype=dtype).contiguous() + else: + scale = float(s.item()) + out[name] = (q.float() * scale).to(dtype=dtype).contiguous() + for name, t in obj["passthrough"].items(): + out_t = t.detach().to("cpu").contiguous() + orig_dtype = passthrough_orig_dtypes.get(name) + if isinstance(orig_dtype, str): + out_t = out_t.to(dtype=getattr(torch, orig_dtype)).contiguous() + out[name] = out_t + return out + +# --- Data loading --- + +def load_data_shard(file: Path) -> Tensor: + header_bytes = 256 * np.dtype(" None: + self.file_idx = (self.file_idx + 1) % len(self.files) + self.tokens = load_data_shard(self.files[self.file_idx]) + self.pos = 0 + def take(self, n: int) -> Tensor: + chunks: list[Tensor] = [] + remaining = n + while remaining > 0: + avail = self.tokens.numel() - self.pos + if avail <= 0: + self._advance_file() + continue + k = min(remaining, avail) + chunks.append(self.tokens[self.pos : self.pos + k]) + self.pos += k + remaining -= k + return chunks[0] if len(chunks) == 1 else torch.cat(chunks) +class DistributedTokenLoader: + def __init__(self, pattern: str, rank: int, world_size: int, device: torch.device): + self.rank = rank + self.world_size = world_size + self.device = device + self.stream = TokenStream(pattern) + def next_batch(self, global_tokens: int, seq_len: int, grad_accum_steps: int) -> tuple[Tensor, Tensor]: + local_tokens = global_tokens // (self.world_size * grad_accum_steps) + per_rank_span = local_tokens + 1 + chunk = self.stream.take(per_rank_span * self.world_size) + start = self.rank * per_rank_span + local = chunk[start : start + per_rank_span].to(dtype=torch.int64) + x = local[:-1].reshape(-1, seq_len) + y = local[1:].reshape(-1, seq_len) + return x.to(self.device, non_blocking=True), y.to(self.device, non_blocking=True) + +# --- Transformer modules --- + +class RMSNorm(nn.Module): + def __init__(self, eps: float | None = None): + super().__init__() + self.eps = eps + def forward(self, x: Tensor) -> Tensor: + return F.rms_norm(x, (x.size(-1),), eps=self.eps) +class CastedLinear(nn.Linear): + _qat_enabled: bool = False + def forward(self, x: Tensor) -> Tensor: + w = self.weight.to(x.dtype) + if CastedLinear._qat_enabled and self.training and w.ndim == 2: + with torch.no_grad(): + w32 = self.weight.float() + row_max = w32.abs().amax(dim=1) + scale = (row_max / 31.0).clamp_min(1.0 / 31.0) + w_q = (torch.clamp(torch.round(w32 / scale[:, None]), -32, 31) * scale[:, None]).to(x.dtype) + w = w + (w_q - w).detach() + bias = self.bias.to(x.dtype) if self.bias is not None else None + return F.linear(x, w, bias) +def restore_low_dim_params_to_fp32(module: nn.Module) -> None: + with torch.no_grad(): + for name, param in module.named_parameters(): + if (param.ndim < 2 or any(pattern in name for pattern in CONTROL_TENSOR_NAME_PATTERNS)) and param.dtype != torch.float32: + param.data = param.data.float() +class Rotary(nn.Module): + def __init__(self, dim: int, base: float = 10000.0, train_seq_len: int = 1024, rope_dims: int = 0): + super().__init__() + self.dim = dim + self.base = base + self.train_seq_len = train_seq_len + self.rope_dims = rope_dims if rope_dims > 0 else dim + inv_freq = 1.0 / (base ** (torch.arange(0, self.rope_dims, 2, dtype=torch.float32) / self.rope_dims)) + self.register_buffer("inv_freq", inv_freq, persistent=False) + self._seq_len_cached = 0 + self._cos_cached: Tensor | None = None + self._sin_cached: Tensor | None = None + def forward(self, seq_len: int, device: torch.device, dtype: torch.dtype) -> tuple[Tensor, Tensor]: + if ( + self._cos_cached is None + or self._sin_cached is None + or self._seq_len_cached != seq_len + or self._cos_cached.device != device + ): + rd = self.rope_dims + if seq_len > self.train_seq_len: + scale = seq_len / self.train_seq_len + new_base = self.base * (scale ** (rd / (rd - 2))) + inv_freq = 1.0 / (new_base ** (torch.arange(0, rd, 2, dtype=torch.float32, device=device) / rd)) + else: + inv_freq = self.inv_freq.to(device) + t = torch.arange(seq_len, device=device, dtype=inv_freq.dtype) + freqs = torch.outer(t, inv_freq) + self._cos_cached = freqs.cos()[None, :, None, :] + self._sin_cached = freqs.sin()[None, :, None, :] + self._seq_len_cached = seq_len + return self._cos_cached.to(dtype=dtype), self._sin_cached.to(dtype=dtype) +def apply_rotary_emb(x: Tensor, cos: Tensor, sin: Tensor, rope_dims: int = 0) -> Tensor: + if rope_dims > 0 and rope_dims < x.size(-1): + x_rope, x_pass = x[..., :rope_dims], x[..., rope_dims:] + half = rope_dims // 2 + x1, x2 = x_rope[..., :half], x_rope[..., half:] + x_rope = torch.cat((x1 * cos + x2 * sin, x1 * (-sin) + x2 * cos), dim=-1) + return torch.cat((x_rope, x_pass), dim=-1) + half = x.size(-1) // 2 + x1, x2 = x[..., :half], x[..., half:] + return torch.cat((x1 * cos + x2 * sin, x1 * (-sin) + x2 * cos), dim=-1) + +class CausalSelfAttention(nn.Module): + def __init__( + self, + dim: int, + num_heads: int, + num_kv_heads: int, + rope_base: float, + qk_gain_init: float, + gated_attention: bool = False, + value_residual: bool = False, + ): + super().__init__() + if dim % num_heads != 0: + raise ValueError("model_dim must be divisible by num_heads") + if num_heads % num_kv_heads != 0: + raise ValueError("num_heads must be divisible by num_kv_heads") + self.num_heads = num_heads + self.num_kv_heads = num_kv_heads + self.head_dim = dim // num_heads + if self.head_dim % 2 != 0: + raise ValueError("head_dim must be even for RoPE") + # No CastedLinear -- weights come from banks + self.q_gain = nn.Parameter(torch.full((num_heads,), qk_gain_init, dtype=torch.float32)) + self.rope_dims = 0 # set by GPT.__init__ for partial RoPE + self.rotary = Rotary(self.head_dim, base=rope_base, train_seq_len=1024) + self.use_xsa = False # set by GPT.__init__ for deep layers only + # Gated attention and value residual (non-banked small params) + self.gated_attention = gated_attention + if gated_attention: + self.attn_gate = nn.Linear(dim, num_heads, bias=True) + nn.init.zeros_(self.attn_gate.weight) + nn.init.constant_(self.attn_gate.bias, 4.0) + self.value_residual = value_residual + if value_residual: + self.vr_lambda = nn.Parameter(torch.tensor([0.5, 0.5], dtype=torch.float32)) + def _xsa_efficient(self, y: Tensor, v: Tensor) -> Tensor: + """Efficient XSA: subtract self-value projection via GQA-aware reshape (no repeat_interleave). + y: [B, T, H, D], v: [B, T, Hkv, D]. H must be divisible by Hkv.""" + B, T, H, D = y.shape + Hkv = v.size(-2) + group = H // Hkv + y_g = y.reshape(B, T, Hkv, group, D) # [B, T, Hkv, group, D] + vn = F.normalize(v, dim=-1).unsqueeze(-2) # [B, T, Hkv, 1, D] -- broadcast ready + proj = (y_g * vn).sum(dim=-1, keepdim=True) * vn + return (y_g - proj).reshape(B, T, H, D) + def forward(self, x: Tensor, q_w: Tensor, k_w: Tensor, v_w: Tensor, out_w: Tensor, v_embed: Tensor | None = None, v0: Tensor | None = None) -> tuple[Tensor, Tensor | None]: + bsz, seqlen, dim = x.shape + q = F.linear(x, q_w.to(x.dtype)).reshape(bsz, seqlen, self.num_heads, self.head_dim) + k = F.linear(x, k_w.to(x.dtype)).reshape(bsz, seqlen, self.num_kv_heads, self.head_dim) + v = F.linear(x, v_w.to(x.dtype)) + if v_embed is not None: + v = v + v_embed + v = v.reshape(bsz, seqlen, self.num_kv_heads, self.head_dim) + raw_v = v if self.value_residual else None + if self.value_residual and v0 is not None: + lam = self.vr_lambda.to(dtype=v.dtype) + v = lam[0] * v0 + lam[1] * v + q = F.rms_norm(q, (q.size(-1),)) + k = F.rms_norm(k, (k.size(-1),)) + cos, sin = self.rotary(seqlen, x.device, q.dtype) + q = apply_rotary_emb(q, cos, sin, self.rope_dims) + k = apply_rotary_emb(k, cos, sin, self.rope_dims) + q = q * self.q_gain.to(dtype=q.dtype)[None, None, :, None] + y = flash_attn_3_func(q, k, v, causal=True) + if self.use_xsa: + y = self._xsa_efficient(y, v) + if self.gated_attention: + # gate shape: (bsz, seqlen, num_heads) -> (bsz, seqlen, num_heads, 1) for B,T,H,D layout + gate = torch.sigmoid(self.attn_gate(x)).unsqueeze(-1) + y = y * gate + y = y.reshape(bsz, seqlen, dim) + return F.linear(y, out_w.to(x.dtype)), raw_v + +class SmearGate(nn.Module): + def __init__(self, dim: int): + super().__init__() + self.gate = nn.Parameter(torch.zeros(dim, dtype=torch.float32)) + def forward(self, x: Tensor) -> Tensor: + g = torch.sigmoid(self.gate.to(dtype=x.dtype))[None, None, :] + x_prev = torch.cat([torch.zeros_like(x[:, :1]), x[:, :-1]], dim=1) + return (1 - g) * x + g * x_prev + +class BigramHashEmbedding(nn.Module): + def __init__(self, bigram_vocab_size: int, bigram_dim: int, model_dim: int): + super().__init__() + self.bigram_vocab_size = bigram_vocab_size + self.embed = nn.Embedding(bigram_vocab_size, bigram_dim) + nn.init.zeros_(self.embed.weight) + self.proj = CastedLinear(bigram_dim, model_dim, bias=False) if bigram_dim != model_dim else None + if self.proj is not None: + nn.init.zeros_(self.proj.weight) + self.scale = nn.Parameter(torch.tensor(0.05, dtype=torch.float32)) + def bigram_hash(self, tokens: Tensor) -> Tensor: + t = tokens.to(torch.int32) + mod = self.bigram_vocab_size - 1 + out = torch.empty_like(t) + out[..., 0] = mod + out[..., 1:] = torch.bitwise_xor(36313 * t[..., 1:], 27191 * t[..., :-1]) % mod + return out.long() + def forward(self, token_ids: Tensor) -> Tensor: + h = self.embed(self.bigram_hash(token_ids)) + if self.proj is not None: + h = self.proj(h) + return h * self.scale.to(dtype=h.dtype) + +class ValueEmbedding(nn.Module): + """Reinject token identity into attention values at specific layers. + Each table maps vocab tokens to a low-dim embedding, projected to model_dim.""" + def __init__(self, vocab_size: int, ve_dim: int, model_dim: int): + super().__init__() + self.embed = nn.Embedding(vocab_size, ve_dim) + nn.init.normal_(self.embed.weight, std=0.01) + self.proj = CastedLinear(ve_dim, model_dim, bias=False) if ve_dim != model_dim else None + if self.proj is not None: + nn.init.zeros_(self.proj.weight) + self.scale = nn.Parameter(torch.tensor(0.1, dtype=torch.float32)) + def forward(self, token_ids: Tensor) -> Tensor: + h = self.embed(token_ids) + if self.proj is not None: + h = self.proj(h) + return h * self.scale.to(dtype=h.dtype) + +class MLP(nn.Module): + def __init__( + self, + dim: int, + mlp_mult: int, + activation_mode: str = "leaky_relu_sq", + activation_neg_slope: float = 0.5, + asymmetric_square_init: float = 0.25, + gated_square_beta_init: float = 1.0, + ): + super().__init__() + # No CastedLinear -- weights come from banks + self.activation_mode = activation_mode + self.activation_neg_slope = activation_neg_slope + if activation_mode == "asymmetric_square": + self.neg_sq_scale = nn.Parameter(torch.tensor(asymmetric_square_init, dtype=torch.float32)) + else: + self.neg_sq_scale = None + if activation_mode == "gated_square": + self.gated_square_beta = nn.Parameter(torch.tensor(gated_square_beta_init, dtype=torch.float32)) + else: + self.gated_square_beta = None + def forward(self, x: Tensor, up_w: Tensor, down_w: Tensor) -> Tensor: + u = F.linear(x, up_w.to(x.dtype)) + if self.activation_mode == "leaky_relu_sq": + h = F.leaky_relu(u, negative_slope=self.activation_neg_slope).square() + elif self.activation_mode == "asymmetric_square": + neg_sq_scale = self.neg_sq_scale.to(dtype=u.dtype).clamp(0.0, 4.0) + h = F.relu(u).square() + neg_sq_scale * F.relu(-u).square() + elif self.activation_mode == "gated_square": + beta = self.gated_square_beta.to(dtype=u.dtype).clamp(0.0, 8.0) + h = u.square() * torch.sigmoid(beta * u) + elif self.activation_mode == "sign_preserving_square": + h = u * u.abs() + else: + raise ValueError(f"Unknown ACTIVATION_MODE={self.activation_mode}") + return F.linear(h, down_w.to(x.dtype)) + +class Block(nn.Module): + def __init__( + self, + dim: int, + num_heads: int, + num_kv_heads: int, + mlp_mult: int, + rope_base: float, + qk_gain_init: float, + layer_idx: int = 0, + ln_scale: bool = False, + dtg: bool = False, + gated_attention: bool = False, + value_residual: bool = False, + activation_mode: str = "leaky_relu_sq", + activation_neg_slope: float = 0.5, + asymmetric_square_init: float = 0.25, + gated_square_beta_init: float = 1.0, + ): + super().__init__() + self.attn_norm = RMSNorm() + self.mlp_norm = RMSNorm() + self.attn = CausalSelfAttention(dim, num_heads, num_kv_heads, rope_base, qk_gain_init, + gated_attention=gated_attention, value_residual=value_residual) + self.mlp = MLP( + dim, + mlp_mult, + activation_mode=activation_mode, + activation_neg_slope=activation_neg_slope, + asymmetric_square_init=asymmetric_square_init, + gated_square_beta_init=gated_square_beta_init, + ) + self.attn_scale = nn.Parameter(torch.ones(dim, dtype=torch.float32)) + self.mlp_scale = nn.Parameter(torch.ones(dim, dtype=torch.float32)) + self.resid_mix = nn.Parameter(torch.stack((torch.ones(dim), torch.zeros(dim))).float()) + self.ln_scale_factor = 1.0 / math.sqrt(layer_idx + 1) if ln_scale else 1.0 + if dtg: + self.dtg_gate = nn.Linear(dim, 1, bias=True) + nn.init.zeros_(self.dtg_gate.weight) + nn.init.constant_(self.dtg_gate.bias, 2.0) + else: + self.dtg_gate = None + def forward(self, x: Tensor, x0: Tensor, q_w: Tensor, k_w: Tensor, v_w: Tensor, out_w: Tensor, up_w: Tensor, down_w: Tensor, v_embed: Tensor | None = None, v0: Tensor | None = None) -> tuple[Tensor, Tensor | None]: + mix = self.resid_mix.to(dtype=x.dtype) + x_in = mix[0][None, None, :] * x + mix[1][None, None, :] * x0 + attn_out, raw_v = self.attn(self.attn_norm(x_in) * self.ln_scale_factor, q_w, k_w, v_w, out_w, v_embed=v_embed, v0=v0) + x_out = x_in + self.attn_scale.to(dtype=x_in.dtype)[None, None, :] * attn_out + x_out = x_out + self.mlp_scale.to(dtype=x_out.dtype)[None, None, :] * self.mlp(self.mlp_norm(x_out) * self.ln_scale_factor, up_w, down_w) + if self.dtg_gate is not None: + gate = torch.sigmoid(self.dtg_gate(x_in.detach())) + x_out = x_in + gate * (x_out - x_in) + return x_out, raw_v + +class GPT(nn.Module): + def __init__( + self, + vocab_size: int, + num_layers: int, + model_dim: int, + num_heads: int, + num_kv_heads: int, + mlp_mult: int, + tie_embeddings: bool, + tied_embed_init_std: float, + logit_softcap: float, + rope_base: float, + qk_gain_init: float, + mtp_num_heads: int = 0, + mtp_loss_weight: float = 0.1, + bigram_vocab_size: int = 0, + bigram_dim: int = 128, + xsa_last_n: int = 0, + rope_dims: int = 0, + ln_scale: bool = False, + dtg: bool = False, + ve_enabled: bool = False, + ve_dim: int = 128, + ve_layers: str = "9,10", + gated_attention: bool = False, + value_residual: bool = False, + activation_mode: str = "leaky_relu_sq", + activation_neg_slope: float = 0.5, + asymmetric_square_init: float = 0.25, + gated_square_beta_init: float = 1.0, + ): + super().__init__() + self._ve_target_dim = num_kv_heads * (model_dim // num_heads) # kv_dim for value projection + if logit_softcap <= 0.0: + raise ValueError(f"logit_softcap must be positive, got {logit_softcap}") + self.tie_embeddings = tie_embeddings + self.tied_embed_init_std = tied_embed_init_std + self.logit_softcap = logit_softcap + self.value_residual = value_residual + self.mtp_num_heads = mtp_num_heads + self.mtp_loss_weight = mtp_loss_weight + self.tok_emb = nn.Embedding(vocab_size, model_dim) + self.bigram = BigramHashEmbedding(bigram_vocab_size, bigram_dim, model_dim) if bigram_vocab_size > 0 else None + self.smear = SmearGate(model_dim) + self.num_encoder_layers = num_layers // 2 + self.num_decoder_layers = num_layers - self.num_encoder_layers + self.num_skip_weights = min(self.num_encoder_layers, self.num_decoder_layers) + self.skip_weights = nn.Parameter(torch.ones(self.num_skip_weights, model_dim, dtype=torch.float32)) + # Parameter banks: contiguous 3D tensors for batched optimizer + head_dim = model_dim // num_heads + kv_dim = num_kv_heads * head_dim + mlp_dim = int(mlp_mult * model_dim) + self.num_layers = num_layers + self.qo_bank = nn.Parameter(torch.empty(2 * num_layers, model_dim, model_dim)) + self.kv_bank = nn.Parameter(torch.empty(2 * num_layers, kv_dim, model_dim)) + self.mlp_up_bank = nn.Parameter(torch.empty(num_layers, mlp_dim, model_dim)) + self.mlp_down_bank = nn.Parameter(torch.empty(num_layers, model_dim, mlp_dim)) + self.blocks = nn.ModuleList( + [ + Block( + model_dim, + num_heads, + num_kv_heads, + mlp_mult, + rope_base, + qk_gain_init, + layer_idx=i, + ln_scale=ln_scale, + dtg=dtg, + gated_attention=gated_attention, + value_residual=value_residual, + activation_mode=activation_mode, + activation_neg_slope=activation_neg_slope, + asymmetric_square_init=asymmetric_square_init, + gated_square_beta_init=gated_square_beta_init, + ) + for i in range(num_layers) + ] + ) + if rope_dims > 0: + head_dim = model_dim // num_heads + for block in self.blocks: + block.attn.rope_dims = rope_dims + block.attn.rotary = Rotary(head_dim, base=rope_base, train_seq_len=1024, rope_dims=rope_dims) + self.ve_layer_indices = [int(x) for x in ve_layers.split(",") if x.strip()] if ve_enabled else [] + kv_dim_ve = self._ve_target_dim + if self.ve_layer_indices: + self.ve_shared = ValueEmbedding(vocab_size, ve_dim, kv_dim_ve) + self.ve_layer_scales = nn.ParameterList( + [nn.Parameter(torch.ones(1, dtype=torch.float32)) for _ in self.ve_layer_indices] + ) + else: + self.ve_shared = None + self.ve_layer_scales = nn.ParameterList() + self.value_embeds = nn.ModuleList() # keep empty for compat + self.final_norm = RMSNorm() + self.lm_head = None if tie_embeddings else CastedLinear(model_dim, vocab_size, bias=False) + if self.lm_head is not None: + self.lm_head._zero_init = True + self.mtp_heads = nn.ModuleList( + [CastedLinear(model_dim, vocab_size, bias=False) for _ in range(mtp_num_heads)] + ) + for head in self.mtp_heads: + head._zero_init = True + if xsa_last_n > 0: + for i in range(max(0, num_layers - xsa_last_n), num_layers): + self.blocks[i].attn.use_xsa = True + self._init_weights() + def _init_weights(self) -> None: + if self.tie_embeddings: + nn.init.normal_(self.tok_emb.weight, mean=0.0, std=self.tied_embed_init_std) + n = self.num_layers + proj_scale = 1.0 / math.sqrt(2 * n) + # Init banks: orthogonal, with proj layers scaled down and out/down zero-init + for i in range(n): + nn.init.orthogonal_(self.qo_bank.data[i], gain=1.0) # Q + nn.init.zeros_(self.qo_bank.data[n + i]) # Out (zero init) + nn.init.orthogonal_(self.kv_bank.data[i], gain=1.0) # K + nn.init.orthogonal_(self.kv_bank.data[n + i], gain=1.0) # V + nn.init.orthogonal_(self.mlp_up_bank.data[i], gain=1.0) # MLP up + nn.init.zeros_(self.mlp_down_bank.data[i]) # MLP down (zero init) + # Scale proj layers (out_proj and mlp_down are "proj" layers) + self.qo_bank.data[n + i].mul_(proj_scale) + self.mlp_down_bank.data[i].mul_(proj_scale) + # Init remaining nn.Linear modules (bigram proj, mtp heads, lm_head) + for name, module in self.named_modules(): + if isinstance(module, nn.Linear): + if getattr(module, "_zero_init", False): + nn.init.zeros_(module.weight) + elif module.weight.ndim == 2 and module.weight.shape[0] >= 64 and module.weight.shape[1] >= 64: + nn.init.orthogonal_(module.weight, gain=1.0) + def _get_ve(self, layer_idx: int, input_ids: Tensor, ve_cache: dict | None = None) -> Tensor | None: + """Get value embedding for a specific layer using shared table + per-layer scale.""" + if self.ve_shared is None or layer_idx not in self.ve_layer_indices: + return None + if ve_cache is not None and 've' not in ve_cache: + ve_cache['ve'] = self.ve_shared(input_ids) + ve_base = ve_cache['ve'] if ve_cache is not None else self.ve_shared(input_ids) + ve_idx = self.ve_layer_indices.index(layer_idx) + return ve_base * self.ve_layer_scales[ve_idx].to(dtype=ve_base.dtype) + def forward(self, input_ids: Tensor, target_ids: Tensor) -> Tensor: + n = self.num_layers + x = self.tok_emb(input_ids) + if self.bigram is not None: + x = x + self.bigram(input_ids) + x = F.rms_norm(x, (x.size(-1),)) + x = self.smear(x) + x0 = x + v0 = None + skips: list[Tensor] = [] + ve_cache: dict = {} + for i in range(self.num_encoder_layers): + ve = self._get_ve(i, input_ids, ve_cache) + x, raw_v = self.blocks[i](x, x0, + self.qo_bank[i], self.kv_bank[i], self.kv_bank[n + i], + self.qo_bank[n + i], self.mlp_up_bank[i], self.mlp_down_bank[i], + v_embed=ve, v0=v0) + if v0 is None and raw_v is not None: + v0 = raw_v + skips.append(x) + for i in range(self.num_decoder_layers): + bi = self.num_encoder_layers + i + if skips: + x = x + self.skip_weights[i].to(dtype=x.dtype)[None, None, :] * skips.pop() + ve = self._get_ve(bi, input_ids, ve_cache) + x, _ = self.blocks[bi](x, x0, + self.qo_bank[bi], self.kv_bank[bi], self.kv_bank[n + bi], + self.qo_bank[n + bi], self.mlp_up_bank[bi], self.mlp_down_bank[bi], + v_embed=ve, v0=v0) + x = self.final_norm(x) + x_flat = x.reshape(-1, x.size(-1)) + targets = target_ids.reshape(-1) + if self.tie_embeddings: + logits_proj = F.linear(x_flat, self.tok_emb.weight) + else: + if self.lm_head is None: + raise RuntimeError("lm_head is required when tie_embeddings=False") + logits_proj = self.lm_head(x_flat) + logits = self.logit_softcap * torch.tanh(logits_proj / self.logit_softcap) + main_loss = F.cross_entropy(logits.float(), targets, reduction="mean") + if self.training and self.mtp_num_heads > 0 and self.mtp_loss_weight > 0.0: + _, seqlen, dim = x.shape + mtp_loss_sum = x.new_zeros(()) + mtp_loss_count = 0 + for k, mtp_head in enumerate(self.mtp_heads): + valid_t = seqlen - (k + 1) + if valid_t <= 0: + continue + mtp_hidden = x[:, :valid_t, :].reshape(-1, dim) + mtp_targets = target_ids[:, k + 1 :].reshape(-1) + mtp_logits_proj = mtp_head(mtp_hidden) + mtp_logits = self.logit_softcap * torch.tanh(mtp_logits_proj / self.logit_softcap) + mtp_loss_sum = mtp_loss_sum + F.cross_entropy(mtp_logits.float(), mtp_targets, reduction="mean") + mtp_loss_count += 1 + if mtp_loss_count > 0: + main_loss = main_loss + self.mtp_loss_weight * (mtp_loss_sum / mtp_loss_count) + return main_loss + def forward_logits(self, input_ids: Tensor) -> Tensor: + """Return logits (bsz, seq_len, vocab) without computing loss.""" + n = self.num_layers + x = self.tok_emb(input_ids) + if self.bigram is not None: + x = x + self.bigram(input_ids) + x = F.rms_norm(x, (x.size(-1),)) + x = self.smear(x) + x0 = x + v0 = None + skips: list[Tensor] = [] + ve_cache: dict = {} + for i in range(self.num_encoder_layers): + ve = self._get_ve(i, input_ids, ve_cache) + x, raw_v = self.blocks[i](x, x0, + self.qo_bank[i], self.kv_bank[i], self.kv_bank[n + i], + self.qo_bank[n + i], self.mlp_up_bank[i], self.mlp_down_bank[i], + v_embed=ve, v0=v0) + if v0 is None and raw_v is not None: + v0 = raw_v + skips.append(x) + for i in range(self.num_decoder_layers): + bi = self.num_encoder_layers + i + if skips: + x = x + self.skip_weights[i].to(dtype=x.dtype)[None, None, :] * skips.pop() + ve = self._get_ve(bi, input_ids, ve_cache) + x, _ = self.blocks[bi](x, x0, + self.qo_bank[bi], self.kv_bank[bi], self.kv_bank[n + bi], + self.qo_bank[n + bi], self.mlp_up_bank[bi], self.mlp_down_bank[bi], + v_embed=ve, v0=v0) + x = self.final_norm(x) + if self.tie_embeddings: + logits_proj = F.linear(x, self.tok_emb.weight) + else: + logits_proj = self.lm_head(x) + return self.logit_softcap * torch.tanh(logits_proj / self.logit_softcap) + +# --- Sliding window evaluation --- + +def eval_val_sliding( + args: Hyperparameters, + base_model: nn.Module, + rank: int, + world_size: int, + device: torch.device, + val_tokens: Tensor, + base_bytes_lut: Tensor, + has_leading_space_lut: Tensor, + is_boundary_token_lut: Tensor, + stride: int, + batch_seqs: int = 32, + eval_seq_len: int | None = None, +) -> tuple[float, float]: + """Sliding window evaluation: each token scored with maximum context.""" + seq_len = eval_seq_len or args.train_seq_len + total_tokens = val_tokens.numel() - 1 + window_starts = [ws for ws in range(0, total_tokens, stride) + if min(ws + seq_len, total_tokens) - ws >= 1] + total_windows = len(window_starts) + my_s = (total_windows * rank) // world_size + my_e = (total_windows * (rank + 1)) // world_size + my_windows = window_starts[my_s:my_e] + loss_sum = torch.zeros((), device=device, dtype=torch.float64) + token_count = torch.zeros((), device=device, dtype=torch.float64) + byte_count = torch.zeros((), device=device, dtype=torch.float64) + base_model.eval() + compiled_logits = torch.compile(base_model.forward_logits, dynamic=False, fullgraph=True) + with torch.inference_mode(): + for bi in range(0, len(my_windows), batch_seqs): + batch_ws = my_windows[bi:bi + batch_seqs] + bsz = len(batch_ws) + x_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + y_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + wlens: list[int] = [] + for i, ws in enumerate(batch_ws): + end = min(ws + seq_len, total_tokens) + wlen = end - ws + wlens.append(wlen) + chunk = val_tokens[ws:end + 1].to(dtype=torch.int64, device=device) + x_batch[i, :wlen] = chunk[:-1] + y_batch[i, :wlen] = chunk[1:] + with torch.autocast(device_type="cuda", dtype=torch.bfloat16): + logits = compiled_logits(x_batch) + nll = F.cross_entropy( + logits.reshape(-1, logits.size(-1)).float(), + y_batch.reshape(-1), + reduction="none", + ).reshape(bsz, seq_len) + for i, ws in enumerate(batch_ws): + wlen = wlens[i] + s = 0 if ws == 0 else max(wlen - stride, 0) + scored_nll = nll[i, s:wlen].to(torch.float64) + loss_sum += scored_nll.sum() + token_count += float(wlen - s) + tgt = y_batch[i, s:wlen] + prev = x_batch[i, s:wlen] + tb = base_bytes_lut[tgt].to(torch.float64) + tb += (has_leading_space_lut[tgt] & ~is_boundary_token_lut[prev]).to(torch.float64) + byte_count += tb.sum() + if dist.is_available() and dist.is_initialized(): + dist.all_reduce(loss_sum, op=dist.ReduceOp.SUM) + dist.all_reduce(token_count, op=dist.ReduceOp.SUM) + dist.all_reduce(byte_count, op=dist.ReduceOp.SUM) + val_loss = (loss_sum / token_count).item() + bits_per_token = val_loss / math.log(2.0) + tokens_per_byte = token_count.item() / byte_count.item() + base_model.train() + return val_loss, bits_per_token * tokens_per_byte + + +def _ttt_bank_mask(base_model: GPT, param_name: str, keep_block_ids: set[int], device: torch.device) -> Tensor | None: + n = base_model.num_layers + if not keep_block_ids: + return None + if param_name in {"qo_bank", "kv_bank"}: + mask = torch.zeros((2 * n, 1, 1), device=device, dtype=torch.float32) + for bi in keep_block_ids: + mask[bi] = 1.0 + mask[n + bi] = 1.0 + return mask + if param_name in {"mlp_up_bank", "mlp_down_bank"}: + mask = torch.zeros((n, 1, 1), device=device, dtype=torch.float32) + for bi in keep_block_ids: + mask[bi] = 1.0 + return mask + return None + + +def _setup_ttt_params( + args: Hyperparameters, base_model: GPT, device: torch.device, log0=print, +) -> tuple[list[Tensor], dict[int, Tensor], str]: + num_layers = base_model.num_layers + all_block_ids = set(range(num_layers)) + freeze_first_n = min(max(args.ttt_freeze_blocks, 0), num_layers) + keep_last_n = min(max(args.ttt_last_n_blocks, 0), num_layers) + keep_late_block_ids = set(range(num_layers - keep_last_n, num_layers)) + control_patterns = ( + "attn_scale", "mlp_scale", "resid_mix", "q_gain", "skip_weights", "smear", + "ve_layer_scales", "ve_shared.scale", "attn_gate", "vr_lambda", + "bigram.scale", "bigram.proj.weight", "ve_shared.proj.weight", "lm_head.weight", + ) + param_mode = args.ttt_param_mode + grad_masks: dict[int, Tensor] = {} + ttt_params: list[Tensor] = [] + + if param_mode == "full": + keep_block_ids = all_block_ids + include_non_block = True + control_only = False + mode_desc = "full" + elif param_mode == "freeze_first_n": + keep_block_ids = set(range(freeze_first_n, num_layers)) + include_non_block = True + control_only = False + mode_desc = f"freeze_first_n:{freeze_first_n}" + elif param_mode == "late_blocks": + keep_block_ids = keep_late_block_ids + include_non_block = False + control_only = False + mode_desc = f"late_blocks:last_{keep_last_n}" + elif param_mode == "control_plus": + keep_block_ids = set() + include_non_block = False + control_only = True + mode_desc = "control_plus" + else: + raise ValueError(f"Unknown TTT_PARAM_MODE={param_mode}") + + for name, p in base_model.named_parameters(): + keep_param = False + bank_mask = _ttt_bank_mask(base_model, name, keep_block_ids, device) + if bank_mask is not None: + if bank_mask.sum().item() > 0 and not control_only: + keep_param = True + grad_masks[id(p)] = bank_mask.to(dtype=p.dtype) + elif name.startswith("blocks."): + block_idx = int(name.split(".")[1]) + if block_idx in keep_block_ids and not control_only: + keep_param = True + elif control_only: + keep_param = any(pattern in name for pattern in control_patterns) + elif include_non_block: + keep_param = True + + p.requires_grad_(keep_param) + if keep_param: + ttt_params.append(p) + + unfrozen_params = sum(p.numel() for p in ttt_params) + frozen_params = sum(p.numel() for p in base_model.parameters() if not p.requires_grad) + log0(f"ttt_setup:param_mode={mode_desc} unfrozen={unfrozen_params} frozen={frozen_params}") + return ttt_params, grad_masks, mode_desc + + +def _ttt_set_lr(args: Hyperparameters, optimizer: torch.optim.Optimizer, progress: float) -> float: + schedule = args.ttt_lr_schedule + if schedule == "constant": + lr = args.ttt_lr + elif schedule in {"cosine", "token_cosine", "chunk_cosine"}: + lr = args.ttt_lr * 0.5 * (1.0 + math.cos(math.pi * min(max(progress, 0.0), 1.0))) + else: + raise ValueError(f"Unknown TTT_LR_SCHEDULE={schedule}") + for pg in optimizer.param_groups: + pg["lr"] = lr + return lr + + +def _ttt_reduce_and_mask_grads(ttt_params: list[Tensor], grad_masks: dict[int, Tensor], world_size: int) -> None: + if world_size > 1: + for p in ttt_params: + if p.grad is not None: + dist.all_reduce(p.grad, op=dist.ReduceOp.AVG) + for p in ttt_params: + mask = grad_masks.get(id(p)) + if mask is not None and p.grad is not None: + p.grad.mul_(mask) + + +def _ttt_accumulate_metrics( + loss_sum: Tensor, token_count: Tensor, byte_count: Tensor, scored_nll: Tensor, tgt: Tensor, prev: Tensor, + base_bytes_lut: Tensor, has_leading_space_lut: Tensor, is_boundary_token_lut: Tensor, +) -> int: + scored_detached = scored_nll.detach().to(torch.float64) + loss_sum += scored_detached.sum() + tokens = int(scored_detached.numel()) + token_count += float(tokens) + tb = base_bytes_lut[tgt].to(torch.float64) + tb += (has_leading_space_lut[tgt] & ~is_boundary_token_lut[prev]).to(torch.float64) + byte_count += tb.sum() + return tokens + + +def eval_val_sliding_ttt( + args: Hyperparameters, base_model: nn.Module, rank: int, world_size: int, + device: torch.device, val_tokens: Tensor, base_bytes_lut: Tensor, + has_leading_space_lut: Tensor, is_boundary_token_lut: Tensor, + stride: int, batch_seqs: int = 32, log0=print, +) -> tuple[float, float]: + """Legal TTT over the eval token stream. + + chunk mode: + score a whole chunk, then train on the already-scored chunk + stream mode: + score the newly revealed suffix of each window, then immediately train on that same suffix + """ + seq_len = args.train_seq_len + total_tokens = val_tokens.numel() - 1 + ttt_chunk = args.ttt_chunk_tokens + window_starts = [ws for ws in range(0, total_tokens, stride) + if min(ws + seq_len, total_tokens) - ws >= stride or ws == 0] + num_chunks = (total_tokens + ttt_chunk - 1) // ttt_chunk + chunk_windows: list[list[int]] = [[] for _ in range(num_chunks)] + for ws in window_starts: + end = min(ws + seq_len, total_tokens) + wlen = end - ws + s = 0 if ws == 0 else max(wlen - stride, 0) + scored_start = ws + s + ci = min(scored_start // ttt_chunk, num_chunks - 1) + chunk_windows[ci].append(ws) + + ttt_params, grad_masks, mode_desc = _setup_ttt_params(args, base_model, device, log0=log0) + optimizer = torch.optim.SGD(ttt_params, lr=args.ttt_lr, momentum=args.ttt_momentum) + loss_sum = torch.zeros((), device=device, dtype=torch.float64) + token_count = torch.zeros((), device=device, dtype=torch.float64) + byte_count = torch.zeros((), device=device, dtype=torch.float64) + adapted_token_count = torch.zeros((), device=device, dtype=torch.float64) + scored_token_count = torch.zeros((), device=device, dtype=torch.float64) + base_model.eval() + t0 = time.perf_counter() + + log0( + f"ttt:start mode={args.ttt_mode} param_mode={mode_desc} chunks={num_chunks} " + f"chunk_tokens={ttt_chunk} total_windows={len(window_starts)} stride={stride} " + f"ttt_lr={args.ttt_lr} ttt_epochs={args.ttt_epochs}" + ) + + if args.ttt_mode == "chunk": + for ci in range(num_chunks): + windows = chunk_windows[ci] + if not windows: + continue + chunk_start = ci * ttt_chunk + chunk_end = min((ci + 1) * ttt_chunk, total_tokens) + my_s = (len(windows) * rank) // world_size + my_e = (len(windows) * (rank + 1)) // world_size + my_windows = windows[my_s:my_e] + + with torch.inference_mode(): + for bi in range(0, len(my_windows), batch_seqs): + batch_ws = my_windows[bi:bi + batch_seqs] + bsz = len(batch_ws) + x_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + y_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + wlens: list[int] = [] + for i, ws in enumerate(batch_ws): + end = min(ws + seq_len, total_tokens) + wlen = end - ws + wlens.append(wlen) + chunk_tok = val_tokens[ws:end + 1].to(dtype=torch.int64, device=device) + x_batch[i, :wlen] = chunk_tok[:-1] + y_batch[i, :wlen] = chunk_tok[1:] + with torch.autocast(device_type="cuda", dtype=torch.bfloat16): + logits = base_model.forward_logits(x_batch) + nll = F.cross_entropy( + logits.reshape(-1, logits.size(-1)).float(), + y_batch.reshape(-1), reduction="none", + ).reshape(bsz, seq_len) + for i, ws in enumerate(batch_ws): + wlen = wlens[i] + s = 0 if ws == 0 else max(wlen - stride, 0) + tokens = _ttt_accumulate_metrics( + loss_sum, token_count, byte_count, + nll[i, s:wlen], y_batch[i, s:wlen], x_batch[i, s:wlen], + base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + scored_token_count += tokens + + is_last_chunk = (ci == num_chunks - 1) + if not is_last_chunk and args.ttt_epochs > 0: + chunk_seqs = (chunk_end - chunk_start) // seq_len + if chunk_seqs > 0: + _ttt_set_lr(args, optimizer, ci / max(num_chunks - 1, 1)) + my_seq_s = (chunk_seqs * rank) // world_size + my_seq_e = (chunk_seqs * (rank + 1)) // world_size + my_chunk_seqs = my_seq_e - my_seq_s + for _ep in range(args.ttt_epochs): + for bs in range(0, my_chunk_seqs, args.ttt_batch_seqs): + be = min(bs + args.ttt_batch_seqs, my_chunk_seqs) + actual_bs = my_seq_s + bs + start_tok = chunk_start + actual_bs * seq_len + end_tok = chunk_start + (my_seq_s + be) * seq_len + 1 + if end_tok > val_tokens.numel(): + continue + local = val_tokens[start_tok:end_tok].to(device=device, dtype=torch.int64) + x = local[:-1].reshape(-1, seq_len) + y = local[1:].reshape(-1, seq_len) + optimizer.zero_grad(set_to_none=True) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16): + loss = base_model(x, y) + loss.backward() + _ttt_reduce_and_mask_grads(ttt_params, grad_masks, world_size) + torch.nn.utils.clip_grad_norm_(ttt_params, args.ttt_grad_clip) + optimizer.step() + adapted_token_count += float(y.numel()) + + if rank == 0 and (ci % 10 == 0 or ci == num_chunks - 1): + elapsed = time.perf_counter() - t0 + rl = loss_sum.item() / max(token_count.item(), 1) + rbpb = rl / math.log(2.0) * (token_count.item() / max(byte_count.item(), 1)) if token_count.item() > 0 else 0.0 + log0(f" ttt_chunk [{ci+1}/{num_chunks}] bpb={rbpb:.6f} time={elapsed:.1f}s") + elif args.ttt_mode == "stream": + my_s = (len(window_starts) * rank) // world_size + my_e = (len(window_starts) * (rank + 1)) // world_size + my_windows = window_starts[my_s:my_e] + local_total_windows = len(my_windows) + for bi in range(0, local_total_windows, batch_seqs): + batch_ws = my_windows[bi:bi + batch_seqs] + bsz = len(batch_ws) + x_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + y_batch = torch.zeros(bsz, seq_len, dtype=torch.int64, device=device) + wlens: list[int] = [] + starts: list[int] = [] + for i, ws in enumerate(batch_ws): + end = min(ws + seq_len, total_tokens) + wlen = end - ws + wlens.append(wlen) + starts.append(0 if ws == 0 else max(wlen - stride, 0)) + chunk_tok = val_tokens[ws:end + 1].to(dtype=torch.int64, device=device) + x_batch[i, :wlen] = chunk_tok[:-1] + y_batch[i, :wlen] = chunk_tok[1:] + + optimizer.zero_grad(set_to_none=True) + progress = 0.0 if local_total_windows <= 1 else bi / max(local_total_windows - 1, 1) + lr = _ttt_set_lr(args, optimizer, progress) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16): + logits = base_model.forward_logits(x_batch) + nll = F.cross_entropy( + logits.reshape(-1, logits.size(-1)).float(), + y_batch.reshape(-1), reduction="none", + ).reshape(bsz, seq_len) + + adapt_loss_sum = None + adapt_tokens = 0 + for i, ws in enumerate(batch_ws): + wlen = wlens[i] + s = starts[i] + scored_slice = nll[i, s:wlen] + tokens = _ttt_accumulate_metrics( + loss_sum, token_count, byte_count, + scored_slice, y_batch[i, s:wlen], x_batch[i, s:wlen], + base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + scored_token_count += tokens + adapt_tokens += tokens + scored_sum = scored_slice.sum() + adapt_loss_sum = scored_sum if adapt_loss_sum is None else adapt_loss_sum + scored_sum + + if adapt_tokens > 0: + adapt_loss = adapt_loss_sum / adapt_tokens + adapt_loss.backward() + _ttt_reduce_and_mask_grads(ttt_params, grad_masks, world_size) + torch.nn.utils.clip_grad_norm_(ttt_params, args.ttt_grad_clip) + optimizer.step() + adapted_token_count += float(adapt_tokens) + + global_window_idx = my_s + bi + len(batch_ws) + if rank == 0 and (global_window_idx % 128 == 0 or global_window_idx >= len(window_starts)): + elapsed = time.perf_counter() - t0 + rl = loss_sum.item() / max(token_count.item(), 1) + rbpb = rl / math.log(2.0) * (token_count.item() / max(byte_count.item(), 1)) if token_count.item() > 0 else 0.0 + log0( + f" ttt_stream windows:{global_window_idx}/{len(window_starts)} " + f"scored_tokens:{int(scored_token_count.item())} adapted_tokens:{int(adapted_token_count.item())} " + f"lr:{lr:.6g} bpb={rbpb:.6f} time={elapsed:.1f}s" + ) + else: + raise ValueError(f"Unknown TTT_MODE={args.ttt_mode}") + + if dist.is_available() and dist.is_initialized(): + for t in (loss_sum, token_count, byte_count, adapted_token_count, scored_token_count): + dist.all_reduce(t, op=dist.ReduceOp.SUM) + + val_loss = (loss_sum / token_count).item() + val_bpb = val_loss / math.log(2.0) * (token_count.item() / byte_count.item()) + assert adapted_token_count.item() <= scored_token_count.item() + 1e-6 + for p in base_model.parameters(): + p.requires_grad_(True) + base_model.eval() + log0( + f"ttt:done mode={args.ttt_mode} val_loss={val_loss:.6f} val_bpb={val_bpb:.6f} " + f"scored_tokens={int(scored_token_count.item())} adapted_tokens={int(adapted_token_count.item())} " + f"elapsed={time.perf_counter() - t0:.1f}s" + ) + return val_loss, val_bpb + + +# --- GPTQ-lite int6 quantization --- + +def _classify_param(name: str) -> str: + if "tok_emb" in name or "lm_head" in name: + return "embed" + if ".mlp." in name: + return "mlp" + if ".attn." in name or (".proj." in name and ".mlp." not in name): + return "attn" + return "other" +def quantize_int6_per_row(t: Tensor, clip_range: int = 31) -> tuple[Tensor, Tensor]: + t32 = t.float() + if t32.ndim == 2: + best_q, best_s, best_err = None, None, float('inf') + for pct in [0.9990, 0.9995, 0.9999, 0.99999, 1.0]: + if pct < 1.0: + row_clip = torch.quantile(t32.abs(), pct, dim=1) + else: + row_clip = t32.abs().amax(dim=1) + s = (row_clip / clip_range).clamp_min(1.0 / clip_range).to(torch.float16) + q = torch.clamp(torch.round(t32 / s.float()[:, None]), -clip_range, clip_range).to(torch.int8) + recon = q.float() * s.float()[:, None] + err = (t32 - recon).pow(2).mean().item() + if err < best_err: + best_q, best_s, best_err = q, s, err + return best_q, best_s + amax = t32.abs().max().item() + scale = torch.tensor(amax / clip_range if amax > 0 else 1.0, dtype=torch.float16) + q = torch.clamp(torch.round(t32 / scale.float()), -clip_range, clip_range).to(torch.int8) + return q, scale + +def _unbank_state_dict(sd: dict[str, Tensor], num_layers: int) -> dict[str, Tensor]: + """Convert 3D bank tensors into individual 2D tensors with standard names.""" + out: dict[str, Tensor] = {} + n = num_layers + for name, tensor in sd.items(): + if name == "qo_bank": + for i in range(n): + out[f"blocks.{i}.attn.c_q.weight"] = tensor[i] + out[f"blocks.{i}.attn.proj.weight"] = tensor[n + i] + elif name == "kv_bank": + for i in range(n): + out[f"blocks.{i}.attn.c_k.weight"] = tensor[i] + out[f"blocks.{i}.attn.c_v.weight"] = tensor[n + i] + elif name == "mlp_up_bank": + for i in range(n): + out[f"blocks.{i}.mlp.fc.weight"] = tensor[i] + elif name == "mlp_down_bank": + for i in range(n): + out[f"blocks.{i}.mlp.proj.weight"] = tensor[i] + else: + out[name] = tensor + return out + +def _rebank_state_dict(sd: dict[str, Tensor], num_layers: int, template_sd: dict[str, Tensor]) -> dict[str, Tensor]: + """Convert individual 2D tensors back into 3D bank tensors.""" + out: dict[str, Tensor] = {} + n = num_layers + # Reconstruct banks from individual weight keys + qo_slices = [None] * (2 * n) + kv_slices = [None] * (2 * n) + up_slices = [None] * n + down_slices = [None] * n + consumed = set() + for i in range(n): + qk = f"blocks.{i}.attn.c_q.weight" + if qk in sd: + qo_slices[i] = sd[qk] + consumed.add(qk) + ok = f"blocks.{i}.attn.proj.weight" + if ok in sd: + qo_slices[n + i] = sd[ok] + consumed.add(ok) + kk = f"blocks.{i}.attn.c_k.weight" + if kk in sd: + kv_slices[i] = sd[kk] + consumed.add(kk) + vk = f"blocks.{i}.attn.c_v.weight" + if vk in sd: + kv_slices[n + i] = sd[vk] + consumed.add(vk) + fk = f"blocks.{i}.mlp.fc.weight" + if fk in sd: + up_slices[i] = sd[fk] + consumed.add(fk) + dk = f"blocks.{i}.mlp.proj.weight" + if dk in sd: + down_slices[i] = sd[dk] + consumed.add(dk) + out["qo_bank"] = torch.stack(qo_slices).to(dtype=template_sd["qo_bank"].dtype) + out["kv_bank"] = torch.stack(kv_slices).to(dtype=template_sd["kv_bank"].dtype) + out["mlp_up_bank"] = torch.stack(up_slices).to(dtype=template_sd["mlp_up_bank"].dtype) + out["mlp_down_bank"] = torch.stack(down_slices).to(dtype=template_sd["mlp_down_bank"].dtype) + for name, tensor in sd.items(): + if name not in consumed: + out[name] = tensor + return out + +def mixed_quantize_int6(state_dict: dict[str, Tensor], int6_cats: set[str]): + num_layers_total = max( + (int(k.split(".")[1]) for k in state_dict if k.startswith("blocks.")), + default=0, + ) + 1 + late_k_layers = set(range(num_layers_total - 2, num_layers_total)) + result: dict[str, Tensor] = {} + meta: dict[str, object] = {} + for name, tensor in state_dict.items(): + t = tensor.detach().cpu().contiguous() + cat = _classify_param(name) + if not t.is_floating_point() or t.numel() <= 65536: + result[name] = t.to(torch.float16) if t.is_floating_point() else t + meta[name] = "passthrough" + continue + if any(p in name for p in CONTROL_TENSOR_NAME_PATTERNS): + result[name] = t.float() + meta[name] = "passthrough_ctrl" + continue + if cat in int6_cats and t.ndim >= 1: + q, s = quantize_int6_per_row(t) + result[name + ".q"] = q + result[name + ".scale"] = s + meta[name] = {"type": "int6"} + else: + q, s = quantize_float_tensor(t) + result[name + ".q"] = q + result[name + ".scale"] = s + meta[name] = {"type": "int8"} + return result, meta +def dequantize_mixed_int6(result: dict[str, Tensor], meta: dict[str, object], + template_sd: dict[str, Tensor]) -> dict[str, Tensor]: + out: dict[str, Tensor] = {} + for name, orig in template_sd.items(): + info = meta.get(name) + if info is None: + continue + orig_dtype = orig.dtype + if info in ("passthrough", "passthrough_ctrl", "passthrough_fp16"): + t = result[name] + if t.dtype == torch.float16 and orig_dtype in (torch.float32, torch.bfloat16): + t = t.to(orig_dtype) + out[name] = t + continue + q, s = result[name + ".q"], result[name + ".scale"] + if s.ndim > 0: + out[name] = (q.float() * s.float().view(q.shape[0], *([1] * (q.ndim - 1)))).to(orig_dtype) + else: + out[name] = (q.float() * float(s.item())).to(orig_dtype) + return out + +# --- Training --- + +def main() -> None: + code = Path(__file__).read_text(encoding="utf-8") + args = Hyperparameters() + # zeropower_via_newtonschulz5 runs eagerly with bmm -- do NOT compile + distributed = "RANK" in os.environ and "WORLD_SIZE" in os.environ + rank = int(os.environ.get("RANK", "0")) + world_size = int(os.environ.get("WORLD_SIZE", "1")) + local_rank = int(os.environ.get("LOCAL_RANK", "0")) + if world_size <= 0: + raise ValueError(f"WORLD_SIZE must be positive, got {world_size}") + if 8 % world_size != 0: + raise ValueError(f"WORLD_SIZE={world_size} must divide 8 so grad_accum_steps stays integral") + grad_accum_steps = 8 // world_size + grad_scale = 1.0 / grad_accum_steps + if not torch.cuda.is_available(): + raise RuntimeError("CUDA is required") + device = torch.device("cuda", local_rank) + torch.cuda.set_device(device) + if distributed: + dist.init_process_group(backend="nccl", device_id=device) + dist.barrier() + master_process = rank == 0 + torch.backends.cuda.matmul.allow_tf32 = True + torch.backends.cudnn.allow_tf32 = True + from torch.backends.cuda import enable_cudnn_sdp, enable_flash_sdp, enable_math_sdp, enable_mem_efficient_sdp + enable_cudnn_sdp(False) + enable_flash_sdp(True) + enable_mem_efficient_sdp(False) + enable_math_sdp(False) + logfile = None + if master_process: + os.makedirs("logs", exist_ok=True) + logfile = f"logs/{args.run_id}.txt" + print(logfile) + def log0(msg: str, console: bool = True) -> None: + if not master_process: + return + if console: + print(msg) + if logfile is not None: + with open(logfile, "a", encoding="utf-8") as f: + print(msg, file=f) + log0(code, console=False) + log0("=" * 100, console=False) + log0(f"Running Python {sys.version}", console=False) + log0(f"Running PyTorch {torch.__version__}", console=False) + log0( + subprocess.run(["nvidia-smi"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False).stdout, + console=False, + ) + log0("=" * 100, console=False) + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.cuda.manual_seed_all(args.seed) + if not args.tokenizer_path.endswith(".model"): + raise ValueError(f"Script only setup for SentencePiece .model file: {args.tokenizer_path}") + sp = spm.SentencePieceProcessor(model_file=args.tokenizer_path) + if int(sp.vocab_size()) != args.vocab_size: + raise ValueError( + f"VOCAB_SIZE={args.vocab_size} does not match tokenizer vocab_size={int(sp.vocab_size())}" + ) + dataset_dir = Path(args.data_path).resolve() + actual_train_files = len(list(dataset_dir.glob("fineweb_train_*.bin"))) + effective_eval_seq_len = args.eval_seq_len if args.eval_seq_len > 0 else args.train_seq_len + val_seq_len = max(args.train_seq_len, effective_eval_seq_len) + val_tokens = load_validation_tokens(args.val_files, val_seq_len, args.val_tokens_limit) + base_bytes_lut, has_leading_space_lut, is_boundary_token_lut = build_sentencepiece_luts( + sp, args.vocab_size, device + ) + log0(f"val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path={args.tokenizer_path}") + log0(f"train_loader:dataset:{dataset_dir.name} train_shards:{actual_train_files}") + log0(f"val_loader:shards pattern={args.val_files} tokens:{val_tokens.numel() - 1}") + CastedLinear._qat_enabled = args.qat_enabled + base_model = GPT( + vocab_size=args.vocab_size, + num_layers=args.num_layers, + model_dim=args.model_dim, + num_heads=args.num_heads, + num_kv_heads=args.num_kv_heads, + mlp_mult=args.mlp_mult, + tie_embeddings=args.tie_embeddings, + tied_embed_init_std=args.tied_embed_init_std, + logit_softcap=args.logit_softcap, + rope_base=args.rope_base, + qk_gain_init=args.qk_gain_init, + mtp_num_heads=args.mtp_num_heads, + mtp_loss_weight=args.mtp_loss_weight, + bigram_vocab_size=args.bigram_vocab_size, + bigram_dim=args.bigram_dim, + xsa_last_n=args.xsa_last_n, + rope_dims=args.rope_dims, + ln_scale=args.ln_scale, + dtg=args.dtg_enabled, + ve_enabled=args.ve_enabled, + ve_dim=args.ve_dim, + ve_layers=args.ve_layers, + gated_attention=args.gated_attention, + value_residual=args.value_residual, + activation_mode=args.activation_mode, + activation_neg_slope=args.activation_neg_slope, + asymmetric_square_init=args.asymmetric_square_init, + gated_square_beta_init=args.gated_square_beta_init, + ).to(device).bfloat16() + # Banks stay FP32 (like CastedLinear weights), cast to BF16 in forward + base_model.qo_bank.data = base_model.qo_bank.data.float() + base_model.kv_bank.data = base_model.kv_bank.data.float() + base_model.mlp_up_bank.data = base_model.mlp_up_bank.data.float() + base_model.mlp_down_bank.data = base_model.mlp_down_bank.data.float() + for module in base_model.modules(): + if isinstance(module, CastedLinear): + module.float() + restore_low_dim_params_to_fp32(base_model) + # No DDP -- Parallel Muon handles bank grad communication via reduce-scatter, + # and non-bank grads are manually all-reduced before Adam steps. + compiled_model = torch.compile(base_model, dynamic=False, fullgraph=True) + model = compiled_model + + # Optimizer split: + # - 4 parameter banks -> Muon (batched Newton-Schulz) + # - token embedding -> Adam + # - scalars/control tensors -> Adam + # - bigram proj, mtp heads, VE proj -> Adam (small matrix params not worth banking) + matrix_params = [ + base_model.qo_bank, base_model.kv_bank, + base_model.mlp_up_bank, base_model.mlp_down_bank, + ] + block_named_params = list(base_model.blocks.named_parameters()) + scalar_params = [ + p + for name, p in block_named_params + if p.ndim < 2 or any(pattern in name for pattern in CONTROL_TENSOR_NAME_PATTERNS) + ] + if base_model.skip_weights.numel() > 0: + scalar_params.append(base_model.skip_weights) + scalar_params.append(base_model.smear.gate) + if base_model.bigram is not None: + scalar_params.append(base_model.bigram.scale) + token_lr = args.tied_embed_lr if args.tie_embeddings else args.embed_lr + tok_params = [{"params": [base_model.tok_emb.weight], "lr": token_lr, "base_lr": token_lr}] + if base_model.bigram is not None: + tok_params.append({"params": [base_model.bigram.embed.weight], "lr": token_lr, "base_lr": token_lr}) + if base_model.bigram.proj is not None: + scalar_params.append(base_model.bigram.proj.weight) + if base_model.ve_shared is not None: + tok_params.append({"params": [base_model.ve_shared.embed.weight], "lr": token_lr, "base_lr": token_lr}) + if base_model.ve_shared.proj is not None: + scalar_params.append(base_model.ve_shared.proj.weight) + scalar_params.append(base_model.ve_shared.scale) + for s in base_model.ve_layer_scales: + scalar_params.append(s) + optimizer_tok = torch.optim.AdamW( + tok_params, + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + weight_decay=args.adam_wd, + fused=True, + ) + optimizer_muon = Muon( + matrix_params, + lr=args.matrix_lr, + momentum=args.muon_momentum, + backend_steps=args.muon_backend_steps, + weight_decay=args.muon_wd, + ) + for group in optimizer_muon.param_groups: + group["base_lr"] = args.matrix_lr + optimizer_scalar = torch.optim.AdamW( + [{"params": scalar_params, "lr": args.scalar_lr, "base_lr": args.scalar_lr}], + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + weight_decay=args.adam_wd, + fused=True, + ) + # Non-bank params that need manual all-reduce (replicated across GPUs) + replicated_params = list(optimizer_tok.param_groups[0]["params"]) + for pg in optimizer_tok.param_groups[1:]: + replicated_params.extend(pg["params"]) + replicated_params.extend(scalar_params) + + optimizer_head = None + if base_model.lm_head is not None: + optimizer_head = torch.optim.Adam( + [{"params": [base_model.lm_head.weight], "lr": args.head_lr, "base_lr": args.head_lr}], + betas=(args.beta1, args.beta2), + eps=args.adam_eps, + fused=True, + ) + replicated_params.append(base_model.lm_head.weight) + optimizers: list[torch.optim.Optimizer] = [optimizer_tok, optimizer_muon, optimizer_scalar] + if optimizer_head is not None: + optimizers.append(optimizer_head) + n_params = sum(p.numel() for p in base_model.parameters()) + mtp_params = sum(p.numel() for p in base_model.mtp_heads.parameters()) + log0(f"model_params:{n_params}") + log0(f"mtp_num_heads:{args.mtp_num_heads} mtp_loss_weight:{args.mtp_loss_weight} mtp_params:{mtp_params}") + xsa_layers = [i for i, b in enumerate(base_model.blocks) if b.attn.use_xsa] + log0(f"XSA:last_{args.xsa_last_n} active_layers:{xsa_layers}") + log0(f"world_size:{world_size} grad_accum_steps:{grad_accum_steps}") + log0("sdp_backends:cudnn=False flash=True mem_efficient=False math=False") + log0(f"attention_mode:gqa num_heads:{args.num_heads} num_kv_heads:{args.num_kv_heads}") + log0( + f"tie_embeddings:{args.tie_embeddings} embed_lr:{token_lr} " + f"head_lr:{args.head_lr if base_model.lm_head is not None else 0.0} " + f"matrix_lr:{args.matrix_lr} scalar_lr:{args.scalar_lr}" + ) + log0( + f"activation_mode:{args.activation_mode} neg_slope:{args.activation_neg_slope} " + f"asym_init:{args.asymmetric_square_init} gated_beta_init:{args.gated_square_beta_init}" + ) + log0( + f"train_batch_tokens:{args.train_batch_tokens} train_seq_len:{args.train_seq_len} " + f"iterations:{args.iterations} warmup_steps:{args.warmup_steps} " + f"max_wallclock_seconds:{args.max_wallclock_seconds:.3f}" + ) + log0(f"seed:{args.seed}") + train_loader = DistributedTokenLoader(args.train_files, rank, world_size, device) + def zero_grad_all() -> None: + for opt in optimizers: + opt.zero_grad(set_to_none=True) + max_wallclock_ms = 1000.0 * args.max_wallclock_seconds if args.max_wallclock_seconds > 0 else None + def lr_mul(step: int, elapsed_ms: float) -> float: + if args.warmdown_iters <= 0: + return 1.0 + if max_wallclock_ms is None: + warmdown_start = max(args.iterations - args.warmdown_iters, 0) + return max((args.iterations - step) / max(args.warmdown_iters, 1), 0.0) if warmdown_start <= step < args.iterations else 1.0 + step_ms = elapsed_ms / max(step, 1) + warmdown_ms = args.warmdown_iters * step_ms + remaining_ms = max(max_wallclock_ms - elapsed_ms, 0.0) + return remaining_ms / max(warmdown_ms, 1e-9) if remaining_ms <= warmdown_ms else 1.0 + if args.warmup_steps > 0: + initial_model_state = {name: tensor.detach().cpu().clone() for name, tensor in base_model.state_dict().items()} + initial_optimizer_states = [copy.deepcopy(opt.state_dict()) for opt in optimizers] + model.train() + for warmup_step in range(args.warmup_steps): + zero_grad_all() + for micro_step in range(grad_accum_steps): + x, y = train_loader.next_batch(args.train_batch_tokens, args.train_seq_len, grad_accum_steps) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + warmup_loss = model(x, y) + (warmup_loss * grad_scale).backward() + # All-reduce all grads for warmup (simple, not optimized) + if distributed: + for p in base_model.parameters(): + if p.grad is not None: + dist.all_reduce(p.grad, op=dist.ReduceOp.AVG) + for opt in optimizers: + opt.step() + zero_grad_all() + if args.warmup_steps <= 20 or (warmup_step + 1) % 10 == 0 or warmup_step + 1 == args.warmup_steps: + log0(f"warmup_step:{warmup_step + 1}/{args.warmup_steps}") + base_model.load_state_dict(initial_model_state, strict=True) + for opt, state in zip(optimizers, initial_optimizer_states, strict=True): + opt.load_state_dict(state) + zero_grad_all() + train_loader = DistributedTokenLoader(args.train_files, rank, world_size, device) + swa_state: dict[str, Tensor] | None = None + swa_count = 0 + from collections import deque + lawa_queue: deque[dict[str, Tensor]] = deque(maxlen=args.lawa_k) + ema_state = {name: t.detach().float().clone() for name, t in base_model.state_dict().items()} + ema_decay = 0.997 + training_time_ms = 0.0 + stop_after_step: int | None = None + torch.cuda.synchronize() + t0 = time.perf_counter() + step = 0 + while True: + last_step = step == args.iterations or (stop_after_step is not None and step >= stop_after_step) + should_validate = last_step or (args.val_loss_every > 0 and step % args.val_loss_every == 0) + if should_validate: + torch.cuda.synchronize() + training_time_ms += 1000.0 * (time.perf_counter() - t0) + val_loss, val_bpb = eval_val( + args, + model, + rank, + world_size, + device, + grad_accum_steps, + val_tokens, + base_bytes_lut, + has_leading_space_lut, + is_boundary_token_lut, + ) + log0( + f"step:{step}/{args.iterations} val_loss:{val_loss:.4f} val_bpb:{val_bpb:.4f} " + f"train_time:{training_time_ms:.0f}ms step_avg:{training_time_ms / max(step, 1):.2f}ms" + ) + torch.cuda.synchronize() + t0 = time.perf_counter() + if last_step: + if stop_after_step is not None and step < args.iterations: + log0( + f"stopping_early: wallclock_cap train_time:{training_time_ms:.0f}ms " + f"step:{step}/{args.iterations}" + ) + break + elapsed_ms = training_time_ms + 1000.0 * (time.perf_counter() - t0) + scale = lr_mul(step, elapsed_ms) + if args.late_qat_threshold > 0 and scale < args.late_qat_threshold and not CastedLinear._qat_enabled: + CastedLinear._qat_enabled = True + log0(f"late_qat:enabled step:{step} scale:{scale:.4f}") + zero_grad_all() + train_loss = torch.zeros((), device=device) + for micro_step in range(grad_accum_steps): + x, y = train_loader.next_batch(args.train_batch_tokens, args.train_seq_len, grad_accum_steps) + with torch.autocast(device_type="cuda", dtype=torch.bfloat16, enabled=True): + loss = model(x, y) + train_loss += loss.detach() + (loss * grad_scale).backward() + train_loss /= grad_accum_steps + frac = min(step / args.muon_momentum_warmup_steps, 1.0) if args.muon_momentum_warmup_steps > 0 else 1.0 + muon_momentum = (1 - frac) * args.muon_momentum_warmup_start + frac * args.muon_momentum + for group in optimizer_muon.param_groups: + group["momentum"] = muon_momentum + for opt in optimizers: + for group in opt.param_groups: + group["lr"] = group["base_lr"] * scale + if args.grad_clip_norm > 0: + torch.nn.utils.clip_grad_norm_(base_model.parameters(), args.grad_clip_norm) + # === 3-phase overlapped optimizer step === + # Phase 1: Launch async reduce-scatter for banks (biggest first) + optimizer_muon.launch_reduce_scatters() + # Phase 2: All-reduce non-bank grads + step Adam (while bank RS is in-flight) + if distributed: + for p in replicated_params: + if p.grad is not None: + dist.all_reduce(p.grad, op=dist.ReduceOp.AVG) + optimizer_tok.step() + optimizer_scalar.step() + if optimizer_head is not None: + optimizer_head.step() + # Phase 3: Wait for RS, local NS5, all-gather (banks processed last) + optimizer_muon.step() + zero_grad_all() + # EMA update + with torch.no_grad(): + for name, t in base_model.state_dict().items(): + ema_state[name].mul_(ema_decay).add_(t.detach().float(), alpha=1.0 - ema_decay) + step += 1 + approx_training_time_ms = training_time_ms + 1000.0 * (time.perf_counter() - t0) + if args.swa_enabled and scale < 0.2 and step % args.swa_every == 0: + if swa_state is None: + swa_state = {name: t.detach().cpu().clone() for name, t in base_model.state_dict().items()} + swa_count = 1 + log0(f"swa:start step:{step}") + else: + for name, t in base_model.state_dict().items(): + swa_state[name] += t.detach().cpu() + swa_count += 1 + if args.lawa_enabled and step % args.lawa_freq == 0: + lawa_queue.append({name: t.detach().cpu().clone() for name, t in base_model.state_dict().items()}) + should_log_train = ( + args.train_log_every > 0 + and (step <= 10 or step % args.train_log_every == 0 or stop_after_step is not None) + ) + if should_log_train: + log0( + f"step:{step}/{args.iterations} train_loss:{train_loss.item():.4f} " + f"train_time:{approx_training_time_ms:.0f}ms step_avg:{approx_training_time_ms / step:.2f}ms" + ) + reached_cap = max_wallclock_ms is not None and approx_training_time_ms >= max_wallclock_ms + if distributed and max_wallclock_ms is not None: + reached_cap_tensor = torch.tensor(int(reached_cap), device=device) + dist.all_reduce(reached_cap_tensor, op=dist.ReduceOp.MAX) + reached_cap = bool(reached_cap_tensor.item()) + if stop_after_step is None and reached_cap: + stop_after_step = step + log0( + f"peak memory allocated: {torch.cuda.max_memory_allocated() // 1024 // 1024} MiB " + f"reserved: {torch.cuda.max_memory_reserved() // 1024 // 1024} MiB" + ) + # Apply weight averaging + if args.lawa_enabled and len(lawa_queue) > 1: + log0(f"lawa:applying LAWA averaging k={len(lawa_queue)}") + current_state = base_model.state_dict() + avg_state = {name: torch.zeros(t.shape, dtype=torch.float32, device='cpu') for name, t in current_state.items()} + for snap in lawa_queue: + for name in avg_state: + avg_state[name] += snap[name].float() + for name in avg_state: + avg_state[name] /= len(lawa_queue) + avg_state[name] = avg_state[name].to(dtype=current_state[name].dtype) + base_model.load_state_dict(avg_state, strict=True) + else: + log0("ema:applying EMA weights") + current_state = base_model.state_dict() + avg_state = {name: t.to(dtype=current_state[name].dtype) for name, t in ema_state.items()} + base_model.load_state_dict(avg_state, strict=True) + torch.cuda.synchronize() + t_diag = time.perf_counter() + diag_val_loss, diag_val_bpb = eval_val( + args, compiled_model, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + ) + torch.cuda.synchronize() + log0( + f"DIAGNOSTIC post_ema val_loss:{diag_val_loss:.4f} val_bpb:{diag_val_bpb:.4f} " + f"eval_time:{1000.0 * (time.perf_counter() - t_diag):.0f}ms" + ) + full_state_dict = base_model.state_dict() + export_sd = {k: v for k, v in full_state_dict.items() if "mtp_heads" not in k} + excluded_mtp = sum(int(t.numel()) for k, t in full_state_dict.items() if "mtp_heads" in k) + if excluded_mtp > 0: + log0(f"export_excluding_mtp_params:{excluded_mtp}") + if master_process: + torch.save(export_sd, "final_model.pt") + model_bytes = os.path.getsize("final_model.pt") + code_bytes = len(code.encode("utf-8")) + log0(f"Serialized model: {model_bytes} bytes") + log0(f"Code size: {code_bytes} bytes") + # Unbank 3D tensors into individual 2D tensors for quantization + sd_cpu = {k: v.detach().cpu() for k, v in export_sd.items()} + unbanked_sd = _unbank_state_dict(sd_cpu, args.num_layers) + quant_result, quant_meta = mixed_quantize_int6(unbanked_sd, {"mlp", "attn"}) + quant_buf = io.BytesIO() + torch.save({"w": quant_result, "m": quant_meta}, quant_buf) + quant_raw = quant_buf.getvalue() + quant_blob = lzma.compress(quant_raw, preset=6) + if master_process: + with open("final_model.int6.ptz", "wb") as f: + f.write(quant_blob) + quant_file_bytes = len(quant_blob) + code_bytes = len(code.encode("utf-8")) + log0(f"Serialized model int6+lzma: {quant_file_bytes} bytes") + log0(f"Total submission size int6+lzma: {quant_file_bytes + code_bytes} bytes") + if distributed: + dist.barrier() + with open("final_model.int6.ptz", "rb") as f: + quant_blob_disk = f.read() + quant_state = torch.load( + io.BytesIO(lzma.decompress(quant_blob_disk)), + map_location="cpu", + ) + deq_unbanked = dequantize_mixed_int6(quant_state["w"], quant_state["m"], unbanked_sd) + # Re-bank the dequantized tensors + deq_state = _rebank_state_dict(deq_unbanked, args.num_layers, sd_cpu) + eval_model = GPT( + vocab_size=args.vocab_size, num_layers=args.num_layers, model_dim=args.model_dim, + num_heads=args.num_heads, num_kv_heads=args.num_kv_heads, mlp_mult=args.mlp_mult, + tie_embeddings=args.tie_embeddings, tied_embed_init_std=args.tied_embed_init_std, + logit_softcap=args.logit_softcap, rope_base=args.rope_base, qk_gain_init=args.qk_gain_init, + mtp_num_heads=0, mtp_loss_weight=0.0, + bigram_vocab_size=args.bigram_vocab_size, bigram_dim=args.bigram_dim, + xsa_last_n=args.xsa_last_n, + rope_dims=args.rope_dims, ln_scale=args.ln_scale, dtg=args.dtg_enabled, + ve_enabled=args.ve_enabled, ve_dim=args.ve_dim, ve_layers=args.ve_layers, + gated_attention=args.gated_attention, value_residual=args.value_residual, + activation_mode=args.activation_mode, + activation_neg_slope=args.activation_neg_slope, + asymmetric_square_init=args.asymmetric_square_init, + gated_square_beta_init=args.gated_square_beta_init, + ).to(device).bfloat16() + eval_model.qo_bank.data = eval_model.qo_bank.data.float() + eval_model.kv_bank.data = eval_model.kv_bank.data.float() + eval_model.mlp_up_bank.data = eval_model.mlp_up_bank.data.float() + eval_model.mlp_down_bank.data = eval_model.mlp_down_bank.data.float() + for m in eval_model.modules(): + if isinstance(m, CastedLinear): + m.float() + restore_low_dim_params_to_fp32(eval_model) + eval_model.load_state_dict(deq_state, strict=True) + compiled_eval = torch.compile(eval_model, dynamic=False, fullgraph=True) + torch.cuda.synchronize() + t_qeval = time.perf_counter() + q_val_loss, q_val_bpb = eval_val( + args, compiled_eval, rank, world_size, device, grad_accum_steps, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + eval_seq_len=effective_eval_seq_len, + ) + torch.cuda.synchronize() + log0( + f"final_int6_roundtrip val_loss:{q_val_loss:.4f} val_bpb:{q_val_bpb:.4f} " + f"eval_time:{1000.0 * (time.perf_counter() - t_qeval):.0f}ms" + ) + log0(f"final_int6_roundtrip_exact val_loss:{q_val_loss:.8f} val_bpb:{q_val_bpb:.8f}") + sw_seq_len = effective_eval_seq_len + if args.eval_stride > 0 and args.eval_stride < sw_seq_len: + torch.cuda.synchronize() + t_slide = time.perf_counter() + sw_val_loss, sw_val_bpb = eval_val_sliding( + args, eval_model, rank, world_size, device, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + stride=args.eval_stride, + eval_seq_len=sw_seq_len, + ) + torch.cuda.synchronize() + log0( + f"final_int6_sliding_window val_loss:{sw_val_loss:.4f} val_bpb:{sw_val_bpb:.4f} " + f"stride:{args.eval_stride} eval_time:{1000.0 * (time.perf_counter() - t_slide):.0f}ms" + ) + log0(f"final_int6_sliding_window_exact val_loss:{sw_val_loss:.8f} val_bpb:{sw_val_bpb:.8f}") + log0(f"final_int8_zlib_roundtrip_exact val_loss:{sw_val_loss:.8f} val_bpb:{sw_val_bpb:.8f}") + if args.eval_stride != 64 and 64 < sw_seq_len: + torch.cuda.synchronize() + t_slide64 = time.perf_counter() + sw64_val_loss, sw64_val_bpb = eval_val_sliding( + args, eval_model, rank, world_size, device, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + stride=64, + eval_seq_len=sw_seq_len, + ) + torch.cuda.synchronize() + log0( + f"final_int6_sliding_window_s64 val_loss:{sw64_val_loss:.4f} val_bpb:{sw64_val_bpb:.4f} " + f"stride:64 eval_time:{1000.0 * (time.perf_counter() - t_slide64):.0f}ms" + ) + log0(f"final_int6_sliding_window_s64_exact val_loss:{sw64_val_loss:.8f} val_bpb:{sw64_val_bpb:.8f}") + log0(f"final_int8_zlib_roundtrip_exact val_loss:{sw64_val_loss:.8f} val_bpb:{sw64_val_bpb:.8f}") + # Legal score-first TTT (PR #461 recipe) + if args.ttt_enabled: + torch.cuda.synchronize() + t_ttt = time.perf_counter() + ttt_loss, ttt_bpb = eval_val_sliding_ttt( + args, eval_model, rank, world_size, device, + val_tokens, base_bytes_lut, has_leading_space_lut, is_boundary_token_lut, + stride=args.eval_stride, log0=log0, + ) + torch.cuda.synchronize() + log0(f"legal_ttt val_loss:{ttt_loss:.4f} val_bpb:{ttt_bpb:.4f} " + f"eval_time:{1000.0 * (time.perf_counter() - t_ttt):.0f}ms") + log0(f"legal_ttt_exact val_loss:{ttt_loss:.8f} val_bpb:{ttt_bpb:.8f}") + if distributed: + dist.destroy_process_group() +if __name__ == "__main__": + main() diff --git a/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_seed1337.log b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_seed1337.log new file mode 100644 index 000000000..5cf7dc651 --- /dev/null +++ b/records/track_10min_16mb/2026-03-24_StreamingLegalTTT_LateBlocks_NonRecord/train_seed1337.log @@ -0,0 +1,1029 @@ + +***************************************** +Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. +***************************************** +logs/streamttt_stream_late4.txt +val_bpb:enabled tokenizer_kind=sentencepiece tokenizer_path=/tmp/parameter-golf-data/tokenizers/fineweb_1024_bpe.model +train_loader:dataset:fineweb10B_sp1024 train_shards:80 +val_loader:shards pattern=/tmp/parameter-golf-data/datasets/fineweb10B_sp1024/fineweb_val_*.bin tokens:62021632 +model_params:26928220 +mtp_num_heads:0 mtp_loss_weight:0.2 mtp_params:0 +XSA:last_4 active_layers:[7, 8, 9, 10] +world_size:8 grad_accum_steps:1 +sdp_backends:cudnn=False flash=True mem_efficient=False math=False +attention_mode:gqa num_heads:8 num_kv_heads:4 +tie_embeddings:True embed_lr:0.035 head_lr:0.0 matrix_lr:0.025 scalar_lr:0.025 +activation_mode:leaky_relu_sq neg_slope:0.5 asym_init:0.25 gated_beta_init:1.0 +train_batch_tokens:786432 train_seq_len:2048 iterations:9000 warmup_steps:20 max_wallclock_seconds:600.000 +seed:1337 +warmup_step:1/20 +warmup_step:2/20 +warmup_step:3/20 +warmup_step:4/20 +warmup_step:5/20 +warmup_step:6/20 +warmup_step:7/20 +warmup_step:8/20 +warmup_step:9/20 +warmup_step:10/20 +warmup_step:11/20 +warmup_step:12/20 +warmup_step:13/20 +warmup_step:14/20 +warmup_step:15/20 +warmup_step:16/20 +warmup_step:17/20 +warmup_step:18/20 +warmup_step:19/20 +warmup_step:20/20 +step:1/9000 train_loss:6.9322 train_time:184ms step_avg:184.03ms +step:2/9000 train_loss:8.6544 train_time:217ms step_avg:108.66ms +step:3/9000 train_loss:7.7180 train_time:298ms step_avg:99.30ms +step:4/9000 train_loss:7.2065 train_time:379ms step_avg:94.64ms +step:5/9000 train_loss:7.1476 train_time:459ms step_avg:91.82ms +step:6/9000 train_loss:7.1650 train_time:540ms step_avg:90.00ms +step:7/9000 train_loss:7.1037 train_time:621ms step_avg:88.66ms +step:8/9000 train_loss:7.0386 train_time:702ms step_avg:87.78ms +step:9/9000 train_loss:6.6163 train_time:785ms step_avg:87.22ms +step:10/9000 train_loss:6.2312 train_time:866ms step_avg:86.59ms +step:500/9000 train_loss:2.3919 train_time:41442ms step_avg:82.88ms +step:1000/9000 train_loss:2.2690 train_time:83159ms step_avg:83.16ms +step:1500/9000 train_loss:2.2105 train_time:124904ms step_avg:83.27ms +step:2000/9000 train_loss:2.0532 train_time:166620ms step_avg:83.31ms +step:2500/9000 train_loss:2.1532 train_time:208311ms step_avg:83.32ms +step:3000/9000 train_loss:2.1483 train_time:249960ms step_avg:83.32ms +step:3500/9000 train_loss:2.1669 train_time:291573ms step_avg:83.31ms +step:4000/9000 train_loss:1.9664 train_time:333177ms step_avg:83.29ms +step:4500/9000 train_loss:2.1183 train_time:374783ms step_avg:83.29ms +step:5000/9000 train_loss:2.0976 train_time:416421ms step_avg:83.28ms +step:5500/9000 train_loss:2.0137 train_time:458008ms step_avg:83.27ms +step:6000/9000 train_loss:1.9397 train_time:499571ms step_avg:83.26ms +step:6500/9000 train_loss:2.0816 train_time:541132ms step_avg:83.25ms +swa:start step:6550 +late_qat:enabled step:6679 scale:0.1500 +step:7000/9000 train_loss:1.7915 train_time:583289ms step_avg:83.33ms +step:7199/9000 val_loss:1.9207 val_bpb:1.1376 train_time:600077ms step_avg:83.36ms +stopping_early: wallclock_cap train_time:600077ms step:7199/9000 +peak memory allocated: 21673 MiB reserved: 21838 MiB +ema:applying EMA weights +DIAGNOSTIC post_ema val_loss:1.9190 val_bpb:1.1366 eval_time:1972ms +Serialized model: 106027446 bytes +Code size: 101140 bytes +Serialized model int6+lzma: 15765864 bytes +Total submission size int6+lzma: 15867004 bytes +final_int6_roundtrip val_loss:1.9327 val_bpb:1.1447 eval_time:18444ms +final_int6_roundtrip_exact val_loss:1.93271573 val_bpb:1.14466312 +final_int6_sliding_window val_loss:1.8932 val_bpb:1.1213 stride:64 eval_time:97539ms +final_int6_sliding_window_exact val_loss:1.89318831 val_bpb:1.12125572 +final_int8_zlib_roundtrip_exact val_loss:1.89318831 val_bpb:1.12125572 +ttt_setup:param_mode=late_blocks:last_4 unfrozen=25960480 frozen=967740 +ttt:start mode=stream param_mode=late_blocks:last_4 chunks=1893 chunk_tokens=32768 total_windows=969088 stride=64 ttt_lr=0.0005 ttt_epochs=1 + ttt_stream windows:128/969088 scored_tokens:10176 adapted_tokens:10176 lr:0.0005 bpb=1.175636 time=0.7s + ttt_stream windows:256/969088 scored_tokens:18368 adapted_tokens:18368 lr:0.0005 bpb=1.204704 time=1.2s + ttt_stream windows:384/969088 scored_tokens:26560 adapted_tokens:26560 lr:0.0005 bpb=1.207872 time=1.7s + ttt_stream windows:512/969088 scored_tokens:34752 adapted_tokens:34752 lr:0.0005 bpb=1.222408 time=2.2s + ttt_stream windows:640/969088 scored_tokens:42944 adapted_tokens:42944 lr:0.0005 bpb=1.211491 time=2.7s + ttt_stream windows:768/969088 scored_tokens:51136 adapted_tokens:51136 lr:0.0005 bpb=1.203089 time=3.2s + ttt_stream windows:896/969088 scored_tokens:59328 adapted_tokens:59328 lr:0.0005 bpb=1.170055 time=3.7s + ttt_stream windows:1024/969088 scored_tokens:67520 adapted_tokens:67520 lr:0.0005 bpb=1.164154 time=4.2s + ttt_stream windows:1152/969088 scored_tokens:75712 adapted_tokens:75712 lr:0.0005 bpb=1.152063 time=4.7s + ttt_stream windows:1280/969088 scored_tokens:83904 adapted_tokens:83904 lr:0.0005 bpb=1.127452 time=5.3s + ttt_stream windows:1408/969088 scored_tokens:92096 adapted_tokens:92096 lr:0.0005 bpb=1.099424 time=5.8s + ttt_stream windows:1536/969088 scored_tokens:100288 adapted_tokens:100288 lr:0.0005 bpb=1.112909 time=6.3s + ttt_stream windows:1664/969088 scored_tokens:108480 adapted_tokens:108480 lr:0.0005 bpb=1.118645 time=6.8s + ttt_stream windows:1792/969088 scored_tokens:116672 adapted_tokens:116672 lr:0.0005 bpb=1.123289 time=7.3s + ttt_stream windows:1920/969088 scored_tokens:124864 adapted_tokens:124864 lr:0.0005 bpb=1.129666 time=7.8s + ttt_stream windows:2048/969088 scored_tokens:133056 adapted_tokens:133056 lr:0.0005 bpb=1.133053 time=8.3s + ttt_stream windows:2176/969088 scored_tokens:141248 adapted_tokens:141248 lr:0.0005 bpb=1.134533 time=8.8s + ttt_stream windows:2304/969088 scored_tokens:149440 adapted_tokens:149440 lr:0.0005 bpb=1.129441 time=9.3s + ttt_stream windows:2432/969088 scored_tokens:157632 adapted_tokens:157632 lr:0.0005 bpb=1.132138 time=9.9s + ttt_stream windows:2560/969088 scored_tokens:165824 adapted_tokens:165824 lr:0.0005 bpb=1.128068 time=10.4s + ttt_stream windows:2688/969088 scored_tokens:174016 adapted_tokens:174016 lr:0.0005 bpb=1.121536 time=10.9s + ttt_stream windows:2816/969088 scored_tokens:182208 adapted_tokens:182208 lr:0.0005 bpb=1.114161 time=11.4s + ttt_stream windows:2944/969088 scored_tokens:190400 adapted_tokens:190400 lr:0.0005 bpb=1.116471 time=11.9s + ttt_stream windows:3072/969088 scored_tokens:198592 adapted_tokens:198592 lr:0.0005 bpb=1.122360 time=12.4s + ttt_stream windows:3200/969088 scored_tokens:206784 adapted_tokens:206784 lr:0.0005 bpb=1.119161 time=12.9s + ttt_stream windows:3328/969088 scored_tokens:214976 adapted_tokens:214976 lr:0.0005 bpb=1.119056 time=13.4s + ttt_stream windows:3456/969088 scored_tokens:223168 adapted_tokens:223168 lr:0.0005 bpb=1.119528 time=13.9s + ttt_stream windows:3584/969088 scored_tokens:231360 adapted_tokens:231360 lr:0.0005 bpb=1.123410 time=14.5s + ttt_stream windows:3712/969088 scored_tokens:239552 adapted_tokens:239552 lr:0.0005 bpb=1.119782 time=15.0s + ttt_stream windows:3840/969088 scored_tokens:247744 adapted_tokens:247744 lr:0.0005 bpb=1.121507 time=15.5s + ttt_stream windows:3968/969088 scored_tokens:255936 adapted_tokens:255936 lr:0.0005 bpb=1.119900 time=16.0s + ttt_stream windows:4096/969088 scored_tokens:264128 adapted_tokens:264128 lr:0.0005 bpb=1.118412 time=16.5s + ttt_stream windows:4224/969088 scored_tokens:272320 adapted_tokens:272320 lr:0.0005 bpb=1.116271 time=17.0s + ttt_stream windows:4352/969088 scored_tokens:280512 adapted_tokens:280512 lr:0.0005 bpb=1.113586 time=17.5s + ttt_stream windows:4480/969088 scored_tokens:288704 adapted_tokens:288704 lr:0.0005 bpb=1.114617 time=18.0s + ttt_stream windows:4608/969088 scored_tokens:296896 adapted_tokens:296896 lr:0.0005 bpb=1.115780 time=18.5s + ttt_stream windows:4736/969088 scored_tokens:305088 adapted_tokens:305088 lr:0.0005 bpb=1.115803 time=19.1s + ttt_stream windows:4864/969088 scored_tokens:313280 adapted_tokens:313280 lr:0.0005 bpb=1.112782 time=19.6s + ttt_stream windows:4992/969088 scored_tokens:321472 adapted_tokens:321472 lr:0.0005 bpb=1.116471 time=20.1s + ttt_stream windows:5120/969088 scored_tokens:329664 adapted_tokens:329664 lr:0.0005 bpb=1.115989 time=20.6s + ttt_stream windows:5248/969088 scored_tokens:337856 adapted_tokens:337856 lr:0.0005 bpb=1.116136 time=21.1s + ttt_stream windows:5376/969088 scored_tokens:346048 adapted_tokens:346048 lr:0.0005 bpb=1.116843 time=21.6s + ttt_stream windows:5504/969088 scored_tokens:354240 adapted_tokens:354240 lr:0.0005 bpb=1.117119 time=22.1s + ttt_stream windows:5632/969088 scored_tokens:362432 adapted_tokens:362432 lr:0.0005 bpb=1.116342 time=22.6s + ttt_stream windows:5760/969088 scored_tokens:370624 adapted_tokens:370624 lr:0.0005 bpb=1.116326 time=23.1s + ttt_stream windows:5888/969088 scored_tokens:378816 adapted_tokens:378816 lr:0.0005 bpb=1.117538 time=23.7s + ttt_stream windows:6016/969088 scored_tokens:387008 adapted_tokens:387008 lr:0.0005 bpb=1.118649 time=24.2s + ttt_stream windows:6144/969088 scored_tokens:395200 adapted_tokens:395200 lr:0.0005 bpb=1.122853 time=24.7s + ttt_stream windows:6272/969088 scored_tokens:403392 adapted_tokens:403392 lr:0.0005 bpb=1.123367 time=25.2s + ttt_stream windows:6400/969088 scored_tokens:411584 adapted_tokens:411584 lr:0.0005 bpb=1.123659 time=25.7s + ttt_stream windows:6528/969088 scored_tokens:419776 adapted_tokens:419776 lr:0.0005 bpb=1.126697 time=26.2s + ttt_stream windows:6656/969088 scored_tokens:427968 adapted_tokens:427968 lr:0.0005 bpb=1.121184 time=26.7s + ttt_stream windows:6784/969088 scored_tokens:436160 adapted_tokens:436160 lr:0.0005 bpb=1.123571 time=27.2s + ttt_stream windows:6912/969088 scored_tokens:444352 adapted_tokens:444352 lr:0.0005 bpb=1.120094 time=27.7s + ttt_stream windows:7040/969088 scored_tokens:452544 adapted_tokens:452544 lr:0.0005 bpb=1.122896 time=28.3s + ttt_stream windows:7168/969088 scored_tokens:460736 adapted_tokens:460736 lr:0.0005 bpb=1.124017 time=28.8s + ttt_stream windows:7296/969088 scored_tokens:468928 adapted_tokens:468928 lr:0.0005 bpb=1.124977 time=29.3s + ttt_stream windows:7424/969088 scored_tokens:477120 adapted_tokens:477120 lr:0.0005 bpb=1.122762 time=29.8s + ttt_stream windows:7552/969088 scored_tokens:485312 adapted_tokens:485312 lr:0.0005 bpb=1.124108 time=30.3s + ttt_stream windows:7680/969088 scored_tokens:493504 adapted_tokens:493504 lr:0.0005 bpb=1.123540 time=30.8s + ttt_stream windows:7808/969088 scored_tokens:501696 adapted_tokens:501696 lr:0.0005 bpb=1.124751 time=31.3s + ttt_stream windows:7936/969088 scored_tokens:509888 adapted_tokens:509888 lr:0.0005 bpb=1.125425 time=31.8s + ttt_stream windows:8064/969088 scored_tokens:518080 adapted_tokens:518080 lr:0.0005 bpb=1.125804 time=32.3s + ttt_stream windows:8192/969088 scored_tokens:526272 adapted_tokens:526272 lr:0.0005 bpb=1.125808 time=32.9s + ttt_stream windows:8320/969088 scored_tokens:534464 adapted_tokens:534464 lr:0.0005 bpb=1.127353 time=33.4s + ttt_stream windows:8448/969088 scored_tokens:542656 adapted_tokens:542656 lr:0.0005 bpb=1.126497 time=33.9s + ttt_stream windows:8576/969088 scored_tokens:550848 adapted_tokens:550848 lr:0.0005 bpb=1.126995 time=34.4s + ttt_stream windows:8704/969088 scored_tokens:559040 adapted_tokens:559040 lr:0.0005 bpb=1.130040 time=34.9s + ttt_stream windows:8832/969088 scored_tokens:567232 adapted_tokens:567232 lr:0.0005 bpb=1.130295 time=35.4s + ttt_stream windows:8960/969088 scored_tokens:575424 adapted_tokens:575424 lr:0.0005 bpb=1.129900 time=35.9s + ttt_stream windows:9088/969088 scored_tokens:583616 adapted_tokens:583616 lr:0.0005 bpb=1.130546 time=36.4s + ttt_stream windows:9216/969088 scored_tokens:591808 adapted_tokens:591808 lr:0.0005 bpb=1.130986 time=36.9s + ttt_stream windows:9344/969088 scored_tokens:600000 adapted_tokens:600000 lr:0.0005 bpb=1.130198 time=37.5s + ttt_stream windows:9472/969088 scored_tokens:608192 adapted_tokens:608192 lr:0.0005 bpb=1.128354 time=38.0s + ttt_stream windows:9600/969088 scored_tokens:616384 adapted_tokens:616384 lr:0.0005 bpb=1.127530 time=38.5s + ttt_stream windows:9728/969088 scored_tokens:624576 adapted_tokens:624576 lr:0.0005 bpb=1.127100 time=39.0s + ttt_stream windows:9856/969088 scored_tokens:632768 adapted_tokens:632768 lr:0.0005 bpb=1.125310 time=39.5s + ttt_stream windows:9984/969088 scored_tokens:640960 adapted_tokens:640960 lr:0.0005 bpb=1.127235 time=40.0s + ttt_stream windows:10112/969088 scored_tokens:649152 adapted_tokens:649152 lr:0.0005 bpb=1.126100 time=40.5s + ttt_stream windows:10240/969088 scored_tokens:657344 adapted_tokens:657344 lr:0.0005 bpb=1.125233 time=41.0s + ttt_stream windows:10368/969088 scored_tokens:665536 adapted_tokens:665536 lr:0.0005 bpb=1.124222 time=41.5s + ttt_stream windows:10496/969088 scored_tokens:673728 adapted_tokens:673728 lr:0.0005 bpb=1.125161 time=42.1s + ttt_stream windows:10624/969088 scored_tokens:681920 adapted_tokens:681920 lr:0.0005 bpb=1.125996 time=42.6s + ttt_stream windows:10752/969088 scored_tokens:690112 adapted_tokens:690112 lr:0.0005 bpb=1.124390 time=43.1s + ttt_stream windows:10880/969088 scored_tokens:698304 adapted_tokens:698304 lr:0.0005 bpb=1.124225 time=43.6s + ttt_stream windows:11008/969088 scored_tokens:706496 adapted_tokens:706496 lr:0.0005 bpb=1.124779 time=44.1s + ttt_stream windows:11136/969088 scored_tokens:714688 adapted_tokens:714688 lr:0.0005 bpb=1.125047 time=44.6s + ttt_stream windows:11264/969088 scored_tokens:722880 adapted_tokens:722880 lr:0.0005 bpb=1.121978 time=45.1s + ttt_stream windows:11392/969088 scored_tokens:731072 adapted_tokens:731072 lr:0.0005 bpb=1.120186 time=45.6s + ttt_stream windows:11520/969088 scored_tokens:739264 adapted_tokens:739264 lr:0.0005 bpb=1.120421 time=46.1s + ttt_stream windows:11648/969088 scored_tokens:747456 adapted_tokens:747456 lr:0.0005 bpb=1.120214 time=46.7s + ttt_stream windows:11776/969088 scored_tokens:755648 adapted_tokens:755648 lr:0.0005 bpb=1.121187 time=47.2s + ttt_stream windows:11904/969088 scored_tokens:763840 adapted_tokens:763840 lr:0.0005 bpb=1.121266 time=47.7s + ttt_stream windows:12032/969088 scored_tokens:772032 adapted_tokens:772032 lr:0.0005 bpb=1.121120 time=48.2s + ttt_stream windows:12160/969088 scored_tokens:780224 adapted_tokens:780224 lr:0.0005 bpb=1.120256 time=48.7s + ttt_stream windows:12288/969088 scored_tokens:788416 adapted_tokens:788416 lr:0.0005 bpb=1.120325 time=49.2s + ttt_stream windows:12416/969088 scored_tokens:796608 adapted_tokens:796608 lr:0.0005 bpb=1.120690 time=49.7s + ttt_stream windows:12544/969088 scored_tokens:804800 adapted_tokens:804800 lr:0.0005 bpb=1.121509 time=50.2s + ttt_stream windows:12672/969088 scored_tokens:812992 adapted_tokens:812992 lr:0.0005 bpb=1.121071 time=50.7s + ttt_stream windows:12800/969088 scored_tokens:821184 adapted_tokens:821184 lr:0.0005 bpb=1.119893 time=51.3s + ttt_stream windows:12928/969088 scored_tokens:829376 adapted_tokens:829376 lr:0.0005 bpb=1.118960 time=51.8s + ttt_stream windows:13056/969088 scored_tokens:837568 adapted_tokens:837568 lr:0.0005 bpb=1.118530 time=52.3s + ttt_stream windows:13184/969088 scored_tokens:845760 adapted_tokens:845760 lr:0.0005 bpb=1.117717 time=52.8s + ttt_stream windows:13312/969088 scored_tokens:853952 adapted_tokens:853952 lr:0.0005 bpb=1.116548 time=53.3s + ttt_stream windows:13440/969088 scored_tokens:862144 adapted_tokens:862144 lr:0.0005 bpb=1.116513 time=53.8s + ttt_stream windows:13568/969088 scored_tokens:870336 adapted_tokens:870336 lr:0.0005 bpb=1.118236 time=54.3s + ttt_stream windows:13696/969088 scored_tokens:878528 adapted_tokens:878528 lr:0.0005 bpb=1.119337 time=54.8s + ttt_stream windows:13824/969088 scored_tokens:886720 adapted_tokens:886720 lr:0.0005 bpb=1.118848 time=55.3s + ttt_stream windows:13952/969088 scored_tokens:894912 adapted_tokens:894912 lr:0.0005 bpb=1.119151 time=55.8s + ttt_stream windows:14080/969088 scored_tokens:903104 adapted_tokens:903104 lr:0.0005 bpb=1.120776 time=56.4s + ttt_stream windows:14208/969088 scored_tokens:911296 adapted_tokens:911296 lr:0.0005 bpb=1.120847 time=56.9s + ttt_stream windows:14336/969088 scored_tokens:919488 adapted_tokens:919488 lr:0.0005 bpb=1.122072 time=57.4s + ttt_stream windows:14464/969088 scored_tokens:927680 adapted_tokens:927680 lr:0.0005 bpb=1.121558 time=57.9s + ttt_stream windows:14592/969088 scored_tokens:935872 adapted_tokens:935872 lr:0.0005 bpb=1.121505 time=58.4s + ttt_stream windows:14720/969088 scored_tokens:944064 adapted_tokens:944064 lr:0.0005 bpb=1.122445 time=58.9s + ttt_stream windows:14848/969088 scored_tokens:952256 adapted_tokens:952256 lr:0.0005 bpb=1.124937 time=59.4s + ttt_stream windows:14976/969088 scored_tokens:960448 adapted_tokens:960448 lr:0.0005 bpb=1.129948 time=59.9s + ttt_stream windows:15104/969088 scored_tokens:968640 adapted_tokens:968640 lr:0.0005 bpb=1.131837 time=60.4s + ttt_stream windows:15232/969088 scored_tokens:976832 adapted_tokens:976832 lr:0.0005 bpb=1.133300 time=61.0s + ttt_stream windows:15360/969088 scored_tokens:985024 adapted_tokens:985024 lr:0.0005 bpb=1.133568 time=61.5s + ttt_stream windows:15488/969088 scored_tokens:993216 adapted_tokens:993216 lr:0.0005 bpb=1.132587 time=62.0s + ttt_stream windows:15616/969088 scored_tokens:1001408 adapted_tokens:1001408 lr:0.0005 bpb=1.131741 time=62.5s + ttt_stream windows:15744/969088 scored_tokens:1009600 adapted_tokens:1009600 lr:0.0005 bpb=1.131337 time=63.0s + ttt_stream windows:15872/969088 scored_tokens:1017792 adapted_tokens:1017792 lr:0.0005 bpb=1.129889 time=63.5s + ttt_stream windows:16000/969088 scored_tokens:1025984 adapted_tokens:1025984 lr:0.0005 bpb=1.130578 time=64.0s + ttt_stream windows:16128/969088 scored_tokens:1034176 adapted_tokens:1034176 lr:0.0005 bpb=1.130239 time=64.5s + ttt_stream windows:16256/969088 scored_tokens:1042368 adapted_tokens:1042368 lr:0.0005 bpb=1.130209 time=65.0s + ttt_stream windows:16384/969088 scored_tokens:1050560 adapted_tokens:1050560 lr:0.0005 bpb=1.130462 time=65.6s + ttt_stream windows:16512/969088 scored_tokens:1058752 adapted_tokens:1058752 lr:0.0005 bpb=1.129590 time=66.1s + ttt_stream windows:16640/969088 scored_tokens:1066944 adapted_tokens:1066944 lr:0.0005 bpb=1.128653 time=66.6s + ttt_stream windows:16768/969088 scored_tokens:1075136 adapted_tokens:1075136 lr:0.0005 bpb=1.129419 time=67.1s + ttt_stream windows:16896/969088 scored_tokens:1083328 adapted_tokens:1083328 lr:0.0005 bpb=1.129234 time=67.6s + ttt_stream windows:17024/969088 scored_tokens:1091520 adapted_tokens:1091520 lr:0.0005 bpb=1.128709 time=68.1s + ttt_stream windows:17152/969088 scored_tokens:1099712 adapted_tokens:1099712 lr:0.0005 bpb=1.129153 time=68.6s + ttt_stream windows:17280/969088 scored_tokens:1107904 adapted_tokens:1107904 lr:0.0005 bpb=1.129174 time=69.1s + ttt_stream windows:17408/969088 scored_tokens:1116096 adapted_tokens:1116096 lr:0.0005 bpb=1.128987 time=69.6s + ttt_stream windows:17536/969088 scored_tokens:1124288 adapted_tokens:1124288 lr:0.0005 bpb=1.128785 time=70.2s + ttt_stream windows:17664/969088 scored_tokens:1132480 adapted_tokens:1132480 lr:0.0005 bpb=1.128514 time=70.7s + ttt_stream windows:17792/969088 scored_tokens:1140672 adapted_tokens:1140672 lr:0.0005 bpb=1.127838 time=71.2s + ttt_stream windows:17920/969088 scored_tokens:1148864 adapted_tokens:1148864 lr:0.0005 bpb=1.127439 time=71.7s + ttt_stream windows:18048/969088 scored_tokens:1157056 adapted_tokens:1157056 lr:0.0005 bpb=1.127351 time=72.2s + ttt_stream windows:18176/969088 scored_tokens:1165248 adapted_tokens:1165248 lr:0.0005 bpb=1.127992 time=72.7s + ttt_stream windows:18304/969088 scored_tokens:1173440 adapted_tokens:1173440 lr:0.0005 bpb=1.128205 time=73.2s + ttt_stream windows:18432/969088 scored_tokens:1181632 adapted_tokens:1181632 lr:0.0005 bpb=1.128424 time=73.7s + ttt_stream windows:18560/969088 scored_tokens:1189824 adapted_tokens:1189824 lr:0.0005 bpb=1.128860 time=74.2s + ttt_stream windows:18688/969088 scored_tokens:1198016 adapted_tokens:1198016 lr:0.0005 bpb=1.128626 time=74.7s + ttt_stream windows:18816/969088 scored_tokens:1206208 adapted_tokens:1206208 lr:0.0005 bpb=1.129842 time=75.3s + ttt_stream windows:18944/969088 scored_tokens:1214400 adapted_tokens:1214400 lr:0.0005 bpb=1.129956 time=75.8s + ttt_stream windows:19072/969088 scored_tokens:1222592 adapted_tokens:1222592 lr:0.0005 bpb=1.129892 time=76.3s + ttt_stream windows:19200/969088 scored_tokens:1230784 adapted_tokens:1230784 lr:0.0005 bpb=1.130054 time=76.8s + ttt_stream windows:19328/969088 scored_tokens:1238976 adapted_tokens:1238976 lr:0.0005 bpb=1.129551 time=77.3s + ttt_stream windows:19456/969088 scored_tokens:1247168 adapted_tokens:1247168 lr:0.0005 bpb=1.128367 time=77.8s + ttt_stream windows:19584/969088 scored_tokens:1255360 adapted_tokens:1255360 lr:0.0005 bpb=1.128217 time=78.3s + ttt_stream windows:19712/969088 scored_tokens:1263552 adapted_tokens:1263552 lr:0.0005 bpb=1.128565 time=78.8s + ttt_stream windows:19840/969088 scored_tokens:1271744 adapted_tokens:1271744 lr:0.0005 bpb=1.128637 time=79.3s + ttt_stream windows:19968/969088 scored_tokens:1279936 adapted_tokens:1279936 lr:0.0005 bpb=1.128467 time=79.9s + ttt_stream windows:20096/969088 scored_tokens:1288128 adapted_tokens:1288128 lr:0.0005 bpb=1.128877 time=80.4s + ttt_stream windows:20224/969088 scored_tokens:1296320 adapted_tokens:1296320 lr:0.0005 bpb=1.128705 time=80.9s + ttt_stream windows:20352/969088 scored_tokens:1304512 adapted_tokens:1304512 lr:0.0005 bpb=1.128660 time=81.4s + ttt_stream windows:20480/969088 scored_tokens:1312704 adapted_tokens:1312704 lr:0.0005 bpb=1.129221 time=81.9s + ttt_stream windows:20608/969088 scored_tokens:1320896 adapted_tokens:1320896 lr:0.0005 bpb=1.128253 time=82.4s + ttt_stream windows:20736/969088 scored_tokens:1329088 adapted_tokens:1329088 lr:0.0005 bpb=1.128122 time=82.9s + ttt_stream windows:20864/969088 scored_tokens:1337280 adapted_tokens:1337280 lr:0.0005 bpb=1.127689 time=83.4s + ttt_stream windows:20992/969088 scored_tokens:1345472 adapted_tokens:1345472 lr:0.0005 bpb=1.126652 time=83.9s + ttt_stream windows:21120/969088 scored_tokens:1353664 adapted_tokens:1353664 lr:0.0005 bpb=1.126413 time=84.5s + ttt_stream windows:21248/969088 scored_tokens:1361856 adapted_tokens:1361856 lr:0.0005 bpb=1.127094 time=85.0s + ttt_stream windows:21376/969088 scored_tokens:1370048 adapted_tokens:1370048 lr:0.0005 bpb=1.127093 time=85.5s + ttt_stream windows:21504/969088 scored_tokens:1378240 adapted_tokens:1378240 lr:0.0005 bpb=1.127737 time=86.0s + ttt_stream windows:21632/969088 scored_tokens:1386432 adapted_tokens:1386432 lr:0.0005 bpb=1.127092 time=86.5s + ttt_stream windows:21760/969088 scored_tokens:1394624 adapted_tokens:1394624 lr:0.0005 bpb=1.126529 time=87.0s + ttt_stream windows:21888/969088 scored_tokens:1402816 adapted_tokens:1402816 lr:0.0005 bpb=1.126356 time=87.5s + ttt_stream windows:22016/969088 scored_tokens:1411008 adapted_tokens:1411008 lr:0.0005 bpb=1.126037 time=88.0s + ttt_stream windows:22144/969088 scored_tokens:1419200 adapted_tokens:1419200 lr:0.0005 bpb=1.125994 time=88.5s + ttt_stream windows:22272/969088 scored_tokens:1427392 adapted_tokens:1427392 lr:0.0005 bpb=1.126203 time=89.1s + ttt_stream windows:22400/969088 scored_tokens:1435584 adapted_tokens:1435584 lr:0.0005 bpb=1.126403 time=89.6s + ttt_stream windows:22528/969088 scored_tokens:1443776 adapted_tokens:1443776 lr:0.0005 bpb=1.126142 time=90.1s + ttt_stream windows:22656/969088 scored_tokens:1451968 adapted_tokens:1451968 lr:0.0005 bpb=1.125475 time=90.6s + ttt_stream windows:22784/969088 scored_tokens:1460160 adapted_tokens:1460160 lr:0.0005 bpb=1.125848 time=91.1s + ttt_stream windows:22912/969088 scored_tokens:1468352 adapted_tokens:1468352 lr:0.0005 bpb=1.124296 time=91.6s + ttt_stream windows:23040/969088 scored_tokens:1476544 adapted_tokens:1476544 lr:0.0005 bpb=1.123794 time=92.1s + ttt_stream windows:23168/969088 scored_tokens:1484736 adapted_tokens:1484736 lr:0.0005 bpb=1.123631 time=92.6s + ttt_stream windows:23296/969088 scored_tokens:1492928 adapted_tokens:1492928 lr:0.0005 bpb=1.123616 time=93.1s + ttt_stream windows:23424/969088 scored_tokens:1501120 adapted_tokens:1501120 lr:0.0005 bpb=1.123604 time=93.6s + ttt_stream windows:23552/969088 scored_tokens:1509312 adapted_tokens:1509312 lr:0.0005 bpb=1.123549 time=94.2s + ttt_stream windows:23680/969088 scored_tokens:1517504 adapted_tokens:1517504 lr:0.0005 bpb=1.124566 time=94.7s + ttt_stream windows:23808/969088 scored_tokens:1525696 adapted_tokens:1525696 lr:0.0005 bpb=1.125530 time=95.2s + ttt_stream windows:23936/969088 scored_tokens:1533888 adapted_tokens:1533888 lr:0.0005 bpb=1.126659 time=95.7s + ttt_stream windows:24064/969088 scored_tokens:1542080 adapted_tokens:1542080 lr:0.0005 bpb=1.126264 time=96.2s + ttt_stream windows:24192/969088 scored_tokens:1550272 adapted_tokens:1550272 lr:0.0005 bpb=1.125912 time=96.7s + ttt_stream windows:24320/969088 scored_tokens:1558464 adapted_tokens:1558464 lr:0.0005 bpb=1.125871 time=97.2s + ttt_stream windows:24448/969088 scored_tokens:1566656 adapted_tokens:1566656 lr:0.0005 bpb=1.125914 time=97.7s + ttt_stream windows:24576/969088 scored_tokens:1574848 adapted_tokens:1574848 lr:0.0005 bpb=1.126531 time=98.2s + ttt_stream windows:24704/969088 scored_tokens:1583040 adapted_tokens:1583040 lr:0.0005 bpb=1.126838 time=98.8s + ttt_stream windows:24832/969088 scored_tokens:1591232 adapted_tokens:1591232 lr:0.0005 bpb=1.126436 time=99.3s + ttt_stream windows:24960/969088 scored_tokens:1599424 adapted_tokens:1599424 lr:0.0005 bpb=1.125888 time=99.8s + ttt_stream windows:25088/969088 scored_tokens:1607616 adapted_tokens:1607616 lr:0.0005 bpb=1.126050 time=100.3s + ttt_stream windows:25216/969088 scored_tokens:1615808 adapted_tokens:1615808 lr:0.0005 bpb=1.125874 time=100.8s + ttt_stream windows:25344/969088 scored_tokens:1624000 adapted_tokens:1624000 lr:0.0005 bpb=1.126345 time=101.3s + ttt_stream windows:25472/969088 scored_tokens:1632192 adapted_tokens:1632192 lr:0.0005 bpb=1.127429 time=101.8s + ttt_stream windows:25600/969088 scored_tokens:1640384 adapted_tokens:1640384 lr:0.0005 bpb=1.127810 time=102.3s + ttt_stream windows:25728/969088 scored_tokens:1648576 adapted_tokens:1648576 lr:0.0005 bpb=1.128128 time=102.8s + ttt_stream windows:25856/969088 scored_tokens:1656768 adapted_tokens:1656768 lr:0.0005 bpb=1.127651 time=103.4s + ttt_stream windows:25984/969088 scored_tokens:1664960 adapted_tokens:1664960 lr:0.0005 bpb=1.128420 time=103.9s + ttt_stream windows:26112/969088 scored_tokens:1673152 adapted_tokens:1673152 lr:0.0005 bpb=1.128427 time=104.4s + ttt_stream windows:26240/969088 scored_tokens:1681344 adapted_tokens:1681344 lr:0.0005 bpb=1.129175 time=104.9s + ttt_stream windows:26368/969088 scored_tokens:1689536 adapted_tokens:1689536 lr:0.0005 bpb=1.128413 time=105.4s + ttt_stream windows:26496/969088 scored_tokens:1697728 adapted_tokens:1697728 lr:0.0005 bpb=1.127250 time=105.9s + ttt_stream windows:26624/969088 scored_tokens:1705920 adapted_tokens:1705920 lr:0.0005 bpb=1.127092 time=106.4s + ttt_stream windows:26752/969088 scored_tokens:1714112 adapted_tokens:1714112 lr:0.0005 bpb=1.127181 time=106.9s + ttt_stream windows:26880/969088 scored_tokens:1722304 adapted_tokens:1722304 lr:0.0005 bpb=1.127500 time=107.4s + ttt_stream windows:27008/969088 scored_tokens:1730496 adapted_tokens:1730496 lr:0.0005 bpb=1.127976 time=107.9s + ttt_stream windows:27136/969088 scored_tokens:1738688 adapted_tokens:1738688 lr:0.0005 bpb=1.128091 time=108.5s + ttt_stream windows:27264/969088 scored_tokens:1746880 adapted_tokens:1746880 lr:0.0005 bpb=1.128220 time=109.0s + ttt_stream windows:27392/969088 scored_tokens:1755072 adapted_tokens:1755072 lr:0.0005 bpb=1.128033 time=109.5s + ttt_stream windows:27520/969088 scored_tokens:1763264 adapted_tokens:1763264 lr:0.0005 bpb=1.128590 time=110.0s + ttt_stream windows:27648/969088 scored_tokens:1771456 adapted_tokens:1771456 lr:0.0005 bpb=1.129554 time=110.5s + ttt_stream windows:27776/969088 scored_tokens:1779648 adapted_tokens:1779648 lr:0.0005 bpb=1.130525 time=111.0s + ttt_stream windows:27904/969088 scored_tokens:1787840 adapted_tokens:1787840 lr:0.0005 bpb=1.131703 time=111.5s + ttt_stream windows:28032/969088 scored_tokens:1796032 adapted_tokens:1796032 lr:0.0005 bpb=1.132629 time=112.0s + ttt_stream windows:28160/969088 scored_tokens:1804224 adapted_tokens:1804224 lr:0.0005 bpb=1.133675 time=112.5s + ttt_stream windows:28288/969088 scored_tokens:1812416 adapted_tokens:1812416 lr:0.0005 bpb=1.134092 time=113.1s + ttt_stream windows:28416/969088 scored_tokens:1820608 adapted_tokens:1820608 lr:0.0005 bpb=1.134248 time=113.6s + ttt_stream windows:28544/969088 scored_tokens:1828800 adapted_tokens:1828800 lr:0.0005 bpb=1.134167 time=114.1s + ttt_stream windows:28672/969088 scored_tokens:1836992 adapted_tokens:1836992 lr:0.0005 bpb=1.134024 time=114.6s + ttt_stream windows:28800/969088 scored_tokens:1845184 adapted_tokens:1845184 lr:0.0005 bpb=1.134116 time=115.1s + ttt_stream windows:28928/969088 scored_tokens:1853376 adapted_tokens:1853376 lr:0.0005 bpb=1.134502 time=115.6s + ttt_stream windows:29056/969088 scored_tokens:1861568 adapted_tokens:1861568 lr:0.0005 bpb=1.134518 time=116.1s + ttt_stream windows:29184/969088 scored_tokens:1869760 adapted_tokens:1869760 lr:0.0005 bpb=1.135292 time=116.6s + ttt_stream windows:29312/969088 scored_tokens:1877952 adapted_tokens:1877952 lr:0.0005 bpb=1.134448 time=117.1s + ttt_stream windows:29440/969088 scored_tokens:1886144 adapted_tokens:1886144 lr:0.0005 bpb=1.134419 time=117.6s + ttt_stream windows:29568/969088 scored_tokens:1894336 adapted_tokens:1894336 lr:0.0005 bpb=1.134364 time=118.2s + ttt_stream windows:29696/969088 scored_tokens:1902528 adapted_tokens:1902528 lr:0.0005 bpb=1.133007 time=118.7s + ttt_stream windows:29824/969088 scored_tokens:1910720 adapted_tokens:1910720 lr:0.0005 bpb=1.132664 time=119.2s + ttt_stream windows:29952/969088 scored_tokens:1918912 adapted_tokens:1918912 lr:0.0005 bpb=1.132436 time=119.7s + ttt_stream windows:30080/969088 scored_tokens:1927104 adapted_tokens:1927104 lr:0.0005 bpb=1.132625 time=120.2s + ttt_stream windows:30208/969088 scored_tokens:1935296 adapted_tokens:1935296 lr:0.0005 bpb=1.132404 time=120.7s + ttt_stream windows:30336/969088 scored_tokens:1943488 adapted_tokens:1943488 lr:0.0005 bpb=1.131908 time=121.2s + ttt_stream windows:30464/969088 scored_tokens:1951680 adapted_tokens:1951680 lr:0.0005 bpb=1.131953 time=121.7s + ttt_stream windows:30592/969088 scored_tokens:1959872 adapted_tokens:1959872 lr:0.0005 bpb=1.132679 time=122.2s + ttt_stream windows:30720/969088 scored_tokens:1968064 adapted_tokens:1968064 lr:0.0005 bpb=1.132586 time=122.8s + ttt_stream windows:30848/969088 scored_tokens:1976256 adapted_tokens:1976256 lr:0.0005 bpb=1.132376 time=123.3s + ttt_stream windows:30976/969088 scored_tokens:1984448 adapted_tokens:1984448 lr:0.0005 bpb=1.132507 time=123.8s + ttt_stream windows:31104/969088 scored_tokens:1992640 adapted_tokens:1992640 lr:0.0005 bpb=1.132431 time=124.3s + ttt_stream windows:31232/969088 scored_tokens:2000832 adapted_tokens:2000832 lr:0.0005 bpb=1.132024 time=124.8s + ttt_stream windows:31360/969088 scored_tokens:2009024 adapted_tokens:2009024 lr:0.0005 bpb=1.131181 time=125.3s + ttt_stream windows:31488/969088 scored_tokens:2017216 adapted_tokens:2017216 lr:0.0005 bpb=1.130824 time=125.8s + ttt_stream windows:31616/969088 scored_tokens:2025408 adapted_tokens:2025408 lr:0.0005 bpb=1.131826 time=126.3s + ttt_stream windows:31744/969088 scored_tokens:2033600 adapted_tokens:2033600 lr:0.0005 bpb=1.132203 time=126.8s + ttt_stream windows:31872/969088 scored_tokens:2041792 adapted_tokens:2041792 lr:0.0005 bpb=1.131975 time=127.4s + ttt_stream windows:32000/969088 scored_tokens:2049984 adapted_tokens:2049984 lr:0.0005 bpb=1.132563 time=127.9s + ttt_stream windows:32128/969088 scored_tokens:2058176 adapted_tokens:2058176 lr:0.0005 bpb=1.132851 time=128.4s + ttt_stream windows:32256/969088 scored_tokens:2066368 adapted_tokens:2066368 lr:0.0005 bpb=1.133147 time=128.9s + ttt_stream windows:32384/969088 scored_tokens:2074560 adapted_tokens:2074560 lr:0.0005 bpb=1.133196 time=129.4s + ttt_stream windows:32512/969088 scored_tokens:2082752 adapted_tokens:2082752 lr:0.0005 bpb=1.133150 time=129.9s + ttt_stream windows:32640/969088 scored_tokens:2090944 adapted_tokens:2090944 lr:0.0005 bpb=1.132961 time=130.4s + ttt_stream windows:32768/969088 scored_tokens:2099136 adapted_tokens:2099136 lr:0.0005 bpb=1.132507 time=130.9s + ttt_stream windows:32896/969088 scored_tokens:2107328 adapted_tokens:2107328 lr:0.0005 bpb=1.131992 time=131.4s + ttt_stream windows:33024/969088 scored_tokens:2115520 adapted_tokens:2115520 lr:0.0005 bpb=1.131940 time=132.0s + ttt_stream windows:33152/969088 scored_tokens:2123712 adapted_tokens:2123712 lr:0.0005 bpb=1.131778 time=132.5s + ttt_stream windows:33280/969088 scored_tokens:2131904 adapted_tokens:2131904 lr:0.0005 bpb=1.131779 time=133.0s + ttt_stream windows:33408/969088 scored_tokens:2140096 adapted_tokens:2140096 lr:0.0005 bpb=1.131403 time=133.5s + ttt_stream windows:33536/969088 scored_tokens:2148288 adapted_tokens:2148288 lr:0.0005 bpb=1.131353 time=134.0s + ttt_stream windows:33664/969088 scored_tokens:2156480 adapted_tokens:2156480 lr:0.0005 bpb=1.131047 time=134.5s + ttt_stream windows:33792/969088 scored_tokens:2164672 adapted_tokens:2164672 lr:0.0005 bpb=1.131311 time=135.0s + ttt_stream windows:33920/969088 scored_tokens:2172864 adapted_tokens:2172864 lr:0.0005 bpb=1.131245 time=135.5s + ttt_stream windows:34048/969088 scored_tokens:2181056 adapted_tokens:2181056 lr:0.0005 bpb=1.131128 time=136.0s + ttt_stream windows:34176/969088 scored_tokens:2189248 adapted_tokens:2189248 lr:0.0005 bpb=1.130611 time=136.6s + ttt_stream windows:34304/969088 scored_tokens:2197440 adapted_tokens:2197440 lr:0.0005 bpb=1.130560 time=137.1s + ttt_stream windows:34432/969088 scored_tokens:2205632 adapted_tokens:2205632 lr:0.0005 bpb=1.130568 time=137.6s + ttt_stream windows:34560/969088 scored_tokens:2213824 adapted_tokens:2213824 lr:0.0005 bpb=1.129884 time=138.1s + ttt_stream windows:34688/969088 scored_tokens:2222016 adapted_tokens:2222016 lr:0.0005 bpb=1.130025 time=138.6s + ttt_stream windows:34816/969088 scored_tokens:2230208 adapted_tokens:2230208 lr:0.0005 bpb=1.130358 time=139.1s + ttt_stream windows:34944/969088 scored_tokens:2238400 adapted_tokens:2238400 lr:0.0005 bpb=1.130378 time=139.6s + ttt_stream windows:35072/969088 scored_tokens:2246592 adapted_tokens:2246592 lr:0.0005 bpb=1.130535 time=140.1s + ttt_stream windows:35200/969088 scored_tokens:2254784 adapted_tokens:2254784 lr:0.0005 bpb=1.130638 time=140.6s + ttt_stream windows:35328/969088 scored_tokens:2262976 adapted_tokens:2262976 lr:0.0005 bpb=1.130928 time=141.2s + ttt_stream windows:35456/969088 scored_tokens:2271168 adapted_tokens:2271168 lr:0.0005 bpb=1.131189 time=141.7s + ttt_stream windows:35584/969088 scored_tokens:2279360 adapted_tokens:2279360 lr:0.0005 bpb=1.131125 time=142.2s + ttt_stream windows:35712/969088 scored_tokens:2287552 adapted_tokens:2287552 lr:0.0005 bpb=1.130735 time=142.7s + ttt_stream windows:35840/969088 scored_tokens:2295744 adapted_tokens:2295744 lr:0.0005 bpb=1.131020 time=143.2s + ttt_stream windows:35968/969088 scored_tokens:2303936 adapted_tokens:2303936 lr:0.0005 bpb=1.131014 time=143.7s + ttt_stream windows:36096/969088 scored_tokens:2312128 adapted_tokens:2312128 lr:0.0005 bpb=1.130860 time=144.2s + ttt_stream windows:36224/969088 scored_tokens:2320320 adapted_tokens:2320320 lr:0.0005 bpb=1.130229 time=144.7s + ttt_stream windows:36352/969088 scored_tokens:2328512 adapted_tokens:2328512 lr:0.0005 bpb=1.130680 time=145.2s + ttt_stream windows:36480/969088 scored_tokens:2336704 adapted_tokens:2336704 lr:0.0005 bpb=1.130930 time=145.7s + ttt_stream windows:36608/969088 scored_tokens:2344896 adapted_tokens:2344896 lr:0.0005 bpb=1.130780 time=146.3s + ttt_stream windows:36736/969088 scored_tokens:2353088 adapted_tokens:2353088 lr:0.0005 bpb=1.130204 time=146.8s + ttt_stream windows:36864/969088 scored_tokens:2361280 adapted_tokens:2361280 lr:0.0005 bpb=1.130065 time=147.3s + ttt_stream windows:36992/969088 scored_tokens:2369472 adapted_tokens:2369472 lr:0.0005 bpb=1.130290 time=147.8s + ttt_stream windows:37120/969088 scored_tokens:2377664 adapted_tokens:2377664 lr:0.0005 bpb=1.130099 time=148.3s + ttt_stream windows:37248/969088 scored_tokens:2385856 adapted_tokens:2385856 lr:0.0005 bpb=1.129979 time=148.8s + ttt_stream windows:37376/969088 scored_tokens:2394048 adapted_tokens:2394048 lr:0.0005 bpb=1.129885 time=149.3s + ttt_stream windows:37504/969088 scored_tokens:2402240 adapted_tokens:2402240 lr:0.0005 bpb=1.130043 time=149.8s + ttt_stream windows:37632/969088 scored_tokens:2410432 adapted_tokens:2410432 lr:0.0005 bpb=1.130339 time=150.3s + ttt_stream windows:37760/969088 scored_tokens:2418624 adapted_tokens:2418624 lr:0.0005 bpb=1.130108 time=150.9s + ttt_stream windows:37888/969088 scored_tokens:2426816 adapted_tokens:2426816 lr:0.0005 bpb=1.129993 time=151.4s + ttt_stream windows:38016/969088 scored_tokens:2435008 adapted_tokens:2435008 lr:0.0005 bpb=1.129827 time=151.9s + ttt_stream windows:38144/969088 scored_tokens:2443200 adapted_tokens:2443200 lr:0.0005 bpb=1.130235 time=152.4s + ttt_stream windows:38272/969088 scored_tokens:2451392 adapted_tokens:2451392 lr:0.0005 bpb=1.130540 time=152.9s + ttt_stream windows:38400/969088 scored_tokens:2459584 adapted_tokens:2459584 lr:0.0005 bpb=1.130564 time=153.4s + ttt_stream windows:38528/969088 scored_tokens:2467776 adapted_tokens:2467776 lr:0.0005 bpb=1.130787 time=153.9s + ttt_stream windows:38656/969088 scored_tokens:2475968 adapted_tokens:2475968 lr:0.0005 bpb=1.130678 time=154.4s + ttt_stream windows:38784/969088 scored_tokens:2484160 adapted_tokens:2484160 lr:0.0005 bpb=1.130067 time=154.9s + ttt_stream windows:38912/969088 scored_tokens:2492352 adapted_tokens:2492352 lr:0.0005 bpb=1.129573 time=155.5s + ttt_stream windows:39040/969088 scored_tokens:2500544 adapted_tokens:2500544 lr:0.0005 bpb=1.129165 time=156.0s + ttt_stream windows:39168/969088 scored_tokens:2508736 adapted_tokens:2508736 lr:0.0005 bpb=1.128707 time=156.5s + ttt_stream windows:39296/969088 scored_tokens:2516928 adapted_tokens:2516928 lr:0.0005 bpb=1.128558 time=157.0s + ttt_stream windows:39424/969088 scored_tokens:2525120 adapted_tokens:2525120 lr:0.0005 bpb=1.128661 time=157.5s + ttt_stream windows:39552/969088 scored_tokens:2533312 adapted_tokens:2533312 lr:0.0005 bpb=1.128884 time=158.0s + ttt_stream windows:39680/969088 scored_tokens:2541504 adapted_tokens:2541504 lr:0.0005 bpb=1.128583 time=158.5s + ttt_stream windows:39808/969088 scored_tokens:2549696 adapted_tokens:2549696 lr:0.0005 bpb=1.128650 time=159.0s + ttt_stream windows:39936/969088 scored_tokens:2557888 adapted_tokens:2557888 lr:0.0005 bpb=1.128512 time=159.5s + ttt_stream windows:40064/969088 scored_tokens:2566080 adapted_tokens:2566080 lr:0.0005 bpb=1.128052 time=160.0s + ttt_stream windows:40192/969088 scored_tokens:2574272 adapted_tokens:2574272 lr:0.0005 bpb=1.127712 time=160.6s + ttt_stream windows:40320/969088 scored_tokens:2582464 adapted_tokens:2582464 lr:0.0005 bpb=1.127529 time=161.1s + ttt_stream windows:40448/969088 scored_tokens:2590656 adapted_tokens:2590656 lr:0.0005 bpb=1.127334 time=161.6s + ttt_stream windows:40576/969088 scored_tokens:2598848 adapted_tokens:2598848 lr:0.0005 bpb=1.126818 time=162.1s + ttt_stream windows:40704/969088 scored_tokens:2607040 adapted_tokens:2607040 lr:0.0005 bpb=1.127075 time=162.6s + ttt_stream windows:40832/969088 scored_tokens:2615232 adapted_tokens:2615232 lr:0.0005 bpb=1.126847 time=163.1s + ttt_stream windows:40960/969088 scored_tokens:2623424 adapted_tokens:2623424 lr:0.0005 bpb=1.127140 time=163.6s + ttt_stream windows:41088/969088 scored_tokens:2631616 adapted_tokens:2631616 lr:0.0005 bpb=1.127003 time=164.1s + ttt_stream windows:41216/969088 scored_tokens:2639808 adapted_tokens:2639808 lr:0.0005 bpb=1.127433 time=164.6s + ttt_stream windows:41344/969088 scored_tokens:2648000 adapted_tokens:2648000 lr:0.0005 bpb=1.127327 time=165.2s + ttt_stream windows:41472/969088 scored_tokens:2656192 adapted_tokens:2656192 lr:0.0005 bpb=1.127319 time=165.7s + ttt_stream windows:41600/969088 scored_tokens:2664384 adapted_tokens:2664384 lr:0.0005 bpb=1.127114 time=166.2s + ttt_stream windows:41728/969088 scored_tokens:2672576 adapted_tokens:2672576 lr:0.0005 bpb=1.127130 time=166.7s + ttt_stream windows:41856/969088 scored_tokens:2680768 adapted_tokens:2680768 lr:0.0005 bpb=1.127149 time=167.2s + ttt_stream windows:41984/969088 scored_tokens:2688960 adapted_tokens:2688960 lr:0.0005 bpb=1.127667 time=167.7s + ttt_stream windows:42112/969088 scored_tokens:2697152 adapted_tokens:2697152 lr:0.0005 bpb=1.127715 time=168.2s + ttt_stream windows:42240/969088 scored_tokens:2705344 adapted_tokens:2705344 lr:0.0005 bpb=1.127585 time=168.7s + ttt_stream windows:42368/969088 scored_tokens:2713536 adapted_tokens:2713536 lr:0.0005 bpb=1.127102 time=169.2s + ttt_stream windows:42496/969088 scored_tokens:2721728 adapted_tokens:2721728 lr:0.0005 bpb=1.127564 time=169.7s + ttt_stream windows:42624/969088 scored_tokens:2729920 adapted_tokens:2729920 lr:0.0005 bpb=1.127278 time=170.3s + ttt_stream windows:42752/969088 scored_tokens:2738112 adapted_tokens:2738112 lr:0.0005 bpb=1.127235 time=170.8s + ttt_stream windows:42880/969088 scored_tokens:2746304 adapted_tokens:2746304 lr:0.0005 bpb=1.127373 time=171.3s + ttt_stream windows:43008/969088 scored_tokens:2754496 adapted_tokens:2754496 lr:0.0005 bpb=1.127460 time=171.8s + ttt_stream windows:43136/969088 scored_tokens:2762688 adapted_tokens:2762688 lr:0.0005 bpb=1.127405 time=172.3s + ttt_stream windows:43264/969088 scored_tokens:2770880 adapted_tokens:2770880 lr:0.0005 bpb=1.127508 time=172.8s + ttt_stream windows:43392/969088 scored_tokens:2779072 adapted_tokens:2779072 lr:0.0005 bpb=1.127804 time=173.3s + ttt_stream windows:43520/969088 scored_tokens:2787264 adapted_tokens:2787264 lr:0.0005 bpb=1.127680 time=173.8s + ttt_stream windows:43648/969088 scored_tokens:2795456 adapted_tokens:2795456 lr:0.0005 bpb=1.127102 time=174.3s + ttt_stream windows:43776/969088 scored_tokens:2803648 adapted_tokens:2803648 lr:0.0005 bpb=1.126589 time=174.9s + ttt_stream windows:43904/969088 scored_tokens:2811840 adapted_tokens:2811840 lr:0.0005 bpb=1.126115 time=175.4s + ttt_stream windows:44032/969088 scored_tokens:2820032 adapted_tokens:2820032 lr:0.0005 bpb=1.126485 time=175.9s + ttt_stream windows:44160/969088 scored_tokens:2828224 adapted_tokens:2828224 lr:0.0005 bpb=1.126649 time=176.4s + ttt_stream windows:44288/969088 scored_tokens:2836416 adapted_tokens:2836416 lr:0.0005 bpb=1.126350 time=176.9s + ttt_stream windows:44416/969088 scored_tokens:2844608 adapted_tokens:2844608 lr:0.0005 bpb=1.126105 time=177.4s + ttt_stream windows:44544/969088 scored_tokens:2852800 adapted_tokens:2852800 lr:0.0005 bpb=1.125914 time=177.9s + ttt_stream windows:44672/969088 scored_tokens:2860992 adapted_tokens:2860992 lr:0.0005 bpb=1.125925 time=178.4s + ttt_stream windows:44800/969088 scored_tokens:2869184 adapted_tokens:2869184 lr:0.0005 bpb=1.126028 time=178.9s + ttt_stream windows:44928/969088 scored_tokens:2877376 adapted_tokens:2877376 lr:0.0005 bpb=1.126152 time=179.5s + ttt_stream windows:45056/969088 scored_tokens:2885568 adapted_tokens:2885568 lr:0.0005 bpb=1.126126 time=180.0s + ttt_stream windows:45184/969088 scored_tokens:2893760 adapted_tokens:2893760 lr:0.0005 bpb=1.126151 time=180.5s + ttt_stream windows:45312/969088 scored_tokens:2901952 adapted_tokens:2901952 lr:0.0005 bpb=1.126206 time=181.0s + ttt_stream windows:45440/969088 scored_tokens:2910144 adapted_tokens:2910144 lr:0.0005 bpb=1.126007 time=181.5s + ttt_stream windows:45568/969088 scored_tokens:2918336 adapted_tokens:2918336 lr:0.0005 bpb=1.125696 time=182.0s + ttt_stream windows:45696/969088 scored_tokens:2926528 adapted_tokens:2926528 lr:0.0005 bpb=1.125792 time=182.5s + ttt_stream windows:45824/969088 scored_tokens:2934720 adapted_tokens:2934720 lr:0.0005 bpb=1.125802 time=183.0s + ttt_stream windows:45952/969088 scored_tokens:2942912 adapted_tokens:2942912 lr:0.0005 bpb=1.126140 time=183.5s + ttt_stream windows:46080/969088 scored_tokens:2951104 adapted_tokens:2951104 lr:0.0005 bpb=1.126199 time=184.0s + ttt_stream windows:46208/969088 scored_tokens:2959296 adapted_tokens:2959296 lr:0.0005 bpb=1.126273 time=184.6s + ttt_stream windows:46336/969088 scored_tokens:2967488 adapted_tokens:2967488 lr:0.0005 bpb=1.126282 time=185.1s + ttt_stream windows:46464/969088 scored_tokens:2975680 adapted_tokens:2975680 lr:0.0005 bpb=1.126014 time=185.6s + ttt_stream windows:46592/969088 scored_tokens:2983872 adapted_tokens:2983872 lr:0.0005 bpb=1.126269 time=186.1s + ttt_stream windows:46720/969088 scored_tokens:2992064 adapted_tokens:2992064 lr:0.0005 bpb=1.126181 time=186.6s + ttt_stream windows:46848/969088 scored_tokens:3000256 adapted_tokens:3000256 lr:0.0005 bpb=1.125862 time=187.1s + ttt_stream windows:46976/969088 scored_tokens:3008448 adapted_tokens:3008448 lr:0.0005 bpb=1.125730 time=187.6s + ttt_stream windows:47104/969088 scored_tokens:3016640 adapted_tokens:3016640 lr:0.0005 bpb=1.125536 time=188.1s + ttt_stream windows:47232/969088 scored_tokens:3024832 adapted_tokens:3024832 lr:0.0005 bpb=1.125315 time=188.6s + ttt_stream windows:47360/969088 scored_tokens:3033024 adapted_tokens:3033024 lr:0.0005 bpb=1.125326 time=189.2s + ttt_stream windows:47488/969088 scored_tokens:3041216 adapted_tokens:3041216 lr:0.0005 bpb=1.125514 time=189.7s + ttt_stream windows:47616/969088 scored_tokens:3049408 adapted_tokens:3049408 lr:0.0005 bpb=1.125587 time=190.2s + ttt_stream windows:47744/969088 scored_tokens:3057600 adapted_tokens:3057600 lr:0.0005 bpb=1.125504 time=190.7s + ttt_stream windows:47872/969088 scored_tokens:3065792 adapted_tokens:3065792 lr:0.0005 bpb=1.125302 time=191.2s + ttt_stream windows:48000/969088 scored_tokens:3073984 adapted_tokens:3073984 lr:0.0005 bpb=1.125276 time=191.7s + ttt_stream windows:48128/969088 scored_tokens:3082176 adapted_tokens:3082176 lr:0.0005 bpb=1.125547 time=192.2s + ttt_stream windows:48256/969088 scored_tokens:3090368 adapted_tokens:3090368 lr:0.0005 bpb=1.125781 time=192.7s + ttt_stream windows:48384/969088 scored_tokens:3098560 adapted_tokens:3098560 lr:0.0005 bpb=1.125529 time=193.2s + ttt_stream windows:48512/969088 scored_tokens:3106752 adapted_tokens:3106752 lr:0.0005 bpb=1.125743 time=193.8s + ttt_stream windows:48640/969088 scored_tokens:3114944 adapted_tokens:3114944 lr:0.0005 bpb=1.125650 time=194.3s + ttt_stream windows:48768/969088 scored_tokens:3123136 adapted_tokens:3123136 lr:0.0005 bpb=1.125064 time=194.8s + ttt_stream windows:48896/969088 scored_tokens:3131328 adapted_tokens:3131328 lr:0.0005 bpb=1.125257 time=195.3s + ttt_stream windows:49024/969088 scored_tokens:3139520 adapted_tokens:3139520 lr:0.0005 bpb=1.125221 time=195.8s + ttt_stream windows:49152/969088 scored_tokens:3147712 adapted_tokens:3147712 lr:0.0005 bpb=1.125907 time=196.3s + ttt_stream windows:49280/969088 scored_tokens:3155904 adapted_tokens:3155904 lr:0.0005 bpb=1.126210 time=196.8s + ttt_stream windows:49408/969088 scored_tokens:3164096 adapted_tokens:3164096 lr:0.0005 bpb=1.126118 time=197.3s + ttt_stream windows:49536/969088 scored_tokens:3172288 adapted_tokens:3172288 lr:0.0005 bpb=1.126404 time=197.8s + ttt_stream windows:49664/969088 scored_tokens:3180480 adapted_tokens:3180480 lr:0.0005 bpb=1.126488 time=198.4s + ttt_stream windows:49792/969088 scored_tokens:3188672 adapted_tokens:3188672 lr:0.0005 bpb=1.126824 time=198.9s + ttt_stream windows:49920/969088 scored_tokens:3196864 adapted_tokens:3196864 lr:0.0005 bpb=1.126594 time=199.4s + ttt_stream windows:50048/969088 scored_tokens:3205056 adapted_tokens:3205056 lr:0.0005 bpb=1.127046 time=199.9s + ttt_stream windows:50176/969088 scored_tokens:3213248 adapted_tokens:3213248 lr:0.0005 bpb=1.126739 time=200.4s + ttt_stream windows:50304/969088 scored_tokens:3221440 adapted_tokens:3221440 lr:0.0005 bpb=1.126983 time=200.9s + ttt_stream windows:50432/969088 scored_tokens:3229632 adapted_tokens:3229632 lr:0.0005 bpb=1.126988 time=201.4s + ttt_stream windows:50560/969088 scored_tokens:3237824 adapted_tokens:3237824 lr:0.0005 bpb=1.126568 time=201.9s + ttt_stream windows:50688/969088 scored_tokens:3246016 adapted_tokens:3246016 lr:0.0005 bpb=1.126800 time=202.4s + ttt_stream windows:50816/969088 scored_tokens:3254208 adapted_tokens:3254208 lr:0.0005 bpb=1.126955 time=203.0s + ttt_stream windows:50944/969088 scored_tokens:3262400 adapted_tokens:3262400 lr:0.0005 bpb=1.127206 time=203.5s + ttt_stream windows:51072/969088 scored_tokens:3270592 adapted_tokens:3270592 lr:0.0005 bpb=1.127132 time=204.0s + ttt_stream windows:51200/969088 scored_tokens:3278784 adapted_tokens:3278784 lr:0.0005 bpb=1.127424 time=204.5s + ttt_stream windows:51328/969088 scored_tokens:3286976 adapted_tokens:3286976 lr:0.0005 bpb=1.127244 time=205.0s + ttt_stream windows:51456/969088 scored_tokens:3295168 adapted_tokens:3295168 lr:0.0005 bpb=1.127139 time=205.5s + ttt_stream windows:51584/969088 scored_tokens:3303360 adapted_tokens:3303360 lr:0.0005 bpb=1.127023 time=206.0s + ttt_stream windows:51712/969088 scored_tokens:3311552 adapted_tokens:3311552 lr:0.0005 bpb=1.127055 time=206.5s + ttt_stream windows:51840/969088 scored_tokens:3319744 adapted_tokens:3319744 lr:0.0005 bpb=1.127332 time=207.0s + ttt_stream windows:51968/969088 scored_tokens:3327936 adapted_tokens:3327936 lr:0.0005 bpb=1.127288 time=207.5s + ttt_stream windows:52096/969088 scored_tokens:3336128 adapted_tokens:3336128 lr:0.0005 bpb=1.127756 time=208.1s + ttt_stream windows:52224/969088 scored_tokens:3344320 adapted_tokens:3344320 lr:0.0005 bpb=1.127835 time=208.6s + ttt_stream windows:52352/969088 scored_tokens:3352512 adapted_tokens:3352512 lr:0.0005 bpb=1.127715 time=209.1s + ttt_stream windows:52480/969088 scored_tokens:3360704 adapted_tokens:3360704 lr:0.0005 bpb=1.127761 time=209.6s + ttt_stream windows:52608/969088 scored_tokens:3368896 adapted_tokens:3368896 lr:0.0005 bpb=1.127668 time=210.1s + ttt_stream windows:52736/969088 scored_tokens:3377088 adapted_tokens:3377088 lr:0.0005 bpb=1.127934 time=210.6s + ttt_stream windows:52864/969088 scored_tokens:3385280 adapted_tokens:3385280 lr:0.0005 bpb=1.127866 time=211.1s + ttt_stream windows:52992/969088 scored_tokens:3393472 adapted_tokens:3393472 lr:0.0005 bpb=1.127753 time=211.6s + ttt_stream windows:53120/969088 scored_tokens:3401664 adapted_tokens:3401664 lr:0.0005 bpb=1.127800 time=212.1s + ttt_stream windows:53248/969088 scored_tokens:3409856 adapted_tokens:3409856 lr:0.0005 bpb=1.127833 time=212.7s + ttt_stream windows:53376/969088 scored_tokens:3418048 adapted_tokens:3418048 lr:0.0005 bpb=1.127425 time=213.2s + ttt_stream windows:53504/969088 scored_tokens:3426240 adapted_tokens:3426240 lr:0.0005 bpb=1.127235 time=213.7s + ttt_stream windows:53632/969088 scored_tokens:3434432 adapted_tokens:3434432 lr:0.0005 bpb=1.127011 time=214.2s + ttt_stream windows:53760/969088 scored_tokens:3442624 adapted_tokens:3442624 lr:0.0005 bpb=1.126874 time=214.7s + ttt_stream windows:53888/969088 scored_tokens:3450816 adapted_tokens:3450816 lr:0.0005 bpb=1.127072 time=215.2s + ttt_stream windows:54016/969088 scored_tokens:3459008 adapted_tokens:3459008 lr:0.0005 bpb=1.127210 time=215.7s + ttt_stream windows:54144/969088 scored_tokens:3467200 adapted_tokens:3467200 lr:0.0005 bpb=1.127419 time=216.2s + ttt_stream windows:54272/969088 scored_tokens:3475392 adapted_tokens:3475392 lr:0.0005 bpb=1.127463 time=216.7s + ttt_stream windows:54400/969088 scored_tokens:3483584 adapted_tokens:3483584 lr:0.0005 bpb=1.127501 time=217.3s + ttt_stream windows:54528/969088 scored_tokens:3491776 adapted_tokens:3491776 lr:0.0005 bpb=1.127553 time=217.8s + ttt_stream windows:54656/969088 scored_tokens:3499968 adapted_tokens:3499968 lr:0.0005 bpb=1.127298 time=218.3s + ttt_stream windows:54784/969088 scored_tokens:3508160 adapted_tokens:3508160 lr:0.0005 bpb=1.127371 time=218.8s + ttt_stream windows:54912/969088 scored_tokens:3516352 adapted_tokens:3516352 lr:0.0005 bpb=1.127497 time=219.3s + ttt_stream windows:55040/969088 scored_tokens:3524544 adapted_tokens:3524544 lr:0.0005 bpb=1.127743 time=219.8s + ttt_stream windows:55168/969088 scored_tokens:3532736 adapted_tokens:3532736 lr:0.0005 bpb=1.127888 time=220.3s + ttt_stream windows:55296/969088 scored_tokens:3540928 adapted_tokens:3540928 lr:0.0005 bpb=1.127830 time=220.8s + ttt_stream windows:55424/969088 scored_tokens:3549120 adapted_tokens:3549120 lr:0.0005 bpb=1.128010 time=221.3s + ttt_stream windows:55552/969088 scored_tokens:3557312 adapted_tokens:3557312 lr:0.0005 bpb=1.128100 time=221.9s + ttt_stream windows:55680/969088 scored_tokens:3565504 adapted_tokens:3565504 lr:0.0005 bpb=1.127904 time=222.4s + ttt_stream windows:55808/969088 scored_tokens:3573696 adapted_tokens:3573696 lr:0.0005 bpb=1.127757 time=222.9s + ttt_stream windows:55936/969088 scored_tokens:3581888 adapted_tokens:3581888 lr:0.0005 bpb=1.127711 time=223.4s + ttt_stream windows:56064/969088 scored_tokens:3590080 adapted_tokens:3590080 lr:0.0005 bpb=1.127869 time=223.9s + ttt_stream windows:56192/969088 scored_tokens:3598272 adapted_tokens:3598272 lr:0.0005 bpb=1.127873 time=224.4s + ttt_stream windows:56320/969088 scored_tokens:3606464 adapted_tokens:3606464 lr:0.0005 bpb=1.127947 time=224.9s + ttt_stream windows:56448/969088 scored_tokens:3614656 adapted_tokens:3614656 lr:0.0005 bpb=1.127828 time=225.4s + ttt_stream windows:56576/969088 scored_tokens:3622848 adapted_tokens:3622848 lr:0.0005 bpb=1.127678 time=225.9s + ttt_stream windows:56704/969088 scored_tokens:3631040 adapted_tokens:3631040 lr:0.0005 bpb=1.127337 time=226.4s + ttt_stream windows:56832/969088 scored_tokens:3639232 adapted_tokens:3639232 lr:0.0005 bpb=1.127155 time=227.0s + ttt_stream windows:56960/969088 scored_tokens:3647424 adapted_tokens:3647424 lr:0.0005 bpb=1.127145 time=227.5s + ttt_stream windows:57088/969088 scored_tokens:3655616 adapted_tokens:3655616 lr:0.0005 bpb=1.126747 time=228.0s + ttt_stream windows:57216/969088 scored_tokens:3663808 adapted_tokens:3663808 lr:0.0005 bpb=1.126541 time=228.5s + ttt_stream windows:57344/969088 scored_tokens:3672000 adapted_tokens:3672000 lr:0.0005 bpb=1.126631 time=229.0s + ttt_stream windows:57472/969088 scored_tokens:3680192 adapted_tokens:3680192 lr:0.0005 bpb=1.126645 time=229.5s + ttt_stream windows:57600/969088 scored_tokens:3688384 adapted_tokens:3688384 lr:0.0005 bpb=1.126720 time=230.0s + ttt_stream windows:57728/969088 scored_tokens:3696576 adapted_tokens:3696576 lr:0.0005 bpb=1.126505 time=230.5s + ttt_stream windows:57856/969088 scored_tokens:3704768 adapted_tokens:3704768 lr:0.0005 bpb=1.125815 time=231.0s + ttt_stream windows:57984/969088 scored_tokens:3712960 adapted_tokens:3712960 lr:0.0005 bpb=1.125209 time=231.6s + ttt_stream windows:58112/969088 scored_tokens:3721152 adapted_tokens:3721152 lr:0.0005 bpb=1.124436 time=232.1s + ttt_stream windows:58240/969088 scored_tokens:3729344 adapted_tokens:3729344 lr:0.0005 bpb=1.123922 time=232.6s + ttt_stream windows:58368/969088 scored_tokens:3737536 adapted_tokens:3737536 lr:0.0005 bpb=1.123415 time=233.1s + ttt_stream windows:58496/969088 scored_tokens:3745728 adapted_tokens:3745728 lr:0.0005 bpb=1.123217 time=233.6s + ttt_stream windows:58624/969088 scored_tokens:3753920 adapted_tokens:3753920 lr:0.0005 bpb=1.123266 time=234.1s + ttt_stream windows:58752/969088 scored_tokens:3762112 adapted_tokens:3762112 lr:0.0005 bpb=1.123057 time=234.6s + ttt_stream windows:58880/969088 scored_tokens:3770304 adapted_tokens:3770304 lr:0.0005 bpb=1.123019 time=235.1s + ttt_stream windows:59008/969088 scored_tokens:3778496 adapted_tokens:3778496 lr:0.0005 bpb=1.122800 time=235.6s + ttt_stream windows:59136/969088 scored_tokens:3786688 adapted_tokens:3786688 lr:0.0005 bpb=1.122941 time=236.2s + ttt_stream windows:59264/969088 scored_tokens:3794880 adapted_tokens:3794880 lr:0.0005 bpb=1.122860 time=236.7s + ttt_stream windows:59392/969088 scored_tokens:3803072 adapted_tokens:3803072 lr:0.0005 bpb=1.122727 time=237.2s + ttt_stream windows:59520/969088 scored_tokens:3811264 adapted_tokens:3811264 lr:0.0005 bpb=1.122818 time=237.7s + ttt_stream windows:59648/969088 scored_tokens:3819456 adapted_tokens:3819456 lr:0.0005 bpb=1.122893 time=238.2s + ttt_stream windows:59776/969088 scored_tokens:3827648 adapted_tokens:3827648 lr:0.0005 bpb=1.122915 time=238.7s + ttt_stream windows:59904/969088 scored_tokens:3835840 adapted_tokens:3835840 lr:0.0005 bpb=1.122960 time=239.2s + ttt_stream windows:60032/969088 scored_tokens:3844032 adapted_tokens:3844032 lr:0.0005 bpb=1.122983 time=239.7s + ttt_stream windows:60160/969088 scored_tokens:3852224 adapted_tokens:3852224 lr:0.0005 bpb=1.122736 time=240.2s + ttt_stream windows:60288/969088 scored_tokens:3860416 adapted_tokens:3860416 lr:0.0005 bpb=1.122632 time=240.7s + ttt_stream windows:60416/969088 scored_tokens:3868608 adapted_tokens:3868608 lr:0.0005 bpb=1.122663 time=241.3s + ttt_stream windows:60544/969088 scored_tokens:3876800 adapted_tokens:3876800 lr:0.0005 bpb=1.122913 time=241.8s + ttt_stream windows:60672/969088 scored_tokens:3884992 adapted_tokens:3884992 lr:0.0005 bpb=1.123052 time=242.3s + ttt_stream windows:60800/969088 scored_tokens:3893184 adapted_tokens:3893184 lr:0.0005 bpb=1.122960 time=242.8s + ttt_stream windows:60928/969088 scored_tokens:3901376 adapted_tokens:3901376 lr:0.0005 bpb=1.123221 time=243.3s + ttt_stream windows:61056/969088 scored_tokens:3909568 adapted_tokens:3909568 lr:0.0005 bpb=1.123418 time=243.8s + ttt_stream windows:61184/969088 scored_tokens:3917760 adapted_tokens:3917760 lr:0.0005 bpb=1.123713 time=244.3s + ttt_stream windows:61312/969088 scored_tokens:3925952 adapted_tokens:3925952 lr:0.0005 bpb=1.123501 time=244.8s + ttt_stream windows:61440/969088 scored_tokens:3934144 adapted_tokens:3934144 lr:0.0005 bpb=1.123342 time=245.3s + ttt_stream windows:61568/969088 scored_tokens:3942336 adapted_tokens:3942336 lr:0.0005 bpb=1.123119 time=245.9s + ttt_stream windows:61696/969088 scored_tokens:3950528 adapted_tokens:3950528 lr:0.0005 bpb=1.123157 time=246.4s + ttt_stream windows:61824/969088 scored_tokens:3958720 adapted_tokens:3958720 lr:0.0005 bpb=1.123292 time=246.9s + ttt_stream windows:61952/969088 scored_tokens:3966912 adapted_tokens:3966912 lr:0.0005 bpb=1.123811 time=247.4s + ttt_stream windows:62080/969088 scored_tokens:3975104 adapted_tokens:3975104 lr:0.0005 bpb=1.123897 time=247.9s + ttt_stream windows:62208/969088 scored_tokens:3983296 adapted_tokens:3983296 lr:0.0005 bpb=1.123811 time=248.4s + ttt_stream windows:62336/969088 scored_tokens:3991488 adapted_tokens:3991488 lr:0.0005 bpb=1.123797 time=248.9s + ttt_stream windows:62464/969088 scored_tokens:3999680 adapted_tokens:3999680 lr:0.0005 bpb=1.123918 time=249.4s + ttt_stream windows:62592/969088 scored_tokens:4007872 adapted_tokens:4007872 lr:0.0005 bpb=1.123939 time=249.9s + ttt_stream windows:62720/969088 scored_tokens:4016064 adapted_tokens:4016064 lr:0.0005 bpb=1.124009 time=250.5s + ttt_stream windows:62848/969088 scored_tokens:4024256 adapted_tokens:4024256 lr:0.0005 bpb=1.123959 time=251.0s + ttt_stream windows:62976/969088 scored_tokens:4032448 adapted_tokens:4032448 lr:0.0005 bpb=1.123588 time=251.5s + ttt_stream windows:63104/969088 scored_tokens:4040640 adapted_tokens:4040640 lr:0.0005 bpb=1.123551 time=252.0s + ttt_stream windows:63232/969088 scored_tokens:4048832 adapted_tokens:4048832 lr:0.0005 bpb=1.123635 time=252.5s + ttt_stream windows:63360/969088 scored_tokens:4057024 adapted_tokens:4057024 lr:0.0005 bpb=1.123843 time=253.0s + ttt_stream windows:63488/969088 scored_tokens:4065216 adapted_tokens:4065216 lr:0.0005 bpb=1.124067 time=253.5s + ttt_stream windows:63616/969088 scored_tokens:4073408 adapted_tokens:4073408 lr:0.0005 bpb=1.124129 time=254.0s + ttt_stream windows:63744/969088 scored_tokens:4081600 adapted_tokens:4081600 lr:0.0005 bpb=1.123996 time=254.5s + ttt_stream windows:63872/969088 scored_tokens:4089792 adapted_tokens:4089792 lr:0.0005 bpb=1.124174 time=255.0s + ttt_stream windows:64000/969088 scored_tokens:4097984 adapted_tokens:4097984 lr:0.0005 bpb=1.123913 time=255.6s + ttt_stream windows:64128/969088 scored_tokens:4106176 adapted_tokens:4106176 lr:0.0005 bpb=1.124116 time=256.1s + ttt_stream windows:64256/969088 scored_tokens:4114368 adapted_tokens:4114368 lr:0.0005 bpb=1.124383 time=256.6s + ttt_stream windows:64384/969088 scored_tokens:4122560 adapted_tokens:4122560 lr:0.0005 bpb=1.124182 time=257.1s + ttt_stream windows:64512/969088 scored_tokens:4130752 adapted_tokens:4130752 lr:0.0005 bpb=1.124105 time=257.6s + ttt_stream windows:64640/969088 scored_tokens:4138944 adapted_tokens:4138944 lr:0.0005 bpb=1.123959 time=258.1s + ttt_stream windows:64768/969088 scored_tokens:4147136 adapted_tokens:4147136 lr:0.0005 bpb=1.124220 time=258.6s + ttt_stream windows:64896/969088 scored_tokens:4155328 adapted_tokens:4155328 lr:0.0005 bpb=1.124055 time=259.1s + ttt_stream windows:65024/969088 scored_tokens:4163520 adapted_tokens:4163520 lr:0.0005 bpb=1.124002 time=259.6s + ttt_stream windows:65152/969088 scored_tokens:4171712 adapted_tokens:4171712 lr:0.0005 bpb=1.123811 time=260.2s + ttt_stream windows:65280/969088 scored_tokens:4179904 adapted_tokens:4179904 lr:0.0005 bpb=1.123664 time=260.7s + ttt_stream windows:65408/969088 scored_tokens:4188096 adapted_tokens:4188096 lr:0.0005 bpb=1.123771 time=261.2s + ttt_stream windows:65536/969088 scored_tokens:4196288 adapted_tokens:4196288 lr:0.0005 bpb=1.123865 time=261.7s + ttt_stream windows:65664/969088 scored_tokens:4204480 adapted_tokens:4204480 lr:0.0005 bpb=1.123829 time=262.2s + ttt_stream windows:65792/969088 scored_tokens:4212672 adapted_tokens:4212672 lr:0.0005 bpb=1.123622 time=262.7s + ttt_stream windows:65920/969088 scored_tokens:4220864 adapted_tokens:4220864 lr:0.0005 bpb=1.123238 time=263.2s + ttt_stream windows:66048/969088 scored_tokens:4229056 adapted_tokens:4229056 lr:0.0005 bpb=1.123185 time=263.7s + ttt_stream windows:66176/969088 scored_tokens:4237248 adapted_tokens:4237248 lr:0.0005 bpb=1.123142 time=264.2s + ttt_stream windows:66304/969088 scored_tokens:4245440 adapted_tokens:4245440 lr:0.0005 bpb=1.123188 time=264.7s + ttt_stream windows:66432/969088 scored_tokens:4253632 adapted_tokens:4253632 lr:0.0005 bpb=1.123124 time=265.3s + ttt_stream windows:66560/969088 scored_tokens:4261824 adapted_tokens:4261824 lr:0.0005 bpb=1.123100 time=265.8s + ttt_stream windows:66688/969088 scored_tokens:4270016 adapted_tokens:4270016 lr:0.0005 bpb=1.123138 time=266.3s + ttt_stream windows:66816/969088 scored_tokens:4278208 adapted_tokens:4278208 lr:0.0005 bpb=1.122945 time=266.8s + ttt_stream windows:66944/969088 scored_tokens:4286400 adapted_tokens:4286400 lr:0.0005 bpb=1.122856 time=267.3s + ttt_stream windows:67072/969088 scored_tokens:4294592 adapted_tokens:4294592 lr:0.0005 bpb=1.122903 time=267.8s + ttt_stream windows:67200/969088 scored_tokens:4302784 adapted_tokens:4302784 lr:0.0005 bpb=1.122745 time=268.3s + ttt_stream windows:67328/969088 scored_tokens:4310976 adapted_tokens:4310976 lr:0.0005 bpb=1.122473 time=268.8s + ttt_stream windows:67456/969088 scored_tokens:4319168 adapted_tokens:4319168 lr:0.0005 bpb=1.122546 time=269.3s + ttt_stream windows:67584/969088 scored_tokens:4327360 adapted_tokens:4327360 lr:0.0005 bpb=1.122518 time=269.9s + ttt_stream windows:67712/969088 scored_tokens:4335552 adapted_tokens:4335552 lr:0.0005 bpb=1.122532 time=270.4s + ttt_stream windows:67840/969088 scored_tokens:4343744 adapted_tokens:4343744 lr:0.0005 bpb=1.122409 time=270.9s + ttt_stream windows:67968/969088 scored_tokens:4351936 adapted_tokens:4351936 lr:0.0005 bpb=1.122459 time=271.4s + ttt_stream windows:68096/969088 scored_tokens:4360128 adapted_tokens:4360128 lr:0.0005 bpb=1.122739 time=271.9s + ttt_stream windows:68224/969088 scored_tokens:4368320 adapted_tokens:4368320 lr:0.0005 bpb=1.122665 time=272.4s + ttt_stream windows:68352/969088 scored_tokens:4376512 adapted_tokens:4376512 lr:0.0005 bpb=1.122601 time=272.9s + ttt_stream windows:68480/969088 scored_tokens:4384704 adapted_tokens:4384704 lr:0.0005 bpb=1.122364 time=273.4s + ttt_stream windows:68608/969088 scored_tokens:4392896 adapted_tokens:4392896 lr:0.0005 bpb=1.122356 time=273.9s + ttt_stream windows:68736/969088 scored_tokens:4401088 adapted_tokens:4401088 lr:0.0005 bpb=1.122237 time=274.5s + ttt_stream windows:68864/969088 scored_tokens:4409280 adapted_tokens:4409280 lr:0.0005 bpb=1.122312 time=275.0s + ttt_stream windows:68992/969088 scored_tokens:4417472 adapted_tokens:4417472 lr:0.0005 bpb=1.122068 time=275.5s + ttt_stream windows:69120/969088 scored_tokens:4425664 adapted_tokens:4425664 lr:0.0005 bpb=1.122208 time=276.0s + ttt_stream windows:69248/969088 scored_tokens:4433856 adapted_tokens:4433856 lr:0.0005 bpb=1.121982 time=276.5s + ttt_stream windows:69376/969088 scored_tokens:4442048 adapted_tokens:4442048 lr:0.0005 bpb=1.121907 time=277.0s + ttt_stream windows:69504/969088 scored_tokens:4450240 adapted_tokens:4450240 lr:0.0005 bpb=1.122110 time=277.5s + ttt_stream windows:69632/969088 scored_tokens:4458432 adapted_tokens:4458432 lr:0.0005 bpb=1.122150 time=278.0s + ttt_stream windows:69760/969088 scored_tokens:4466624 adapted_tokens:4466624 lr:0.0005 bpb=1.122044 time=278.5s + ttt_stream windows:69888/969088 scored_tokens:4474816 adapted_tokens:4474816 lr:0.0005 bpb=1.122065 time=279.0s + ttt_stream windows:70016/969088 scored_tokens:4483008 adapted_tokens:4483008 lr:0.0005 bpb=1.121969 time=279.6s + ttt_stream windows:70144/969088 scored_tokens:4491200 adapted_tokens:4491200 lr:0.0005 bpb=1.121958 time=280.1s + ttt_stream windows:70272/969088 scored_tokens:4499392 adapted_tokens:4499392 lr:0.0005 bpb=1.122010 time=280.6s + ttt_stream windows:70400/969088 scored_tokens:4507584 adapted_tokens:4507584 lr:0.0005 bpb=1.121847 time=281.1s + ttt_stream windows:70528/969088 scored_tokens:4515776 adapted_tokens:4515776 lr:0.0005 bpb=1.121904 time=281.6s + ttt_stream windows:70656/969088 scored_tokens:4523968 adapted_tokens:4523968 lr:0.0005 bpb=1.121875 time=282.1s + ttt_stream windows:70784/969088 scored_tokens:4532160 adapted_tokens:4532160 lr:0.0005 bpb=1.121958 time=282.6s + ttt_stream windows:70912/969088 scored_tokens:4540352 adapted_tokens:4540352 lr:0.0005 bpb=1.121952 time=283.1s + ttt_stream windows:71040/969088 scored_tokens:4548544 adapted_tokens:4548544 lr:0.0005 bpb=1.121898 time=283.6s + ttt_stream windows:71168/969088 scored_tokens:4556736 adapted_tokens:4556736 lr:0.0005 bpb=1.121799 time=284.2s + ttt_stream windows:71296/969088 scored_tokens:4564928 adapted_tokens:4564928 lr:0.0005 bpb=1.121730 time=284.7s + ttt_stream windows:71424/969088 scored_tokens:4573120 adapted_tokens:4573120 lr:0.0005 bpb=1.121663 time=285.2s + ttt_stream windows:71552/969088 scored_tokens:4581312 adapted_tokens:4581312 lr:0.0005 bpb=1.121584 time=285.7s + ttt_stream windows:71680/969088 scored_tokens:4589504 adapted_tokens:4589504 lr:0.0005 bpb=1.121496 time=286.2s + ttt_stream windows:71808/969088 scored_tokens:4597696 adapted_tokens:4597696 lr:0.0005 bpb=1.121688 time=286.7s + ttt_stream windows:71936/969088 scored_tokens:4605888 adapted_tokens:4605888 lr:0.0005 bpb=1.121893 time=287.2s + ttt_stream windows:72064/969088 scored_tokens:4614080 adapted_tokens:4614080 lr:0.0005 bpb=1.121915 time=287.7s + ttt_stream windows:72192/969088 scored_tokens:4622272 adapted_tokens:4622272 lr:0.0005 bpb=1.121748 time=288.2s + ttt_stream windows:72320/969088 scored_tokens:4630464 adapted_tokens:4630464 lr:0.0005 bpb=1.121631 time=288.7s + ttt_stream windows:72448/969088 scored_tokens:4638656 adapted_tokens:4638656 lr:0.0005 bpb=1.121657 time=289.3s + ttt_stream windows:72576/969088 scored_tokens:4646848 adapted_tokens:4646848 lr:0.0005 bpb=1.121545 time=289.8s + ttt_stream windows:72704/969088 scored_tokens:4655040 adapted_tokens:4655040 lr:0.0005 bpb=1.121668 time=290.3s + ttt_stream windows:72832/969088 scored_tokens:4663232 adapted_tokens:4663232 lr:0.0005 bpb=1.121746 time=290.8s + ttt_stream windows:72960/969088 scored_tokens:4671424 adapted_tokens:4671424 lr:0.0005 bpb=1.121464 time=291.3s + ttt_stream windows:73088/969088 scored_tokens:4679616 adapted_tokens:4679616 lr:0.0005 bpb=1.121558 time=291.8s + ttt_stream windows:73216/969088 scored_tokens:4687808 adapted_tokens:4687808 lr:0.0005 bpb=1.121657 time=292.3s + ttt_stream windows:73344/969088 scored_tokens:4696000 adapted_tokens:4696000 lr:0.0005 bpb=1.121597 time=292.8s + ttt_stream windows:73472/969088 scored_tokens:4704192 adapted_tokens:4704192 lr:0.0005 bpb=1.121707 time=293.3s + ttt_stream windows:73600/969088 scored_tokens:4712384 adapted_tokens:4712384 lr:0.0005 bpb=1.121782 time=293.9s + ttt_stream windows:73728/969088 scored_tokens:4720576 adapted_tokens:4720576 lr:0.0005 bpb=1.121743 time=294.4s + ttt_stream windows:73856/969088 scored_tokens:4728768 adapted_tokens:4728768 lr:0.0005 bpb=1.122004 time=294.9s + ttt_stream windows:73984/969088 scored_tokens:4736960 adapted_tokens:4736960 lr:0.0005 bpb=1.121943 time=295.4s + ttt_stream windows:74112/969088 scored_tokens:4745152 adapted_tokens:4745152 lr:0.0005 bpb=1.121941 time=295.9s + ttt_stream windows:74240/969088 scored_tokens:4753344 adapted_tokens:4753344 lr:0.0005 bpb=1.122041 time=296.4s + ttt_stream windows:74368/969088 scored_tokens:4761536 adapted_tokens:4761536 lr:0.0005 bpb=1.122102 time=296.9s + ttt_stream windows:74496/969088 scored_tokens:4769728 adapted_tokens:4769728 lr:0.0005 bpb=1.122327 time=297.4s + ttt_stream windows:74624/969088 scored_tokens:4777920 adapted_tokens:4777920 lr:0.0005 bpb=1.122357 time=297.9s + ttt_stream windows:74752/969088 scored_tokens:4786112 adapted_tokens:4786112 lr:0.0005 bpb=1.122307 time=298.5s + ttt_stream windows:74880/969088 scored_tokens:4794304 adapted_tokens:4794304 lr:0.0005 bpb=1.122529 time=299.0s + ttt_stream windows:75008/969088 scored_tokens:4802496 adapted_tokens:4802496 lr:0.0005 bpb=1.122346 time=299.5s + ttt_stream windows:75136/969088 scored_tokens:4810688 adapted_tokens:4810688 lr:0.0005 bpb=1.122016 time=300.0s + ttt_stream windows:75264/969088 scored_tokens:4818880 adapted_tokens:4818880 lr:0.0005 bpb=1.121910 time=300.5s + ttt_stream windows:75392/969088 scored_tokens:4827072 adapted_tokens:4827072 lr:0.0005 bpb=1.122135 time=301.0s + ttt_stream windows:75520/969088 scored_tokens:4835264 adapted_tokens:4835264 lr:0.0005 bpb=1.122177 time=301.5s + ttt_stream windows:75648/969088 scored_tokens:4843456 adapted_tokens:4843456 lr:0.0005 bpb=1.121714 time=302.0s + ttt_stream windows:75776/969088 scored_tokens:4851648 adapted_tokens:4851648 lr:0.0005 bpb=1.121379 time=302.5s + ttt_stream windows:75904/969088 scored_tokens:4859840 adapted_tokens:4859840 lr:0.0005 bpb=1.121358 time=303.0s + ttt_stream windows:76032/969088 scored_tokens:4868032 adapted_tokens:4868032 lr:0.0005 bpb=1.121404 time=303.6s + ttt_stream windows:76160/969088 scored_tokens:4876224 adapted_tokens:4876224 lr:0.0005 bpb=1.121275 time=304.1s + ttt_stream windows:76288/969088 scored_tokens:4884416 adapted_tokens:4884416 lr:0.0005 bpb=1.121283 time=304.6s + ttt_stream windows:76416/969088 scored_tokens:4892608 adapted_tokens:4892608 lr:0.0005 bpb=1.121290 time=305.1s + ttt_stream windows:76544/969088 scored_tokens:4900800 adapted_tokens:4900800 lr:0.0005 bpb=1.121432 time=305.6s + ttt_stream windows:76672/969088 scored_tokens:4908992 adapted_tokens:4908992 lr:0.0005 bpb=1.121298 time=306.1s + ttt_stream windows:76800/969088 scored_tokens:4917184 adapted_tokens:4917184 lr:0.0005 bpb=1.121621 time=306.6s + ttt_stream windows:76928/969088 scored_tokens:4925376 adapted_tokens:4925376 lr:0.0005 bpb=1.121756 time=307.1s + ttt_stream windows:77056/969088 scored_tokens:4933568 adapted_tokens:4933568 lr:0.0005 bpb=1.121810 time=307.6s + ttt_stream windows:77184/969088 scored_tokens:4941760 adapted_tokens:4941760 lr:0.0005 bpb=1.121991 time=308.2s + ttt_stream windows:77312/969088 scored_tokens:4949952 adapted_tokens:4949952 lr:0.0005 bpb=1.121909 time=308.7s + ttt_stream windows:77440/969088 scored_tokens:4958144 adapted_tokens:4958144 lr:0.0005 bpb=1.122057 time=309.2s + ttt_stream windows:77568/969088 scored_tokens:4966336 adapted_tokens:4966336 lr:0.0005 bpb=1.121912 time=309.7s + ttt_stream windows:77696/969088 scored_tokens:4974528 adapted_tokens:4974528 lr:0.0005 bpb=1.121936 time=310.2s + ttt_stream windows:77824/969088 scored_tokens:4982720 adapted_tokens:4982720 lr:0.0005 bpb=1.121865 time=310.7s + ttt_stream windows:77952/969088 scored_tokens:4990912 adapted_tokens:4990912 lr:0.0005 bpb=1.122065 time=311.2s + ttt_stream windows:78080/969088 scored_tokens:4999104 adapted_tokens:4999104 lr:0.0005 bpb=1.122058 time=311.7s + ttt_stream windows:78208/969088 scored_tokens:5007296 adapted_tokens:5007296 lr:0.0005 bpb=1.122147 time=312.2s + ttt_stream windows:78336/969088 scored_tokens:5015488 adapted_tokens:5015488 lr:0.0005 bpb=1.122278 time=312.7s + ttt_stream windows:78464/969088 scored_tokens:5023680 adapted_tokens:5023680 lr:0.0005 bpb=1.122323 time=313.3s + ttt_stream windows:78592/969088 scored_tokens:5031872 adapted_tokens:5031872 lr:0.0005 bpb=1.122556 time=313.8s + ttt_stream windows:78720/969088 scored_tokens:5040064 adapted_tokens:5040064 lr:0.0005 bpb=1.122281 time=314.3s + ttt_stream windows:78848/969088 scored_tokens:5048256 adapted_tokens:5048256 lr:0.0005 bpb=1.121767 time=314.8s + ttt_stream windows:78976/969088 scored_tokens:5056448 adapted_tokens:5056448 lr:0.0005 bpb=1.121863 time=315.3s + ttt_stream windows:79104/969088 scored_tokens:5064640 adapted_tokens:5064640 lr:0.0005 bpb=1.121960 time=315.8s + ttt_stream windows:79232/969088 scored_tokens:5072832 adapted_tokens:5072832 lr:0.0005 bpb=1.121995 time=316.3s + ttt_stream windows:79360/969088 scored_tokens:5081024 adapted_tokens:5081024 lr:0.0005 bpb=1.122207 time=316.8s + ttt_stream windows:79488/969088 scored_tokens:5089216 adapted_tokens:5089216 lr:0.0005 bpb=1.122184 time=317.3s + ttt_stream windows:79616/969088 scored_tokens:5097408 adapted_tokens:5097408 lr:0.0005 bpb=1.122352 time=317.9s + ttt_stream windows:79744/969088 scored_tokens:5105600 adapted_tokens:5105600 lr:0.0005 bpb=1.122413 time=318.4s + ttt_stream windows:79872/969088 scored_tokens:5113792 adapted_tokens:5113792 lr:0.0005 bpb=1.122386 time=318.9s + ttt_stream windows:80000/969088 scored_tokens:5121984 adapted_tokens:5121984 lr:0.0005 bpb=1.122540 time=319.4s + ttt_stream windows:80128/969088 scored_tokens:5130176 adapted_tokens:5130176 lr:0.0005 bpb=1.122527 time=319.9s + ttt_stream windows:80256/969088 scored_tokens:5138368 adapted_tokens:5138368 lr:0.0005 bpb=1.122432 time=320.4s + ttt_stream windows:80384/969088 scored_tokens:5146560 adapted_tokens:5146560 lr:0.0005 bpb=1.122214 time=320.9s + ttt_stream windows:80512/969088 scored_tokens:5154752 adapted_tokens:5154752 lr:0.0005 bpb=1.122638 time=321.4s + ttt_stream windows:80640/969088 scored_tokens:5162944 adapted_tokens:5162944 lr:0.0005 bpb=1.122820 time=321.9s + ttt_stream windows:80768/969088 scored_tokens:5171136 adapted_tokens:5171136 lr:0.0005 bpb=1.122839 time=322.5s + ttt_stream windows:80896/969088 scored_tokens:5179328 adapted_tokens:5179328 lr:0.0005 bpb=1.122683 time=323.0s + ttt_stream windows:81024/969088 scored_tokens:5187520 adapted_tokens:5187520 lr:0.0005 bpb=1.122536 time=323.5s + ttt_stream windows:81152/969088 scored_tokens:5195712 adapted_tokens:5195712 lr:0.0005 bpb=1.122400 time=324.0s + ttt_stream windows:81280/969088 scored_tokens:5203904 adapted_tokens:5203904 lr:0.0005 bpb=1.122449 time=324.5s + ttt_stream windows:81408/969088 scored_tokens:5212096 adapted_tokens:5212096 lr:0.0005 bpb=1.122272 time=325.0s + ttt_stream windows:81536/969088 scored_tokens:5220288 adapted_tokens:5220288 lr:0.0005 bpb=1.122282 time=325.5s + ttt_stream windows:81664/969088 scored_tokens:5228480 adapted_tokens:5228480 lr:0.0005 bpb=1.122191 time=326.0s + ttt_stream windows:81792/969088 scored_tokens:5236672 adapted_tokens:5236672 lr:0.0005 bpb=1.122327 time=326.5s + ttt_stream windows:81920/969088 scored_tokens:5244864 adapted_tokens:5244864 lr:0.0005 bpb=1.122520 time=327.0s + ttt_stream windows:82048/969088 scored_tokens:5253056 adapted_tokens:5253056 lr:0.0005 bpb=1.122661 time=327.6s + ttt_stream windows:82176/969088 scored_tokens:5261248 adapted_tokens:5261248 lr:0.0005 bpb=1.122810 time=328.1s + ttt_stream windows:82304/969088 scored_tokens:5269440 adapted_tokens:5269440 lr:0.0005 bpb=1.122656 time=328.6s + ttt_stream windows:82432/969088 scored_tokens:5277632 adapted_tokens:5277632 lr:0.0005 bpb=1.122741 time=329.1s + ttt_stream windows:82560/969088 scored_tokens:5285824 adapted_tokens:5285824 lr:0.0005 bpb=1.122781 time=329.6s + ttt_stream windows:82688/969088 scored_tokens:5294016 adapted_tokens:5294016 lr:0.0005 bpb=1.122866 time=330.1s + ttt_stream windows:82816/969088 scored_tokens:5302208 adapted_tokens:5302208 lr:0.0005 bpb=1.122903 time=330.6s + ttt_stream windows:82944/969088 scored_tokens:5310400 adapted_tokens:5310400 lr:0.0005 bpb=1.122885 time=331.1s + ttt_stream windows:83072/969088 scored_tokens:5318592 adapted_tokens:5318592 lr:0.0005 bpb=1.122980 time=331.6s + ttt_stream windows:83200/969088 scored_tokens:5326784 adapted_tokens:5326784 lr:0.0005 bpb=1.123170 time=332.2s + ttt_stream windows:83328/969088 scored_tokens:5334976 adapted_tokens:5334976 lr:0.0005 bpb=1.123242 time=332.7s + ttt_stream windows:83456/969088 scored_tokens:5343168 adapted_tokens:5343168 lr:0.0005 bpb=1.123138 time=333.2s + ttt_stream windows:83584/969088 scored_tokens:5351360 adapted_tokens:5351360 lr:0.0005 bpb=1.123234 time=333.7s + ttt_stream windows:83712/969088 scored_tokens:5359552 adapted_tokens:5359552 lr:0.0005 bpb=1.123185 time=334.2s + ttt_stream windows:83840/969088 scored_tokens:5367744 adapted_tokens:5367744 lr:0.0005 bpb=1.123295 time=334.7s + ttt_stream windows:83968/969088 scored_tokens:5375936 adapted_tokens:5375936 lr:0.0005 bpb=1.124625 time=335.2s + ttt_stream windows:84096/969088 scored_tokens:5384128 adapted_tokens:5384128 lr:0.0005 bpb=1.124972 time=335.7s + ttt_stream windows:84224/969088 scored_tokens:5392320 adapted_tokens:5392320 lr:0.0005 bpb=1.124969 time=336.2s + ttt_stream windows:84352/969088 scored_tokens:5400512 adapted_tokens:5400512 lr:0.0005 bpb=1.125102 time=336.8s + ttt_stream windows:84480/969088 scored_tokens:5408704 adapted_tokens:5408704 lr:0.0005 bpb=1.125166 time=337.3s + ttt_stream windows:84608/969088 scored_tokens:5416896 adapted_tokens:5416896 lr:0.0005 bpb=1.125147 time=337.8s + ttt_stream windows:84736/969088 scored_tokens:5425088 adapted_tokens:5425088 lr:0.0005 bpb=1.125132 time=338.3s + ttt_stream windows:84864/969088 scored_tokens:5433280 adapted_tokens:5433280 lr:0.0005 bpb=1.125135 time=338.8s + ttt_stream windows:84992/969088 scored_tokens:5441472 adapted_tokens:5441472 lr:0.0005 bpb=1.125273 time=339.3s + ttt_stream windows:85120/969088 scored_tokens:5449664 adapted_tokens:5449664 lr:0.0005 bpb=1.125070 time=339.8s + ttt_stream windows:85248/969088 scored_tokens:5457856 adapted_tokens:5457856 lr:0.0005 bpb=1.124768 time=340.3s + ttt_stream windows:85376/969088 scored_tokens:5466048 adapted_tokens:5466048 lr:0.0005 bpb=1.124491 time=340.8s + ttt_stream windows:85504/969088 scored_tokens:5474240 adapted_tokens:5474240 lr:0.0005 bpb=1.124306 time=341.3s + ttt_stream windows:85632/969088 scored_tokens:5482432 adapted_tokens:5482432 lr:0.0005 bpb=1.123994 time=341.9s + ttt_stream windows:85760/969088 scored_tokens:5490624 adapted_tokens:5490624 lr:0.0005 bpb=1.124091 time=342.4s + ttt_stream windows:85888/969088 scored_tokens:5498816 adapted_tokens:5498816 lr:0.0005 bpb=1.124207 time=342.9s + ttt_stream windows:86016/969088 scored_tokens:5507008 adapted_tokens:5507008 lr:0.0005 bpb=1.124257 time=343.4s + ttt_stream windows:86144/969088 scored_tokens:5515200 adapted_tokens:5515200 lr:0.0005 bpb=1.124326 time=343.9s + ttt_stream windows:86272/969088 scored_tokens:5523392 adapted_tokens:5523392 lr:0.0005 bpb=1.124329 time=344.4s + ttt_stream windows:86400/969088 scored_tokens:5531584 adapted_tokens:5531584 lr:0.0005 bpb=1.124305 time=344.9s + ttt_stream windows:86528/969088 scored_tokens:5539776 adapted_tokens:5539776 lr:0.0005 bpb=1.124404 time=345.4s + ttt_stream windows:86656/969088 scored_tokens:5547968 adapted_tokens:5547968 lr:0.0005 bpb=1.124184 time=345.9s + ttt_stream windows:86784/969088 scored_tokens:5556160 adapted_tokens:5556160 lr:0.0005 bpb=1.124306 time=346.5s + ttt_stream windows:86912/969088 scored_tokens:5564352 adapted_tokens:5564352 lr:0.0005 bpb=1.124469 time=347.0s + ttt_stream windows:87040/969088 scored_tokens:5572544 adapted_tokens:5572544 lr:0.0005 bpb=1.124499 time=347.5s + ttt_stream windows:87168/969088 scored_tokens:5580736 adapted_tokens:5580736 lr:0.0005 bpb=1.124488 time=348.0s + ttt_stream windows:87296/969088 scored_tokens:5588928 adapted_tokens:5588928 lr:0.0005 bpb=1.124697 time=348.5s + ttt_stream windows:87424/969088 scored_tokens:5597120 adapted_tokens:5597120 lr:0.0005 bpb=1.124733 time=349.0s + ttt_stream windows:87552/969088 scored_tokens:5605312 adapted_tokens:5605312 lr:0.0005 bpb=1.124780 time=349.5s + ttt_stream windows:87680/969088 scored_tokens:5613504 adapted_tokens:5613504 lr:0.0005 bpb=1.124942 time=350.0s + ttt_stream windows:87808/969088 scored_tokens:5621696 adapted_tokens:5621696 lr:0.0005 bpb=1.124974 time=350.5s + ttt_stream windows:87936/969088 scored_tokens:5629888 adapted_tokens:5629888 lr:0.0005 bpb=1.124974 time=351.0s + ttt_stream windows:88064/969088 scored_tokens:5638080 adapted_tokens:5638080 lr:0.0005 bpb=1.124987 time=351.6s + ttt_stream windows:88192/969088 scored_tokens:5646272 adapted_tokens:5646272 lr:0.0005 bpb=1.124952 time=352.1s + ttt_stream windows:88320/969088 scored_tokens:5654464 adapted_tokens:5654464 lr:0.0005 bpb=1.124942 time=352.6s + ttt_stream windows:88448/969088 scored_tokens:5662656 adapted_tokens:5662656 lr:0.0005 bpb=1.124999 time=353.1s + ttt_stream windows:88576/969088 scored_tokens:5670848 adapted_tokens:5670848 lr:0.0005 bpb=1.125107 time=353.6s + ttt_stream windows:88704/969088 scored_tokens:5679040 adapted_tokens:5679040 lr:0.0005 bpb=1.125128 time=354.1s + ttt_stream windows:88832/969088 scored_tokens:5687232 adapted_tokens:5687232 lr:0.0005 bpb=1.125086 time=354.6s + ttt_stream windows:88960/969088 scored_tokens:5695424 adapted_tokens:5695424 lr:0.0005 bpb=1.124865 time=355.1s + ttt_stream windows:89088/969088 scored_tokens:5703616 adapted_tokens:5703616 lr:0.0005 bpb=1.125017 time=355.6s + ttt_stream windows:89216/969088 scored_tokens:5711808 adapted_tokens:5711808 lr:0.0005 bpb=1.125044 time=356.2s + ttt_stream windows:89344/969088 scored_tokens:5720000 adapted_tokens:5720000 lr:0.0005 bpb=1.124948 time=356.7s + ttt_stream windows:89472/969088 scored_tokens:5728192 adapted_tokens:5728192 lr:0.0005 bpb=1.125111 time=357.2s + ttt_stream windows:89600/969088 scored_tokens:5736384 adapted_tokens:5736384 lr:0.0005 bpb=1.125282 time=357.7s + ttt_stream windows:89728/969088 scored_tokens:5744576 adapted_tokens:5744576 lr:0.0005 bpb=1.125528 time=358.2s + ttt_stream windows:89856/969088 scored_tokens:5752768 adapted_tokens:5752768 lr:0.0005 bpb=1.125516 time=358.7s + ttt_stream windows:89984/969088 scored_tokens:5760960 adapted_tokens:5760960 lr:0.0005 bpb=1.125646 time=359.2s + ttt_stream windows:90112/969088 scored_tokens:5769152 adapted_tokens:5769152 lr:0.0005 bpb=1.125681 time=359.7s + ttt_stream windows:90240/969088 scored_tokens:5777344 adapted_tokens:5777344 lr:0.0005 bpb=1.125700 time=360.2s + ttt_stream windows:90368/969088 scored_tokens:5785536 adapted_tokens:5785536 lr:0.0005 bpb=1.125618 time=360.7s + ttt_stream windows:90496/969088 scored_tokens:5793728 adapted_tokens:5793728 lr:0.0005 bpb=1.125478 time=361.3s + ttt_stream windows:90624/969088 scored_tokens:5801920 adapted_tokens:5801920 lr:0.0005 bpb=1.125487 time=361.8s + ttt_stream windows:90752/969088 scored_tokens:5810112 adapted_tokens:5810112 lr:0.0005 bpb=1.125437 time=362.3s + ttt_stream windows:90880/969088 scored_tokens:5818304 adapted_tokens:5818304 lr:0.0005 bpb=1.125287 time=362.8s + ttt_stream windows:91008/969088 scored_tokens:5826496 adapted_tokens:5826496 lr:0.0005 bpb=1.125362 time=363.3s + ttt_stream windows:91136/969088 scored_tokens:5834688 adapted_tokens:5834688 lr:0.0005 bpb=1.125438 time=363.8s + ttt_stream windows:91264/969088 scored_tokens:5842880 adapted_tokens:5842880 lr:0.0005 bpb=1.125199 time=364.3s + ttt_stream windows:91392/969088 scored_tokens:5851072 adapted_tokens:5851072 lr:0.0005 bpb=1.124947 time=364.8s + ttt_stream windows:91520/969088 scored_tokens:5859264 adapted_tokens:5859264 lr:0.0005 bpb=1.124876 time=365.3s + ttt_stream windows:91648/969088 scored_tokens:5867456 adapted_tokens:5867456 lr:0.0005 bpb=1.124800 time=365.9s + ttt_stream windows:91776/969088 scored_tokens:5875648 adapted_tokens:5875648 lr:0.0005 bpb=1.124681 time=366.4s + ttt_stream windows:91904/969088 scored_tokens:5883840 adapted_tokens:5883840 lr:0.0005 bpb=1.124707 time=366.9s + ttt_stream windows:92032/969088 scored_tokens:5892032 adapted_tokens:5892032 lr:0.0005 bpb=1.124772 time=367.4s + ttt_stream windows:92160/969088 scored_tokens:5900224 adapted_tokens:5900224 lr:0.0005 bpb=1.124760 time=367.9s + ttt_stream windows:92288/969088 scored_tokens:5908416 adapted_tokens:5908416 lr:0.0005 bpb=1.124583 time=368.4s + ttt_stream windows:92416/969088 scored_tokens:5916608 adapted_tokens:5916608 lr:0.0005 bpb=1.124629 time=368.9s + ttt_stream windows:92544/969088 scored_tokens:5924800 adapted_tokens:5924800 lr:0.0005 bpb=1.124807 time=369.4s + ttt_stream windows:92672/969088 scored_tokens:5932992 adapted_tokens:5932992 lr:0.0005 bpb=1.124809 time=369.9s + ttt_stream windows:92800/969088 scored_tokens:5941184 adapted_tokens:5941184 lr:0.0005 bpb=1.124918 time=370.5s + ttt_stream windows:92928/969088 scored_tokens:5949376 adapted_tokens:5949376 lr:0.0005 bpb=1.124850 time=371.0s + ttt_stream windows:93056/969088 scored_tokens:5957568 adapted_tokens:5957568 lr:0.0005 bpb=1.124843 time=371.5s + ttt_stream windows:93184/969088 scored_tokens:5965760 adapted_tokens:5965760 lr:0.0005 bpb=1.124688 time=372.0s + ttt_stream windows:93312/969088 scored_tokens:5973952 adapted_tokens:5973952 lr:0.0005 bpb=1.124895 time=372.5s + ttt_stream windows:93440/969088 scored_tokens:5982144 adapted_tokens:5982144 lr:0.0005 bpb=1.124921 time=373.0s + ttt_stream windows:93568/969088 scored_tokens:5990336 adapted_tokens:5990336 lr:0.0005 bpb=1.125022 time=373.5s + ttt_stream windows:93696/969088 scored_tokens:5998528 adapted_tokens:5998528 lr:0.0005 bpb=1.124898 time=374.0s + ttt_stream windows:93824/969088 scored_tokens:6006720 adapted_tokens:6006720 lr:0.0005 bpb=1.124821 time=374.5s + ttt_stream windows:93952/969088 scored_tokens:6014912 adapted_tokens:6014912 lr:0.0005 bpb=1.124784 time=375.0s + ttt_stream windows:94080/969088 scored_tokens:6023104 adapted_tokens:6023104 lr:0.0005 bpb=1.125015 time=375.6s + ttt_stream windows:94208/969088 scored_tokens:6031296 adapted_tokens:6031296 lr:0.0005 bpb=1.125147 time=376.1s + ttt_stream windows:94336/969088 scored_tokens:6039488 adapted_tokens:6039488 lr:0.0005 bpb=1.125256 time=376.6s + ttt_stream windows:94464/969088 scored_tokens:6047680 adapted_tokens:6047680 lr:0.0005 bpb=1.125045 time=377.1s + ttt_stream windows:94592/969088 scored_tokens:6055872 adapted_tokens:6055872 lr:0.0005 bpb=1.124931 time=377.6s + ttt_stream windows:94720/969088 scored_tokens:6064064 adapted_tokens:6064064 lr:0.0005 bpb=1.124958 time=378.1s + ttt_stream windows:94848/969088 scored_tokens:6072256 adapted_tokens:6072256 lr:0.0005 bpb=1.125040 time=378.6s + ttt_stream windows:94976/969088 scored_tokens:6080448 adapted_tokens:6080448 lr:0.0005 bpb=1.125245 time=379.1s + ttt_stream windows:95104/969088 scored_tokens:6088640 adapted_tokens:6088640 lr:0.0005 bpb=1.125135 time=379.6s + ttt_stream windows:95232/969088 scored_tokens:6096832 adapted_tokens:6096832 lr:0.0005 bpb=1.124978 time=380.2s + ttt_stream windows:95360/969088 scored_tokens:6105024 adapted_tokens:6105024 lr:0.0005 bpb=1.124804 time=380.7s + ttt_stream windows:95488/969088 scored_tokens:6113216 adapted_tokens:6113216 lr:0.0005 bpb=1.124800 time=381.2s + ttt_stream windows:95616/969088 scored_tokens:6121408 adapted_tokens:6121408 lr:0.0005 bpb=1.124585 time=381.7s + ttt_stream windows:95744/969088 scored_tokens:6129600 adapted_tokens:6129600 lr:0.0005 bpb=1.124476 time=382.2s + ttt_stream windows:95872/969088 scored_tokens:6137792 adapted_tokens:6137792 lr:0.0005 bpb=1.124529 time=382.7s + ttt_stream windows:96000/969088 scored_tokens:6145984 adapted_tokens:6145984 lr:0.0005 bpb=1.124521 time=383.2s + ttt_stream windows:96128/969088 scored_tokens:6154176 adapted_tokens:6154176 lr:0.0005 bpb=1.124453 time=383.7s + ttt_stream windows:96256/969088 scored_tokens:6162368 adapted_tokens:6162368 lr:0.0005 bpb=1.124428 time=384.2s + ttt_stream windows:96384/969088 scored_tokens:6170560 adapted_tokens:6170560 lr:0.0005 bpb=1.124511 time=384.8s + ttt_stream windows:96512/969088 scored_tokens:6178752 adapted_tokens:6178752 lr:0.0005 bpb=1.124654 time=385.3s + ttt_stream windows:96640/969088 scored_tokens:6186944 adapted_tokens:6186944 lr:0.0005 bpb=1.126058 time=385.8s + ttt_stream windows:96768/969088 scored_tokens:6195136 adapted_tokens:6195136 lr:0.0005 bpb=1.127106 time=386.3s + ttt_stream windows:96896/969088 scored_tokens:6203328 adapted_tokens:6203328 lr:0.0005 bpb=1.127752 time=386.8s + ttt_stream windows:97024/969088 scored_tokens:6211520 adapted_tokens:6211520 lr:0.0005 bpb=1.127819 time=387.3s + ttt_stream windows:97152/969088 scored_tokens:6219712 adapted_tokens:6219712 lr:0.0005 bpb=1.127879 time=387.8s + ttt_stream windows:97280/969088 scored_tokens:6227904 adapted_tokens:6227904 lr:0.0005 bpb=1.127748 time=388.3s + ttt_stream windows:97408/969088 scored_tokens:6236096 adapted_tokens:6236096 lr:0.0005 bpb=1.127601 time=388.8s + ttt_stream windows:97536/969088 scored_tokens:6244288 adapted_tokens:6244288 lr:0.0005 bpb=1.127439 time=389.3s + ttt_stream windows:97664/969088 scored_tokens:6252480 adapted_tokens:6252480 lr:0.0005 bpb=1.127224 time=389.9s + ttt_stream windows:97792/969088 scored_tokens:6260672 adapted_tokens:6260672 lr:0.0005 bpb=1.127182 time=390.4s + ttt_stream windows:97920/969088 scored_tokens:6268864 adapted_tokens:6268864 lr:0.0005 bpb=1.127476 time=390.9s + ttt_stream windows:98048/969088 scored_tokens:6277056 adapted_tokens:6277056 lr:0.0005 bpb=1.127455 time=391.4s + ttt_stream windows:98176/969088 scored_tokens:6285248 adapted_tokens:6285248 lr:0.0005 bpb=1.127343 time=391.9s + ttt_stream windows:98304/969088 scored_tokens:6293440 adapted_tokens:6293440 lr:0.0005 bpb=1.127261 time=392.4s + ttt_stream windows:98432/969088 scored_tokens:6301632 adapted_tokens:6301632 lr:0.0005 bpb=1.127301 time=392.9s + ttt_stream windows:98560/969088 scored_tokens:6309824 adapted_tokens:6309824 lr:0.0005 bpb=1.127598 time=393.4s + ttt_stream windows:98688/969088 scored_tokens:6318016 adapted_tokens:6318016 lr:0.0005 bpb=1.127469 time=393.9s + ttt_stream windows:98816/969088 scored_tokens:6326208 adapted_tokens:6326208 lr:0.0005 bpb=1.127505 time=394.5s + ttt_stream windows:98944/969088 scored_tokens:6334400 adapted_tokens:6334400 lr:0.0005 bpb=1.127353 time=395.0s + ttt_stream windows:99072/969088 scored_tokens:6342592 adapted_tokens:6342592 lr:0.0005 bpb=1.127304 time=395.5s + ttt_stream windows:99200/969088 scored_tokens:6350784 adapted_tokens:6350784 lr:0.0005 bpb=1.127278 time=396.0s + ttt_stream windows:99328/969088 scored_tokens:6358976 adapted_tokens:6358976 lr:0.0005 bpb=1.127268 time=396.5s + ttt_stream windows:99456/969088 scored_tokens:6367168 adapted_tokens:6367168 lr:0.0005 bpb=1.127288 time=397.0s + ttt_stream windows:99584/969088 scored_tokens:6375360 adapted_tokens:6375360 lr:0.0005 bpb=1.127314 time=397.5s + ttt_stream windows:99712/969088 scored_tokens:6383552 adapted_tokens:6383552 lr:0.0005 bpb=1.127397 time=398.0s + ttt_stream windows:99840/969088 scored_tokens:6391744 adapted_tokens:6391744 lr:0.0005 bpb=1.127294 time=398.5s + ttt_stream windows:99968/969088 scored_tokens:6399936 adapted_tokens:6399936 lr:0.0005 bpb=1.127117 time=399.1s + ttt_stream windows:100096/969088 scored_tokens:6408128 adapted_tokens:6408128 lr:0.0005 bpb=1.127039 time=399.6s + ttt_stream windows:100224/969088 scored_tokens:6416320 adapted_tokens:6416320 lr:0.0005 bpb=1.127014 time=400.1s + ttt_stream windows:100352/969088 scored_tokens:6424512 adapted_tokens:6424512 lr:0.0005 bpb=1.127052 time=400.6s + ttt_stream windows:100480/969088 scored_tokens:6432704 adapted_tokens:6432704 lr:0.0005 bpb=1.127130 time=401.1s + ttt_stream windows:100608/969088 scored_tokens:6440896 adapted_tokens:6440896 lr:0.0005 bpb=1.127143 time=401.6s + ttt_stream windows:100736/969088 scored_tokens:6449088 adapted_tokens:6449088 lr:0.0005 bpb=1.127186 time=402.1s + ttt_stream windows:100864/969088 scored_tokens:6457280 adapted_tokens:6457280 lr:0.0005 bpb=1.127326 time=402.6s + ttt_stream windows:100992/969088 scored_tokens:6465472 adapted_tokens:6465472 lr:0.0005 bpb=1.127398 time=403.1s + ttt_stream windows:101120/969088 scored_tokens:6473664 adapted_tokens:6473664 lr:0.0005 bpb=1.127428 time=403.6s + ttt_stream windows:101248/969088 scored_tokens:6481856 adapted_tokens:6481856 lr:0.0005 bpb=1.127518 time=404.2s + ttt_stream windows:101376/969088 scored_tokens:6490048 adapted_tokens:6490048 lr:0.0005 bpb=1.127600 time=404.7s + ttt_stream windows:101504/969088 scored_tokens:6498240 adapted_tokens:6498240 lr:0.0005 bpb=1.127561 time=405.2s + ttt_stream windows:101632/969088 scored_tokens:6506432 adapted_tokens:6506432 lr:0.0005 bpb=1.127596 time=405.7s + ttt_stream windows:101760/969088 scored_tokens:6514624 adapted_tokens:6514624 lr:0.0005 bpb=1.127485 time=406.2s + ttt_stream windows:101888/969088 scored_tokens:6522816 adapted_tokens:6522816 lr:0.0005 bpb=1.127308 time=406.7s + ttt_stream windows:102016/969088 scored_tokens:6531008 adapted_tokens:6531008 lr:0.0005 bpb=1.127287 time=407.2s + ttt_stream windows:102144/969088 scored_tokens:6539200 adapted_tokens:6539200 lr:0.0005 bpb=1.127188 time=407.7s + ttt_stream windows:102272/969088 scored_tokens:6547392 adapted_tokens:6547392 lr:0.0005 bpb=1.127009 time=408.2s + ttt_stream windows:102400/969088 scored_tokens:6555584 adapted_tokens:6555584 lr:0.0005 bpb=1.126883 time=408.8s + ttt_stream windows:102528/969088 scored_tokens:6563776 adapted_tokens:6563776 lr:0.0005 bpb=1.126774 time=409.3s + ttt_stream windows:102656/969088 scored_tokens:6571968 adapted_tokens:6571968 lr:0.0005 bpb=1.126787 time=409.8s + ttt_stream windows:102784/969088 scored_tokens:6580160 adapted_tokens:6580160 lr:0.0005 bpb=1.126673 time=410.3s + ttt_stream windows:102912/969088 scored_tokens:6588352 adapted_tokens:6588352 lr:0.0005 bpb=1.126659 time=410.8s + ttt_stream windows:103040/969088 scored_tokens:6596544 adapted_tokens:6596544 lr:0.0005 bpb=1.126755 time=411.3s + ttt_stream windows:103168/969088 scored_tokens:6604736 adapted_tokens:6604736 lr:0.0005 bpb=1.126720 time=411.8s + ttt_stream windows:103296/969088 scored_tokens:6612928 adapted_tokens:6612928 lr:0.0005 bpb=1.126642 time=412.3s + ttt_stream windows:103424/969088 scored_tokens:6621120 adapted_tokens:6621120 lr:0.0005 bpb=1.126448 time=412.8s + ttt_stream windows:103552/969088 scored_tokens:6629312 adapted_tokens:6629312 lr:0.0005 bpb=1.126442 time=413.4s + ttt_stream windows:103680/969088 scored_tokens:6637504 adapted_tokens:6637504 lr:0.0005 bpb=1.126497 time=413.9s + ttt_stream windows:103808/969088 scored_tokens:6645696 adapted_tokens:6645696 lr:0.0005 bpb=1.126547 time=414.4s + ttt_stream windows:103936/969088 scored_tokens:6653888 adapted_tokens:6653888 lr:0.0005 bpb=1.126476 time=414.9s + ttt_stream windows:104064/969088 scored_tokens:6662080 adapted_tokens:6662080 lr:0.0005 bpb=1.126292 time=415.4s + ttt_stream windows:104192/969088 scored_tokens:6670272 adapted_tokens:6670272 lr:0.0005 bpb=1.126593 time=415.9s + ttt_stream windows:104320/969088 scored_tokens:6678464 adapted_tokens:6678464 lr:0.0005 bpb=1.126687 time=416.4s + ttt_stream windows:104448/969088 scored_tokens:6686656 adapted_tokens:6686656 lr:0.0005 bpb=1.126668 time=416.9s + ttt_stream windows:104576/969088 scored_tokens:6694848 adapted_tokens:6694848 lr:0.0005 bpb=1.126271 time=417.4s + ttt_stream windows:104704/969088 scored_tokens:6703040 adapted_tokens:6703040 lr:0.0005 bpb=1.126074 time=417.9s + ttt_stream windows:104832/969088 scored_tokens:6711232 adapted_tokens:6711232 lr:0.0005 bpb=1.125842 time=418.5s + ttt_stream windows:104960/969088 scored_tokens:6719424 adapted_tokens:6719424 lr:0.0005 bpb=1.125809 time=419.0s + ttt_stream windows:105088/969088 scored_tokens:6727616 adapted_tokens:6727616 lr:0.0005 bpb=1.125851 time=419.5s + ttt_stream windows:105216/969088 scored_tokens:6735808 adapted_tokens:6735808 lr:0.0005 bpb=1.125788 time=420.0s + ttt_stream windows:105344/969088 scored_tokens:6744000 adapted_tokens:6744000 lr:0.0005 bpb=1.125718 time=420.5s + ttt_stream windows:105472/969088 scored_tokens:6752192 adapted_tokens:6752192 lr:0.0005 bpb=1.125681 time=421.0s + ttt_stream windows:105600/969088 scored_tokens:6760384 adapted_tokens:6760384 lr:0.0005 bpb=1.125607 time=421.5s + ttt_stream windows:105728/969088 scored_tokens:6768576 adapted_tokens:6768576 lr:0.0005 bpb=1.125526 time=422.0s + ttt_stream windows:105856/969088 scored_tokens:6776768 adapted_tokens:6776768 lr:0.0005 bpb=1.125518 time=422.5s + ttt_stream windows:105984/969088 scored_tokens:6784960 adapted_tokens:6784960 lr:0.0005 bpb=1.125628 time=423.1s + ttt_stream windows:106112/969088 scored_tokens:6793152 adapted_tokens:6793152 lr:0.0005 bpb=1.125484 time=423.6s + ttt_stream windows:106240/969088 scored_tokens:6801344 adapted_tokens:6801344 lr:0.0005 bpb=1.125628 time=424.1s + ttt_stream windows:106368/969088 scored_tokens:6809536 adapted_tokens:6809536 lr:0.0005 bpb=1.125538 time=424.6s + ttt_stream windows:106496/969088 scored_tokens:6817728 adapted_tokens:6817728 lr:0.0005 bpb=1.125563 time=425.1s + ttt_stream windows:106624/969088 scored_tokens:6825920 adapted_tokens:6825920 lr:0.0005 bpb=1.125627 time=425.6s + ttt_stream windows:106752/969088 scored_tokens:6834112 adapted_tokens:6834112 lr:0.0005 bpb=1.125679 time=426.1s + ttt_stream windows:106880/969088 scored_tokens:6842304 adapted_tokens:6842304 lr:0.0005 bpb=1.125642 time=426.6s + ttt_stream windows:107008/969088 scored_tokens:6850496 adapted_tokens:6850496 lr:0.0005 bpb=1.125606 time=427.1s + ttt_stream windows:107136/969088 scored_tokens:6858688 adapted_tokens:6858688 lr:0.0005 bpb=1.125527 time=427.6s + ttt_stream windows:107264/969088 scored_tokens:6866880 adapted_tokens:6866880 lr:0.0005 bpb=1.125574 time=428.2s + ttt_stream windows:107392/969088 scored_tokens:6875072 adapted_tokens:6875072 lr:0.0005 bpb=1.125477 time=428.7s + ttt_stream windows:107520/969088 scored_tokens:6883264 adapted_tokens:6883264 lr:0.0005 bpb=1.125475 time=429.2s + ttt_stream windows:107648/969088 scored_tokens:6891456 adapted_tokens:6891456 lr:0.0005 bpb=1.125508 time=429.7s + ttt_stream windows:107776/969088 scored_tokens:6899648 adapted_tokens:6899648 lr:0.0005 bpb=1.125548 time=430.2s + ttt_stream windows:107904/969088 scored_tokens:6907840 adapted_tokens:6907840 lr:0.0005 bpb=1.125573 time=430.7s + ttt_stream windows:108032/969088 scored_tokens:6916032 adapted_tokens:6916032 lr:0.0005 bpb=1.125769 time=431.2s + ttt_stream windows:108160/969088 scored_tokens:6924224 adapted_tokens:6924224 lr:0.0005 bpb=1.126058 time=431.7s + ttt_stream windows:108288/969088 scored_tokens:6932416 adapted_tokens:6932416 lr:0.0005 bpb=1.126290 time=432.2s + ttt_stream windows:108416/969088 scored_tokens:6940608 adapted_tokens:6940608 lr:0.0005 bpb=1.126184 time=432.8s + ttt_stream windows:108544/969088 scored_tokens:6948800 adapted_tokens:6948800 lr:0.0005 bpb=1.126135 time=433.3s + ttt_stream windows:108672/969088 scored_tokens:6956992 adapted_tokens:6956992 lr:0.0005 bpb=1.126074 time=433.8s + ttt_stream windows:108800/969088 scored_tokens:6965184 adapted_tokens:6965184 lr:0.0005 bpb=1.126125 time=434.3s + ttt_stream windows:108928/969088 scored_tokens:6973376 adapted_tokens:6973376 lr:0.0005 bpb=1.126228 time=434.8s + ttt_stream windows:109056/969088 scored_tokens:6981568 adapted_tokens:6981568 lr:0.0005 bpb=1.126315 time=435.3s + ttt_stream windows:109184/969088 scored_tokens:6989760 adapted_tokens:6989760 lr:0.0005 bpb=1.126205 time=435.8s + ttt_stream windows:109312/969088 scored_tokens:6997952 adapted_tokens:6997952 lr:0.0005 bpb=1.126002 time=436.3s + ttt_stream windows:109440/969088 scored_tokens:7006144 adapted_tokens:7006144 lr:0.0005 bpb=1.125926 time=436.8s + ttt_stream windows:109568/969088 scored_tokens:7014336 adapted_tokens:7014336 lr:0.0005 bpb=1.126259 time=437.4s + ttt_stream windows:109696/969088 scored_tokens:7022528 adapted_tokens:7022528 lr:0.0005 bpb=1.126284 time=437.9s + ttt_stream windows:109824/969088 scored_tokens:7030720 adapted_tokens:7030720 lr:0.0005 bpb=1.126251 time=438.4s + ttt_stream windows:109952/969088 scored_tokens:7038912 adapted_tokens:7038912 lr:0.0005 bpb=1.126161 time=438.9s + ttt_stream windows:110080/969088 scored_tokens:7047104 adapted_tokens:7047104 lr:0.0005 bpb=1.126173 time=439.4s + ttt_stream windows:110208/969088 scored_tokens:7055296 adapted_tokens:7055296 lr:0.0005 bpb=1.126180 time=439.9s + ttt_stream windows:110336/969088 scored_tokens:7063488 adapted_tokens:7063488 lr:0.0005 bpb=1.126144 time=440.4s + ttt_stream windows:110464/969088 scored_tokens:7071680 adapted_tokens:7071680 lr:0.0005 bpb=1.126243 time=440.9s + ttt_stream windows:110592/969088 scored_tokens:7079872 adapted_tokens:7079872 lr:0.0005 bpb=1.126409 time=441.4s + ttt_stream windows:110720/969088 scored_tokens:7088064 adapted_tokens:7088064 lr:0.0005 bpb=1.126465 time=441.9s + ttt_stream windows:110848/969088 scored_tokens:7096256 adapted_tokens:7096256 lr:0.0005 bpb=1.126542 time=442.5s + ttt_stream windows:110976/969088 scored_tokens:7104448 adapted_tokens:7104448 lr:0.0005 bpb=1.126389 time=443.0s + ttt_stream windows:111104/969088 scored_tokens:7112640 adapted_tokens:7112640 lr:0.0005 bpb=1.126375 time=443.5s + ttt_stream windows:111232/969088 scored_tokens:7120832 adapted_tokens:7120832 lr:0.0005 bpb=1.126352 time=444.0s + ttt_stream windows:111360/969088 scored_tokens:7129024 adapted_tokens:7129024 lr:0.0005 bpb=1.126274 time=444.5s + ttt_stream windows:111488/969088 scored_tokens:7137216 adapted_tokens:7137216 lr:0.0005 bpb=1.126176 time=445.0s + ttt_stream windows:111616/969088 scored_tokens:7145408 adapted_tokens:7145408 lr:0.0005 bpb=1.126085 time=445.5s + ttt_stream windows:111744/969088 scored_tokens:7153600 adapted_tokens:7153600 lr:0.0005 bpb=1.126039 time=446.0s + ttt_stream windows:111872/969088 scored_tokens:7161792 adapted_tokens:7161792 lr:0.0005 bpb=1.126057 time=446.5s + ttt_stream windows:112000/969088 scored_tokens:7169984 adapted_tokens:7169984 lr:0.0005 bpb=1.126132 time=447.1s + ttt_stream windows:112128/969088 scored_tokens:7178176 adapted_tokens:7178176 lr:0.0005 bpb=1.126330 time=447.6s + ttt_stream windows:112256/969088 scored_tokens:7186368 adapted_tokens:7186368 lr:0.0005 bpb=1.126376 time=448.1s + ttt_stream windows:112384/969088 scored_tokens:7194560 adapted_tokens:7194560 lr:0.0005 bpb=1.126289 time=448.6s + ttt_stream windows:112512/969088 scored_tokens:7202752 adapted_tokens:7202752 lr:0.0005 bpb=1.126527 time=449.1s + ttt_stream windows:112640/969088 scored_tokens:7210944 adapted_tokens:7210944 lr:0.0005 bpb=1.126620 time=449.6s + ttt_stream windows:112768/969088 scored_tokens:7219136 adapted_tokens:7219136 lr:0.0005 bpb=1.126759 time=450.1s + ttt_stream windows:112896/969088 scored_tokens:7227328 adapted_tokens:7227328 lr:0.0005 bpb=1.126722 time=450.6s + ttt_stream windows:113024/969088 scored_tokens:7235520 adapted_tokens:7235520 lr:0.0005 bpb=1.126690 time=451.1s + ttt_stream windows:113152/969088 scored_tokens:7243712 adapted_tokens:7243712 lr:0.0005 bpb=1.126592 time=451.7s + ttt_stream windows:113280/969088 scored_tokens:7251904 adapted_tokens:7251904 lr:0.0005 bpb=1.126731 time=452.2s + ttt_stream windows:113408/969088 scored_tokens:7260096 adapted_tokens:7260096 lr:0.0005 bpb=1.126708 time=452.7s + ttt_stream windows:113536/969088 scored_tokens:7268288 adapted_tokens:7268288 lr:0.0005 bpb=1.126539 time=453.2s + ttt_stream windows:113664/969088 scored_tokens:7276480 adapted_tokens:7276480 lr:0.0005 bpb=1.126640 time=453.7s + ttt_stream windows:113792/969088 scored_tokens:7284672 adapted_tokens:7284672 lr:0.0005 bpb=1.126617 time=454.2s + ttt_stream windows:113920/969088 scored_tokens:7292864 adapted_tokens:7292864 lr:0.0005 bpb=1.126507 time=454.7s + ttt_stream windows:114048/969088 scored_tokens:7301056 adapted_tokens:7301056 lr:0.0005 bpb=1.126474 time=455.2s + ttt_stream windows:114176/969088 scored_tokens:7309248 adapted_tokens:7309248 lr:0.0005 bpb=1.126340 time=455.7s + ttt_stream windows:114304/969088 scored_tokens:7317440 adapted_tokens:7317440 lr:0.0005 bpb=1.126270 time=456.2s + ttt_stream windows:114432/969088 scored_tokens:7325632 adapted_tokens:7325632 lr:0.0005 bpb=1.126454 time=456.8s + ttt_stream windows:114560/969088 scored_tokens:7333824 adapted_tokens:7333824 lr:0.0005 bpb=1.126442 time=457.3s + ttt_stream windows:114688/969088 scored_tokens:7342016 adapted_tokens:7342016 lr:0.0005 bpb=1.126249 time=457.8s + ttt_stream windows:114816/969088 scored_tokens:7350208 adapted_tokens:7350208 lr:0.0005 bpb=1.126237 time=458.3s + ttt_stream windows:114944/969088 scored_tokens:7358400 adapted_tokens:7358400 lr:0.0005 bpb=1.126292 time=458.8s + ttt_stream windows:115072/969088 scored_tokens:7366592 adapted_tokens:7366592 lr:0.0005 bpb=1.126308 time=459.3s + ttt_stream windows:115200/969088 scored_tokens:7374784 adapted_tokens:7374784 lr:0.0005 bpb=1.126340 time=459.8s + ttt_stream windows:115328/969088 scored_tokens:7382976 adapted_tokens:7382976 lr:0.0005 bpb=1.126438 time=460.3s + ttt_stream windows:115456/969088 scored_tokens:7391168 adapted_tokens:7391168 lr:0.0005 bpb=1.126489 time=460.8s + ttt_stream windows:115584/969088 scored_tokens:7399360 adapted_tokens:7399360 lr:0.0005 bpb=1.126542 time=461.4s + ttt_stream windows:115712/969088 scored_tokens:7407552 adapted_tokens:7407552 lr:0.0005 bpb=1.126468 time=461.9s + ttt_stream windows:115840/969088 scored_tokens:7415744 adapted_tokens:7415744 lr:0.0005 bpb=1.126354 time=462.4s + ttt_stream windows:115968/969088 scored_tokens:7423936 adapted_tokens:7423936 lr:0.0005 bpb=1.126243 time=463.0s + ttt_stream windows:116096/969088 scored_tokens:7432128 adapted_tokens:7432128 lr:0.0005 bpb=1.126259 time=463.5s + ttt_stream windows:116224/969088 scored_tokens:7440320 adapted_tokens:7440320 lr:0.0005 bpb=1.126119 time=464.0s + ttt_stream windows:116352/969088 scored_tokens:7448512 adapted_tokens:7448512 lr:0.0005 bpb=1.126050 time=464.5s + ttt_stream windows:116480/969088 scored_tokens:7456704 adapted_tokens:7456704 lr:0.0005 bpb=1.125938 time=465.0s + ttt_stream windows:116608/969088 scored_tokens:7464896 adapted_tokens:7464896 lr:0.0005 bpb=1.125981 time=465.6s + ttt_stream windows:116736/969088 scored_tokens:7473088 adapted_tokens:7473088 lr:0.0005 bpb=1.125943 time=466.1s + ttt_stream windows:116864/969088 scored_tokens:7481280 adapted_tokens:7481280 lr:0.0005 bpb=1.125998 time=466.6s + ttt_stream windows:116992/969088 scored_tokens:7489472 adapted_tokens:7489472 lr:0.0005 bpb=1.125934 time=467.1s + ttt_stream windows:117120/969088 scored_tokens:7497664 adapted_tokens:7497664 lr:0.0005 bpb=1.126049 time=467.6s + ttt_stream windows:117248/969088 scored_tokens:7505856 adapted_tokens:7505856 lr:0.0005 bpb=1.126074 time=468.1s + ttt_stream windows:117376/969088 scored_tokens:7514048 adapted_tokens:7514048 lr:0.0005 bpb=1.126122 time=468.6s + ttt_stream windows:117504/969088 scored_tokens:7522240 adapted_tokens:7522240 lr:0.0005 bpb=1.126219 time=469.1s + ttt_stream windows:117632/969088 scored_tokens:7530432 adapted_tokens:7530432 lr:0.0005 bpb=1.126336 time=469.6s + ttt_stream windows:117760/969088 scored_tokens:7538624 adapted_tokens:7538624 lr:0.0005 bpb=1.126164 time=470.1s + ttt_stream windows:117888/969088 scored_tokens:7546816 adapted_tokens:7546816 lr:0.0005 bpb=1.126170 time=470.7s + ttt_stream windows:118016/969088 scored_tokens:7555008 adapted_tokens:7555008 lr:0.0005 bpb=1.126210 time=471.2s + ttt_stream windows:118144/969088 scored_tokens:7563200 adapted_tokens:7563200 lr:0.0005 bpb=1.126340 time=471.7s + ttt_stream windows:118272/969088 scored_tokens:7571392 adapted_tokens:7571392 lr:0.0005 bpb=1.126348 time=472.2s + ttt_stream windows:118400/969088 scored_tokens:7579584 adapted_tokens:7579584 lr:0.0005 bpb=1.126258 time=472.7s + ttt_stream windows:118528/969088 scored_tokens:7587776 adapted_tokens:7587776 lr:0.0005 bpb=1.126316 time=473.2s + ttt_stream windows:118656/969088 scored_tokens:7595968 adapted_tokens:7595968 lr:0.0005 bpb=1.126275 time=473.7s + ttt_stream windows:118784/969088 scored_tokens:7604160 adapted_tokens:7604160 lr:0.0005 bpb=1.126380 time=474.2s + ttt_stream windows:118912/969088 scored_tokens:7612352 adapted_tokens:7612352 lr:0.0005 bpb=1.126312 time=474.7s + ttt_stream windows:119040/969088 scored_tokens:7620544 adapted_tokens:7620544 lr:0.0005 bpb=1.126390 time=475.3s + ttt_stream windows:119168/969088 scored_tokens:7628736 adapted_tokens:7628736 lr:0.0005 bpb=1.126303 time=475.8s + ttt_stream windows:119296/969088 scored_tokens:7636928 adapted_tokens:7636928 lr:0.0005 bpb=1.126377 time=476.3s + ttt_stream windows:119424/969088 scored_tokens:7645120 adapted_tokens:7645120 lr:0.0005 bpb=1.126334 time=476.8s + ttt_stream windows:119552/969088 scored_tokens:7653312 adapted_tokens:7653312 lr:0.0005 bpb=1.126225 time=477.3s + ttt_stream windows:119680/969088 scored_tokens:7661504 adapted_tokens:7661504 lr:0.0005 bpb=1.126218 time=477.8s + ttt_stream windows:119808/969088 scored_tokens:7669696 adapted_tokens:7669696 lr:0.0005 bpb=1.126184 time=478.3s + ttt_stream windows:119936/969088 scored_tokens:7677888 adapted_tokens:7677888 lr:0.0005 bpb=1.126251 time=478.8s + ttt_stream windows:120064/969088 scored_tokens:7686080 adapted_tokens:7686080 lr:0.0005 bpb=1.126232 time=479.3s + ttt_stream windows:120192/969088 scored_tokens:7694272 adapted_tokens:7694272 lr:0.0005 bpb=1.126260 time=479.8s + ttt_stream windows:120320/969088 scored_tokens:7702464 adapted_tokens:7702464 lr:0.0005 bpb=1.126383 time=480.4s + ttt_stream windows:120448/969088 scored_tokens:7710656 adapted_tokens:7710656 lr:0.0005 bpb=1.126299 time=480.9s + ttt_stream windows:120576/969088 scored_tokens:7718848 adapted_tokens:7718848 lr:0.0005 bpb=1.126354 time=481.4s + ttt_stream windows:120704/969088 scored_tokens:7727040 adapted_tokens:7727040 lr:0.0005 bpb=1.126392 time=481.9s + ttt_stream windows:120832/969088 scored_tokens:7735232 adapted_tokens:7735232 lr:0.0005 bpb=1.126554 time=482.4s + ttt_stream windows:120960/969088 scored_tokens:7743424 adapted_tokens:7743424 lr:0.0005 bpb=1.126657 time=482.9s + ttt_stream windows:121088/969088 scored_tokens:7751616 adapted_tokens:7751616 lr:0.0005 bpb=1.126688 time=483.4s +ttt:done mode=stream val_loss=1.892458 val_bpb=1.120823 scored_tokens=62023616 adapted_tokens=62023616 elapsed=483.7s +legal_ttt val_loss:1.8925 val_bpb:1.1208 eval_time:484237ms +legal_ttt_exact val_loss:1.89245802 val_bpb:1.12082320