rope

package
v0.0.0-...-6e6905b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAttentionFactor

func WithAttentionFactor(attentionFactor float32) func(*Options)

func WithExtrapolationFactor

func WithExtrapolationFactor(extrapolationFactor float32) func(*Options)

func WithFactors

func WithFactors(factors ml.Tensor) func(*Options)

WithFactors sets custom rope factors

func WithOriginalContextLength

func WithOriginalContextLength(n int) func(*Options)

WithOriginalContextLength sets a custom context length

func WithTypeNeoX

func WithTypeNeoX() func(*Options)

WithTypeNeoX sets RoPE type to NeoX

Types

type Options

type Options struct {
	Type                  int
	Factors               ml.Tensor
	OriginalContextLength int

	// YaRN options
	ExtrapolationFactor,
	AttentionFactor,
	BetaFast,
	BetaSlow float32
}

Options contains optional parameters for RoPE function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL