Views
No views yet
| Metric | Rollout FT | Pretrained | Paper |
|---|---|---|---|
| F1 (Eq.20) | 0.6446 | 0.6450 | 0.9964 |
| Sorensen (Eq.22) | 0.0112 | 0.0110 | 0.31 |
| Species MAE (norm) | 0.020769 | 0.0210 | 0.0836 |
1import torch
2from safetensors.torch import load_file
3from bfm_model.bfm.model import BFMRollout
4
5# 1. Build BFMRollout with VeRA
6model = BFMRollout(
7 embed_dim=512, depth=10, patch_size=8,
8 swin_backbone_size="large", perceiver_latents=16100,
9 rollout_steps=1, finetune_mode="peft",
10 use_vera=True, peft_r=256, d_initial=0.1,
11 peft_mode="single", peft_steps=1,
12 # ... (see finetune_rollout_large.py for full config)
13)
14
15# 2. Load pretrained base weights
16state = load_file("bfm-pretrain-large.safetensors", device="cpu")
17model.load_state_dict(state, strict=False)
18
19# 3. Load finetuned VeRA weights from Lightning checkpoint
20ckpt = torch.load("epoch=036-val_loss=0.627335.ckpt", map_location="cpu")
21model.load_state_dict(ckpt["state_dict"], strict=False)
22model.eval()epoch=036-val_loss=0.627335.ckpt - Best Lightning checkpoint (epoch 36)last.ckpt - Final checkpoint (epoch 49)bfm_rollout_eval_results.json - Full evaluation resultsfinetune_rollout_large.py - Finetuning scripteval_rollout_large.py - Evaluation script1@article{foerster2025bfm,
2 title={A Foundation Model for Forecasting Biodiversity Dynamics},
3 author={Foerster et al.},
4 journal={arXiv preprint arXiv:2507.09080v2},
5 year={2025}
6}