hstu

Classes

HSTUModel(n_blocks, n_heads, n_factors, ...)

HSTU model: transformer-based sequential model with unidirectional pointwise aggregated attention mechanism, combined with "Shifted Sequence" training objective.

HSTUModelConfig(*, cls, verbose, ...)

HSTU model config.

RelativeAttentionBias(session_max_len, ...)

Computes relative time and positional attention biases for STU.

STULayer(n_factors, n_heads, ...)

HSTU author's encoder block architecture rewritten from jagged tensor to dense.

STULayers(n_blocks, n_factors, n_heads, ...)

STULayers transformer blocks.