Enum WeightType

Source
#[non_exhaustive]
#[repr(u32)]
pub enum WeightType {
Show 32 variants SD_TYPE_F32 = 0, SD_TYPE_F16 = 1, SD_TYPE_Q4_0 = 2, SD_TYPE_Q4_1 = 3, SD_TYPE_Q5_0 = 6, SD_TYPE_Q5_1 = 7, SD_TYPE_Q8_0 = 8, SD_TYPE_Q8_1 = 9, SD_TYPE_Q2_K = 10, SD_TYPE_Q3_K = 11, SD_TYPE_Q4_K = 12, SD_TYPE_Q5_K = 13, SD_TYPE_Q6_K = 14, SD_TYPE_Q8_K = 15, SD_TYPE_IQ2_XXS = 16, SD_TYPE_IQ2_XS = 17, SD_TYPE_IQ3_XXS = 18, SD_TYPE_IQ1_S = 19, SD_TYPE_IQ4_NL = 20, SD_TYPE_IQ3_S = 21, SD_TYPE_IQ2_S = 22, SD_TYPE_IQ4_XS = 23, SD_TYPE_I8 = 24, SD_TYPE_I16 = 25, SD_TYPE_I32 = 26, SD_TYPE_I64 = 27, SD_TYPE_F64 = 28, SD_TYPE_IQ1_M = 29, SD_TYPE_BF16 = 30, SD_TYPE_TQ1_0 = 34, SD_TYPE_TQ2_0 = 35, SD_TYPE_COUNT = 39,
}
Expand description

Weight type

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SD_TYPE_F32 = 0

§

SD_TYPE_F16 = 1

§

SD_TYPE_Q4_0 = 2

§

SD_TYPE_Q4_1 = 3

§

SD_TYPE_Q5_0 = 6

§

SD_TYPE_Q5_1 = 7

§

SD_TYPE_Q8_0 = 8

§

SD_TYPE_Q8_1 = 9

§

SD_TYPE_Q2_K = 10

§

SD_TYPE_Q3_K = 11

§

SD_TYPE_Q4_K = 12

§

SD_TYPE_Q5_K = 13

§

SD_TYPE_Q6_K = 14

§

SD_TYPE_Q8_K = 15

§

SD_TYPE_IQ2_XXS = 16

§

SD_TYPE_IQ2_XS = 17

§

SD_TYPE_IQ3_XXS = 18

§

SD_TYPE_IQ1_S = 19

§

SD_TYPE_IQ4_NL = 20

§

SD_TYPE_IQ3_S = 21

§

SD_TYPE_IQ2_S = 22

§

SD_TYPE_IQ4_XS = 23

§

SD_TYPE_I8 = 24

§

SD_TYPE_I16 = 25

§

SD_TYPE_I32 = 26

§

SD_TYPE_I64 = 27

§

SD_TYPE_F64 = 28

§

SD_TYPE_IQ1_M = 29

§

SD_TYPE_BF16 = 30

§

SD_TYPE_TQ1_0 = 34

§

SD_TYPE_TQ2_0 = 35

§

SD_TYPE_COUNT = 39

Trait Implementations§

Source§

impl Clone for sd_type_t

Source§

fn clone(&self) -> sd_type_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for sd_type_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Hash for sd_type_t

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for sd_type_t

Source§

fn eq(&self, other: &sd_type_t) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for sd_type_t

Source§

impl Eq for sd_type_t

Source§

impl StructuralPartialEq for sd_type_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,