pub struct EmbedHost {
pub raw: Vec<u8>,
pub ggml_type: GgmlType,
pub n_embd: usize,
}Expand description
Host-resident embedding table for row gather (dequant only the needed token rows).
Fields§
§raw: Vec<u8>§ggml_type: GgmlType§n_embd: usizeImplementations§
Source§impl EmbedHost
impl EmbedHost
pub fn from_gguf(g: &GgufFile, name: &str) -> Self
pub fn from_source(src: &dyn TensorSource, name: &str) -> Self
Sourcepub fn qt_and_row_bytes(&self, n_embd: usize) -> (i32, usize)
pub fn qt_and_row_bytes(&self, n_embd: usize) -> (i32, usize)
QT int + row_bytes for this embed table’s dtype (for the device embed-gather kernel). CUDA-GRAPH-PLAN Phase 1. Mirrors the GpuTensor qtype mapping.
Auto Trait Implementations§
impl Freeze for EmbedHost
impl RefUnwindSafe for EmbedHost
impl Send for EmbedHost
impl Sync for EmbedHost
impl Unpin for EmbedHost
impl UnsafeUnpin for EmbedHost
impl UnwindSafe for EmbedHost
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