Table of Contents

Constructor ContextInfo

Namespace
LMKit.Inference
Assembly
LM-Kit.NET.dll

ContextInfo(string, int, long, ContextResidency, bool, int, bool, bool, KVCacheType, long, long)

Initializes a new ContextInfo snapshot.

public ContextInfo(string id, int contextLength, long memorySize, ContextResidency residency, bool isInUse, int deviceNumber, bool flashAttention, bool isCachePriority, KVCacheType kvCacheQuantization, long draftMemorySize = 0, long outputBufferBytes = 0)

Parameters

id string

The stable, unique identifier of the context.

contextLength int

The context window size, in tokens.

memorySize long

The main KV-cache plus compute-buffer size in bytes, or 0 when hibernated.

residency ContextResidency

The residency of the context.

isInUse bool

true when actively held; false when pooled for reuse.

deviceNumber int

The device number: -1 for the CPU, otherwise the GPU device number.

flashAttention bool

true when flash-attention is enabled.

isCachePriority bool

true when the context is pinned against eviction.

kvCacheQuantization KVCacheType

The data type (quantization level) of the context's KV-cache.

draftMemorySize long

The speculative-decoding draft context size in bytes, or 0 when there is no separate draft context.

outputBufferBytes long

The output/logits buffer size in bytes, or 0 when hibernated or unavailable on the running backend.

Share