pub struct DeferredTensor {
pub path: PathBuf,
pub offset: u64,
pub shape: Vec<usize>,
pub dtype: WeightDtype,
}Expand description
Where a skipped tensor lives, so a consumer can read it in place.
Fields§
§path: PathBufShard file containing the tensor.
offset: u64ABSOLUTE byte offset of the tensor’s first element in that file
(safetensors header length + the tensor’s data_offsets[0]).
shape: Vec<usize>§dtype: WeightDtypeTrait Implementations§
Source§impl Clone for DeferredTensor
impl Clone for DeferredTensor
Source§fn clone(&self) -> DeferredTensor
fn clone(&self) -> DeferredTensor
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 moreAuto Trait Implementations§
impl Freeze for DeferredTensor
impl RefUnwindSafe for DeferredTensor
impl Send for DeferredTensor
impl Sync for DeferredTensor
impl Unpin for DeferredTensor
impl UnwindSafe for DeferredTensor
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