pub struct ColbertConfig {
pub metric: DistanceMetric,
pub max_doc_tokens: usize,
pub max_query_tokens: usize,
pub compress_tokens: bool,
pub parallel_search: bool,
}Expand description
ColBERT configuration
Fields§
§metric: DistanceMetricDistance metric for token similarity Cosine similarity is standard for ColBERT
max_doc_tokens: usizeMaximum number of tokens per document Longer documents are truncated
max_query_tokens: usizeMaximum number of tokens per query
compress_tokens: boolEnable compression for token storage
parallel_search: boolUse parallel search
Implementations§
Source§impl ColbertConfig
impl ColbertConfig
pub fn with_metric(self, metric: DistanceMetric) -> Self
pub fn with_max_doc_tokens(self, max_doc_tokens: usize) -> Self
pub fn with_max_query_tokens(self, max_query_tokens: usize) -> Self
pub fn with_compression(self, compress: bool) -> Self
Trait Implementations§
Source§impl Clone for ColbertConfig
impl Clone for ColbertConfig
Source§fn clone(&self) -> ColbertConfig
fn clone(&self) -> ColbertConfig
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 moreSource§impl Debug for ColbertConfig
impl Debug for ColbertConfig
Source§impl Default for ColbertConfig
impl Default for ColbertConfig
Source§impl<'de> Deserialize<'de> for ColbertConfig
impl<'de> Deserialize<'de> for ColbertConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ColbertConfig
impl RefUnwindSafe for ColbertConfig
impl Send for ColbertConfig
impl Sync for ColbertConfig
impl Unpin for ColbertConfig
impl UnwindSafe for ColbertConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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