pub struct DistributedConfig<T: FloatBounds> {
pub num_workers: usize,
pub backend: DistributedBackend,
pub sync_strategy: GradientSyncStrategy,
pub batch_size_per_worker: usize,
pub sync_frequency: usize,
pub lr_scaling: LearningRateScaling<T>,
pub gradient_compression: bool,
pub compression_threshold: T,
pub max_grad_norm: Option<T>,
pub warmup_steps: usize,
}Expand description
Configuration for distributed training
Fields§
§num_workers: usizeNumber of worker processes/devices
backend: DistributedBackendBackend type for communication (GPU, CPU, etc.)
sync_strategy: GradientSyncStrategyGradient synchronization strategy
batch_size_per_worker: usizeBatch size per worker
sync_frequency: usizeFrequency of gradient synchronization (in steps)
lr_scaling: LearningRateScaling<T>Learning rate scaling strategy
gradient_compression: boolWhether to use gradient compression
compression_threshold: TCompression threshold for gradients
max_grad_norm: Option<T>Maximum gradient norm for clipping
warmup_steps: usizeWarmup steps for distributed training
Trait Implementations§
Source§impl<T: Clone + FloatBounds> Clone for DistributedConfig<T>
impl<T: Clone + FloatBounds> Clone for DistributedConfig<T>
Source§fn clone(&self) -> DistributedConfig<T>
fn clone(&self) -> DistributedConfig<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug + FloatBounds> Debug for DistributedConfig<T>
impl<T: Debug + FloatBounds> Debug for DistributedConfig<T>
Source§impl<T: FloatBounds> Default for DistributedConfig<T>
impl<T: FloatBounds> Default for DistributedConfig<T>
Auto Trait Implementations§
impl<T> Freeze for DistributedConfig<T>where
T: Freeze,
impl<T> RefUnwindSafe for DistributedConfig<T>where
T: RefUnwindSafe,
impl<T> Send for DistributedConfig<T>
impl<T> Sync for DistributedConfig<T>
impl<T> Unpin for DistributedConfig<T>where
T: Unpin,
impl<T> UnsafeUnpin for DistributedConfig<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DistributedConfig<T>where
T: UnwindSafe,
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