pub struct TensorSpec {
pub name: &'static str,
pub dtype: KdaDtype,
/* private fields */
}Expand description
The 15 self_attn tensors a KDA block has — and the complete list of what it may have.
Shapes are expressed against Glm5NextKdaConfig so a geometry change fails loudly here
rather than at launch. H = heads, D = head_dim, Q = H*D, X = hidden, K = conv kernel.
Fields§
§name: &'static str§dtype: KdaDtypeImplementations§
Source§impl TensorSpec
impl TensorSpec
pub fn expected_shape(&self, c: &Glm5NextKdaConfig) -> Vec<usize>
Trait Implementations§
Source§impl Clone for TensorSpec
impl Clone for TensorSpec
Source§fn clone(&self) -> TensorSpec
fn clone(&self) -> TensorSpec
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 TensorSpec
impl Debug for TensorSpec
impl Copy for TensorSpec
Auto Trait Implementations§
impl Freeze for TensorSpec
impl RefUnwindSafe for TensorSpec
impl Send for TensorSpec
impl Sync for TensorSpec
impl Unpin for TensorSpec
impl UnwindSafe for TensorSpec
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