Skip to content

LiteRTDemo v5.1.0 - C++ SDK, Multi-Conversation & Android Memory Tuning

Latest

Choose a tag to compare

@winyunq winyunq released this 18 Jul 03:27

LiteRTDemo v5.1.0 — C++ SDK、多对话与 Android 内存调参

这是当前 Win11 / Android 可运行 Demo 的二进制发布。它把插件的场景层 C++ API、多人独立对话与移动端诊断放到同一条可验证路径中。

这次更新

  • 单对话兼容层:ULiteRtLmQuickChat 自动持有一段普通 Agent 对话,支持整段与流式回答。
  • 多对话:每个 NPC / 狼人杀座位持有独立 ULiteRtLmAgent;Prompt、私密信息和记忆隔离,但共享同一 Runtime 与模型。
  • 狼人杀公开事件由游戏状态层写入相关 Agent 的记忆,不用“该信息已公开”之类的提示词补丁;自爆与投票测试可以据此区分记忆路由问题和模型决策问题。
  • C++ 插件接口覆盖 Quick Chat、Agent、Runtime、Memory、Tools、MCP Gateway、Diagnostics 和可选 Native SDK / C ABI,避免在玩法模块重复实现插件已有功能。
  • Android 在 Native 模型创建前查询总内存、当前可用内存与进程内存,并把配置上下文保守限制到 4K / 8K / 16K / 32K 档位。运行时可通过 GetMemoryPlan() 读取实际选择。
  • 增加 ADB 崩溃采集脚本,可导出设备内存、GPU / 驱动、Logcat、应用信息和 Android 进程退出原因。
  • Win64 与 Android 均使用匹配的 Wrapper / LiteRT 运行时,并在打包阶段检查 ABI 符号、依赖闭包和模型内容。

下载与重组

GitHub 单个 Release 资产有大小限制,因此 Windows ZIP 和 Android APK 被拆成 500 MB 分卷。最简单的用法:

  1. 下载 Assemble-LiteRTDemo-v5.1.0.ps1
  2. 在空目录中执行以下一条命令;脚本会自动下载、逐卷校验并重组最终文件。
# Android ARM64
powershell -ExecutionPolicy Bypass -File .\Assemble-LiteRTDemo-v5.1.0.ps1 -Target Android -Download

# Windows 11
powershell -ExecutionPolicy Bypass -File .\Assemble-LiteRTDemo-v5.1.0.ps1 -Target Windows -Download

最终文件:

  • LiteRTDemo-Android-Shipping-arm64.apk — 2,713,562,348 bytes
    SHA-256 50776C27591DE810E55E38497FBC28772500548A07A899FC1DE7EAEDB84E71BE
  • LiteRTDemo-Windows-v5.1.0.zip — 2,513,066,394 bytes
    SHA-256 8640B2C5E40528C948057887C16A5312593410CECF36F6A4EE9096F3D7145376

已完成的发布验证

  • UE Shipping 编译、Cook、Stage 与 Archive:Win64、Android ARM64 通过。
  • Windows 压缩包完整性测试通过,打包程序启动 25 秒无启动崩溃。
  • Android:单 APK / 无 OBB、minSdk 26、targetSdk 34、versionCode 6、四个模型分块、AArch64 原生库依赖闭包、Wrapper/Core ABI 导出与 APK v2 签名检查通过。
  • 本地分卷已按 Release 清单重组,最终 SHA-256 与上面数值一致。
  • 狼人自爆投票测试脚本的静态自检通过;发布时显卡剩余显存不足,未强行关闭用户正在运行的 Unreal Editor,因此本轮没有重新执行完整 GPU 对局。

Android 说明

本 APK 是用于 Demo 与故障定位的 ARM64 UE Shipping 包,但使用 Android debug 证书;它不是 Google Play Distribution / AAB 成品。发布时没有连接物理 ARM64 手机,因此不把构建检查等同于真机 GPU 推理通过。若推理闪退,请运行 Release 中的 Collect-LiteRTDemoAndroidCrash.ps1,复现一次后提供生成的日志目录。

文档

Source archive notice

Per the project publication policy, this release does not push the current plugin or Demo source changes to the public repository. The tag points at the existing public Demo commit, while the attached, hash-verified binaries contain the newer maintained plugin / Blueprint build. Consequently, GitHub's automatically generated “Source code” archives do not reproduce these binary assets. Use the attached packages for v5.1.0 evaluation.


English summary

v5.1.0 ships the current Windows 11 and ARM64 Android demo with public C++ Quick Chat / Agent / Runtime / MCP surfaces, one persistent Agent per Werewolf role, device-memory-aware Android context tuning, and an ADB crash collector. Packages are split into 500 MB parts and are reconstructed plus SHA-256 verified by the included PowerShell script. The Android artifact is debug-certificate signed for demo/diagnostics and was not tested on a connected physical phone during publication.