Repository navigation
feat(litert): add a LiteRT-LM provider built on react-native-litert-lm - #376
Draft
john-rocky wants to merge 1 commit into
Draft
john-rocky wants to merge 1 commit into
john-rocky wants to merge 1 commit into
Conversation
|
@john-rocky is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@react-native-ai/litert, an AI SDK provider for LiteRT-LM, built on react-native-litert-lm. It runs.litertlmmodels on iOS and Android, with generation, streaming, tool calling and structured output.Sampling and tools apply when the model loads, so changing them between calls reloads the model and returns a warning. Options the runtime doesn't support return an
unsupportedwarning.Given a Hugging Face repo, the provider picks the file: the GPU-only file on iOS and the full bundle on Android, because the GPU-only Gemma 4 E2B file gave wrong text, with no error, on a Pixel 11 Pro.
Docs are in
website/src/content/docs/docs/litert/, and the root README gets a row and a section.Test plan
litert-community/gemma-4-E2B-it-litert-lm, 30 checks pass on a Pixel 11 Pro (Android 17) and on an iPhone 18 Pro (iOS 27.2). They cover generation, streaming, tools, structured output, conversations, and these failures: no such file or repo, a broken or truncated file, an abort during a load and during a call, a tool call that doesn't parse (injected), tool arguments that fail the schema, and a prompt that's too long.backend: 'npu',speculativeDecoding, a repo with alitertlm_manifest.json, a gated model'saccessToken, and Android asking for memory back.apps/exampleorharnessyet.