Research archive

Four-worker AWC without gradient clipping: 20M tuning at 128K tokens

Archived reference. Read the current results →

Historical report; retained as an experimental record.

Historical report. Settings and conclusions describe the recorded experiment. See the current documentation for maintained guidance.

Measured on 2026-09-12–2026-09-13: 240 successful runs covering a complete 80-configuration LR/beta1/beta2 grid, with runtime seeds 42, 43, and 44 for every configuration. This report describes AWC with gradient clipping disabled and compares it with the four-worker clipped AWC study.

Clipping at norm 1.0 is favored within the tested settings. Removing clipping increases mean final full-validation loss in 27 of the 28 matched configurations. The best tested no-clipping recipe is LR 0.0056, beta1 0.9, beta2 0.98, with loss 3.668404 ± 0.046502 nats. The tuned clipped recipe measures 3.595559 ± 0.005025, 0.072846 nats lower. These selected recipes use different hyperparameters; the matched comparisons below hold LR and betas fixed.

All ± values are sample standard deviations across three seeds, not confidence intervals. In the difference column and comparison plot, the SD is computed from the three seed-paired differences. Lower loss is better.

Variant and search space

AWC first computes local forward and backward passes, then mixes parameters, then applies local AdamW updates. With clipping enabled, each worker’s gradients are clipped to norm 1.0 before mixing. Here optimizer.grad_clip=null skips that scaling operation. Gradient norms are still computed and logged, and nonfinite gradients still stop training. Optimizer moments remain local; adaptive consensus is disabled. Both variants evaluate the globally averaged model.

ParameterValues
Learning rate0.0056, 0.008, 0.010, 0.0112, 0.016
AdamW beta10.9, 0.925, 0.95, 0.975
AdamW beta20.95, 0.98, 0.99, 0.999
Runtime seeds42, 43, 44
Gradient clippingDisabled (optimizer.grad_clip=null)

Every unique combination has three runs: 5 × 4 × 4 × 3 = 240. All completed with finite full-validation losses; no failed or divergent jobs were discarded. Selection minimizes mean final full-validation cross-entropy over all three seeds, breaking exact ties by lower LR, then beta1, then beta2.

No-clipping response surfaces

No-clipping beta1/beta2 heatmaps at all learning rates

PDF · PNG. Each panel covers 16 configurations and 48 runs, with a shared color scale. Cells show mean ± sample SD; orange outlines mark the best mean within each LR.

LRBest beta1Best beta2Mean loss ± sample SD
0.00560.90.983.668404 ± 0.046502
0.0080.9250.993.685574 ± 0.071087
0.010.90.953.762922 ± 0.008466
0.01120.9250.983.765837 ± 0.064662
0.0160.90.953.900531 ± 0.048257

The best mean at each LR worsens as LR increases across this grid. The overall winner lies at the lowest tested LR and lowest tested beta1, so this sweep does not rule out better unclipped settings below those bounds. The next-best configuration is only 0.002288 nats behind, compared with substantial seed variation in both groups. The top-ranked hyperparameters should therefore be interpreted as the best tested mean, not a precisely resolved optimum.

No-clipping LR response for all beta1 and beta2 values

PDF · PNG. Each panel fixes beta1 and includes four beta2 curves; error bars show sample SD. All panels share the same loss scale, and lines connect measured points.

Comparison with clipping enabled

Selected recipes and fixed-hyperparameter checks

ComparisonNo clippingClipping at 1.0No clipping − clipping
Each variant’s best tested recipe3.668404 ± 0.0465023.595559 ± 0.005025+0.072846
Fixed LR 0.0056, beta1 0.9, beta2 0.983.668404 ± 0.0465023.606178 ± 0.005628+0.062226
Fixed LR 0.008, beta1 0.95, beta2 0.993.817465 ± 0.0658953.595559 ± 0.005025+0.221906

The clipped winner uses LR 0.008, beta1 0.95, beta2 0.99. Clipping improves the measured mean at both variants’ selected settings. The selected-recipe comparison covers unequal search spaces: 80 configurations without clipping and 43 with clipping. It does not isolate the effect of clipping by itself.

