Winyunq Industrial Core / API Layer Documentation
void* handles. The lifetime, symbols, and memory layout of all underlying C++ objects are completely hidden by the DLL.
Conversation handle owns a dedicated physical slice in VRAM of max_num_tokens size.
SendChatRequest. TTFT < 100ms.
LoadModel(const FLiteRtLmConfig& Config)
STATIC
Loads the .tflite model from the specified path and initializes the underlying runtime. Pre-requisite for all inference ops.
SendChatRequest(void* SessionKey, const TArray<...>& Messages, ...)
STATIC
Sends a chat request. The system compares the history for the SessionKey and only syncs new message chunks (Incremental Sync), significantly boosting speed.
OnChunk triggers on Game Thread for UI safety.ReleaseSession(void* SessionKey)
STATIC
Manually releases the KV Cache slot for a specific session. Call when an NPC is destroyed.
GetAutoConfig()
STATIC
Probes VRAM via DXGI and generates optimal thread count and KV slot configurations.
Model weights are mounted via mmap, avoiding redundant memory copies during cold starts.
Each void* SessionKey maps to a LlamaIndex, corresponding to a fixed stride offset in VRAM.
The underlying WaitUntilDone is blocking. It is isolated via Unreal's AsyncTask to prevent main thread stalls.
Once loaded, the model occupies several GBs of VRAM. UnloadModel must be called during level transitions.