IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

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.