Skip to main content

Module adam_update

Module adam_update 

Source
Expand description

Adam optimizer step kernel + Rust dispatch.

Used by hf2q’s ADR-020 Track 2 DWQ-proper training loop (iter 13). Per-element in-place update of param, m, v per the standard Adam algorithm. See shaders/adam_update.metal for the math.

Caller pre-computes the bias-correction denominators 1 − β1^t and 1 − β2^t for the current step t and passes them via the params buffer — keeps the kernel pure-element.

Statics§

ADAM_UPDATE_SHADER_SOURCE

Functions§

dispatch_adam_update_f32
Encode one Adam optimizer step.
register