dgarrett-synaptics's picture
Update README.md
7ac850b verified
|
Raw
History Blame Contribute Delete
5.54 kB
---
license: other
license_name: lfm-open-license-v1.0
license_link: LICENSE
tags:
- torq
- synaptics
- sl2619
- npu
- edge
- lfm2
- text-generation
base_model:
- LiquidAI/LFM2.5-230M
pipeline_tag: text-generation
---
# LFM2.5-230M — Torq build (Synaptics SL2610-Series Torq NPU)
<img src="synaptics-logo-full-color.png" alt="Synaptics" width="600"/></img>
This repository provides compiled model files for LiquidAI's LFM2.5 230M text language model, ready
to run on the **Synaptics SL2610-series Torq NPU**.
The model can act as a skill-selection layer, taking natural-language instruction and decompose it into a sequence of tool calls.
**Quick start guide**:
- [Buy a Machina kit](https://www.synaptics.com/products/embedded-processors/sl2610-product-line#devKit): Get an SL2600 Machina kit delivered to you
- [Torq Examples](https://synaptics-torq.github.io/torq-compiler/v/latest/): Use Torq-examples LiquidAI/LFM2.5-230M scripts to download and deploy on your Machina kit
<img src="astra_sl2600_machina.png" alt="SL2600 Machina kit" width="400"/></img>
## Model Overview
LFM2.5-230M is a general-purpose text-only model. It is a hybrid architecture that combines short convolutions with grouped-query attention.
The transformer runs on the Torq NPU in bf16; the token embeddings run on the host CPU.
## Model Features
### Contents
| File | Size | Role |
|---|--:|---|
| `model.vmfb` | 461 MB | **monolithic** build — decoder + LM head in one graph (logits output) |
| `body.vmfb` | 327 MB | **split** build — decoder body only, emits hidden states (pairs with `lm_head.vmfb`) |
| `lm_head.vmfb` | 134 MB | **split** build — standalone LM head (hidden → 65 536 logits) |
| `token_embeddings.npy` | 134 MB | CPU embedding lookup table (bf16) |
| `config.json` | — | model configuration |
| `tokenizer.json`, `tokenizer_config.json` | — | tokenizer + tokenizer config |
| `onnx/model.onnx` (+ `model.onnx_data`) | ~952 MB | reference ONNX export for non-Torq runtimes (e.g. onnxruntime) |
### Monolithic vs. split
Two equivalent ways to run the model (same weights — `body` 327 MB + `lm_head` 134 MB ≈
the 461 MB monolithic build):
- **`model.vmfb` (monolithic):** one graph that outputs logits directly. Simplest to run.
- **`body.vmfb` + `lm_head.vmfb` (split):** the decoder body emits hidden states and the
LM head is applied only when sampling. Prefill tokens then skip the large
`[1024 → 65 536]` LM-head projection, which **lowers time-to-first-token** — pick this
when TTFT matters.
The `onnx/` export is provided for reference / portability to other runtimes.
### Model Details
- **Architecture:** LFM2 (`Lfm2ForCausalLM`) — hybrid short-convolution + grouped-query attention.
- **Hidden size:** 1024 · **Layers:** 14 · **Attention heads:** 16 (8 KV heads, GQA) · **Intermediate size:** 2560.
- **Vocabulary:** 65 536 · **Context length:** up to 128 k.
- **Precision:** bf16 on the NPU.
- **Target:** Synaptics SL2619, compiled with the Torq compiler.
## Tested Platforms
- [Synaptics Astra™ Machina SL2619 2GB](https://www.synaptics.com/products/embedded-processors/astra-machina-foundation-series)
## Metrics
| Platform | Model / Stage | Environment | NPU Clock | Inference Time | Infer / s |
| --------- | --------- | --------- | --------- | --------- | --------- |
| SL2619 2GB | LFM2.5-230M | Torq v2.0.0 | 1 GHz | TBD | 7.1 |
## Deployment
The models have been tested with the following environment.
- Torq Compiler: *v2.0.0*
- Torq Runtime: *v2.0.0* included in Astra SDK release *scarthgap_6.12_v2.4.0*
### Usage Tutorials / Example Apps
A usage example is provided in the [Torq Examples / LiquidAI-LFM2.5-230M](https://github.com/synaptics-torq/torq-examples/tree/main/LiquidAI/LiquidAI-LFM2.5-230M).
Check out the [README](https://github.com/synaptics-torq/torq-examples/blob/main/LiquidAI/LiquidAI-LFM2.5-230M/README.md) for instructions.
Usage Notes:
- Place the model files in a directory and invoke the Torq LLM runner with either `model.vmfb` (monolithic) or `body.vmfb` + `lm_head.vmfb` (split, lower TTFT), alongside `token_embeddings.npy`, `config.json`, and `tokenizer.json`.
## License & attribution
This repository is a redistribution of a model created by **Liquid AI, Inc.**,
licensed under the **LFM Open License v1.0**. Copies of the license and the
attribution notices are included alongside the model files:
- **[LICENSE](https://huggingface.co/Synaptics/LiquidAI-LFM2.5-230M/blob/main/LICENSE)** — a verbatim copy of the LFM Open License v1.0.
- **[NOTICE](https://huggingface.co/Synaptics/LiquidAI-LFM2.5-230M/blob/main/NOTICE)** — the copyright, patent, trademark, and attribution
notices retained from the original Work (per Section 4(c) of the license).
Original model: **[LFM2.5-230M](https://huggingface.co/LiquidAI/LFM2.5-230M)** · Copyright © Liquid AI, Inc.
## Learn More
- [Synaptics AI Developer Zone](https://developer.synaptics.com?utm_source=hf): Get started with documentation, tutorials and resources for your Edge AI journey.
- [Torq Compiler Documentation](https://synaptics-torq.github.io/torq-compiler/v/latest/): Learn more about the Torq compiler based on MLIR and IREE.
- [Synaptics Astra SDK](https://synaptics-astra.github.io/doc/v/latest/): Learn more about the Yocto Project-based Linux software available for Astra SL processors.
- [Astra Support Portal](https://synacsm.atlassian.net/servicedesk/customer/portal/543?utm_source=hf): Connect with our engineering team and community.