Instructions to use meossistant/LFM3-VL-2B-1024-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use meossistant/LFM3-VL-2B-1024-LiteRT 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=meossistant/LFM3-VL-2B-1024-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use meossistant/LFM3-VL-2B-1024-LiteRT 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
LFM3-VL-2B (1024Γ1024, 4096 Context) β LiteRT-LM
Custom LiteRT-LM conversion of LiquidAI/LFM3-VL-2B (revision f83d2b0a) built using the official google-ai-edge/litert-samples (models/lfm/lfm3_vl_2b/converted) recipe with higher image resolution and context length for dense OCR and multilingual translation:
- Image Input Resolution:
1024 Γ 1024(1,024 visual tokens, vs. 512 Γ 512 / 256 tokens in the stock LiteRT build) - Decoder Context Length:
4,096tokens (prefill signatures1024 / 256 / 64 / 16 / 4 / 1) - Quantization: Text decoder INT4 (blockwise-32, scale floor
2^-14) + INT8 output projection & embeddings; vision encoder FP32; projector FP16 - File:
LFM3-VL-2B_int4_1024_ctx4096.litertlm(1.94 GB,2,081,583,136bytes) - SHA-256:
376df546031cc590c88e70ed9758b3cd02c5e9ea1fc66c54cc590e077353d21f - License: LFM Open License v1.0 (same as LiquidAI/LFM3-VL-2B)
Preprocessing Note
Pre-rotate EXIF orientation and resize/pad input images to 1024 Γ 1024 before passing to LiteRT-LM:
from PIL import Image, ImageOps
ImageOps.exif_transpose(Image.open("photo.jpg")).convert("RGB").resize((1024, 1024), Image.BICUBIC).save("photo_1024.png")
- Downloads last month
- 4