Learn R Programming

ggmlR (version 0.6.1)

ggml_soft_max_ext_inplace: Extended Softmax Inplace (Graph)

Description

Creates a graph node for extended softmax, modifying input tensor in place. Returns a view of the input tensor.

Usage

ggml_soft_max_ext_inplace(ctx, a, mask = NULL, scale = 1, max_bias = 0)

Value

View of input tensor with softmax applied in place

Arguments

ctx

GGML context

a

Input tensor (typically attention scores)

mask

Optional attention mask tensor (F16 or F32). NULL for no mask. Shape must be broadcastable to input tensor.

scale

Scaling factor, typically 1/sqrt(head_dim)

max_bias

Maximum ALiBi bias (0.0 to disable ALiBi)

See Also

Other softmax: ggml_soft_max_ext_back_inplace()