Skip to main content

HyperConnectionArgs

Struct HyperConnectionArgs 

Source
pub struct HyperConnectionArgs<'a, T: Element> {
    pub x_expanded: TensorRef<'a, T, 3>,
    pub rmsnorm_weight: TensorRef<'a, bf16, 1>,
    pub h_pre: TensorRef<'a, f32, 1>,
    pub h_post: TensorRef<'a, f32, 1>,
    pub h_res: TensorRef<'a, f32, 2>,
    pub out: TensorMut<'a, T, 3>,
}
Expand description

Args bundle for a HyperConnectionPlan launch.

Fields§

§x_expanded: TensorRef<'a, T, 3>

Residual-stream input — [B, n, C] row-major contiguous.

§rmsnorm_weight: TensorRef<'a, bf16, 1>

RMSNorm gamma — [C] bf16. Always bf16 regardless of T (matches upstream floatX typedef).

§h_pre: TensorRef<'a, f32, 1>

Pre-mixing logits — [n] f32. The kernel passes them through sigmoid internally.

§h_post: TensorRef<'a, f32, 1>

Post-mixing logits — [n] f32. The kernel passes them through 2 * sigmoid(.) internally.

§h_res: TensorRef<'a, f32, 2>

Pre-Sinkhorn residual mixing matrix — [n, n] f32. The kernel passes it through Sinkhorn-Knopp iteration to project onto the doubly-stochastic manifold before mixing.

§out: TensorMut<'a, T, 3>

Output — [B, n, C] row-major contiguous, same dtype as input.

Auto Trait Implementations§

§

impl<'a, T> !UnwindSafe for HyperConnectionArgs<'a, T>

§

impl<'a, T> Freeze for HyperConnectionArgs<'a, T>

§

impl<'a, T> RefUnwindSafe for HyperConnectionArgs<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for HyperConnectionArgs<'a, T>
where T: Sync + Send,

§

impl<'a, T> Sync for HyperConnectionArgs<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for HyperConnectionArgs<'a, T>

§

impl<'a, T> UnsafeUnpin for HyperConnectionArgs<'a, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.