GenAI
Collection
Generative AI on device: LLMs, VLMs, audio-LMs (speech LMs), embeddings, and text-to-image โ LiteRT / LiteRT-LM ready. โข 76 items โข Updated โข 5
How to use litert-community/SmolLM2-135M-Instruct 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 # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=litert-community/SmolLM2-135M-Instruct \ --prompt="Write me a poem"
This model provides a variant of HuggingFaceTB/SmolLM2-135M-Instruct that is ready for deployment on Android using the LiteRT-LM.
Download or build the app from GitHub.
Install the app from Google Play.
Follow the instructions in the app.
To build the demo app from source, please follow the instructions from the GitHub repository.
Base model
HuggingFaceTB/SmolLM2-135M
# 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 # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=litert-community/SmolLM2-135M-Instruct \ --prompt="Write me a poem"