pub struct FsdpConfig {
pub world_size: usize,
pub local_rank: usize,
pub wrapping_policy: WrappingPolicy,
pub cpu_offload: bool,
pub mixed_precision: bool,
pub backward_prefetch: bool,
pub forward_prefetch: bool,
}Expand description
Configuration for FSDP training
Fields§
§world_size: usizeTotal number of processes
local_rank: usizeThis process’s rank
wrapping_policy: WrappingPolicyStrategy for deciding which modules to wrap
cpu_offload: boolOffload parameter shards to CPU between forward and backward passes
mixed_precision: boolKeep full-precision master weights, use fp16 for forward pass
backward_prefetch: boolPrefetch the next layer’s params during the backward pass
forward_prefetch: boolPrefetch params ahead of forward pass
Trait Implementations§
Source§impl Clone for FsdpConfig
impl Clone for FsdpConfig
Source§fn clone(&self) -> FsdpConfig
fn clone(&self) -> FsdpConfig
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 Debug for FsdpConfig
impl Debug for FsdpConfig
Auto Trait Implementations§
impl Freeze for FsdpConfig
impl RefUnwindSafe for FsdpConfig
impl Send for FsdpConfig
impl Sync for FsdpConfig
impl Unpin for FsdpConfig
impl UnsafeUnpin for FsdpConfig
impl UnwindSafe for FsdpConfig
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> 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