--- license: other license_name: apache-2.0-and-llama3.2 license_link: LICENSE language: - en library_name: transformers datasets: - leochen085/Lapras-Reasoning-Datasets tags: - time-series - time-series-language-model - latent-reasoning - reasoning - ecg - sleep-staging - human-activity-recognition - llama-3.2 - qwen3 --- ## Lapras logo  Lapras: Latent Reasoning for Time Series Language Models [Paper](https://arxiv.org/abs/2610.11111) | [Code](https://github.com/yuc0805/Lapras) | [Datasets](https://huggingface.co/datasets/leochen085/Lapras-Reasoning-Datasets) **Lapras** (**La**tent **P**ost-trained **R**easoning **A**cross **S**eries) is a post-training framework that equips time series language models (TSLMs) with latent reasoning. A model trained with Lapras reasons through a sequence of *continuous thoughts* in the joint time series–language space, producing text only for the final answer. It learns this through teacher–student self-distillation from reference chain-of-thought (CoT) traces. This repository holds the 15 Lapras checkpoints reported in the paper: three TSLM backbones, each finetuned separately on five time series question answering tasks. ## Checkpoints | Folder | Backbone | Finetuned from | Size per checkpoint | License | |---|---|---|---:|---| | `chatts/` | ChatTS-8B (Qwen3-8B) | [bytedance-research/ChatTS-8B](https://huggingface.co/bytedance-research/ChatTS-8B) | 16 GB | Apache-2.0 | | `opentslm/` | OpenTSLM-Flamingo-1B (Llama 3.2 1B) | [OpenTSLM/llama-3.2-1b-sleep-flamingo](https://huggingface.co/OpenTSLM/llama-3.2-1b-sleep-flamingo) | 6.8 GB | Llama 3.2 Community License | | `slip/` | SLIP-1B (Llama 3.2 1B) | [leochen085/SLIP-Llama](https://huggingface.co/leochen085/SLIP-Llama) | 3.3 GB | Llama 3.2 Community License | Each backbone folder has one checkpoint per task: `lapras_ecg`, `lapras_sleep`, `lapras_har`, `lapras_tsr`, `lapras_engine`. A checkpoint answers questions of its own task only. ``` chatts/lapras_tsr/ ├── config.json, generation_config.json, weights, tokenizer files ├── *.py # modeling code, loaded with trust_remote_code=True ├── lapras_projection.safetensors # projection π that maps each continuous thought to the next input embedding └── lapras_run_config.json # inference settings (template, number of continuous thoughts, patch size) ``` The time series enters the language model differently in each backbone: as patch embeddings in the token sequence (ChatTS), through gated cross-attention over a Perceiver resampler (OpenTSLM-Flamingo), or through cross-attention in the last layers (SLIP). ## How to use The continuous-thought loop (K latent steps fed back through π before the answer is decoded) is implemented in the [Lapras code](https://github.com/yuc0805/Lapras), not in `generate()`. Run the checkpoints with its `evaluation/evaluate.py`, which reads `lapras_run_config.json`, so nothing has to be set by hand. ```bash git clone https://github.com/yuc0805/Lapras.git && cd Lapras # install as in the code README, then download into ckpt/ and dataset/: hf download leochen085/Lapras --include "chatts/*" "opentslm/*" "slip/*" --local-dir ckpt # all 15 checkpoints (128 GB) hf download leochen085/Lapras --include "slip/*" --local-dir ckpt # one backbone hf download leochen085/Lapras --include "slip/lapras_tsr/*" --local-dir ckpt # one checkpoint hf download leochen085/Lapras-Reasoning-Datasets --repo-type dataset --include "*.jsonl" --local-dir dataset ``` Evaluate one checkpoint on its test set with greedy decoding: ```bash # single GPU python evaluation/evaluate.py --ckpt ckpt/slip/lapras_tsr --test_file dataset/tsr/test.jsonl # 4 GPUs torchrun --nproc_per_node 4 evaluation/evaluate.py \ --ckpt ckpt/chatts/lapras_tsr \ --test_file dataset/tsr/test_with_ts_tags.jsonl \ --batch_size 8 --max_new_tokens 512 ``` ChatTS and OpenTSLM checkpoints read the `*_with_ts_tags.jsonl` files; SLIP reads the plain `*.jsonl` files. Predictions and metrics are written to `/eval/` (`predictions.jsonl`, `summary.json`). SLIP checkpoints fetch the configuration of the gated [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) when loaded: accept its license and log in (`hf auth login`) first. ## Tasks The checkpoints were finetuned on the [Lapras Reasoning Datasets](https://huggingface.co/datasets/leochen085/Lapras-Reasoning-Datasets): each example pairs a question and a multichannel time series with a reference reasoning trace that ends in `Answer: