Stage: Before the Loop
Fig 1.1: Physical Resource Allocation on CreateEngine
DLL_EXPORT void* LiteRtLm_CreateEngine(LiteRtLm_Config config);
NULL.void* handle; type casting on the UE5 side is prohibited.Determines the physical pre-allocation size for KV Cache. Once allocated, VRAM usage is fixed.
Formula: VRAM ≈ Weights + (Tokens * 128 KB)
Mandatory for UE5. Set to 1 to compile PSOs at load time, eliminating frame drops on the first token.
model_path uses mmap. Corrupted model files or invalid paths will cause a direct process crash; verify physical existence before calling.
Environment probing interface. Returns a string of system acceleration capabilities (e.g., "gpu,cpu").