LFM3-TS
a language model for time-series analysis
2 min readupdated
LFM3-TS builds on Liquid AI's compact LFM3-1.7B language model (1.8 billion parameters), pairing it with a dedicated time-series encoder. Feed it a numeric series alongside a text question, and it responds in plain language—pinpointing anomalies, giving their exact locations, and describing the nature of the deviations. It is built for data scientists and developers who want a natural-language interface for monitoring charts, logs, or sensor feeds.
Key features
- Time-series analysis: detects anomalies and answers questions over sequences up to 2048 points long.
- LFM3-1.7B backbone: built on an efficient architecture with fine-tuned weights.
- Natural-language output: generates free-form responses complete with actual offset and scale values.
- Transformers integration: full support for standard Python libraries for fast deployment.
What you can do
- Detect anomalies: catch spikes and glitches in numeric data passed in as arrays or lists.
- Monitor sensors: automate instrument reading checks using plain-text queries.
- Explore datasets: test sequences for anomalous patterns without writing traditional detection algorithms.
Example
Sample code for running the model and spotting an anomaly in a time series:
import numpy as np
from transformers import AutoModelForCausalLM, AutoProcessor
model = AutoModelForCausalLM.from_pretrained("nardi/LFM3-TS", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("nardi/LFM3-TS", trust_remote_code=True)
series = np.sin(np.arange(512) / 8)
series[300] += 4 # аномальный всплеск
print(model.chat(processor, series, "Is there an anomaly in this time series? If so, where is it and what does it look like?"))Read more
DetailsBenchmarks: on the ChatTS dataset, the model scores 82.0% accuracy on Set A (categorical) and 77.5% on Set A (numerical).
Parameters: 1.8 billion parameters, based on the LFM3-1.7B language model.
Limitations: supports English only and sequences up to 2048 points long.










Comments