yangluo7 / came Goto Github PK
View Code? Open in Web Editor NEWThe official implementation of "CAME: Confidence-guided Adaptive Memory Optimization"
License: MIT License
The official implementation of "CAME: Confidence-guided Adaptive Memory Optimization"
License: MIT License
Hi, amazing paper.
I was wondering if you tested or have any knowledge of CAME working with LR schedulers that utilizes repeats like Cosine with repeats, Cosine with Annealing? Is it better to have a constant or a simple decaying LR scheduler over the repeating methods?
When the parameter is a vector, the in-place operation of the variable update
seems to affect the value of the variable exp_avg
. Is this behavior expected?
In this code segment, when not factored, update
is first assigned to exp_avg
and then multiplied by lr, which results in exp_avg
also being multiplied by lr.
if factored:
exp_avg_res_row = state["exp_avg_res_row"]
exp_avg_res_col = state["exp_avg_res_col"]
exp_avg_res_row.mul_(group["betas"][2]).add_(
res.mean(dim=-1), alpha=1.0 - group["betas"][2]
)
exp_avg_res_col.mul_(group["betas"][2]).add_(
res.mean(dim=-2), alpha=1.0 - group["betas"][2]
)
# Approximation of exponential moving average of instability
res_approx = self._approx_sq_grad(exp_avg_res_row, exp_avg_res_col)
update = res_approx.mul_(exp_avg)
else:
update = exp_avg
if group["weight_decay"] != 0:
p.data.add_(
p.data, alpha=-group["weight_decay"] * group["lr"]
)
update.mul_(group["lr"])
p.data.add_(-update)
When use update = exp_avg.clone()
๏ผ the rate of convergence is faster.
Here is a test on rosenbrock function:
To replicate our result, first register the CAME optimizer to the transformer package.
How to register the CAME optimizer to the transformer package. ?
Any tutorial? Thanks!
cool!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.