Skip to main content

LLM-ABBA

PyPI version Documentation build arXiv paper Cython acceleration MIT license

LLM-ABBA is a Python library and research codebase for using large language models with numerical time series. It converts signals into sequences of symbols that a language model can process as text.

What LLM-ABBA does

Adaptive Brownian bridge-based symbolic aggregation (ABBA) approximates a signal with variable-length linear segments. A fitted codebook groups segments with similar lengths and changes in value, then assigns each group a symbol. The resulting sequence can be used as model input or decoded into an approximation of the original signal.

  • Symbolic approximation and reconstruction — Use ABBA to encode and decode time series on a CPU without downloading a language model.
  • Classification and regression — Use LLMABBA to fine-tune a causal language model to predict class labels or numeric targets from symbolic inputs.
  • Forecasting — Generate future symbols from a history window and decode them into a forecast in the original units.

Who it is for

  • Time-series researchers studying symbolic representations or comparing them across classification, regression, and forecasting tasks.
  • Machine learning engineers and data scientists prototyping models for signals such as ECG recordings, sensor streams, or energy measurements.
  • Students and educators exploring how piecewise linear approximation, symbolization, and language-model fine-tuning fit together.

Installation

python -m pip install llmabba

See the installation guide for source installation and GPU setup.

Quick start

Encode and reconstruct a time series

from llmabba import ABBA

series = [[1.2, 1.4, 1.3, 1.8, 2.2, 2.4, 2.1]]
abba = ABBA(tol=0.1, alpha=0.1, verbose=0)
symbols = abba.encode(series)
reconstruction = abba.decode(symbols)

Classify ECG signals with Mistral-7B

After installing from source, run the PTBDB demo from the repository root on a CUDA setup that supports bitsandbytes 4-bit quantization.

cd examples
WANDB_MODE=disabled python demo-ts-classification.py --model mistralai/Mistral-7B-Instruct-v0.1

Documentation

Citation

If you use LLM-ABBA in research, cite the article in IEEE Transactions on Signal Processing. An open-access preprint is available on arXiv.

@article{chen2026llmabba,
  author = {Chen, Xinye and Carson, Erin and Kang, Cheng},
  title = {{LLM-ABBA}: Understanding Time Series via Symbolic Approximation},
  journal = {IEEE Transactions on Signal Processing},
  year = {2026},
  volume = {74},
  pages = {1218--1232},
  doi = {10.1109/TSP.2026.3662011}
}

For the underlying aggregation method and its Python implementation, see the fABBA method paper and the fABBA software paper.

BibTeX for the fABBA method and software
@article{10.1145/3532622,
  author = {Chen, Xinye and G\"{u}ttel, Stefan},
  title = {An Efficient Aggregation Method for the Symbolic Representation of Temporal Data},
  journal = {ACM Transactions on Knowledge Discovery from Data},
  year = {2023},
  volume = {17},
  number = {1},
  doi = {10.1145/3532622}
}

@article{Chen2024,
  author = {Chen, Xinye and G\"{u}ttel, Stefan},
  title = {{fABBA}: A Python library for the fast symbolic approximation of time series},
  journal = {Journal of Open Source Software},
  year = {2024},
  volume = {9},
  number = {95},
  pages = {6294},
  doi = {10.21105/joss.06294}
}

Contributing and license

Report bugs or ask questions in GitHub Issues. Documentation and code contributions are welcome. LLM-ABBA is released under the MIT License.

Metadata

Release files for llmabba 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmabba 0.0.6
File Size Uploaded Provenance Actions
llmabba-0.0.6.tar.gz 516.0 kB Without provenance Details for llmabba-0.0.6.tar.gz

Release files / llmabba-0.0.6.tar.gz

Download URL llmabba-0.0.6.tar.gz
Size 516.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be72128fd1304d9f62a7479bd8e51a26c499f7be7aa4aae08323acbc03534d04
BLAKE2b-256 checksum
How to use checksums
d8a976ce7bb11353bd2cdeb20ee7506a0ce77b42b181946c371e41448be9ed18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for llmabba 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page