Constructor ContextInfo
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
idstringThe stable, unique identifier of the context.
contextLengthintThe context window size, in tokens.
memorySizelongThe main KV-cache plus compute-buffer size in bytes, or
0when hibernated.residencyContextResidencyThe residency of the context.
isInUsebooltruewhen actively held;falsewhen pooled for reuse.deviceNumberintThe device number:
-1for the CPU, otherwise the GPU device number.flashAttentionbooltruewhen flash-attention is enabled.isCachePrioritybooltruewhen the context is pinned against eviction.kvCacheQuantizationKVCacheTypeThe data type (quantization level) of the context's KV-cache.
draftMemorySizelongThe speculative-decoding draft context size in bytes, or
0when there is no separate draft context.outputBufferByteslongThe output/logits buffer size in bytes, or
0when hibernated or unavailable on the running backend.