pub struct QuantizedEmbeddingBuilder {
pub embedding_count: i32,
pub dimensions: i32,
pub group_size: i32,
pub bits: i32,
}
Expand description
Builder for QuantizedEmbedding
Fields§
§embedding_count: i32
How many possible discrete tokens can we embed. Usually called the vocabulary size.
dimensions: i32
The dimensionality of the embeddings.
group_size: i32
Quantization group size. Default to QuantizedEmbedding::DEFAULT_GROUP_SIZE
bits: i32
Bits per parameter. Default to QuantizedEmbedding::DEFAULT_BITS
Implementations§
Source§impl QuantizedEmbeddingBuilder
impl QuantizedEmbeddingBuilder
Sourcepub fn build_with_embedding(
self,
embedding: Embedding,
) -> Result<QuantizedEmbedding, Exception>
pub fn build_with_embedding( self, embedding: Embedding, ) -> Result<QuantizedEmbedding, Exception>
Convenience method to build a new QuantizedEmbedding
with an existing Embedding
Sourcepub fn build_with_weight(
self,
weight: Array,
) -> Result<QuantizedEmbedding, Exception>
pub fn build_with_weight( self, weight: Array, ) -> Result<QuantizedEmbedding, Exception>
Convenience method to build a new QuantizedEmbedding
with an existing weight matrix
Trait Implementations§
Source§impl Clone for QuantizedEmbeddingBuilder
impl Clone for QuantizedEmbeddingBuilder
Source§fn clone(&self) -> QuantizedEmbeddingBuilder
fn clone(&self) -> QuantizedEmbeddingBuilder
Returns a copy 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 QuantizedEmbeddingBuilder
impl RefUnwindSafe for QuantizedEmbeddingBuilder
impl Send for QuantizedEmbeddingBuilder
impl Sync for QuantizedEmbeddingBuilder
impl Unpin for QuantizedEmbeddingBuilder
impl UnwindSafe for QuantizedEmbeddingBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option
.