pub struct Ple {
pub layer: usize,
pub ngram: usize,
pub heads_per_ngram: usize,
pub head_dim: usize,
pub conv_taps: usize,
pub eos: u32,
pub multipliers: Vec<u64>,
pub head_offsets: Vec<u64>,
pub head_vocab: Vec<u64>,
}Expand description
The per-layer n-gram embedding: each position’s n-grams of 2 to ngram tokens, read back no further than the last
end of document, are hashed heads_per_ngram ways each (t₀·m₀ ⊕ t₁·m₁ ⊕ … modulo a head’s prime, from the head’s
offset in one table); the heads’ rows, side by side, project to a value and to a key for each hyper-connection lane,
the lane’s normed state gating the value by σ(sign(g)·√|g|) of its agreement g with the key, and a dilated
depthwise convolution over the normed gated values adds local context. Its sum joins the layer’s residual input.
Fields§
§layer: usizeThe layer whose input it joins.
ngram: usizeThe longest n-gram: its context reaches ngram - 1 tokens back, and the convolution’s dilation is ngram.
heads_per_ngram: usize§head_dim: usizeA head’s row in the table.
conv_taps: usize§eos: u32The token that ends a document: no n-gram reaches back across it, and it stands in before the first token.
multipliers: Vec<u64>The odd multiplier each position back is hashed by.
head_offsets: Vec<u64>Each head’s first row in the table.
head_vocab: Vec<u64>Each head’s prime modulus.
Trait Implementations§
impl Eq for Ple
impl StructuralPartialEq for Ple
Auto Trait Implementations§
impl Freeze for Ple
impl RefUnwindSafe for Ple
impl Send for Ple
impl Sync for Ple
impl Unpin for Ple
impl UnsafeUnpin for Ple
impl UnwindSafe for Ple
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.