pub struct QatConfig {
pub target: QuantTarget,
pub scheme: QuantScheme,
pub rounding: RoundingMode,
pub lr: f64,
pub beta1: f64,
pub beta2: f64,
pub eps: f64,
pub weight_decay: f64,
}Expand description
Configuration for a QatOptimizer: the quantization target plus the
(Adam/AdamW) master-update hyper-parameters.
Fields§
§target: QuantTargetQuantization target for the fake-quant view.
scheme: QuantSchemeInteger scheme (ignored for fp8 targets).
rounding: RoundingModeRounding mode applied when deriving the quantized view.
lr: f64Learning rate.
beta1: f64First-moment decay (beta1).
beta2: f64Second-moment decay (beta2).
eps: f64Numerical-stability epsilon.
weight_decay: f64Decoupled (AdamW) weight decay.
Implementations§
Source§impl QatConfig
impl QatConfig
Sourcepub fn new(
target: QuantTarget,
scheme: QuantScheme,
rounding: RoundingMode,
lr: f64,
) -> Self
pub fn new( target: QuantTarget, scheme: QuantScheme, rounding: RoundingMode, lr: f64, ) -> Self
Construct a config with standard Adam defaults
(beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0).
Trait Implementations§
impl Copy for QatConfig
impl StructuralPartialEq for QatConfig
Auto Trait Implementations§
impl Freeze for QatConfig
impl RefUnwindSafe for QatConfig
impl Send for QatConfig
impl Sync for QatConfig
impl Unpin for QatConfig
impl UnsafeUnpin for QatConfig
impl UnwindSafe for QatConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more