Table of Contents

Method ReserveKVCache

Namespace
OpenCvSharp.Dnn
Assembly
OpenCvSharp.dll

ReserveKVCache(int)

Reserves key-value cache pages before the first forward pass of a model with paged attention.

public void ReserveKVCache(int maxSequenceLength)

Parameters

maxSequenceLength int

Number of tokens to reserve for. The cache can grow past this length.

Remarks

Call after EnableKVCache(). ResetKVCache() discards the reservation.