All matched configurations

There are 28 shared configurations and 84 pairs of seeded runs. Both variants match LR, beta1, beta2, runtime seeds, local worker count, architecture, global and local batch sizes, token budget, topology, optimizer settings, data cache, and validation protocol. This overlap consists of all 16 beta pairs at LR 0.008, plus the four beta2 choices at beta1 0.9 for LR 0.0056, 0.0112, and 0.016.

Seed-paired loss differences with and without clipping

PDF · PNG. Positive differences favor clipping. Error bars show sample SD of the three seed-paired differences, not uncertainty bounds on the mean.

The median difference across the 28 configuration means is +0.151066 nats. Clipping has the lower mean in 27 configurations. The only negative difference, at LR 0.016, beta1 0.9, beta2 0.99, is -0.000140 ± 0.144131, which is negligible relative to its seed variation.

Across the matched configurations, median within-configuration sample SD is 0.062629 without clipping, versus 0.011973 with clipping. This describes greater sensitivity to runtime seed without clipping in this experiment; all 240 unclipped jobs nevertheless completed with finite results. The median difference and win count describe this particular grid and are not an average effect over arbitrary training recipes.

LRBeta1Beta2No clipping mean ± SDClipped mean ± SDPaired difference mean ± SD
0.00560.90.953.701510 ± 0.0068563.636359 ± 0.005782+0.065151 ± 0.006410
0.00560.90.983.668404 ± 0.0465023.606178 ± 0.005628+0.062226 ± 0.050169
0.00560.90.993.708780 ± 0.0995743.604343 ± 0.007428+0.104437 ± 0.100368
0.00560.90.9993.694059 ± 0.0508433.612911 ± 0.004840+0.081148 ± 0.046814
0.0080.90.953.763544 ± 0.0192513.620824 ± 0.008201+0.142719 ± 0.020251
0.0080.90.983.737945 ± 0.0751533.601910 ± 0.006842+0.136035 ± 0.068930
0.0080.90.993.781161 ± 0.0778093.608260 ± 0.008515+0.172901 ± 0.070660
0.0080.90.9993.905399 ± 0.1171833.698712 ± 0.062199+0.206686 ± 0.118346
0.0080.9250.953.796693 ± 0.0471713.612169 ± 0.008923+0.184523 ± 0.049492
0.0080.9250.983.782922 ± 0.0593633.604153 ± 0.004039+0.178768 ± 0.055513
0.0080.9250.993.685574 ± 0.0710873.628551 ± 0.045025+0.057023 ± 0.081163
0.0080.9250.9993.935499 ± 0.1261343.627433 ± 0.008334+0.308067 ± 0.120851
0.0080.950.953.777113 ± 0.0169503.619770 ± 0.011060+0.157343 ± 0.012935
0.0080.950.983.747583 ± 0.0077613.602794 ± 0.012887+0.144789 ± 0.018196
0.0080.950.993.817465 ± 0.0658953.595559 ± 0.005025+0.221906 ± 0.067133
0.0080.950.9993.935121 ± 0.0868163.641030 ± 0.024592+0.294090 ± 0.108547
0.0080.9750.954.073854 ± 0.0269033.693064 ± 0.006425+0.380790 ± 0.021325
0.0080.9750.983.985828 ± 0.0353323.662906 ± 0.010097+0.322922 ± 0.025325
0.0080.9750.993.869753 ± 0.0989043.667934 ± 0.021182+0.201819 ± 0.077723
0.0080.9750.9994.260894 ± 0.2474203.673407 ± 0.014273+0.587487 ± 0.252082
0.01120.90.953.778609 ± 0.0257743.676571 ± 0.019166+0.102038 ± 0.011421
0.01120.90.983.801480 ± 0.0369013.703557 ± 0.036920+0.097923 ± 0.044876
0.01120.90.993.814564 ± 0.0314033.735541 ± 0.023741+0.079023 ± 0.052127
0.01120.90.9994.282084 ± 0.2177914.042032 ± 0.138063+0.240052 ± 0.300522
0.0160.90.953.900531 ± 0.0482573.798987 ± 0.023771+0.101545 ± 0.039625
0.0160.90.983.976379 ± 0.0965663.858660 ± 0.067922+0.117718 ± 0.159880
0.0160.90.994.093293 ± 0.0713374.093433 ± 0.096776-0.000140 ± 0.144131
0.0160.90.9994.793792 ± 0.2530264.626482 ± 0.083386+0.167309 ± 0.275325

