pub struct PrefixTuningConfig {
pub num_prefix_tokens: usize,
pub num_layers: usize,
pub d_model: usize,
pub num_heads: usize,
pub init_strategy: PromptInitStrategy,
pub prefix_kv: bool,
}Expand description
Prefix Tuning configuration
Fields§
§num_prefix_tokens: usizeNumber of prefix tokens per layer
num_layers: usizeNumber of layers
d_model: usizeModel dimension
num_heads: usizeNumber of attention heads
init_strategy: PromptInitStrategyPrefix initialization strategy
prefix_kv: boolUse prefix for both key and value
Implementations§
Trait Implementations§
Source§impl Clone for PrefixTuningConfig
impl Clone for PrefixTuningConfig
Source§fn clone(&self) -> PrefixTuningConfig
fn clone(&self) -> PrefixTuningConfig
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 PrefixTuningConfig
impl Debug for PrefixTuningConfig
Auto Trait Implementations§
impl Freeze for PrefixTuningConfig
impl RefUnwindSafe for PrefixTuningConfig
impl Send for PrefixTuningConfig
impl Sync for PrefixTuningConfig
impl Unpin for PrefixTuningConfig
impl UnwindSafe for PrefixTuningConfig
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> 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