Document split body.vmfb + lm_head.vmfb alongside monolithic model.vmfb
Browse files
README.md
CHANGED
|
@@ -16,27 +16,40 @@ pipeline_tag: text-generation
|
|
| 16 |
# LFM2.5-230M — Torq build (Synaptics SL2619 NPU)
|
| 17 |
|
| 18 |
Pre-compiled **Torq VMFB** build of LiquidAI's LFM2.5 230M text language model, ready
|
| 19 |
-
to run on the Synaptics **SL2619** edge NPU.
|
|
|
|
| 20 |
NPU in bf16; the token embeddings run on the host CPU.
|
| 21 |
|
| 22 |
## Contents
|
| 23 |
|
| 24 |
| File | Size | Role |
|
| 25 |
|---|--:|---|
|
| 26 |
-
| `model.vmfb` | 461 MB |
|
|
|
|
|
|
|
| 27 |
| `token_embeddings.npy` | 134 MB | CPU embedding lookup table (bf16) |
|
| 28 |
| `config.json` | — | model configuration |
|
| 29 |
| `tokenizer.json`, `tokenizer_config.json` | — | tokenizer + tokenizer config |
|
| 30 |
| `onnx/model.onnx` (+ `model.onnx_data`) | ~952 MB | reference ONNX export for non-Torq runtimes (e.g. onnxruntime) |
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Model details
|
| 36 |
|
| 37 |
- **Architecture:** LFM2 (`Lfm2ForCausalLM`) — hybrid short-convolution + grouped-query attention.
|
| 38 |
- **Hidden size:** 1024 · **Layers:** 14 · **Attention heads:** 16 (8 KV heads, GQA) · **Intermediate size:** 2560.
|
| 39 |
-
- **Vocabulary:** 65
|
| 40 |
- **Precision:** bf16 on the NPU.
|
| 41 |
- **Target:** Synaptics SL2619, compiled with the Torq compiler.
|
| 42 |
|
|
@@ -44,8 +57,9 @@ reference / portability to other runtimes.
|
|
| 44 |
|
| 45 |
Runs on the Synaptics Torq runtime via
|
| 46 |
[synaptics-torq/torq-examples](https://github.com/synaptics-torq/torq-examples). Place
|
| 47 |
-
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
## License
|
| 51 |
|
|
|
|
| 16 |
# LFM2.5-230M — Torq build (Synaptics SL2619 NPU)
|
| 17 |
|
| 18 |
Pre-compiled **Torq VMFB** build of LiquidAI's LFM2.5 230M text language model, ready
|
| 19 |
+
to run on the Synaptics **SL2619** edge NPU. LFM2 is a hybrid architecture that
|
| 20 |
+
combines short convolutions with grouped-query attention. The transformer runs on the
|
| 21 |
NPU in bf16; the token embeddings run on the host CPU.
|
| 22 |
|
| 23 |
## Contents
|
| 24 |
|
| 25 |
| File | Size | Role |
|
| 26 |
|---|--:|---|
|
| 27 |
+
| `model.vmfb` | 461 MB | **monolithic** build — decoder + LM head in one graph (logits output) |
|
| 28 |
+
| `body.vmfb` | 327 MB | **split** build — decoder body only, emits hidden states (pairs with `lm_head.vmfb`) |
|
| 29 |
+
| `lm_head.vmfb` | 134 MB | **split** build — standalone LM head (hidden → 65 536 logits) |
|
| 30 |
| `token_embeddings.npy` | 134 MB | CPU embedding lookup table (bf16) |
|
| 31 |
| `config.json` | — | model configuration |
|
| 32 |
| `tokenizer.json`, `tokenizer_config.json` | — | tokenizer + tokenizer config |
|
| 33 |
| `onnx/model.onnx` (+ `model.onnx_data`) | ~952 MB | reference ONNX export for non-Torq runtimes (e.g. onnxruntime) |
|
| 34 |
|
| 35 |
+
### Monolithic vs. split
|
| 36 |
+
|
| 37 |
+
Two equivalent ways to run the model (same weights — `body` 327 MB + `lm_head` 134 MB ≈
|
| 38 |
+
the 461 MB monolithic build):
|
| 39 |
+
|
| 40 |
+
- **`model.vmfb` (monolithic):** one graph that outputs logits directly. Simplest to run.
|
| 41 |
+
- **`body.vmfb` + `lm_head.vmfb` (split):** the decoder body emits hidden states and the
|
| 42 |
+
LM head is applied only when sampling. Prefill tokens then skip the large
|
| 43 |
+
`[1024 → 65 536]` LM-head projection, which **lowers time-to-first-token** — pick this
|
| 44 |
+
when TTFT matters.
|
| 45 |
+
|
| 46 |
+
The `onnx/` export is provided for reference / portability to other runtimes.
|
| 47 |
|
| 48 |
## Model details
|
| 49 |
|
| 50 |
- **Architecture:** LFM2 (`Lfm2ForCausalLM`) — hybrid short-convolution + grouped-query attention.
|
| 51 |
- **Hidden size:** 1024 · **Layers:** 14 · **Attention heads:** 16 (8 KV heads, GQA) · **Intermediate size:** 2560.
|
| 52 |
+
- **Vocabulary:** 65 536 · **Context length:** up to 128 k.
|
| 53 |
- **Precision:** bf16 on the NPU.
|
| 54 |
- **Target:** Synaptics SL2619, compiled with the Torq compiler.
|
| 55 |
|
|
|
|
| 57 |
|
| 58 |
Runs on the Synaptics Torq runtime via
|
| 59 |
[synaptics-torq/torq-examples](https://github.com/synaptics-torq/torq-examples). Place
|
| 60 |
+
the model files in a directory and invoke the Torq LLM runner with either `model.vmfb`
|
| 61 |
+
(monolithic) or `body.vmfb` + `lm_head.vmfb` (split, lower TTFT), alongside
|
| 62 |
+
`token_embeddings.npy`, `config.json`, and `tokenizer.json`.
|
| 63 |
|
| 64 |
## License
|
| 65 |
|