|
Download README.md from Godseye1311/DecayFormer: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/Godseye1311/DecayFormer/resolve/main/README.md
- Command line
-
hf download hf://Godseye1311/DecayFormer/README.md
-
curl -L -o README.md https://huggingface.co/Godseye1311/DecayFormer/resolve/main/README.md
3.36 kB
| license: mit | |
| library_name: pytorch | |
| tags: | |
| - battery | |
| - state-of-health | |
| - degradation-forecasting | |
| - time-series | |
| - state-space-model | |
| # DecayFormer | |
| Trained weights of **DecayFormer**, a compact hybrid state space / attention model | |
| that forecasts a battery cell's full state of health (SOH) trajectory from its | |
| first 100 cycles, for all 22 aging-condition-exclusive folds of the BatteryLife | |
| benchmark as defined by BatteryMFormer. One model per fold; 791,529 parameters. | |
| Code, reproducibility notebooks and documentation: [github.com/ShreyPatel1311/DecayFormer](https://github.com/ShreyPatel1311/DecayFormer). License: MIT. | |
| ## Results of these weights | |
| Test MAPE (%) from BatteryMFormer's released evaluation (`evaluate_model.py`, | |
| fp16), on each fold's own test set. Mean ± std across folds: | |
| | Domain | Folds | Test MAPE | | |
| |---|---|---| | |
| | Li-ion | 3 | 2.281 ± 0.089 | | |
| | Zn-ion | 3 | 6.814 ± 0.540 | | |
| | Na-ion | 12 | 0.926 ± 0.282 | | |
| | CALB | 4 | 2.783 ± 2.200 | | |
| | Fold | Test MAPE | Early-stopping patience | | |
| |---|---|---| | |
| | `Li-ion/seed2021` | 2.375 | 30 | | |
| | `Li-ion/seed42` | 2.197 | 30 | | |
| | `Li-ion/seed2024` | 2.272 | 30 | | |
| | `Zn-ion/seed2021` | 6.248 | 30 | | |
| | `Zn-ion/seed42` | 6.869 | 30 | | |
| | `Zn-ion/seed2024` | 7.324 | 30 | | |
| | `Na-ion/cond400` | 0.660 | 30 | | |
| | `Na-ion/cond401` | 1.346 | 50 | | |
| | `Na-ion/cond402` | 0.843 | 50 | | |
| | `Na-ion/cond403` | 0.834 | 30 | | |
| | `Na-ion/cond404` | 1.001 | 30 | | |
| | `Na-ion/cond405` | 0.831 | 30 | | |
| | `Na-ion/cond406` | 0.487 | 30 | | |
| | `Na-ion/cond407` | 1.463 | 30 | | |
| | `Na-ion/cond408` | 1.006 | 30 | | |
| | `Na-ion/cond409` | 1.138 | 30 | | |
| | `Na-ion/cond410` | 0.721 | 30 | | |
| | `Na-ion/cond411` | 0.785 | 30 | | |
| | `CALB/cond396` | 5.209 | 30 | | |
| | `CALB/cond397` | 0.946 | 30 | | |
| | `CALB/cond398` | 0.893 | 30 | | |
| | `CALB/cond399` | 4.082 | 30 | | |
| ## Training configuration | |
| All 22 models share one configuration: d_model 96, 3 encoder blocks, 4 attention | |
| heads, dropout 0.1; AdamW at learning rate 5e-4 with a constant schedule; batch | |
| 128 (one GPU, equal to BatteryMFormer's 2 x 64 recipe); up to 300 epochs with | |
| early stopping on validation MAPE; fp16; each fold's own seed (2021, 42 or 2024). | |
| The only per-fold difference is early-stopping patience: 50 for Na-ion cond401 and | |
| cond402, 30 for every other fold. Training ran inside BatteryMFormer's released | |
| pipeline (commit `febe174`) on BatteryLife v11, so data, targets, training loop and | |
| evaluation are common to all models compared with it. | |
| ## Files | |
| ``` | |
| config.json architecture (DecayFormerConfig) | |
| <Domain>/<fold>/ | |
| model.safetensors weights, saved from BatteryMFormer's pipeline (keys prefixed "net.") | |
| args.json training arguments in that pipeline | |
| label_scaler label scaler expected by that pipeline's data loader | |
| ``` | |
| Domains: `Li-ion` (seed2021, seed42, seed2024), `Zn-ion` (seed2021, seed42, | |
| seed2024), `Na-ion` (cond400 to cond411), `CALB` (cond396 to cond399). | |
| ## Usage | |
| ```python | |
| from decayformer import load_fold # pip install from the DecayFormer repository | |
| model = load_fold("Na-ion/cond400") | |
| # x [B, 100, 300, 4] curves, mask [B, 100], soh [B, 100, 1], cycle_feats [B, 100, 2] | |
| trajectory = model(x, mask, soh, cycle_feats) # [B, 5000] normalised SOH | |
| ``` | |
| To reproduce the table above, follow the notebooks in the repository, which | |
| evaluate these weights with BatteryMFormer's own pipeline. | |