flashinfer.comm._ulysses_lowp.payload_spec

flashinfer.comm._ulysses_lowp.payload_spec(*, batch_size: int, local_sequence: int, num_heads: int, head_dim: int, world_size: int) → Dict[str, int | float]

Return the headerless V2-G destination-chunk layout in bytes.

Parameters:
  • batch_size – Positive batch size B.

  • local_sequence – Number of tokens per source shard, including zero padding.

  • num_heads – Total heads before the all-to-all; payload packing requires divisibility by world_size.

  • head_dim – Head dimension, 64 or 128; must agree on every rank.

  • world_size – Ulysses group size, one of 2, 4, 6 or 8; 6 is supported structurally but has not been validated.

Returns:

Dictionary containing byte offsets, per-destination chunk_bytes, total payload_bytes, scale counts and sequence sizes.