These results support retaining clipping for the measured four-worker protocol. They do not establish that clipping is necessary at every LR or for every model. Only three runtime seeds were tested; validation-based selection has no independent test estimate. The unclipped winner is at a search boundary, and 52 of its configurations have no clipped counterpart. Both implementations use the same AWC order, but source revisions differ to support the scheme and no-clipping options. Checkpoint retention also differs (none versus final). Matching seeds does not guarantee bitwise-identical execution or remove these provenance differences.

Complete no-clipping ranking

All 80 configurations are ranked below and in the summary CSV.

RankLRBeta1Beta2Mean loss (nats)Sample SD
10.00560.90.983.6684040.046502
20.00560.9250.953.6706930.080207
30.00560.9250.993.6736590.066504
40.0080.9250.993.6855740.071087
50.00560.90.9993.6940590.050843
60.00560.9250.983.6999500.025368
70.00560.90.953.7015100.006856
80.00560.90.993.7087800.099574
90.0080.90.983.7379450.075153
100.0080.950.983.7475830.007761
110.00560.9250.9993.7481070.063325
120.00560.950.9993.7509290.101220
130.00560.950.953.7571420.036115
140.010.90.953.7629220.008466
150.00560.950.983.7632490.050827
160.0080.90.953.7635440.019251
170.01120.9250.983.7658370.064662
180.010.9250.953.7714650.048977
190.010.950.983.7723360.067123
200.010.90.983.7760880.037597
210.0080.950.953.7771130.016950
220.01120.90.953.7786090.025774
230.0080.90.993.7811610.077809
240.0080.9250.983.7829220.059363
250.00560.950.993.7876660.043892
260.010.90.993.7913340.052137
270.010.9250.983.7949040.028355
280.0080.9250.953.7966930.047171
290.01120.9250.953.8002140.025526
300.01120.90.983.8014800.036901
310.010.9250.993.8133840.033281
320.01120.90.993.8145640.031403
330.00560.9750.993.8161110.063759
340.0080.950.993.8174650.065895
350.01120.9250.993.8307850.086128
360.01120.950.983.8363470.026007
370.00560.9750.983.8412880.085760
380.010.950.953.8436610.002419
390.010.950.993.8448770.117091
400.01120.950.953.8604380.048700
410.00560.9750.9993.8682480.067176
420.0080.9750.993.8697530.098904
430.01120.950.993.8793190.114015
440.010.9750.993.8877090.056319
450.0160.90.953.9005310.048257
460.0080.90.9993.9053990.117183
470.010.9750.983.9147770.114692
480.01120.9750.983.9205270.012665
490.0160.9250.983.9269260.026457
500.0080.950.9993.9351210.086816
510.0080.9250.9993.9354990.126134
520.0160.950.993.9416090.132243
530.0160.950.983.9417650.013379
540.00560.9750.953.9436370.129667
550.0160.950.953.9466470.137261
560.0160.9250.953.9470670.096284
570.01120.9750.993.9490280.029781
580.0160.90.983.9763790.096566
590.010.9750.953.9852360.147432
600.0080.9750.983.9858280.035332
610.01120.9750.954.0724190.057884
620.0080.9750.954.0738540.026903
630.0160.90.994.0932930.071337
640.010.9250.9994.1331700.128570
650.010.90.9994.1453370.252933
660.01120.950.9994.1584600.132825
670.0160.9250.994.1964850.195330
680.0160.9750.994.2090190.201328
690.0080.9750.9994.2608940.247420
700.010.950.9994.2665420.169319
710.01120.90.9994.2820840.217791
720.0160.9750.984.2850810.080717
730.0160.9750.954.3279130.221607
740.01120.9250.9994.3388860.272380
750.010.9750.9994.3940800.139400
760.0160.950.9994.5720890.153622
770.01120.9750.9994.5753160.188011
780.0160.9750.9994.7240020.195091
790.0160.9250.9994.7525230.246805
800.0160.90.9994.7937920.253026

