pub struct ModelIdentity {
pub name: String,
pub revision: String,
pub dimensions: u32,
pub normalized: bool,
pub text_template: u32,
pub chunk_template: u32,
}Expand description
Everything that decides what vector an embedder returns for a text.
Two identities that differ in any field never share vectors: a new model revision, another dimension or a changed text template means every vector must be embedded again.
Fields§
§name: StringThe model’s name as its backend reports it, such as
sentence-transformers/all-MiniLM-L6-v2.
revision: StringThe model’s revision or weights digest; empty when the backend has none.
dimensions: u32§normalized: boolWhether the backend returns vectors scaled to unit length. Scoring is cosine either way; a backend that changes this returns different vectors.
text_template: u32Version of the template that builds the text sent to the embedder.
chunk_template: u32Version of the rules that cut a file into chunks. Chunk maps depend on it; vectors depend only on the text they were given.
Implementations§
Trait Implementations§
Source§impl Clone for ModelIdentity
impl Clone for ModelIdentity
Source§impl Debug for ModelIdentity
impl Debug for ModelIdentity
impl Eq for ModelIdentity
Source§impl Hash for ModelIdentity
impl Hash for ModelIdentity
Source§impl HeapBytes for ModelIdentity
impl HeapBytes for ModelIdentity
Source§fn heap_bytes(&self, seen: &mut Seen) -> usize
fn heap_bytes(&self, seen: &mut Seen) -> usize
The bytes this value owns on the heap; an allocation
seen has
already counted adds nothing.Source§impl PartialEq for ModelIdentity
impl PartialEq for ModelIdentity
impl StructuralPartialEq for ModelIdentity
Auto Trait Implementations§
impl Forget for ModelIdentity
impl Freeze for ModelIdentity
impl Move for ModelIdentity
impl RefUnwindSafe for ModelIdentity
impl Send for ModelIdentity
impl Sync for ModelIdentity
impl Unpin for ModelIdentity
impl UnsafeUnpin for ModelIdentity
impl UnwindSafe for ModelIdentity
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