Update Readme
Browse files
README.md
CHANGED
|
@@ -1,3 +1,60 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# TempVerseFormer - Pre-trained Models
|
| 6 |
+
|
| 7 |
+
[](https://huggingface.co/LKyluk/TempVerseFormer)
|
| 8 |
+
[](https://github.com/leo27heady/TempVerseFormer)
|
| 9 |
+
[](https://github.com/leo27heady/simple-shape-dataset-toolbox)
|
| 10 |
+
[](https://wandb.ai/leo27heady)
|
| 11 |
+
|
| 12 |
+
This repository hosts pre-trained models for **TempVerseFormer: Temporal Modeling with Reversible Transformers**, a novel architecture introduced in the research article **"Temporal Modeling with Reversible Transformers"**.
|
| 13 |
+
|
| 14 |
+
These models are designed for memory-efficient temporal sequence prediction, particularly for tasks involving continuous and evolving data streams. They are trained on a synthetic dataset of rotating 2D shapes, designed to evaluate temporal modeling capabilities in a controlled environment.
|
| 15 |
+
|
| 16 |
+
## Models Included
|
| 17 |
+
|
| 18 |
+
This repository contains pre-trained weights for the following models, as described in the research article:
|
| 19 |
+
|
| 20 |
+
* **TempVerseFormer (Rev-Transformer):** The core Reversible Temporal Transformer architecture, leveraging reversible blocks and time-agnostic backpropagation for memory efficiency.
|
| 21 |
+
* Checkpoints available for different training configurations (e.g., with/without temporal patterns).
|
| 22 |
+
* **TempFormer (Vanilla-Transformer):** A standard Vanilla Transformer architecture with temporal chaining, serving as a baseline to compare against TempVerseFormer.
|
| 23 |
+
* Checkpoints available for different training configurations (e.g., with/without temporal patterns).
|
| 24 |
+
* **Standard Transformer (Pipe-Transformer):** A standard Transformer model processing the entire context at once, used as a non-sequential baseline.
|
| 25 |
+
* Checkpoints available for different training configurations (e.g., with/without temporal patterns).
|
| 26 |
+
* **LSTM:** A Long Short-Term Memory network, representing a traditional recurrent sequence modeling approach.
|
| 27 |
+
* Checkpoints available for different training configurations (e.g., with/without temporal patterns).
|
| 28 |
+
* **VAE Models:** Variational Autoencoder (VAE) models used for encoding and decoding images to and from a latent space:
|
| 29 |
+
* **Vanilla VAE:** Standard VAE architecture.
|
| 30 |
+
|
| 31 |
+
Each model checkpoint is provided as a `.pt` file containing the `state_dict` of the trained model.
|
| 32 |
+
|
| 33 |
+
## Intended Use
|
| 34 |
+
|
| 35 |
+
These pre-trained models are intended for:
|
| 36 |
+
|
| 37 |
+
* **Research:** Facilitating further research in memory-efficient temporal modeling, reversible architectures, and time-agnostic backpropagation.
|
| 38 |
+
* **Benchmarking:** Providing baselines for comparison with new temporal sequence modeling architectures.
|
| 39 |
+
* **Fine-tuning:** Serving as a starting point for fine-tuning on new datasets or for related temporal prediction tasks.
|
| 40 |
+
* **Demonstration:** Illustrating the capabilities of TempVerseFormer and its memory efficiency advantages.
|
| 41 |
+
|
| 42 |
+
**Please note:** These models were primarily trained and evaluated on a synthetic dataset of rotating shapes. While they demonstrate promising results in this controlled environment, their performance on real-world datasets may vary and require further evaluation and fine-tuning.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## How to Use
|
| 46 |
+
|
| 47 |
+
* **Configuration:** Ensure you use the correct model configuration (e.g., `config_rev_transformer`, `config_vae`) that corresponds to the pre-trained checkpoint you are loading. You can find example configurations in the `configs/train` directory of the [GitHub repository](https://github.com/leo27heady/TempVerseFormer).
|
| 48 |
+
* **Data Preprocessing:** Input data should be preprocessed in the same way as the training data. Refer to the `ShapeDataset` class in the GitHub repository for details on data loading and preprocessing.
|
| 49 |
+
* **Device:** Load models and data onto the appropriate device (`'cpu'` or `'cuda'`).
|
| 50 |
+
* **Evaluation Mode:** Remember to set models to `.eval()` mode for inference.
|
| 51 |
+
|
| 52 |
+
For more detailed usage examples and specific code for different models and tasks, please refer to the [GitHub repository](https://github.com/leo27heady/TempVerseFormer) and the `train.py`, `eval.py`, and `memory_test.py` scripts.
|
| 53 |
+
|
| 54 |
+
## Dataset
|
| 55 |
+
|
| 56 |
+
The models were trained on a synthetic dataset of rotating 2D shapes generated using the [Simple Shape Dataset Toolbox](https://github.com/leo27heady/simple-shape-dataset-toolbox). This toolbox allows for procedural generation of customizable shape datasets.
|
| 57 |
+
|
| 58 |
+
## License
|
| 59 |
+
|
| 60 |
+
These pre-trained models are released under the [**MIT**] license.
|