Instructions to use aoiandroid/streamgemma-micro-litert-lm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use aoiandroid/streamgemma-micro-litert-lm with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
StreamGemma-Micro LiteRT-LM (mobile-pair)
This is the mobile-optimized 550M parameter student variant of StreamGemma, compressed via dynamic range INT8 quantization and packaged for the LiteRT-LM execution framework.
It is designed specifically for resource-constrained edge devices (e.g., iPhone 12+, Pixel 6+), requiring a minimal runtime memory footprint of approximately 450 MB.
Model Specifications
- Architecture: StreamGemma-Micro (
mobile-pairvariant) - Parameters: ~550M (d_model=512, 10 transformer layers)
- Precision: Dynamic range INT8 quantization
- Vocab Size: 256,000
- Supported Languages: Tier S priority languages (
eng,jpn,cmn) - Key Pipeline Features:
- Auto-regressive Text Prefill & Generation
- Language Identification (LID)
- Speculative Decoding support
Text-Only Translation Model: This Micro variant is designed specifically for text-to-text translation (machine translation) on-device. It does not contain an
audio_modelor a TTS (text-to-speech) head to keep its size and memory footprint optimal. For end-to-end speech-to-speech, please refer to the unreduced 2.2B models.
Bundle Files
The repository contains:
streamgemma-micro.litertlm: The official unified LiteRT-LM model container file packed usinglitert-lm-builder.README.md: Model card.streamgemma_banner.jpg: Banner asset.
Deployment with streamgemma-litert-lm
This model can be run directly using the cross-platform msandroid/streamgemma-litert-lm SDKs (Python, Android Kotlin, iOS Swift, Web TypeScript, Flutter, C++, Rust).
Python Example
import numpy as np
from streamgemma_litert import StreamGemmaEngine, EngineConfig, SessionConfig
# Initialize the engine with the .litertlm file
config = EngineConfig(model_path="path/to/streamgemma-micro.litertlm")
engine = StreamGemmaEngine(config)
# Start a translation session
session = engine.create_session(SessionConfig())
# Feed input tokens (shape [1, 128])
input_tokens = np.array([[2, 101, 102, 103] + [0]*124], dtype=np.int32)
result = session.feed_text(input_tokens)
print(f"[{result.source_language}] {result.text}")
- Downloads last month
- -
