ggml_diag_mask_zero: Diagonal Mask with Zero (Graph)

View source: R/operations.R

ggml_diag_mask_zeroR Documentation

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)

Arguments

ctx

GGML context

a

Input tensor

n_past

Number of past tokens

Value

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


ggmlR documentation built on July 14, 2026, 1:08 a.m.