Skip to content

Release v0.15.2

Choose a tag to compare

@DenisovAV DenisovAV released this 16 May 11:28
· 951 commits to main since this release
0b8058d

Unified embedding on LiteRT C API + Dart FFI on all native platforms (#264).

What changed

  • Single Dart-side LitertEmbeddingModel runs on Android, iOS, macOS, Linux, Windows via dart:ffi against the LiteRT C API. The LiteRT runtime is already shipped in the native bundle for inference accelerators — no new native dep.
  • Three legacy implementations deleted: Android localagents-rag JVM lib, iOS TensorFlowLiteC pod + Swift tokenizer hierarchy, Desktop libtensorflowlite_c.{dylib,so,dll} tarball.
  • TaskType.prefix is now the single source of truth for retrievalQuery / retrievalDocument prefix strings — fixes the cross-platform drift that caused #264 by construction.
  • Windows LiteRtLayout MSVC vs GCC/Clang bit-field ABI handled via dual-layout FFI structs (LiteRtLayoutPosix / LiteRtLayoutMsvc + View helper).

Verification

Cross-platform RAG drift verified <0.003 on six platforms × two embedding models (Gecko 110M, EmbeddingGemma 300M):

macOS iOS Sim iPhone Pixel 8 Linux T4 Windows MSVC
Gecko 64 climate↔warming 0.9161 0.9161 0.9161 0.9168 0.9163 0.9163
EmbeddingGemma 256 climate↔warming 0.8695 0.8695 0.8695 0.8689 0.8668 0.8668

Full 18-test litertlm_ffi_test.dart integration suite green on macOS, Linux T4, Windows NPU VM (Intel Lunar Lake), Pixel 8.

Breaking changes

  • EmbeddingInstallationBuilder.tokenizerFromNetwork/Asset/Bundled/File: removed the iOS-only iosPath / iosToken parameters. They were no-ops since 0.15.2 (same tokenizer on every platform now). Callers that omit them are unaffected; callers that pass them need to remove the named arg.

See CHANGELOG.md and the migration story in the PR description for the full diff.