# How to contribute an optimizer to the Optimisers.jl package

**URL:** https://discourse.julialang.org/t/how-to-contribute-an-optimizer-to-the-optimisers-jl-package/136975
**Category:** Machine Learning
**Tags:** optimization
**Created:** [May 4, 2026, 4:07am UTC](https://discourse.julialang.org/t/how-to-contribute-an-optimizer-to-the-optimisers-jl-package/136975 "2026-05-04T04:07:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![uwestoehr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uwestoehr/32/216201_2.png) [@uwestoehr](https://discourse.julialang.org/u/uwestoehr)
#### Post date: [May 4, 2026, 4:07am UTC](https://discourse.julialang.org/t/how-to-contribute-an-optimizer-to-the-optimisers-jl-package/136975/1 "2026-05-04T04:07:17Z")

</div>

Since almost 2 years I use Flux and Lux and thus the Optimisers.jl package. Since I need for scientific reasons also tests with optimizers not supported by the Optimisers.jl package, I wrote them for my own.

I want now to offer them to Optimisers.jl but before I make there a pull request I want to discuss/learn how it works.

In effect I want to contribute the 2 optimizers: Yogi and AdaBelief with weight decay.

- Is there a reason why Optimisers.jl does not support the Yogi optimizer?
- Regarding AdaBelief with weight decay - this is my daily work horse. hereby I need to learn how it could be implemented because I cannot just add the weight decay to the existing code because then the algorithm would no longer follow the scientific paper about AdaBelief. So do I for example have to find a new name for it?

I put the code I have to far online:

> **[SurpriseOpt/PerformanceTests/Optimizers/AdaBeliefW.jl at main](https://codeberg.org/Soloof/SurpriseOpt/src/branch/main/PerformanceTests/Optimizers/AdaBeliefW.jl)**
>
> SurpriseOpt - SurpriseOpt: An Adaptive First-Order Optimizer Driven by Boredom

and

> **[SurpriseOpt/PerformanceTests/Optimizers/Yogi.jl at main](https://codeberg.org/Soloof/SurpriseOpt/src/branch/main/PerformanceTests/Optimizers/Yogi.jl)**
>
> SurpriseOpt - SurpriseOpt: An Adaptive First-Order Optimizer Driven by Boredom
