Instructions to use litert-community/gemma-4-E2B-it-litert-lm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/gemma-4-E2B-it-litert-lm with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=litert-community/gemma-4-E2B-it-litert-lm \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
New gemma-4-E2B-it.litertlm broken!
Can you share which changes you just updated for gemma-4-E2B-it.litertlm and gemma-4-E4B-it.litertlm.
I saw an error on my side.
Unable to translate text: Exception: Failed to create engine. Model may be invalid: gemma-4-E2B-it.litertlm
Thank you for reporting!
What platform (Android, iOS, MacOS, Windows, Linux, etc) were you running on? Were you running with the AI Edge Gallery apps, LiteRT-LM CLI or using a different method?
If it was a model download in the last ~18hrs AND you are using the AI Edge Gallery app on Android or iOS, I think it might be the same issue as https://huggingface.co/litert-community/gemma-4-E2B-it-litert-lm/discussions/17. It should be solved by updating to the latest version of the AI Edge Gallery app.
I just try new version of AI Edge Gallery, but the latency will not changes, it still not support specula decoding right ?
Hey, in Gallery you need to go to the configuration page and turn on "Enable speculative decoding" toggle. Speculative decoding is off by default. So you can go to a task (e.g. AI Chat) and in the chat view, tap the configuration button at top right. And you need to make sure you download the latest model.