Skip to content

Track and retire LiteRT-LM downstream speech/runtime workarounds #19

Description

@leehack

Summary

Track the downstream compatibility surface introduced by #18 and published in
v0.16.0-native.2, then retire each workaround only after an upstream tagged release and representative real-device validation make it safe.

Current downstream-owned pieces:

  • versioned litert_lm_asr_* C ABI over LiteRT-LM's C++-only AsrEngine and AsrSession
  • bounded push-PCM AudioSource needed for incremental callers and backpressure
  • iOS framework-relative loader paths for the LiteRT Metal accelerator and LiteRT-LM Metal sampler
  • checksum-pinned Android Dawn rollback used by the v0.16 runtime on arm64/x64

These should remain explicit compatibility layers, not silently become permanent forks.

Upstream references

Work

ASR C ABI

  • Monitor official LiteRT-LM release notes and c/ headers for a supported ASR ABI and packaged ASR symbols.
  • Compare any upstream ABI with the behavior downstream currently needs: push PCM, bounded backpressure, confirmed/unconfirmed text, finish/reset, cancellation, and model configuration.
  • Prefer migrating to an official ABI over expanding the downstream bridge.
  • Keep bridge compatibility until downstream llamadart has passed published-artifact and real-model migration gates.

Apple framework loader patches

  • Keep both loader changes declarative and reviewable; replace the imperative sampler_factory.cc text rewrite with a checked-in patch.
  • Track the accelerator fix through LiteRT #7219 and obtain an upstream equivalent for the Metal sampler path.
  • Remove each patch only when the exact LiteRT/LiteRT-LM tag contains the corresponding fix.
  • Revalidate iOS device and Simulator packaging, code signing, framework lookup, Gemma GPU generation, and ASR after removal.

Android Dawn rollback

  • File or link an upstream report containing the exact v0.16 Pixel 9 Pro VK_ERROR_DEVICE_LOST reproduction and rollback evidence.
  • Keep the override isolated by upstream tag, architecture, source commit, and SHA-256.
  • Remove it only after the tagged replacement passes repeated Gemma 4 GPU correctness and stability gates on the affected Pixel/Mali path.

Provenance and compatibility

  • Record the resolved upstream Git commit in manifest.json; do not leave upstream.commit null.
  • Record every applied source patch and its SHA-256 in the manifest, separately from prebuilt binary overrides.
  • Replace the broad v0.16.0 or newer ASR compatibility rule with an explicit tested-version mapping or an equivalent fail-closed capability rule.
  • Keep native release tags immutable. Any packaging/provenance correction after .2 must use a new release tag.

Completion criteria

Close this tracker only when every retained workaround has either been removed after the gates above or split into a narrower issue with a named owner, upstream reference, and removal condition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:P3Watch or strategic work blocked by upstream/runtime/design dependencies

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions