Downloads ยท 30 days
0
a12354/ITFormer
ITFormer is a machine learning model from a12354. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository provides the official open-source implementation of ITFormer (Instruct Time Transformer), a novel framework for temporal-textual multimodal question answering (QA).
Downloads ยท 30 days
0
Access
Public
Updated Jun 19, 2026
Repo size
59.4 GB
Likes
0
Public
Click a slice to open those files.
.pt36.1 GB ยท 57%
From the Hugging Face model README
This repository provides the official open-source implementation of ITFormer (Instruct Time Transformer), a novel framework for temporal-textual multimodal question answering (QA).
ITFormer (Instruct Time Transformer) is a state-of-the-art model for temporal-textual multimodal question answering. This repository provides the official open-source implementation with inference and training scripts.
Our work introduces a large-scale multitask dataset (EngineMT-QA) and demonstrates ITFormer's superior performance in bridging time series data with natural language understanding. Remarkably, our 0.5B model is lightweight and efficient while achieving strong performance.
accelerate for multi-GPU training and inference.After downloading models and datasets, organize your files as follows:
<pre> ITFormer-ICML25/ โโโ dataset/ โ โโโ datasets/ # Place EngineMT-QA dataset files here โ โโโ time_series_data.h5 โ โโโ train_qa.jsonl โ โโโ test_qa.jsonl โโโ LLM/ # Base Qwen2.5-Instruct models โโโ checkpoints/ โ โโโ ITFormer-0.5B/ # ITFormer model checkpoints โโโ scripts/ # One-click automation scripts โ โโโ run_pretrain.sh โ โโโ run_sft.sh โ โโโ run_inference.sh โโโ accelerate_config.yaml # Configuration for distributed execution โโโ yaml/ โโโ infer.yaml # Inference configuration </pre>We now support parallel inference using accelerate. This automatically aggregates results from multiple GPUs.
# Using the automated script (Recommended)
bash scripts/run_inference.sh
# Or launch manually via accelerate
accelerate launch --config_file accelerate_config.yaml inference.py --config yaml/infer.yaml
The inference script will:
inference_results/ and output_result_all.json.We provide a streamlined training pipeline using accelerate. Ensure your accelerate_config.yaml is properly configured for your hardware.
Stage A focuses on pre-training the TimeSeriesEncoder using masked modeling.
# One-click pre-training
bash scripts/run_pretrain.sh
Stage B performs end-to-end SFT, bridging the time-series encoder with the LLM via ITFormer.
# One-click SFT (Requires pre-trained ts_encoder weights)
bash scripts/run_sft.sh
Key Parameters in SFT:
--it_d_model, --it_n_heads, --it_layers: Configuration for the ITFormer module.--load_ts_encoder: Path to the weights generated in Stage A.--llm_model_path: Path to the base Qwen2.5-Instruct model.ITFormer leverages an Instruction-aware Time Series Transformer to align temporal features with textual queries before feeding them into a Large Language Model. The framework is designed to be parameter-efficient, freezing the LLM and TS Encoder during SFT while training only the ITFormer and projection layers.
If you use this code in your research, please cite:
@inproceedings{wang2025itformer,
title={ITFormer: Bridging Time Series and Natural Language for Multi-Modal QA with Large-Scale Multitask Dataset},
author={Yilin Wang and Peixuan Lei and Jie Song and Yuzhe Hao and Tao Chen and Yuxuan Zhang and Lei Jia and Yuanxiang Li and Zhongyu Wei},
booktitle={International Conference on Machine Learning (ICML)},
year={2025}
}
MIT License โ see the LICENSE file for details.