Instructions to use litert-community/SmolLM2-1.7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/SmolLM2-1.7B-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 litert-lm run \ --from-huggingface-repo=litert-community/SmolLM2-1.7B-Instruct \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/SmolLM2-1.7B-Instruct 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
SmolLM2-1.7B-Instruct (LiteRT-LM)
This repository hosts the LiteRT-LM (LiteRT, formerly known as TensorFlow Lite) version of HuggingFaceTB/SmolLM2-1.7B-Instruct, optimized for on-device inference across Android, desktop, and edge hardware.
Available Models
SmolLM2-1_7B-Instruct_dynamic_wi8_afp32.litertlm:- Quantization: Dynamic weight-only INT8 quantization (
wi8) with FP32 activations (afp32). - Hardware Optimization: Converted via
litert-torchwith boolean attention masks and fused GPU composite operations enabled for high-throughput GPU and CPU execution.
- Quantization: Dynamic weight-only INT8 quantization (
Use the Model
1. Edge Gallery App (Android)
You can run this model directly on Android using the official Google AI Edge Gallery app:
- Get the App: Install the app from Google Play or download the latest APK from the GitHub releases page.
- Import the Model: Navigate to the Model manager within the app and tap the "+" (plus) icon in the bottom-right corner:
- Import from HF (Recommended): Select this option, enter
litert-community/SmolLM2-1.7B-Instruct, and submit to download directly inside the app. - From local model file: Download
SmolLM2-1_7B-Instruct_dynamic_wi8_afp32.litertlmdirectly to your Android device (or push it via ADB:adb push SmolLM2-1_7B-Instruct_dynamic_wi8_afp32.litertlm /sdcard/Download/), select the file from storage, choose your preferred backend (GPU or CPU), and tap "Import". For full details on importing models and building from source, see the Edge Gallery App Wiki.
- Import from HF (Recommended): Select this option, enter
2. Try It (Desktop / CLI)
Install uv and run the model directly from the LiteRT-LM command line:
uv tool install litert-lm
uvx litert-lm run \
--from-huggingface-repo=litert-community/SmolLM2-1.7B-Instruct \
SmolLM2-1_7B-Instruct_dynamic_wi8_afp32.litertlm \
--prompt="What is the capital of France?"
- Downloads last month
- 4
Model tree for litert-community/SmolLM2-1.7B-Instruct
Base model
HuggingFaceTB/SmolLM2-1.7B Quantized
HuggingFaceTB/SmolLM2-1.7B-Instruct