pub struct ZeroOptimizationConfig {Show 14 fields
pub stage: ZeroStage,
pub allgather_bucket_size: Option<u64>,
pub reduce_bucket_size: Option<u64>,
pub overlap_comm: Option<bool>,
pub contiguous_gradients: Option<bool>,
pub sub_group_size: Option<u32>,
pub reduce_scatter: Option<bool>,
pub allgather_partitions: Option<bool>,
pub stage3_max_live_parameters: Option<u64>,
pub stage3_max_reuse_distance: Option<u64>,
pub stage3_prefetch_bucket_size: Option<u64>,
pub stage3_param_persistence_threshold: Option<u64>,
pub offload_optimizer: Option<OffloadOptimizerConfig>,
pub offload_param: Option<OffloadParamConfig>,
}Expand description
ZeRO optimization configuration
Fields§
§stage: ZeroStageZeRO stage (0, 1, 2, or 3)
allgather_bucket_size: Option<u64>Allgather bucket size
reduce_bucket_size: Option<u64>Reduce bucket size
overlap_comm: Option<bool>Overlap communications
contiguous_gradients: Option<bool>Contiguous gradients
sub_group_size: Option<u32>Sub-group size
reduce_scatter: Option<bool>Reduce scatter
allgather_partitions: Option<bool>Allgather partitions
stage3_max_live_parameters: Option<u64>Stage 3 max live parameters
stage3_max_reuse_distance: Option<u64>Stage 3 max reuse distance
stage3_prefetch_bucket_size: Option<u64>Stage 3 prefetch bucket size
stage3_param_persistence_threshold: Option<u64>Stage 3 parameter persistence threshold
offload_optimizer: Option<OffloadOptimizerConfig>CPU offloading configuration
offload_param: Option<OffloadParamConfig>Parameter offloading configuration
Trait Implementations§
Source§impl Clone for ZeroOptimizationConfig
impl Clone for ZeroOptimizationConfig
Source§fn clone(&self) -> ZeroOptimizationConfig
fn clone(&self) -> ZeroOptimizationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZeroOptimizationConfig
impl Debug for ZeroOptimizationConfig
Source§impl Default for ZeroOptimizationConfig
impl Default for ZeroOptimizationConfig
Source§impl<'de> Deserialize<'de> for ZeroOptimizationConfig
impl<'de> Deserialize<'de> for ZeroOptimizationConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ZeroOptimizationConfig
impl RefUnwindSafe for ZeroOptimizationConfig
impl Send for ZeroOptimizationConfig
impl Sync for ZeroOptimizationConfig
impl Unpin for ZeroOptimizationConfig
impl UnsafeUnpin for ZeroOptimizationConfig
impl UnwindSafe for ZeroOptimizationConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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