xiezhe24 commited on
Commit
79a408b
·
verified ·
1 Parent(s): 67609ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +98 -3
README.md CHANGED
@@ -1,3 +1,98 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ base_model:
6
+ - Qwen/Qwen3-8B
7
+ datasets:
8
+ - ChatTSRepo/ChatTS-Training-Dataset
9
+ language:
10
+ - eng
11
+ - zh
12
+ ---
13
+
14
+ # [VLDB' 25] ChatTS-8B-1103 Model
15
+
16
+ <div style="display:flex;justify-content: center">
17
+ <a href="https://github.com/NetmanAIOps/ChatTS"><img alt="github" src="https://img.shields.io/badge/Code-GitHub-blue"></a>
18
+ <a href="https://arxiv.org/abs/2412.03104"><img alt="preprint" src="https://img.shields.io/static/v1?label=arXiv&amp;message=2412.03104&amp;color=B31B1B&amp;logo=arXiv"></a>
19
+ </div>
20
+
21
+ **[VLDB' 25] ChatTS: Aligning Time Series with LLMs via Synthetic Data for Enhanced Understanding and Reasoning**
22
+
23
+ `ChatTS` focuses on **Understanding and Reasoning** about time series, much like what vision/video/audio-MLLMs do.
24
+
25
+ This is a `Qwen3-8B` version of [ChatTS-14B](https://huggingface.co/bytedance-research/ChatTS-14B), with some minor bug fixes and improvements on short time series length and instructions following capabilities.
26
+
27
+ ## Web Demo
28
+ The Web Demo of ChatTS is available at HuggingFace Spaces: [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20ChatTS-Web%20Demo-blue)](https://huggingface.co/spaces/xiezhe22/ChatTS)
29
+
30
+ ## Key Features
31
+ ChatTS is a Multimodal LLM built natively for time series as a core modality:
32
+ - ✅ **Native support for multivariate time series**
33
+ - ✅ **Flexible input**: Supports multivariate time series with **different lengths** and **flexible dimensionality**
34
+ - ✅ **Conversational understanding + reasoning**:
35
+ Enables interactive dialogue over time series to explore insights about time series
36
+ - ✅ **Preserves raw numerical values**:
37
+ Can answer **statistical questions**, such as _"How large is the spike at timestamp t?"_
38
+ - ✅ **Easy integration with existing LLM pipelines**, including support for **vLLM**.
39
+
40
+ ### Example Application
41
+ Here is an example of a ChatTS application, which allows users to interact with a LLM to understand and reason about time series data:
42
+ ![Chat](figures/chat_example.png)
43
+
44
+ [Link to the paper](https://arxiv.org/pdf/2412.03104)
45
+
46
+ [Link to the Github repository](https://github.com/NetManAIOps/ChatTS)
47
+
48
+ ## Usage
49
+ - This model is fine-tuned on the QWen2.5-14B-Instruct (https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) model. For more usage details, please refer to the `README.md` in the ChatTS repository.
50
+ - An example usage of ChatTS (with `HuggingFace`):
51
+ ```python
52
+ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor
53
+ import torch
54
+ import numpy as np
55
+
56
+ hf_model = "bytedance-research/ChatTS-14B"
57
+ # Load the model, tokenizer and processor
58
+ # For pre-Ampere GPUs (like V100) use `_attn_implementation='eager'`
59
+ model = AutoModelForCausalLM.from_pretrained(hf_model, trust_remote_code=True, device_map="auto", torch_dtype='float16')
60
+ tokenizer = AutoTokenizer.from_pretrained(hf_model, trust_remote_code=True)
61
+ processor = AutoProcessor.from_pretrained(hf_model, trust_remote_code=True, tokenizer=tokenizer)
62
+ # Create time series and prompts
63
+ timeseries = np.sin(np.arange(256) / 10) * 5.0
64
+ timeseries[100:] -= 10.0
65
+ prompt = f"I have a time series length of 256: <ts><ts/>. Please analyze the local changes in this time series."
66
+ # Apply Chat Template
67
+ prompt = f"""<|im_start|>system
68
+ You are a helpful assistant.<|im_end|><|im_start|>user
69
+ {prompt}<|im_end|><|im_start|>assistant
70
+ """
71
+ # Convert to tensor
72
+ inputs = processor(text=[prompt], timeseries=[timeseries], padding=True, return_tensors="pt")
73
+ # Model Generate
74
+ outputs = model.generate(**inputs, max_new_tokens=300)
75
+ print(tokenizer.decode(outputs[0][len(inputs['input_ids'][0]):], skip_special_tokens=True))
76
+ ```
77
+
78
+ ## Reproduction of Paper Results
79
+ Please download the [legacy ChatTS-14B model](https://huggingface.co/bytedance-research/ChatTS-14B/tree/fea24f221dd13ad310b68cc5470f575647b838c6) to reproduce the results in the paper.
80
+
81
+ ## Reference
82
+ - QWen3-8B (https://huggingface.co/Qwen/Qwen3-8B)
83
+ - transformers (https://github.com/huggingface/transformers.git)
84
+ - [ChatTS Paper](https://arxiv.org/pdf/2412.03104)
85
+
86
+
87
+ ## License
88
+ This model is licensed under the [Apache License 2.0](LICENSE).
89
+
90
+ ## Cite
91
+ ```
92
+ @article{xie2024chatts,
93
+ title={ChatTS: Aligning Time Series with LLMs via Synthetic Data for Enhanced Understanding and Reasoning},
94
+ author={Xie, Zhe and Li, Zeyan and He, Xiao and Xu, Longlong and Wen, Xidao and Zhang, Tieying and Chen, Jianjun and Shi, Rui and Pei, Dan},
95
+ journal={arXiv preprint arXiv:2412.03104},
96
+ year={2024}
97
+ }
98
+ ```