Skip to main content

GaVadLayer

Struct GaVadLayer 

Source
pub struct GaVadLayer<'a> {
Show 16 fields pub norm_ff1: (&'a [f32], &'a [f32]), pub ff1: (GaLin<'a>, GaLin<'a>), pub norm_att: (&'a [f32], &'a [f32]), pub q: GaLin<'a>, pub k: GaLin<'a>, pub v: GaLin<'a>, pub o: GaLin<'a>, pub norm_conv: (&'a [f32], &'a [f32]), pub pw1: GaLin<'a>, pub taps: &'a [f32], pub dw_b: &'a [f32], pub conv_norm: (&'a [f32], &'a [f32]), pub pw2: GaLin<'a>, pub norm_ff2: (&'a [f32], &'a [f32]), pub ff2: (GaLin<'a>, GaLin<'a>), pub norm_out: (&'a [f32], &'a [f32]),
}
Expand description

One layer of GigaAM’s voice-activity Conformer for gigaam_vad, over rows r ([n, dim]); a norm is LayerNorm (weight, bias, eps 1e-5): r += ½·ff1(norm_ff1(r)) (linear, SiLU, linear); xn = norm_att(r), queries and keys from q / k of xn rotated by the step’s angles (lane j of a head with lane j + head_dim/2), values from v of xn itself, attention inside a window, r += o(context); u = pw1(norm_conv(r)) ([n, 2·dim]), g = u[..dim]·σ(u[dim..]), a depthwise convolution over time inside the window (taps [kernel][dim], zeros outside), r += pw2(silu(conv_norm(conv))); r += ½·ff2(norm_ff2(r)); r = norm_out(r).

Fields§

§norm_ff1: (&'a [f32], &'a [f32])§ff1: (GaLin<'a>, GaLin<'a>)§norm_att: (&'a [f32], &'a [f32])§q: GaLin<'a>§k: GaLin<'a>§v: GaLin<'a>§o: GaLin<'a>§norm_conv: (&'a [f32], &'a [f32])§pw1: GaLin<'a>§taps: &'a [f32]§dw_b: &'a [f32]§conv_norm: (&'a [f32], &'a [f32])§pw2: GaLin<'a>§norm_ff2: (&'a [f32], &'a [f32])§ff2: (GaLin<'a>, GaLin<'a>)§norm_out: (&'a [f32], &'a [f32])

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for GaVadLayer<'a>

§

impl<'a> !UnwindSafe for GaVadLayer<'a>

§

impl<'a> Forget for GaVadLayer<'a>

§

impl<'a> Freeze for GaVadLayer<'a>

§

impl<'a> Move for GaVadLayer<'a>

§

impl<'a> Send for GaVadLayer<'a>

§

impl<'a> Sync for GaVadLayer<'a>

§

impl<'a> Unpin for GaVadLayer<'a>

§

impl<'a> UnsafeUnpin for GaVadLayer<'a>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more