pub struct RerankerSection {
pub enabled: Option<bool>,
pub model: Option<String>,
pub max_seq_tokens: Option<usize>,
}Expand description
v0.7.x (#1146) — [reranker] sectioned cross-encoder
configuration.
Wire format:
[reranker]
enabled = true
model = "ms-marco-MiniLM-L-6-v2" # v0.7.0 has one variant;
# field reserved for future
# bake-offs.Folds the legacy cross_encoder = bool top-level flag. Migration
(via ai-memory config migrate) writes the explicit enabled +
model fold; the legacy field continues to be honored at parse
time until v0.8.0.
Fields§
§enabled: Option<bool>Whether the cross-encoder rerank stage runs in the recall
pipeline. Folded from cross_encoder: Option<bool> at the
resolver layer.
model: Option<String>Cross-encoder model identifier. Defaults to
ms-marco-MiniLM-L-6-v2 when unset. Field reserved for future
model bake-offs (e.g., bge-reranker-v2-m3,
mxbai-rerank-large-v2).
max_seq_tokens: Option<usize>#1604 — tokenized length cap for rerank inputs (the batched
cross-encoder forward). Defaults to
crate::reranker::RERANK_MAX_SEQ_DEFAULT when unset; values
that are zero or above the model ceiling
(crate::reranker::CROSS_ENCODER_MAX_SEQ) fall through.
Overridable via AI_MEMORY_RERANK_MAX_SEQ.
Trait Implementations§
Source§impl Clone for RerankerSection
impl Clone for RerankerSection
Source§fn clone(&self) -> RerankerSection
fn clone(&self) -> RerankerSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RerankerSection
impl Debug for RerankerSection
Source§impl Default for RerankerSection
impl Default for RerankerSection
Source§fn default() -> RerankerSection
fn default() -> RerankerSection
Source§impl<'de> Deserialize<'de> for RerankerSection
impl<'de> Deserialize<'de> for RerankerSection
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>,
impl Eq for RerankerSection
Source§impl PartialEq for RerankerSection
impl PartialEq for RerankerSection
Source§fn eq(&self, other: &RerankerSection) -> bool
fn eq(&self, other: &RerankerSection) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RerankerSection
impl Serialize for RerankerSection
impl StructuralPartialEq for RerankerSection
Auto Trait Implementations§
impl Freeze for RerankerSection
impl RefUnwindSafe for RerankerSection
impl Send for RerankerSection
impl Sync for RerankerSection
impl Unpin for RerankerSection
impl UnsafeUnpin for RerankerSection
impl UnwindSafe for RerankerSection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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