pub enum DType {
F32,
F16,
BF16,
I64,
I32,
I8,
U8,
Bool,
}Expand description
The element types kime reads from checkpoints. Weights are floats. The integer types exist because safetensors files may carry them, and a loader that knows their size can check a file it will not use.
Variants§
F32
IEEE binary32.
F16
IEEE binary16.
BF16
bfloat16.
I64
Signed 64 bit integers.
I32
Signed 32 bit integers.
I8
Signed 8 bit integers.
U8
Unsigned 8 bit integers.
Bool
Booleans, one byte each.
Implementations§
Trait Implementations§
impl Copy for DType
impl Eq for DType
impl StructuralPartialEq for DType
Auto Trait Implementations§
impl Freeze for DType
impl RefUnwindSafe for DType
impl Send for DType
impl Sync for DType
impl Unpin for DType
impl UnsafeUnpin for DType
impl UnwindSafe for DType
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