mlboydaisuke commited on
Commit
792b4b3
·
verified ·
1 Parent(s): 80847f8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +88 -0
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