Constructor ContextInfo
ContextInfo(string, int, long, ContextResidency, bool, int, bool, bool, KVCacheType, long, long, int, int, int, int, int, long, long, bool)
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, int slotCount = 0, int slotContextSize = 0, int busySlots = 0, int queuedRuns = 0, int trackedSessions = 0, long projectedMemorySize = 0, long hibernatedBytes = 0, bool isEmbeddingPool = false)
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.slotCountintThe parallel decoder's slot count when this is a shared decoder context, otherwise
0.slotContextSizeintThe per-slot token window, or
0whenslotCountis0.busySlotsintThe slots decoding a request right now, or
0whenslotCountis0.queuedRunsintThe requests waiting for a free slot, or
0whenslotCountis0.trackedSessionsintThe conversations the decoder tracks on this context, or
0whenslotCountis0.projectedMemorySizelongThe estimated footprint once resident, or
0when the context already is.hibernatedByteslongThe serialized state bytes on disk, or
0when the context is not hibernated.isEmbeddingPoolbooltruewhen the context is an embedding pool whose slot fields carry the pool shape rather than completion decode slots.