Skip to content

Releases

v2.3.0 - CIFAR-10 validated, Adam m fix

Choose a tag to compare

@dskc dskc released this 15 Nov 11:01

Peanut v2.3 - CIFAR-10 validated, Adam m fix.

What changed from v2.2:

  • Fixed silent third change: first step m was 0, now m = Adam m. First update same size, step 2 now remembers g1.
  • MLP check: v2.3 mean 0.8611 vs v2.2 mean 0.8619, within noise. Fix preserves performance.

CIFAR-10, 50 epochs, TinyCNN, 3 seeds, Colab T4:

  • LR 0.003: Peanut 0.7847 mean, AdamW 0.7813 mean
  • LR 0.01: Peanut 0.6526 mean, AdamW 0.3396 mean, AdamW collapses, one seed 0.1000

Peanut now wins on 2 datasets: Fashion-MNIST and CIFAR-10.
Thanks to community for finding the m bug.

Peanut v2.2.0 - LR-aware damping

Choose a tag to compare

@dskc dskc released this 14 Nov 15:17

Peanut v2.2 - LR-aware damping, from community feedback.

What changed from v2.0.0:

  • Both dampings now scale with LR. At LR 0.01, damp = 0.2, full. At LR 0.003, damp = 0.66, less. At LR 0.001, damp = 1.0, no damping.
  • V inflation also scales with LR.
  • Ablation showed neither change alone beats Adam. Both together are needed at high LR.

MLP, 10 epochs, 3 seeds:

  • LR 0.003: Peanut v2.2 0.8807 mean, Adam 0.8800 mean
  • LR 0.01: Peanut v2.2 0.8619 mean, Adam 0.8613 mean

Community CIFAR-10 probe, 3 epochs, from Hugging Face feedback:

  • Peanut beats Adam by 7.04 points at 0.003, 5.80 points at 0.01
  • Peanut vs warmup flips with LR

Thanks to Hugging Face community for the ablation and warmup feedback.

Peanut v2.0.0 - First public release

Choose a tag to compare

@dskc dskc released this 13 Nov 17:38
6225f1c

Peanut v2 - A more stable Adam variant, tested on CPU only.

Results, Fashion-MNIST, CNN, 3 seeds, lr 0.01:

  • Experiment 01, 10 epochs: Peanut v2 0.8952 mean, 0.0012 std, vs Adam 0.8934, AdamW 0.8889
  • Experiment 02, 20 epochs: Peanut v2 0.8972 mean, 0.0038 std, vs Adam 0.8901

Peanut does not beat Adam by a lot. It is more stable.
AdamW collapses on some seeds. Peanut v2 never collapsed in my tests.

Files:

  • src/optimizers/peanut.py - Peanut v2 code
  • experiments/cnn_exp01.py - CNN 10 epochs
  • experiments/cnn_exp02.py - CNN 20 epochs

Try it on your dataset and tell me if it stays stable.