Skip to content

Conversation

@copybara-service
Copy link
Contributor

Speculative partial fix for #4727

We need to pick up commit bazelbuild/apple_support@44c43c7 in every dependency of LiteRT LM.

gcarranza-1 and others added 30 commits November 7, 2025 13:49
… limits.

LiteRT-LM-PiperOrigin-RevId: 829572476
1. provide a real example of using the Kotlin API
1. make it very simple to try out the Kotlin API from source

**To run it with bazel**:
```
bazel run -c opt //kotlin/java/com/google/ai/edge/litertlm/example:main -- <abs_model_path>
```

**To build a standalone binary and run**:
```
bazel build -c opt //kotlin/java/com/google/ai/edge/litertlm/example:main_deploy.jar

./bazel-bin/kotlin/java/com/google/ai/edge/litertlm/example/main_deploy.jar -- <abs_model_apth>
```

LiteRT-LM-PiperOrigin-RevId: 829573268
LiteRT-LM-PiperOrigin-RevId: 829591297
LiteRT-LM-PiperOrigin-RevId: 829596495
LiteRT-LM-PiperOrigin-RevId: 829635897
1. add jvm_flags to get rid of the warning message
2. fix typo in bazel command

LiteRT-LM-PiperOrigin-RevId: 829699946
Printing the message as string is a very common use case. Make it super simple.

If there is image / audio output in the future, then the toString() of them is something like: `Content(AudioFile("/path/to/file"))`

LiteRT-LM-PiperOrigin-RevId: 829877174
Extends the `Message.of(content)` to `Message.of(content1, content2, content3, ...)`. It still works with only one content.

LiteRT-LM-PiperOrigin-RevId: 830494523
Apple devices perform better with Buffers.

LiteRT-LM-PiperOrigin-RevId: 830924175
Add `__declspec(dllexport)` when building for Windows so the .dll has the exported symbols. https://learn.microsoft.com/en-us/cpp/cpp/using-dllimport-and-dllexport-in-cpp-classes

LiteRT-LM-PiperOrigin-RevId: 830991930
See Main.kt :-)

This `Flow` approach is also faster than the callback approach because it does not wait for the `onMessage()` logic.

LiteRT-LM-PiperOrigin-RevId: 831131771
LiteRT-LM-PiperOrigin-RevId: 831181727
LiteRT-LM-PiperOrigin-RevId: 831194431
Used Options::GetGpuOptions().
The new Create() method takes non-const reference to Options object.

LiteRT-LM-PiperOrigin-RevId: 831216121
LiteRT-LM-PiperOrigin-RevId: 831627364
LiteRT-LM-PiperOrigin-RevId: 831637934
LiteRT-LM-PiperOrigin-RevId: 831948857
The new API doesn't require Model but create it internally with model_filename
or model_buffer.
Also users can get Signature from CompiledModel directly.

LiteRT-LM-PiperOrigin-RevId: 832038920
LiteRT-LM-PiperOrigin-RevId: 832039059
… cache directory settings to LiteRT-LM C

LiteRT-LM-PiperOrigin-RevId: 832381402
LiteRT-LM-PiperOrigin-RevId: 832406710
…thod returns null.

LiteRT-LM-PiperOrigin-RevId: 832500201
…edHostMemory when environment is not needed.

LiteRT-LM-PiperOrigin-RevId: 832519936
- Add sample code for a chat app and animation demo. And a Bazel command to quickly try it.
- Mention JVM support, in additional to the original Android support.

LiteRT-LM-PiperOrigin-RevId: 832701364
LiteRT-LM-PiperOrigin-RevId: 833396367
hheydary and others added 20 commits January 22, 2026 09:24
LiteRT-LM-PiperOrigin-RevId: 859642028
When context length is big, it increase init time noticeably, e.g. 8s when context length = 32k for gemma3-1b.

LiteRT-LM-PiperOrigin-RevId: 859666933
LiteRT-LM-PiperOrigin-RevId: 859859182
LiteRT-LM-PiperOrigin-RevId: 859875851
LiteRT-LM-PiperOrigin-RevId: 859999259
LiteRT-LM-PiperOrigin-RevId: 860120569
The given option is true by default and used to set the mmap'ed memory for
shared weights are swapped out to reduce memory footprint.
When memory is swapped out, all the temporary changes made by magic numbers
are reverted. So, when magic numbers are used, the give flags must be disabled.

LiteRT-LM-PiperOrigin-RevId: 860150634
LiteRT-LM-PiperOrigin-RevId: 860278850
We will remove the `--hk_token`. The environment is the only way to set the token.

LiteRT-LM-PiperOrigin-RevId: 860319701
LiteRT-LM-PiperOrigin-RevId: 860320494
- Add TensorBuffer Clear method
- Replace @local_xla with @xla

LiteRT-LM-PiperOrigin-RevId: 860680613
LiteRT-LM-PiperOrigin-RevId: 861221697
LiteRT-LM-PiperOrigin-RevId: 861230859
This is similar to the existing weight cache support that
XNNPack uses.

LiteRT-LM-PiperOrigin-RevId: 861245691
…ternal constraints and LLGuidance.

LiteRT-LM-PiperOrigin-RevId: 861255750
…bled by checking whether there is corresponding `is_appending_to_prefill` in the jinja template. Templates with such capability can support multi-prefill.

LiteRT-LM-PiperOrigin-RevId: 861409419
@copybara-service copybara-service bot force-pushed the litert_lm_pr_861425587 branch from fccfb75 to c9066b1 Compare January 27, 2026 01:48
ai-edge-bot and others added 5 commits January 26, 2026 18:46
LiteRT-LM-PiperOrigin-RevId: 861449983
LiteRT-LM-PiperOrigin-RevId: 861460877
* Use LFS (Large File Storage) to prebuilt binaries

* Enable LFS in workflows
We need to pick up commit bazelbuild/apple_support@44c43c7 in every dependency of LiteRT LM.

LiteRT-LM-PiperOrigin-RevId: 861425587
@copybara-service copybara-service bot force-pushed the litert_lm_pr_861425587 branch from c9066b1 to a1fd171 Compare January 27, 2026 18:41
@protobird-git protobird-git deleted the litert_lm_pr_861425587 branch February 1, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.