|
Download opus-48gpu/agent_notes/notes.md from PreTrainBench/transcripts: direct link, hf CLI and curl.
- Browser
- Download file 13.3 kB
-
https://huggingface.co/datasets/PreTrainBench/transcripts/resolve/main/opus-48gpu/agent_notes/notes.md
- Command line
-
hf download hf://datasets/PreTrainBench/transcripts/opus-48gpu/agent_notes/notes.md
-
curl -L -o notes.md https://huggingface.co/datasets/PreTrainBench/transcripts/resolve/main/opus-48gpu/agent_notes/notes.md
13.3 kB
| # Research notes (pretraining under 1048 H100-h / 23.5h wall clock) | |
| ## Environment facts | |
| - CPU box: 16 cores/128GB. GPUs via `gpu` tool, max 48 at once (6 nodes x 8). | |
| - HF download ~900MB/s. starcoderdata gated (no access); stack-edu = blob ids only (no content). | |
| - Eval: BPB per UTF-8 byte, unweighted mean over domains; docs truncated ~18k chars; | |
| context = config max_position_embeddings, sliding window stride = window/2; BOS prepended; | |
| determinism check tolerance 2e-3 nats between processes. | |
| ## Plan (initial) | |
| - Custom byte-level BPE tokenizer (64k vocab) trained on the mixture. | |
| - Llama-style decoder, ~1-2B params, ctx 4096, doc-masked attention (matches eval: each doc scored from BOS). | |
| - WSD schedule so cooldown can start based on remaining wall-clock. | |
| - Small-scale ablations: AdamW vs Muon, data mix. | |
| # Research notes (pretraining under 1048 H100-h / 23.5h wall clock) | |
| ## Environment facts | |
| - CPU box: 16 cores/128GB. GPUs via `gpu` tool, max 48 at once (6 nodes x 8). | |
| - HF download ~900MB/s. starcoderdata gated (no access); stack-edu = blob ids only (no content). | |
| - Eval: BPB per UTF-8 byte, unweighted mean over domains; docs truncated ~18k chars; | |
| context = config max_position_embeddings, sliding window stride = window/2; BOS prepended; | |
| determinism check tolerance 2e-3 nats between processes. | |
| ## Plan (initial) | |
| - Custom byte-level BPE tokenizer (64k vocab) trained on the mixture. | |
| - Llama-style decoder, ~1-2B params, ctx 4096, doc-masked attention (matches eval: each doc scored from BOS). | |
| - WSD schedule so cooldown can start based on remaining wall-clock. | |
| - Small-scale ablations: AdamW vs Muon, data mix. | |
| ## Progress log (UTC) | |
| - 02:05-02:20 downloads (24 sources, 460GB, ~10 min). Tokenizer: byte-level BPE 65,536 vocab (GPT-4 split regex, | |
| 8 special tokens, <|endoftext|>=0 is BOS/EOS), trained on 3GB mixture sample in 2.5 min. Lossless round-trip verified. | |
| Bulk tokenization via tiktoken port of the same merges (bit-identical to HF on samples): ~330MB/s on 15 procs. | |
| Total tokenized: ~335B tokens. Bytes/token: web 4.5-4.7, code 3.5-3.7, arxiv 3.1, multilingual 4.1. | |
| - Bugs hit: output-name collisions (fw2 same basenames per language dir; common-pile ".chunk.NN" names) -> fixed. | |
| - NCCL 2-node allreduce busbw ~370GB/s (EFA/OFI) -> DDP across 6 nodes is fine. | |
| - Throughput (8xH100, seq 4096, doc-masked FA2 varlen, torch.compile, bf16): | |
| 1.5B (d2048,L24,ffn5632): 48K tok/s/GPU (46% MFU), 73GB @ micro 4x4096 (AdamW) / 64GB (Muon) | |
| 1.8B (d2048,L28,ffn6144): 40K tok/s/GPU (46% MFU), 75GB @ micro 4 (Muon) | |
| - Ablation (340M: d1024 L16, 2.1B tokens, 0.5M batch, WSD 20% linear cooldown), avg BPB over 24 val domains: | |
| AdamW 1e-3: 0.9474 | AdamW 2e-3: 0.9368 | Muon 1e-3: 0.9217 | Muon 2e-3: 0.9148 -> Muon (+1.6-2.3%) | |
| - 03:24 launched MAIN: 1.8B (d2048 L28 H16 ffn6144, QK-norm, untied), Muon lr 1e-3 (AdamW 1e-3 for emb/head/norms), | |
| wd 0.1, batch 576x4096=2.36M tok, warmup 1000, WSD with time-based cooldown (last 20%, 1-sqrt), end_time 23:15 UTC. | |
| # Research notes (pretraining under 1048 H100-h / 23.5h wall clock) | |
| ## Environment facts | |
| - CPU box: 16 cores/128GB. GPUs via `gpu` tool, max 48 at once (6 nodes x 8). | |
| - HF download ~900MB/s. starcoderdata gated (no access); stack-edu = blob ids only (no content). | |
| - Eval: BPB per UTF-8 byte, unweighted mean over domains; docs truncated ~18k chars; | |
| context = config max_position_embeddings, sliding window stride = window/2; BOS prepended; | |
| determinism check tolerance 2e-3 nats between processes. | |
| ## Plan (initial) | |
| - Custom byte-level BPE tokenizer (64k vocab) trained on the mixture. | |
| - Llama-style decoder, ~1-2B params, ctx 4096, doc-masked attention (matches eval: each doc scored from BOS). | |
| - WSD schedule so cooldown can start based on remaining wall-clock. | |
| - Small-scale ablations: AdamW vs Muon, data mix. | |
| # Research notes (pretraining under 1048 H100-h / 23.5h wall clock) | |
| ## Environment facts | |
| - CPU box: 16 cores/128GB. GPUs via `gpu` tool, max 48 at once (6 nodes x 8). | |
| - HF download ~900MB/s. starcoderdata gated (no access); stack-edu = blob ids only (no content). | |
| - Eval: BPB per UTF-8 byte, unweighted mean over domains; docs truncated ~18k chars; | |
| context = config max_position_embeddings, sliding window stride = window/2; BOS prepended; | |
| determinism check tolerance 2e-3 nats between processes. | |
| ## Plan (initial) | |
| - Custom byte-level BPE tokenizer (64k vocab) trained on the mixture. | |
| - Llama-style decoder, ~1-2B params, ctx 4096, doc-masked attention (matches eval: each doc scored from BOS). | |
| - WSD schedule so cooldown can start based on remaining wall-clock. | |
| - Small-scale ablations: AdamW vs Muon, data mix. | |
| ## Progress log (UTC) | |
| - 02:05-02:20 downloads (24 sources, 460GB, ~10 min). Tokenizer: byte-level BPE 65,536 vocab (GPT-4 split regex, | |
| 8 special tokens, <|endoftext|>=0 is BOS/EOS), trained on 3GB mixture sample in 2.5 min. Lossless round-trip verified. | |
| Bulk tokenization via tiktoken port of the same merges (bit-identical to HF on samples): ~330MB/s on 15 procs. | |
| Total tokenized: ~335B tokens. Bytes/token: web 4.5-4.7, code 3.5-3.7, arxiv 3.1, multilingual 4.1. | |
| - Bugs hit: output-name collisions (fw2 same basenames per language dir; common-pile ".chunk.NN" names) -> fixed. | |
| - NCCL 2-node allreduce busbw ~370GB/s (EFA/OFI) -> DDP across 6 nodes is fine. | |
| - Throughput (8xH100, seq 4096, doc-masked FA2 varlen, torch.compile, bf16): | |
| 1.5B (d2048,L24,ffn5632): 48K tok/s/GPU (46% MFU), 73GB @ micro 4x4096 (AdamW) / 64GB (Muon) | |
| 1.8B (d2048,L28,ffn6144): 40K tok/s/GPU (46% MFU), 75GB @ micro 4 (Muon) | |
| - Ablation (340M: d1024 L16, 2.1B tokens, 0.5M batch, WSD 20% linear cooldown), avg BPB over 24 val domains: | |
| AdamW 1e-3: 0.9474 | AdamW 2e-3: 0.9368 | Muon 1e-3: 0.9217 | Muon 2e-3: 0.9148 -> Muon (+1.6-2.3%) | |
| - 03:24 launched MAIN: 1.8B (d2048 L28 H16 ffn6144, QK-norm, untied), Muon lr 1e-3 (AdamW 1e-3 for emb/head/norms), | |
| wd 0.1, batch 576x4096=2.36M tok, warmup 1000, WSD with time-based cooldown (last 20%, 1-sqrt), end_time 23:15 UTC. | |
| - 03:24 main attempt 1: only 1.45M tok/s (35% MFU) on 48 GPUs vs 40K tok/s/GPU on 1 node. | |
| - 03:41 attempt 2: rewrote loader (os.pread + 16 threads + pinned prefetch). NO change (1.46M) -> data was not the issue. | |
| - 03:51 attempt 3: root cause = DDP(torch.compile(model)) ordering: AOTAutograd backward emits all grads at the end, | |
| so the 7.2GB fp32 grad all-reduce cannot overlap with backward (cheap on NVLink, ~0.4 s/step across 6 nodes). | |
| Fix: torch.compile(DDP(model)) (dynamo DDPOptimizer splits graph at buckets -> overlap) + bf16 grad compression hook. | |
| -> 1.79M tok/s (42.8% MFU). Profile (ms): data_wait<=4, fb_nosync 265-305/micro, fb_sync(last) 350-490, opt 67. | |
| Losses identical to attempts 1/2 up to bf16-comm noise (11.3678 vs 11.3679 @ step10). | |
| UTF-8 byte, unweighted mean over domains; docs truncated ~18k chars; | |
| context = config max_position_embeddings, sliding window stride = window/2; BOS prepended; | |
| determinism check tolerance 2e-3 nats between processes. | |
| ## Plan (initial) | |
| - Custom byte-level BPE tokenizer (64k vocab) trained on the mixture. | |
| - Llama-style decoder, ~1-2B params, ctx 4096, doc-masked attention (matches eval: each doc scored from BOS). | |
| - WSD schedule so cooldown can start based on remaining wall-clock. | |
| - Small-scale ablations: AdamW vs Muon, data mix. | |
| ## Progress log (UTC) | |
| - 02:05-02:20 downloads (24 sources, 460GB, ~10 min). Tokenizer: byte-level BPE 65,536 vocab (GPT-4 split regex, | |
| 8 special tokens, <|endoftext|>=0 is BOS/EOS), trained on 3GB mixture sample in 2.5 min. Lossless round-trip verified. | |
| Bulk tokenization via tiktoken port of the same merges (bit-identical to HF on samples): ~330MB/s on 15 procs. | |
| Total tokenized: ~335B tokens. Bytes/token: web 4.5-4.7, code 3.5-3.7, arxiv 3.1, multilingual 4.1. | |
| - Bugs hit: output-name collisions (fw2 same basenames per language dir; common-pile ".chunk.NN" names) -> fixed. | |
| - NCCL 2-node allreduce busbw ~370GB/s (EFA/OFI) -> DDP across 6 nodes is fine. | |
| - Throughput (8xH100, seq 4096, doc-masked FA2 varlen, torch.compile, bf16): | |
| 1.5B (d2048,L24,ffn5632): 48K tok/s/GPU (46% MFU), 73GB @ micro 4x4096 (AdamW) / 64GB (Muon) | |
| 1.8B (d2048,L28,ffn6144): 40K tok/s/GPU (46% MFU), 75GB @ micro 4 (Muon) | |
| - Ablation (340M: d1024 L16, 2.1B tokens, 0.5M batch, WSD 20% linear cooldown), avg BPB over 24 val domains: | |
| AdamW 1e-3: 0.9474 | AdamW 2e-3: 0.9368 | Muon 1e-3: 0.9217 | Muon 2e-3: 0.9148 -> Muon (+1.6-2.3%) | |
| - 03:24 launched MAIN: 1.8B (d2048 L28 H16 ffn6144, QK-norm, untied), Muon lr 1e-3 (AdamW 1e-3 for emb/head/norms), | |
| wd 0.1, batch 576x4096=2.36M tok, warmup 1000, WSD with time-based cooldown (last 20%, 1-sqrt), end_time 23:15 UTC. | |
| - 03:24 main attempt 1: only 1.45M tok/s (35% MFU) on 48 GPUs vs 40K tok/s/GPU on 1 node. | |
| - 03:41 attempt 2: rewrote loader (os.pread + 16 threads + pinned prefetch). NO change (1.46M) -> data was not the issue. | |
| - 03:51 attempt 3: root cause = DDP(torch.compile(model)) ordering: AOTAutograd backward emits all grads at the end, | |
| so the 7.2GB fp32 grad all-reduce cannot overlap with backward (cheap on NVLink, ~0.4 s/step across 6 nodes). | |
| Fix: torch.compile(DDP(model)) (dynamo DDPOptimizer splits graph at buckets -> overlap) + bf16 grad compression hook. | |
| -> 1.79M tok/s (42.8% MFU). Profile (ms): data_wait<=4, fb_nosync 265-305/micro, fb_sync(last) 350-490, opt 67. | |
| Losses identical to attempts 1/2 up to bf16-comm noise (11.3678 vs 11.3679 @ step10). | |
| - attempt 3 showed intermittent stragglers (max fb_nosync 544-612ms vs min 265ms; steps up to 2.2s, avg 1.64M tok/s). | |
| Cause: Python cyclic GC firing at random times on random ranks (torch.compile leaves huge object graphs). | |
| 04:22 attempt 4 (resumed from step 1000): gc.disable() + synchronized gc.collect()+gc.freeze() every 500 steps | |
| -> stable 1.77-1.79M tok/s (42.5% MFU), max fb_nosync <=308ms. | |
| - step 1000 eval (2.4B tokens): mean BPB 0.969 over 24 domains. | |
| - CPU export of step_1000 (28 layers) passes official checks (valid: yes). | |
| @ micro 4 (Muon) | |
| - Ablation (340M: d1024 L16, 2.1B tokens, 0.5M batch, WSD 20% linear cooldown), avg BPB over 24 val domains: | |
| AdamW 1e-3: 0.9474 | AdamW 2e-3: 0.9368 | Muon 1e-3: 0.9217 | Muon 2e-3: 0.9148 -> Muon (+1.6-2.3%) | |
| - 03:24 launched MAIN: 1.8B (d2048 L28 H16 ffn6144, QK-norm, untied), Muon lr 1e-3 (AdamW 1e-3 for emb/head/norms), | |
| wd 0.1, batch 576x4096=2.36M tok, warmup 1000, WSD with time-based cooldown (last 20%, 1-sqrt), end_time 23:15 UTC. | |
| - 03:24 main attempt 1: only 1.45M tok/s (35% MFU) on 48 GPUs vs 40K tok/s/GPU on 1 node. | |
| - 03:41 attempt 2: rewrote loader (os.pread + 16 threads + pinned prefetch). NO change (1.46M) -> data was not the issue. | |
| - 03:51 attempt 3: root cause = DDP(torch.compile(model)) ordering: AOTAutograd backward emits all grads at the end, | |
| so the 7.2GB fp32 grad all-reduce cannot overlap with backward (cheap on NVLink, ~0.4 s/step across 6 nodes). | |
| Fix: torch.compile(DDP(model)) (dynamo DDPOptimizer splits graph at buckets -> overlap) + bf16 grad compression hook. | |
| -> 1.79M tok/s (42.8% MFU). Profile (ms): data_wait<=4, fb_nosync 265-305/micro, fb_sync(last) 350-490, opt 67. | |
| Losses identical to attempts 1/2 up to bf16-comm noise (11.3678 vs 11.3679 @ step10). | |
| - attempt 3 showed intermittent stragglers (max fb_nosync 544-612ms vs min 265ms; steps up to 2.2s, avg 1.64M tok/s). | |
| Cause: Python cyclic GC firing at random times on random ranks (torch.compile leaves huge object graphs). | |
| 04:22 attempt 4 (resumed from step 1000): gc.disable() + synchronized gc.collect()+gc.freeze() every 500 steps | |
| -> stable 1.77-1.79M tok/s (42.5% MFU), max fb_nosync <=308ms. | |
| - step 1000 eval (2.4B tokens): mean BPB 0.969 over 24 domains. | |
| - CPU export of step_1000 (28 layers) passes official checks (valid: yes). | |
| - Eval (mean BPB, 24 domains): 1k 0.969 | 2k 0.868 | 3k 0.831 | 4k 0.809 | 5k 0.795 | 6k 0.785 | 7k 0.777 | 8k 0.771 | |
| Hardest domains @8k: irc 1.01, pre1929 0.98, fw2 0.97, gutenberg 0.96, youtube 0.95, dclm 0.95, pg19 0.93. | |
| - Position analysis (step 8000, 30 long docs from pg19/arxiv/gutenberg/pubmed/algstack/uspto, first 4096 tokens): | |
| BPB by position: 0-64 0.95 | 64-256 0.83 | 256-512 0.90 | 512-1k 0.81 | 1-2k 0.79 | 2-3k 0.79 | 3-4k 0.80 | |
| - final_model safety net = step_8000 export (validated earlier pipeline). Final job script: code/final_job.sh. | |
| - Eval trajectory: 14k 0.749 | 22k 0.736 | 30k 0.728 | 40k 0.723 (plateau) | |
| - 19:24 COOLDOWN decided at step 40900 -> total 51124 steps (120.6B tokens); 1-sqrt decay to 0. | |
| cooldown evals: 41k 0.7208 | 42k 0.7095 | 44k 0.6968 | 46k 0.6873 | 48k 0.6794 | 50k 0.6732 | 51124 0.6714 | |
| - 23:12 training done. Final job (export + official scorer + lm-eval) waited 15 min for machines, ran 11 min. | |
| final_model = export of step_51124 (verified bit-identical weights). Valid in normal and --isolate yes modes. | |
| - OFFICIAL SCORER: mean BPB 24 in-dist domains 0.6663; 5 external (c4 .853, wikitext103 .693, pg19-test .847, | |
| gsm8k .734, humaneval .545) mean 0.7342. | |
| (one parallel shard failed to load due to shared HF module-cache race; rerun alone -> valid.) | |
| - lm-eval 0-shot: HellaSwag acc_norm .634, ARC-E .728, ARC-C acc_norm .398, PIQA .751, WinoGrande .611, | |
| LAMBADA .625 (ppl 5.61), SciQ .930, OBQA acc_norm .412, BoolQ .665, MMLU .290. | |
| - GPU-hours used: 965.7 / 1048. | |