pub struct DenseModuleData {
pub config_bytes: Vec<u8>,
pub weights_bytes: Vec<u8>,
}Expand description
Raw bytes for one Dense projection layer in the SentenceTransformers
pipeline, in the order they appear in modules.json.
Fields§
§config_bytes: Vec<u8>Contents of <path>/config.json (in_features, out_features,
activation_function, bias, optional use_residual).
weights_bytes: Vec<u8>Contents of <path>/model.safetensors (always contains
linear.weight; also contains residual.weight when the module’s
use_residual is true).
Auto Trait Implementations§
impl Freeze for DenseModuleData
impl RefUnwindSafe for DenseModuleData
impl Send for DenseModuleData
impl Sync for DenseModuleData
impl Unpin for DenseModuleData
impl UnsafeUnpin for DenseModuleData
impl UnwindSafe for DenseModuleData
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> 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