Add final weights and normalization constants, correct variable order
Browse filessonny_final.safetensors holds the weights of the revised paper; model.safetensors (epoch 50) is unchanged. config.json now lists the training order of the variables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Files changed (9)
- README.md+55-1
- config.json+19-3
- normalization/normalize_diff_std_12.npzAdded+3
- normalization/normalize_diff_std_24.npzAdded+3
- normalization/normalize_diff_std_6.npzAdded+3
- normalization/normalize_mean.npzAdded+3
- normalization/normalize_std.npzAdded+3
- normalization_note.txt+1-1
- sonny_final.safetensorsAdded+3
11 unmodified lines1213141516171811 unmodified lines# SonnyStepNets one-step weather backbone: variable-aware embedding and a two-stage trunk, 69 ERA5-like variables, **1.5° grid (121×240 lat×lon in the paper)**.## Citation11 unmodified lines1213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717211 unmodified lines# SonnyStepNets one-step weather backbone: variable-aware embedding and a two-stage trunk, 69 ERA5 variables, **1.5° grid (120×240 lat×lon)**. Rows run from 88.5°S to 90°N (the south-pole row of the 121×240 WeatherBench 2 grid is dropped), and columns from 0° eastward.## Files| File | Contents || :--- | :--- || `sonny_final.safetensors` | **Sonny**: EMA (decay 0.999) after a five-epoch learning-rate cooldown from epoch 50. These are the weights evaluated in the revised paper. || `model.safetensors` | **Sonny (epoch 50)**: EMA (decay 0.9) at epoch 50, the weights of arXiv:2603.21284v1. || `config.json` | Constructor arguments. `init_args.variables` is the training order, which sets the order of the output channels. || `normalization/` | `normalize_mean`, `normalize_std`, and `normalize_diff_std_{6,12,24}`, one value per variable. |**Correction (November 2026):** earlier versions of `config.json` listed the first three variables as `2m_temperature, 10m_u_component_of_wind, 10m_v_component_of_wind`. The training order is `10m_u_component_of_wind, 10m_v_component_of_wind, 2m_temperature`. Outputs obtained with the earlier list have these three channels mislabeled. This applies to both weight files.## UsageThe model code is at [github.com/jmj2316/Sonny](https://github.com/jmj2316/Sonny) and needs `torch`, `timm`, `xformers`, and a GPU. Run this from a clone of that repository:```pythonimport jsonimport numpy as npimport torchfrom huggingface_hub import snapshot_downloadfrom safetensors.torch import load_filefrom networks.sonny import Sonnyrepo = snapshot_download("Francismj/sonny")args = json.load(open(f"{repo}/config.json"))["init_args"]variables = args["variables"]model = Sonny(**args).cuda().eval()model.load_state_dict(load_file(f"{repo}/sonny_final.safetensors"), strict=True)def constant(name):z = np.load(f"{repo}/normalization/{name}.npz")values = np.concatenate([z[v] for v in variables]).astype("float32")return torch.tensor(values).cuda().view(1, -1, 1, 1)mean, std = constant("normalize_mean"), constant("normalize_std")def step(x, hours):"""x: physical units, (batch, 69, 120, 240), channels in the order of `variables`. hours: 6, 12, or 24."""diff_std = constant(f"normalize_diff_std_{hours}")interval = torch.full((x.shape[0],), hours / 10, device=x.device)with torch.no_grad(), torch.autocast("cuda", dtype=torch.float16):delta = model((x - mean) / std, variables, interval)return x + delta.float() * diff_std```The scores in the paper average three rollouts, with steps of 6, 12, and 24 h, at every 24 h lead.This procedure was run on the 355 daily 00 UTC starts of 2022 with `sonny_final.safetensors`. Over nine variables and ten lead days, the mean RMSE differs from the values in the paper by at most 0.47% in any cell, and by −0.13% on average. The paper's evaluation code scaled the increments in float16, which also left `specific_humidity_{50,100,150,200}` unchanged during rollouts; the code above scales them in float32.## Citation
7 unmodified lines891011121314151673 unmodified lines90919293947 unmodified lines"source_epoch": 50,"init_args": {"variables": ["2m_temperature","10m_u_component_of_wind","10m_v_component_of_wind","mean_sea_level_pressure","geopotential_50","geopotential_100",73 unmodified lines"num_heads": 6,"mlp_ratio": 4.0,"step_ratio": 0.5}}7 unmodified lines891011121314151673 unmodified lines909192939495969798991001011021031041051061071081091107 unmodified lines"source_epoch": 50,"init_args": {"variables": ["10m_u_component_of_wind","10m_v_component_of_wind","2m_temperature","mean_sea_level_pressure","geopotential_50","geopotential_100",73 unmodified lines"num_heads": 6,"mlp_ratio": 4.0,"step_ratio": 0.5},"weights": {"sonny_final.safetensors": {"name": "Sonny","epoch": 55,"ema_decay": 0.999,"description": "Weights evaluated in the revised paper: EMA after a five-epoch learning-rate cooldown from epoch 50."},"model.safetensors": {"name": "Sonny (epoch 50)","epoch": 50,"ema_decay": 0.9,"description": "EMA weights at epoch 50, the weights of arXiv:2603.21284v1."}},"time_interval_input": "hours / 10","normalization": "normalization/"}
123version https://git-lfs.github.com/spec/v1oid sha256:4d9cebc5b0a31ef8b3580558372ee43aeb79a5967aecb28a04bc943b6c9ebc79size 33012123version https://git-lfs.github.com/spec/v1oid sha256:78edd41274ce1ad95d182cdb77e4469a8046f1180131a95ddfbafb197379aaeasize 19020123version https://git-lfs.github.com/spec/v1oid sha256:ed232f7501ac1ee53d77fdb6ca34c7f8433bc3ba52815cd17016cc64eb2b3a71size 33012123version https://git-lfs.github.com/spec/v1oid sha256:00c9caffac219440dcb03f794ec32bf6658c819f8434ea1e9bb985ba00d15684size 19296123version https://git-lfs.github.com/spec/v1oid sha256:516dd83d268d7ab2b98194092a6b200553bf86fe39bb64aeb087f21d2496255bsize 192961For evaluation/inference you still need normalize_mean.npz / normalize_std.npz / normalize_diff_std_*.npz from the training repository (normalization_constants/).1Normalization constants are in normalization/. Inputs use normalize_mean and normalize_std; the model output for a 6, 12, or 24 h interval is multiplied by normalize_diff_std_6, _12, or _24 to give the increment in physical units.
123version https://git-lfs.github.com/spec/v1oid sha256:f79585141b6eab07947f8906b4101a7c5d93a21403b9af0e7de55929665ec137size 94337776README.md+55-1
config.json+19-3
normalization/normalize_diff_std_12.npzAdded+3
normalization/normalize_diff_std_24.npzAdded+3
normalization/normalize_diff_std_6.npzAdded+3
normalization/normalize_mean.npzAdded+3
normalization/normalize_std.npzAdded+3
normalization_note.txt+1-1
sonny_final.safetensorsAdded+3