Views
No views yet
| idx | channel | role |
|---|---|---|
| 0 | User | the incoming user message (input) |
| 1 | Output | the user-visible reply |
| 2 | Think | an internal analytical reasoning stream |
| 3 | Skeptical | an internal adversarial / error-checking stream |
[User, Output, Think, Skeptical], flattened row-major. Attention is
block-causal: a token at row r sees all of rows < r (every channel)
plus itself, never its same-row peers. So Output can read what Think and
Skeptical produced on earlier rows.stream_lfm2.py, block_causal_short_conv.py) and the multi-stream decode
loop (stream_cache.py). model.generate() does not apply; use the
StreamDecoder / row-by-row decode.1import torch
2from transformers import AutoTokenizer
3from transformers.models.lfm2_moe.modeling_lfm2_moe import Lfm2MoeConfig
4from stream_lfm2 import StreamLfm2MoeForCausalLM # bundled in this repo
5
6CHANNELS = ["User", "Output", "Think", "Skeptical"]
7tok = AutoTokenizer.from_pretrained("Isolyth/LFM2.5-8B-A1B-Multichannel")
8cfg = Lfm2MoeConfig.from_pretrained("Isolyth/LFM2.5-8B-A1B-Multichannel")
9cfg.num_channels = 4
10cfg.channel_names = CHANNELS
11model = StreamLfm2MoeForCausalLM.from_pretrained(
12 "Isolyth/LFM2.5-8B-A1B-Multichannel",
13 config=cfg, torch_dtype=torch.bfloat16, device_map="auto").eval()infer.py (bundled) is a runnable single-prompt example; server_lfm2.py +
chat.py give a live TUI with one pane per channel.User channel one token per row; the
other channels generate at the same time.LICENSE), which includes a non-commercial / commercial-use
threshold. "LFM2.5" appears here only to describe the model's origin; this is an
independent fine-tune, not an official LiquidAI release. Method and the
stream-data corpus are from Multi-Stream LLMs (arXiv:2605.12460).