pub struct GgufMatMul { /* private fields */ }Trait Implementations§
Source§impl Debug for GgufMatMul
impl Debug for GgufMatMul
Source§impl QuantMethod for GgufMatMul
impl QuantMethod for GgufMatMul
fn new(method: QuantMethodConfig) -> Result<Self>where
Self: Sized,
fn dequantize_w(&self, out_ty: DType) -> Result<Tensor>
Source§fn forward(&self, a: &Tensor) -> Result<Tensor>
fn forward(&self, a: &Tensor) -> Result<Tensor>
Compute matmul of
self and a. self should contain the weights.Source§fn forward_via_half(&self, a: &Tensor) -> Result<Tensor>
fn forward_via_half(&self, a: &Tensor) -> Result<Tensor>
Compute matmul of
self and a. self should contain the weights.
This may go via half precision if it is supported.Source§fn quantized_act_type(&self) -> Option<DType>
fn quantized_act_type(&self) -> Option<DType>
If a quantized method, return the activation dtype.
Source§fn to_device(&self, dev: &Device) -> Result<Arc<dyn QuantMethod>>
fn to_device(&self, dev: &Device) -> Result<Arc<dyn QuantMethod>>
Cast this layer to the given device.
fn size_in_bytes(&self) -> Result<usize>
fn device(&self) -> Device
Source§fn forward_autocast(&self, a: &Tensor) -> Result<Tensor>
fn forward_autocast(&self, a: &Tensor) -> Result<Tensor>
Compute matmul of
self and a. self should contain the weights.
Automatically cast to required quantization actiation type and backAuto Trait Implementations§
impl Freeze for GgufMatMul
impl !RefUnwindSafe for GgufMatMul
impl Send for GgufMatMul
impl Sync for GgufMatMul
impl Unpin for GgufMatMul
impl !UnwindSafe for GgufMatMul
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> 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