pub struct TokenBudgetConfig {
pub max_tokens: usize,
pub max_samples: usize,
pub replicas: usize,
pub rank: usize,
pub shuffle: bool,
pub seed: u64,
pub drop_rank_tail: bool,
}Expand description
Token-budget and distributed-rank policy. Padded token cost is
batch_size * longest_sequence, and every sequence must fit by itself.
Fields§
§max_tokens: usizeMaximum padded tokens in a batch.
max_samples: usizeMaximum samples, including empty sequences, in a batch.
replicas: usizeTotal distributed ranks.
rank: usizeThis rank, starting at zero.
shuffle: boolShuffle with the supplied seed and epoch.
seed: u64Base permutation seed.
drop_rank_tail: boolDrop the incomplete distributed tail instead of padding rank indices.
Trait Implementations§
Source§impl Clone for TokenBudgetConfig
impl Clone for TokenBudgetConfig
Source§impl Debug for TokenBudgetConfig
impl Debug for TokenBudgetConfig
Source§impl Default for TokenBudgetConfig
impl Default for TokenBudgetConfig
Source§impl<'de> Deserialize<'de> for TokenBudgetConfig
impl<'de> Deserialize<'de> for TokenBudgetConfig
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
impl Eq for TokenBudgetConfig
Source§impl PartialEq for TokenBudgetConfig
impl PartialEq for TokenBudgetConfig
Source§impl Serialize for TokenBudgetConfig
impl Serialize for TokenBudgetConfig
impl StructuralPartialEq for TokenBudgetConfig
Auto Trait Implementations§
impl Forget for TokenBudgetConfig
impl Freeze for TokenBudgetConfig
impl RefUnwindSafe for TokenBudgetConfig
impl Send for TokenBudgetConfig
impl Sync for TokenBudgetConfig
impl Unpin for TokenBudgetConfig
impl UnsafeUnpin for TokenBudgetConfig
impl UnwindSafe for TokenBudgetConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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