pub struct HyperPrimeWorkspaceShape {
pub chunk_token_bytes: usize,
pub prompt_bytes_per_token: usize,
pub kpool_score_pool: usize,
pub n_layers: usize,
pub gdn_grid: bool,
}Expand description
Per-request prefill WORKSPACE coefficients for a HyperConnections trunk, published to
admission (lane/glm5-gpf-workspace, 2026-08-30). None for every non-hyper model: their
admission arithmetic is byte-identical to the pre-lane behavior.
These are the FORMULA behind the 262k 2-card cell’s measured ~0.8 MiB/token/card prefill
wall (research/glm53-flash-bringup-20260827/262k-2card-20260830/LANE.md), not the slope
itself: each term is the size of a named allocation in the walk, summed per token of ONE
prime call. On GLM-5.3-Flash geometry (H=4096, S=4, F=2048, U=8, heads=64, qk=256, v=256,
topk=2048, P=4) chunk_token_bytes evaluates to ~0.86 MiB — the receipt’s slope with the
conservative side up. The attribution table naming every term lives in
research/glm53-flash-bringup-20260827/gpf-workspace-20260830/LANE.md §1.
Fields§
§chunk_token_bytes: usizeBytes of per-call prefill transients PER TOKEN OF ONE PRIME CALL: the double-buffered
[t, streams, hidden] stream state + ppN boundary slots, the pre/norm transients, the
grouped-MoE staging (CSR activations + three f32 partial planes + f16 mirrors + scatter
planes), the MLA query/attention planes, the k-pool idx plane, and the prime-tail
hidden/norm pair. Multiplied by hyper_prime_call_rows this bounds the workspace of
the CHUNKED prime; on the monolithic rollback (MEMRA_PRIME_CHUNK=0) the call rows are
the whole prompt up to PRIME_CHUNK_LAUNCH_CAP (65,535 launch-legal max; admission
re-derives hyper_prime_call_rows so the arithmetic stays consistent either way) and
the same product stays honest.
prompt_bytes_per_token: usizeBytes per PROMPT token that live for the WHOLE prime on the last stage: the returned
pre-output_norm hiddens stack (n_embd f32), consumed by the MTP-spec prompt_h
and the embed capture.
kpool_score_pool: usizeDSA k-pool group size P, or 0 when the model runs no k-pool indexer. The selection
score plane of ONE call is call_rows * (ctx / P) f32 — the one prefill transient that
stays COUPLED TO CONTEXT DEPTH after chunking (it is the allocation the 3-card 1M prime
died on at 97.2 GiB).
n_layers: usizeTrunk layer count, for re-deriving hyper_prime_call_rows at admission time with the
same env-sensitive schedule the prime itself will walk.
gdn_grid: boolThe model’s own GDN grid-alignment input to the schedule.
Implementations§
Source§impl HyperPrimeWorkspaceShape
impl HyperPrimeWorkspaceShape
Sourcepub fn admission_bytes(&self, prompt_rows: usize) -> usize
pub fn admission_bytes(&self, prompt_rows: usize) -> usize
The admission charge for one request: workspace of the LARGEST prime call this request can produce, plus the ctx-coupled score plane at that call width, plus the prompt-long hiddens stack.
Keyed on PROMPT rows, deliberately not on ctx_cap: every term here is a function of
what the PRIME walks, and a max_tokens-omitted request carries a ctx_cap of the
whole server window — charging the window would refuse every vendor-default short
prompt on a deep-window box for workspace it never allocates. A continuation request’s
prompt is the full rendered conversation (the suffix optimization is internal
reuse), so the score plane’s t_kv is covered too.
Trait Implementations§
Source§impl Clone for HyperPrimeWorkspaceShape
impl Clone for HyperPrimeWorkspaceShape
Source§fn clone(&self) -> HyperPrimeWorkspaceShape
fn clone(&self) -> HyperPrimeWorkspaceShape
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more