The selected no-clipping recipe’s individual full-validation losses are:

Runtime seedLoss (nats)
423.689980033
433.615033275
443.700199450

Shared training protocol

SettingValue
Local models4 × 20,403,520 parameters; 81,614,080 total local parameters
Architecture per model8 layers, width 320, 5 heads, FFN 896, vocabulary 32,000
Topology / schemeone_peer_exponential / AWC
Context / local microbatch1,024 tokens / 32 sequences
Global batch4 × 32 × 1,024 = 131,072 targets; no accumulation
Global / per-model training budget408,068,096 / 102,017,024 targets
Epochs / updates40 / 3,119, including shortened epoch-ending steps
Other AdamW settingsWeight decay 0.1, epsilon 1e-8
Schedule5% token-based linear warmup; cosine decay to 10% of peak LR
Epoch evaluationFixed 1,024-block subset, globally averaged model
Final evaluationFull C4 validation split: 197,411,295 targets, globally averaged model
Preprocessing / validation seeds42 / 12345
Adaptive consensusDisabled
ExecutionGH200 120GB, BF16 autocast, FP32 weights, compiled SDPA, fused AdamW, 8 CPU threads
RuntimePython 3.12.13, PyTorch 2.14.0, CUDA 13.0
No-clipping checkpoint policynone; no model, optimizer, or weight files saved

Each job simulates four workers on one GPU, so these measurements do not include physical inter-node communication costs. Median no-clipping run time including validation was 429.5 seconds (range 395.5–480.2). Jobs used at most 24 concurrent GPUs, isolated compiler caches, and a 30-minute allocation limit. This report makes no speedup claim from removing clipping.

Audit and data

All 240 tasks in Slurm array 2341796 completed with exit code 0. The audit verified frozen source and config hashes, resolved recipes, runtime source digests and versions, training and validation counts, update and epoch counts, finite losses, and absence of checkpoint files. Every group has exactly seeds 42, 43, and 44; means and sample SDs are recomputed from per-run measurements.

For the clipped reference, all 84 matching individual losses are preserved in the published AWC results dataset, and its 28 matched means and SDs were recomputed. 57 original result/config pairs were re-audited; after allowing for clipping, checkpoint retention, output path, and the explicit default AWC field, the resolved configurations match. The original archive for 27 clipped runs at higher beta1 is unavailable, so those comparisons use the published per-run records and protocol/source metadata. They cannot be re-audited against the original resolved files in the current workspace. Each paired row records which evidence was available; no results were imputed.

The no-clipping archive is runs/packed4-awc-noclip-20m-batch128k-20260912. It contains the frozen source based on commit 11fb614, the archived no-clipping patch, all configurations, and run artifacts. Its source digest is 6dca9dce4dd90a52bf05087a92b343825aeab6076e93675da7b6ce80674eda71. The results JSON includes input and artifact hashes and the SHA-256 of the clipped reference dataset.

Reproduction

With the prepared C4 cache, reproduce the best tested no-clipping recipe:

uv run tiny-llm train --config configs/packed4-20m-awc.yaml \
  --set optimizer.lr=0.0056 \
  --set optimizer.beta1=0.9 \
  --set optimizer.beta2=0.98 \
  --set optimizer.grad_clip=null \
  --set training.checkpoint_policy=none \
  --set runtime.output_dir=runs/packed4-20m-awc-noclip-seed42

Repeat with runtime seeds 43 and 44 in separate output directories. For a matched clipped run, use optimizer.grad_clip=1.0 at the same LR and betas. The existing AWC winner preset is unchanged. Checkpoint-free runs retain metrics but cannot be resumed or used for checkpoint analysis. Regenerate the figures and report:

uv run python doc/data/recipe_sweep_packed4_awc_noclip_20m_128k/plot.py
uv run python doc/data/recipe_sweep_packed4_awc_noclip_20m_128k/write_report.py
View Markdown source ↗
Search current documentation

Historical reports are available in the archive.