Architecture Overview

litert_lm_wrapper.dll is a deep convergence of over 70 industrial-grade integration items. This page fully lists every engineering component involved in compilation and linking. The breadth of this data represents the depth of our work.

I. Core Inference Framework

ComponentLicenseStatusResponsibilities
LiteRT (Google)Apache-2.0PATCHEDCore inference kernel; refactored include paths and fixed MSVC symbol conflicts.
TensorFlow CoreApache-2.0PATCHEDBase operator library and multi-thread scheduling optimization.
rules_ml_toolchainApache-2.0INTEGRATEDManages hermeticity of GPU (CUDA/CUDNN) compilation environment.
bazel-toolchainsApache-2.0INTEGRATEDCross-platform toolchain configuration set.

II. Logic Constraints & Integration Matrix

llguidanceMIT5x PATCHEDMicrosoft constraint framework. Deeply tuned sub-modules including RegexVec, Grammar, and Parser.
toktrieMITPATCHEDEfficient Token retrieval Trie tree, supporting complex grammar validation.
antlr4rustBSD-3-ClauseINTEGRATEDRust grammar parser core, supporting structured output parsing.
antlr_fc_tool_call_parserCustomINTEGRATEDIntegrated Function Call tool call parser A.
antlr_python_tool_call_parserCustomINTEGRATEDIntegrated Python-style tool call parser B.
json_parserCustomINTEGRATEDDedicated JSON structure validity checker.
python_parserCustomINTEGRATEDPython code block semantic parsing component.
fc_parserCustomINTEGRATEDGeneric tool call protocol conversion parser.

III. Tokenization & Template Rendering

sentencepieceApache-2.0REFACTOREDTokenizer source refactored; severed full Abseil dependency for Unreal compatibility.
Minja (C++)Apache-2.0PATCHEDFixed parser crash when handling extremely large JSON payloads.
minijinja (Rust)Apache-2.0INTEGRATEDHigh-performance Rust template engine.
tokenizers-cppApache-2.0INTEGRATEDHuggingFace protocol C++ bridge.
tokenizers (Rust)Apache-2.0INTEGRATEDHuggingFace tokenization core Rust runtime.
nanobind_jsonMITPATCHEDJSON binding layer adaptation patch.

IV. Build Rules & Toolchain Support

rules_rustApache-2.0PATCHEDManages Rust toolchain; handles symbol visibility on Windows.
rules_pythonApache-2.0INTEGRATEDHermetic Python build environment.
rules_appleApache-2.0INTEGRATEDiOS platform build support.
rules_swiftApache-2.0INTEGRATEDSwift library integration.
rules_kotlinApache-2.0INTEGRATEDAndroid Kotlin support.
rules_shellApache-2.0INTEGRATEDCross-platform script execution rules.
rules_platformApache-2.0INTEGRATEDPlatform abstraction descriptions.
platformsApache-2.0INTEGRATEDBase platform configurations.
bazel_featuresApache-2.0INTEGRATEDVersion feature detection library.
apple_supportApache-2.0INTEGRATEDApple compilation helper set.
rules_jvm_externalApache-2.0INTEGRATEDJava dependency management.
cxxbridge_cmdMIT/ApacheINTEGRATEDC++/Rust bridge code generator.

V. Hardware Vendor Acceleration Layer

Qualcomm QAIRTProprietaryINTEGRATEDSnapdragon NPU driver-level integration.
MediaTek NeuroPilotProprietaryINTEGRATEDDimensity APU adaptation layer integration.
Google Tensor SDKProprietaryINTEGRATEDPixel TPU hardware acceleration.
WebGPU (Dawn/WGPU)BSD-3-ClauseINTEGRATEDCross-platform GPU inference abstraction.
XNNPACKApache-2.0INTEGRATEDHigh-performance CPU inference operator acceleration.
CUDA / CUDNN / NCCLNVIDIAINTEGRATEDDesktop GPU deep computing acceleration.

API Symbol Index

VRAM Topology

graph TD subgraph GPU[GPU VRAM - Hot Zone] W[Model Weights] AC[Active KV Cache] end subgraph RAM[System RAM - Cold Zone] IC[Inactive Agent Caches] end AC --- RAM