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 # 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=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
Update card: blockwise int4 + GSM8K parity table
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ pipeline_tag: text-generation
|
|
| 14 |
library_name: litert-lm
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# Falcon3-3B-Instruct β LiteRT-LM (
|
| 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
|
|
@@ -25,12 +25,12 @@ Text-only conversion (the Falcon3 decoder; no vision/audio towers).
|
|
| 25 |
|
| 26 |
| | |
|
| 27 |
|---|---|
|
| 28 |
-
| **File** | `model.litertlm` (~1.
|
| 29 |
-
| **Quantization** |
|
| 30 |
| **Compute** | integer |
|
|
|
|
| 31 |
| **Base model** | tiiuae/Falcon3-3B-Instruct |
|
| 32 |
-
| **Decode speed** | ~
|
| 33 |
-
| **Context** | 32K |
|
| 34 |
|
| 35 |
## Usage
|
| 36 |
|
|
@@ -48,38 +48,31 @@ 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 |
-
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
-
|
|
| 57 |
|---|---|
|
| 58 |
-
|
|
| 59 |
-
|
|
| 60 |
-
|
|
| 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 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 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 |
-
|
| 81 |
-
native chat template. Falcon3-3B is a
|
| 82 |
-
it rides the existing converter and
|
|
|
|
|
|
|
| 83 |
|
| 84 |
## License
|
| 85 |
|
|
|
|
| 14 |
library_name: litert-lm
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Falcon3-3B-Instruct β LiteRT-LM (blockwise 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
|
|
|
|
| 25 |
|
| 26 |
| | |
|
| 27 |
|---|---|
|
| 28 |
+
| **File** | `model.litertlm` (~1.86 GB) |
|
| 29 |
+
| **Quantization** | int4 weights β **blockwise (block 32)**, symmetric; embeddings INT8 |
|
| 30 |
| **Compute** | integer |
|
| 31 |
+
| **Context (KV cache)** | 4096 |
|
| 32 |
| **Base model** | tiiuae/Falcon3-3B-Instruct |
|
| 33 |
+
| **Decode speed** | ~101 tok/s (Apple Silicon, CPU, LiteRT-LM, greedy) |
|
|
|
|
| 34 |
|
| 35 |
## Usage
|
| 36 |
|
|
|
|
| 48 |
native `<|user|>` / `<|assistant|>` format, stop token `<|endoftext|>`), so no
|
| 49 |
separate tokenizer files are needed.
|
| 50 |
|
| 51 |
+
## Quality β GSM8K parity
|
| 52 |
|
| 53 |
+
Measured on GSM8K (n=100, greedy, 0-shot chain-of-thought asking for `#### <n>`,
|
| 54 |
+
identical prompt and answer-extraction for every row). The 4-bit MLX build is the
|
| 55 |
+
known-good 4-bit control:
|
| 56 |
|
| 57 |
+
| Configuration | GSM8K |
|
| 58 |
|---|---|
|
| 59 |
+
| bf16 (reference) | 75% |
|
| 60 |
+
| MLX 4-bit (control) | 76% |
|
| 61 |
+
| **This model β LiteRT int4** | **79%** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
LiteRT int4 is fully at parity β it matches or slightly exceeds both the 4-bit
|
| 64 |
+
control and bf16 here (the small spread is sampling noise at n=100). This is a
|
| 65 |
+
direct-answering instruct model (no `<think>` block) and terminates cleanly at
|
| 66 |
+
`<|endoftext|>`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
## Conversion
|
| 69 |
|
| 70 |
Converted with [`litert-torch`](https://github.com/google-ai-edge/litert) using a
|
| 71 |
+
**blockwise int4** recipe (INT4 weights, block size 32, symmetric) with embeddings
|
| 72 |
+
kept at INT8, KV cache 4096, and Falcon3's native chat template. Falcon3-3B is a
|
| 73 |
+
standard `LlamaForCausalLM` architecture, so it rides the existing converter and
|
| 74 |
+
runtime with no custom code. Blockwise (not channelwise) int4 is what preserves
|
| 75 |
+
reasoning accuracy.
|
| 76 |
|
| 77 |
## License
|
| 78 |
|