LiteRT
Collection
LiteRT is Google's on-device framework for high-performance ML & GenAI deployment on edge platforms. • 5 items • Updated • 1
How to use NeuML/granite-4.0-350m-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=NeuML/granite-4.0-350m-litert-lm \ --prompt="Write me a poem"
Granite-4.0-350M LiteRT-LM model.
This can be run in txtai using the following code.
from txtai import LLM
llm = LLM("neuml/granite-4.0-350m-litert-lm/granite-4.0-350m.litertlm")
llm("Run a prompt here")
Created using the following code.
# pip install litert-torch
from litert_torch.generative.export_hf.export import export
export(
model="ibm-granite/granite-4.0-350m",
output_dir="output",
externalize_embedder=True,
)
Base model
ibm-granite/granite-4.0-350m-base
# 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=NeuML/granite-4.0-350m-litert-lm \ --prompt="Write me a poem"