pub struct PleIdDims {
pub ngram_size: usize,
pub heads_per_ngram: usize,
pub multipliers: Vec<u64>,
pub head_vocab_sizes: Vec<u64>,
pub head_offsets: Vec<u64>,
pub eos_token_id: u32,
}Expand description
2026-09-25: Geometry for one PLE site, read from the checkpoint rather than derived.
multipliers, head_vocab_sizes and head_offsets are the checkpoint’s
ple_embedding.layer_multipliers, .ngram_heads_vocab_sizes and
.ngram_heads_offsets. The reference can also derive them (SplitMix64
and a prime search); reading them keeps the ids tied to the checkpoint.
Fields§
§ngram_size: usize2026-09-25: ngram_size. The loader also uses it as the PLE conv dilation.
heads_per_ngram: usize2026-09-25: heads_per_ngram. Heads are grouped by n-gram order:
[0, heads_per_ngram) uses order 2, the next block order 3, and so on.
multipliers: Vec<u64>2026-09-25: layer_multipliers[ngram_size]; validate refuses an even one.
head_vocab_sizes: Vec<u64>2026-09-25: ngram_heads_vocab_sizes[ngram_heads]: each head’s modulus.
head_offsets: Vec<u64>2026-09-25: ngram_heads_offsets[ngram_heads]: where each head’s range starts
in the single concatenated table.
eos_token_id: u32Implementations§
Source§impl PleIdDims
impl PleIdDims
Sourcepub fn ngram_heads(&self) -> usize
pub fn ngram_heads(&self) -> usize
2026-09-25: (ngram_size - 1) * heads_per_ngram. Times head_dim this is
the PLE embedding width, because the head slices are concatenated
(PleLayer::new checks the product).
Sourcepub fn context_len(&self) -> usize
pub fn context_len(&self) -> usize
2026-09-25: How many previous tokens a decode step must carry to reproduce prefill’s ids.