Commit ·
a31e7df
0
Parent(s):
OpenTSLM TeeMoE
Browse files- .gitattributes +2 -0
- LICENSE +21 -0
- README.md +102 -0
- adapters/aggregation/adapter_config.json +53 -0
- adapters/aggregation/adapter_model.safetensors +3 -0
- adapters/analysis/adapter_config.json +53 -0
- adapters/analysis/adapter_model.safetensors +3 -0
- adapters/native/adapter_config.json +53 -0
- adapters/native/adapter_model.safetensors +3 -0
- controller.safetensors +3 -0
- editor.safetensors +3 -0
- router.ubj +3 -0
- teemoe.json +10 -0
.gitattributes
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.ubj filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 The OpenTSLM TeeMoE authors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model: Qwen/Qwen3.6-27B
|
| 6 |
+
base_model_relation: adapter
|
| 7 |
+
tags:
|
| 8 |
+
- time-series
|
| 9 |
+
- forecasting
|
| 10 |
+
- lora
|
| 11 |
+
- mixture-of-experts
|
| 12 |
+
- safetensors
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# OpenTSLM TeeMoE
|
| 16 |
+
|
| 17 |
+
OpenTSLM TeeMoE is part of the [OpenTSLM](https://github.com/OpenTSLM)
|
| 18 |
+
project. It brings numerical forecasting, context-conditioned forecasting, and
|
| 19 |
+
time-series analysis together in one language model. Built on
|
| 20 |
+
[Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B), it combines three LoRA
|
| 21 |
+
experts through a learned controller that weights them for each request.
|
| 22 |
+
|
| 23 |
+
## Paper
|
| 24 |
+
|
| 25 |
+
The model is described in **OpenTSLM TeeMoE: A Unified Time-Series Language Model
|
| 26 |
+
for Forecasting, Contextual Prediction, and Reasoning**.
|
| 27 |
+
|
| 28 |
+
Accepted at the [Foundation Models for Temporal Systems (FMTS) workshop at NeurIPS 2026](https://fmts-workshop.github.io/index.html#program).
|
| 29 |
+
|
| 30 |
+
[Paper](https://arxiv.org/abs/ARXIV_ID) ·
|
| 31 |
+
[Code](https://github.com/OpenTSLM/OpenTSLM-TeeMoE)
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
+
|
| 35 |
+
See the [TeeMoE repository](https://github.com/OpenTSLM/OpenTSLM-TeeMoE) for
|
| 36 |
+
installation, evaluation, and training instructions.
|
| 37 |
+
|
| 38 |
+
The inference setup targets Linux with an NVIDIA 80 GB GPU. It requires Git,
|
| 39 |
+
[uv](https://docs.astral.sh/uv/), the CUDA toolkit (`nvcc`), and a C++ compiler.
|
| 40 |
+
The setup script creates the Python 3.12 environments:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
git clone https://github.com/OpenTSLM/OpenTSLM-TeeMoE
|
| 44 |
+
cd OpenTSLM-TeeMoE
|
| 45 |
+
bash scripts/setup.sh inference
|
| 46 |
+
source .venv/bin/activate
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
Load this checkpoint through the TeeMoE package:
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
import numpy as np
|
| 53 |
+
from teemoe import TeeMoE
|
| 54 |
+
|
| 55 |
+
model = TeeMoE.from_pretrained("OpenTSLM/TeeMoE")
|
| 56 |
+
history = (10 + np.sin(np.arange(168) / 12)).tolist()
|
| 57 |
+
|
| 58 |
+
forecast = model.forecast(
|
| 59 |
+
history,
|
| 60 |
+
horizon=24,
|
| 61 |
+
frequency="h",
|
| 62 |
+
start="2024-05-01 00:00",
|
| 63 |
+
context="A promotion starts at the first forecast hour and lasts 24 hours.",
|
| 64 |
+
)
|
| 65 |
+
print(forecast.median)
|
| 66 |
+
print(forecast.quantiles.shape) # (24, 9), quantile levels 0.1 through 0.9
|
| 67 |
+
|
| 68 |
+
answer = model.analyze(
|
| 69 |
+
history,
|
| 70 |
+
"Which pattern best describes the series?",
|
| 71 |
+
options=["Periodic variation", "Constant values", "Steady increase"],
|
| 72 |
+
)
|
| 73 |
+
print(answer.text)
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
`from_pretrained` also accepts a local directory. `forecast_batch` and
|
| 77 |
+
`analyze_batch` accept lists of requests. See the code README for multi-GPU
|
| 78 |
+
configuration, evaluation commands, and training from public data.
|
| 79 |
+
|
| 80 |
+
This checkpoint contains the three LoRA adapters, expert controller, numerical
|
| 81 |
+
connector and decoder, and learned ensemble weights. The package downloads the
|
| 82 |
+
base language model and external forecasting models as needed.
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
If you use TeeMoE in your work, please cite:
|
| 87 |
+
|
| 88 |
+
```bibtex
|
| 89 |
+
@misc{chen2026opentslmteemoe,
|
| 90 |
+
title = {{OpenTSLM TeeMoE: A Unified Time-Series Language Model for Forecasting, Contextual Prediction, and Reasoning}},
|
| 91 |
+
author = {Tony Chen and Timo Stoffregen and Maxwell Xu and Thomas Kaar and Martin Maritsch and Geremia Pompei and Nicolas Zumarraga and Robert Jakob and Paul Schmiedmayer and Patrick Langer and Juncheng Liu},
|
| 92 |
+
year = {2026},
|
| 93 |
+
eprint = {ARXIV_ID},
|
| 94 |
+
archivePrefix = {arXiv},
|
| 95 |
+
url = {https://arxiv.org/abs/ARXIV_ID}
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## License
|
| 100 |
+
|
| 101 |
+
The TeeMoE components are released under the [MIT license](LICENSE). The Qwen
|
| 102 |
+
backbone and external forecasting models retain their respective licenses.
|
adapters/aggregation/adapter_config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3.6-27B",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 8,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 4,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": "6a9e13bd6fc8f0983b9b99948120bc37f49c13e9",
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"in_proj_a",
|
| 34 |
+
"k_proj",
|
| 35 |
+
"v_proj",
|
| 36 |
+
"out_proj",
|
| 37 |
+
"down_proj",
|
| 38 |
+
"in_proj_z",
|
| 39 |
+
"q_proj",
|
| 40 |
+
"gate_proj",
|
| 41 |
+
"up_proj",
|
| 42 |
+
"in_proj_b",
|
| 43 |
+
"in_proj_qkv",
|
| 44 |
+
"o_proj"
|
| 45 |
+
],
|
| 46 |
+
"target_parameters": null,
|
| 47 |
+
"task_type": "CAUSAL_LM",
|
| 48 |
+
"trainable_token_indices": null,
|
| 49 |
+
"use_bdlora": null,
|
| 50 |
+
"use_dora": false,
|
| 51 |
+
"use_qalora": false,
|
| 52 |
+
"use_rslora": false
|
| 53 |
+
}
|
adapters/aggregation/adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:254b1aeb012a14f1072a844c4ed129d271c4a07cc42c9918fc88be5341242fc1
|
| 3 |
+
size 116861848
|
adapters/analysis/adapter_config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3.6-27B",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 16,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": "6a9e13bd6fc8f0983b9b99948120bc37f49c13e9",
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"o_proj",
|
| 34 |
+
"in_proj_a",
|
| 35 |
+
"v_proj",
|
| 36 |
+
"q_proj",
|
| 37 |
+
"in_proj_z",
|
| 38 |
+
"out_proj",
|
| 39 |
+
"gate_proj",
|
| 40 |
+
"in_proj_b",
|
| 41 |
+
"up_proj",
|
| 42 |
+
"in_proj_qkv",
|
| 43 |
+
"down_proj",
|
| 44 |
+
"k_proj"
|
| 45 |
+
],
|
| 46 |
+
"target_parameters": null,
|
| 47 |
+
"task_type": "CAUSAL_LM",
|
| 48 |
+
"trainable_token_indices": null,
|
| 49 |
+
"use_bdlora": null,
|
| 50 |
+
"use_dora": false,
|
| 51 |
+
"use_qalora": false,
|
| 52 |
+
"use_rslora": false
|
| 53 |
+
}
|
adapters/analysis/adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0fa0d1ded2d3795e9a3073f702a9af59433415e2b5f6ed9467e757eaf4c33e6b
|
| 3 |
+
size 467047680
|
adapters/native/adapter_config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3.6-27B",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 64,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 32,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": "6a9e13bd6fc8f0983b9b99948120bc37f49c13e9",
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"q_proj",
|
| 34 |
+
"o_proj",
|
| 35 |
+
"in_proj_a",
|
| 36 |
+
"k_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
+
"in_proj_qkv",
|
| 39 |
+
"out_proj",
|
| 40 |
+
"gate_proj",
|
| 41 |
+
"down_proj",
|
| 42 |
+
"v_proj",
|
| 43 |
+
"in_proj_b",
|
| 44 |
+
"in_proj_z"
|
| 45 |
+
],
|
| 46 |
+
"target_parameters": null,
|
| 47 |
+
"task_type": "CAUSAL_LM",
|
| 48 |
+
"trainable_token_indices": null,
|
| 49 |
+
"use_bdlora": null,
|
| 50 |
+
"use_dora": false,
|
| 51 |
+
"use_qalora": false,
|
| 52 |
+
"use_rslora": false
|
| 53 |
+
}
|
adapters/native/adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80bada6a3b0994dca2619f67fc6724c392c679d1ed6f188bd9f79724983691ca
|
| 3 |
+
size 933959152
|
controller.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f258a1dc1631d1a710e74d6de8c519052d2d6850218afab631e3c53aeabbd934
|
| 3 |
+
size 61680
|
editor.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59b7b9094ada7662b1fd6ae07e547c82adbee51868791332106b8b3d0910fdbe
|
| 3 |
+
size 2643344
|
router.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d9ce3f1a4243c6606f45402bf78742ad3d9ac77ea8c190a60a6f23434705780
|
| 3 |
+
size 59331800
|
teemoe.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "Qwen/Qwen3.6-27B",
|
| 3 |
+
"base_revision": "6a9e13bd6fc8f0983b9b99948120bc37f49c13e9",
|
| 4 |
+
"experts": [
|
| 5 |
+
"aggregation",
|
| 6 |
+
"native",
|
| 7 |
+
"analysis"
|
| 8 |
+
],
|
| 9 |
+
"fnf_mass": 0.3854933882343437
|
| 10 |
+
}
|