Instructions to use mlboydaisuke/Falcon3-3B-Instruct-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use mlboydaisuke/Falcon3-3B-Instruct-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 litert-lm run \ --from-huggingface-repo=mlboydaisuke/Falcon3-3B-Instruct-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use mlboydaisuke/Falcon3-3B-Instruct-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
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: falcon-llm-license
|
| 4 |
+
license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
|
| 5 |
+
base_model: tiiuae/Falcon3-3B-Instruct
|
| 6 |
+
tags:
|
| 7 |
+
- litert
|
| 8 |
+
- litert-lm
|
| 9 |
+
- litertlm
|
| 10 |
+
- on-device
|
| 11 |
+
- edge
|
| 12 |
+
- falcon3
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
library_name: litert-lm
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Falcon3-3B-Instruct — LiteRT-LM (mixed int4)
|
| 18 |
+
|
| 19 |
+
[tiiuae/Falcon3-3B-Instruct](https://huggingface.co/tiiuae/Falcon3-3B-Instruct)
|
| 20 |
+
converted to the **LiteRT-LM** (`.litertlm`) format for on-device inference with
|
| 21 |
+
Google's [LiteRT-LM](https://github.com/google-ai-edge/litert-lm) runtime (the
|
| 22 |
+
engine behind the official `litert-community/*` models).
|
| 23 |
+
|
| 24 |
+
Text-only conversion (the Falcon3 decoder; no vision/audio towers).
|
| 25 |
+
|
| 26 |
+
| | |
|
| 27 |
+
|---|---|
|
| 28 |
+
| **File** | `model.litertlm` (~1.7 GB) |
|
| 29 |
+
| **Quantization** | mixed int4 — weights INT4 (channelwise, symmetric), embeddings INT8 |
|
| 30 |
+
| **Compute** | integer |
|
| 31 |
+
| **Base model** | tiiuae/Falcon3-3B-Instruct |
|
| 32 |
+
| **Decode speed** | ~144 tok/s (Apple Silicon, LiteRT-LM) · ~33 tok/s cold on iPhone 17 Pro GPU |
|
| 33 |
+
| **Context** | 32K |
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
|
| 37 |
+
Run with the LiteRT-LM runtime:
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
# build litert-lm from https://github.com/google-ai-edge/litert-lm, then:
|
| 41 |
+
litert_lm_main \
|
| 42 |
+
--model_path model.litertlm \
|
| 43 |
+
--backend gpu \
|
| 44 |
+
--input_prompt "Explain on-device AI in one sentence."
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
The `.litertlm` bundle carries the tokenizer and the prompt template (Falcon3's
|
| 48 |
+
native `<|user|>` / `<|assistant|>` format, stop token `<|endoftext|>`), so no
|
| 49 |
+
separate tokenizer files are needed.
|
| 50 |
+
|
| 51 |
+
## Quality
|
| 52 |
+
|
| 53 |
+
Scored with an 8-question local quality gate (correctness + degeneracy, the same
|
| 54 |
+
checks as the iOS LLM benchmark), each asked separately on Apple Silicon:
|
| 55 |
+
|
| 56 |
+
| Check | Result |
|
| 57 |
+
|---|---|
|
| 58 |
+
| 17 + 25 = 42 | ✅ |
|
| 59 |
+
| capital of Japan = Tokyo | ✅ |
|
| 60 |
+
| opposite of "hot" = cold | ✅ |
|
| 61 |
+
| days in a week = 7 | ✅ |
|
| 62 |
+
| "thank you" in French = merci | ✅ |
|
| 63 |
+
| 8 × 7 = 56 | ✅ |
|
| 64 |
+
| larger of 0.9 / 0.11 | ✅ |
|
| 65 |
+
| "roses are red, violets are…" = blue | ✅ |
|
| 66 |
+
|
| 67 |
+
**8 / 8 correct, non-degenerate**, and it terminates cleanly at `<|endoftext|>`.
|
| 68 |
+
This is a direct-answering instruct model (no `<think>` block). As expected for a
|
| 69 |
+
3B model at int4, long free-form explanations can show occasional minor artifacts
|
| 70 |
+
(a stray word or brief language mix); short-form answers and reasoning are clean.
|
| 71 |
+
|
| 72 |
+
## On-device
|
| 73 |
+
|
| 74 |
+
Validated on **iPhone 17 Pro** via the LiteRT-LM Swift sample app: loads in ~5 s,
|
| 75 |
+
generates coherent text, ~33 tok/s decode (cold) on the GPU backend.
|
| 76 |
+
|
| 77 |
+
## Conversion
|
| 78 |
+
|
| 79 |
+
Converted with [`litert-torch`](https://github.com/google-ai-edge/litert) using a
|
| 80 |
+
mixed-int4 recipe (INT4 weights channelwise + INT8 embeddings) and Falcon3's
|
| 81 |
+
native chat template. Falcon3-3B is a standard `LlamaForCausalLM` architecture, so
|
| 82 |
+
it rides the existing converter and runtime with no custom code.
|
| 83 |
+
|
| 84 |
+
## License
|
| 85 |
+
|
| 86 |
+
Falcon LLM License (TII), inherited from the base model
|
| 87 |
+
[tiiuae/Falcon3-3B-Instruct](https://huggingface.co/tiiuae/Falcon3-3B-Instruct).
|
| 88 |
+
See https://falconllm.tii.ae/falcon-terms-and-conditions.html
|