Skip to content

BlockShuffle

Bases: BaseModule

Deterministic block permutation of a flat tensor.

Splits the last dimension into contiguous blocks of size block_size and permutes the blocks using a fixed seeded permutation.

Parameters:

Name Type Description Default
block_size int

Size of each block along the last dimension.

required
seed int

Seed used to generate the permutation.

42