witgaw commited on
Commit
77670b5
·
verified ·
1 Parent(s): e20176b

Upload STGFORMER_FINAL model trained on METR-LA

Browse files
Files changed (6) hide show
  1. README.md +57 -0
  2. config.json +33 -0
  3. hub_metadata.json +7 -0
  4. metadata.json +7 -0
  5. model.safetensors +3 -0
  6. scaler.json +4 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - traffic-forecasting
4
+ - time-series
5
+ - graph-neural-network
6
+ - stgformer_final
7
+ datasets:
8
+ - metr-la
9
+ ---
10
+
11
+ # Spatial-Temporal Graph Transformer (Final) - METR-LA
12
+
13
+ Spatial-Temporal Graph Transformer (Final) (STGFORMER_FINAL) trained on METR-LA dataset for traffic speed forecasting.
14
+
15
+ ## Model Description
16
+
17
+ STGFormer Chebyshev+TCN with Xavier initialization, DOW embeddings, exclude_missing_from_norm, and sparsity_k=16 [FINAL - 100 epochs]
18
+
19
+
20
+
21
+ ## Dataset
22
+
23
+ **METR-LA**: Traffic speed data from highway sensors.
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from utils.stgformer import load_from_hub
29
+
30
+ # Load model from Hub
31
+ model, scaler = load_from_hub("METR-LA", hf_repo_prefix="STGFORMER_FINAL")
32
+
33
+ # Get predictions
34
+ from utils.stgformer import get_predictions
35
+ predictions = get_predictions(model, scaler, test_dataset)
36
+ ```
37
+
38
+ ## Training
39
+
40
+ Model was trained using the STGFORMER_FINAL implementation with default hyperparameters.
41
+
42
+ ## Citation
43
+
44
+ If you use this model, please cite the original STGFORMER_FINAL paper:
45
+
46
+ ```bibtex
47
+ @inproceedings{lan2022stgformer,
48
+ title={STGformer: Spatial-Temporal Graph Transformer for Traffic Forecasting},
49
+ author={Lan, Shengnan and Ma, Yong and Huang, Weijia and Wang, Wanwei and Yang, Hui and Li, Peng},
50
+ booktitle={IEEE Transactions on Neural Networks and Learning Systems},
51
+ year={2022}
52
+ }
53
+ ```
54
+
55
+ ## License
56
+
57
+ This model checkpoint is released under the same license as the training code.
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "num_nodes": 207,
3
+ "in_steps": 12,
4
+ "out_steps": 12,
5
+ "input_dim": 1,
6
+ "output_dim": 1,
7
+ "steps_per_day": 288,
8
+ "input_embedding_dim": 24,
9
+ "tod_embedding_dim": 24,
10
+ "dow_embedding_dim": 24,
11
+ "spatial_embedding_dim": 0,
12
+ "adaptive_embedding_dim": 80,
13
+ "num_heads": 4,
14
+ "num_layers": 3,
15
+ "dropout_a": 0.3,
16
+ "use_mixed_proj": true,
17
+ "pre_attn_kernel_size": 1,
18
+ "model_dim": 152,
19
+ "dataset": "METR-LA",
20
+ "graph_mode": "learned",
21
+ "lambda_hybrid": 0.5,
22
+ "sparsity_k": 16,
23
+ "propagation_mode": "chebyshev",
24
+ "temporal_mode": "tcn",
25
+ "mamba_d_state": 16,
26
+ "mamba_d_conv": 4,
27
+ "mamba_expand": 2,
28
+ "tcn_num_layers": 3,
29
+ "tcn_kernel_size": 3,
30
+ "tcn_dilation_base": 2,
31
+ "tcn_dropout": 0.1,
32
+ "use_zero_init": false
33
+ }
hub_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": "METR-LA",
3
+ "metrics": {},
4
+ "framework": "PyTorch",
5
+ "hf_repo_prefix": "STGFORMER_FINAL",
6
+ "implementation": "internal"
7
+ }
metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": "METR-LA",
3
+ "upload_date": "2025-12-11T17:07:45.721639",
4
+ "metrics": {},
5
+ "framework": "PyTorch",
6
+ "model_type": "STGFORMER_FINAL"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a31c17bcb3e7d11fc2fcfd94c33971a612e170c9b154793037c34a898d5abf5f
3
+ size 16053084
scaler.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "mean": 58.58370590209961,
3
+ "std": 12.823284149169922
4
+ }