Learn R Programming

ggmlR (version 0.6.1)

ggml_diag_mask_zero: Diagonal Mask with Zero (Graph)

Description

Creates a graph node that sets elements above the diagonal to 0. Alternative to -Inf masking for certain use cases.

Usage

ggml_diag_mask_zero(ctx, a, n_past)

Value

Tensor with same shape as input, elements above diagonal set to 0

Arguments

ctx

GGML context

a

Input tensor

n_past

Number of past tokens