Skip to main content

Python class

YarnScalingParams

YarnScalingParams

class max.nn.YarnScalingParams(factor, beta_fast, beta_slow, original_max_position_embeddings, truncate)

source

Bases: object

Scaling parameters for YaRN (Yet another RoPE eNhancement) frequency interpolation.

Parameters:

beta_fast

beta_fast: float

source

Yarn parameter for fast frequencies.

beta_slow

beta_slow: float

source

Yarn parameter for slow frequencies.

factor

factor: float

source

Main scaling factor for the frequency components of the rope.

original_max_position_embeddings

original_max_position_embeddings: int

source

The original maximum position length supported by the model.

truncate

truncate: bool

source

Whether to truncate the frequencies or not.