pub struct LinearLoadSpec<'a> {
pub littlebit: Option<&'a LittleBitConfig>,
pub ratio_factor: f64,
pub weight_state: WeightState,
pub inference_mode: InferenceMode,
pub dtype: DType,
pub device: &'a Device,
}Expand description
Bundle of parameters specifying how to load a LinearLayer from a state dict.
Fields§
§littlebit: Option<&'a LittleBitConfig>Optional LittleBit quantization config when loading quantized checkpoints.
ratio_factor: f64Per-layer rank multiplier (1.0 default, kv_factor for k_proj/v_proj).
weight_state: WeightStateWhether unpacked U/V weights are already binarized.
inference_mode: InferenceModeWhether to keep U/V packed at inference (Packed) or unpacked floats (Unpacked).
dtype: DTypeTarget dtype for float parameters.
device: &'a DeviceTarget compute device.
Trait Implementations§
Source§impl<'a> Clone for LinearLoadSpec<'a>
impl<'a> Clone for LinearLoadSpec<'a>
impl<'a> Copy for LinearLoadSpec<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinearLoadSpec<'a>
impl<'a> RefUnwindSafe for LinearLoadSpec<'a>
impl<'a> Send for LinearLoadSpec<'a>
impl<'a> Sync for LinearLoadSpec<'a>
impl<'a> Unpin for LinearLoadSpec<'a>
impl<'a> UnsafeUnpin for LinearLoadSpec<'a>
impl<'a> UnwindSafe for LinearLoadSpec<'a>
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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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