Skip to content

u-cast support - #1273

Open
fjaijf wants to merge 5 commits into
PaddlePaddle:developfrom
fjaijf:u-cast_support
Open

fjaijf wants to merge 5 commits into
PaddlePaddle:developfrom
fjaijf:u-cast_support

Conversation

@fjaijf

@fjaijf fjaijf commented Oct 20, 2026 •

Copy link
Copy Markdown

精度对齐方式

  • 完整模型前向:使用原版发布的 EMA 权重及相同输入,对比 PyTorch 与 Paddle 的 FP32 输出,关闭 TF32。
  • 连续训练对照:共享初始权重、真实 ERA5 输入及 Dropout 掩码,两框架独立前向、反向和更新,不替换梯度。缩通道模型为 35,996,435 参数,保留 240×121 网格;WMAE、fair CRPS 两阶段各运行 3 次更新,每次累积 2 个微批次。
  • FP16 使用 BF16 Muon、初始 loss scale=65536;FP32 使用 FP32 Muon。共享 Dropout 掩码仅用于对齐诊断。

对齐结果

完整模型(895,389,203 参数)FP32 前向:相对 L2 误差 4.02e-6,最大绝对误差 3.45e-5。

下表为连续训练 3 次更新中的最大相对 L2 误差;“更新量”指本步更新前后的参数差。

精度 阶段 输出 梯度 更新后参数 更新量
FP16 WMAE 0.1457% 0.2207% 0.0220% 6.470%
FP16 fair CRPS 0.2191% 0.4023% 0.0623% 7.695%
FP32 WMAE 0.001201% 0.02472% 0.000328% 0.3352%
FP32 fair CRPS 0.001660% 0.01921% 0.001565% 0.2663%

Loss、输出、梯度、参数、更新量和 EMA 均通过原记录中的预设阈值;其中 loss 最大相对差阈值为 FP16 0.2%、FP32 0.001%。

以上为短程数值对齐,尚未进行完整训练及论文预报指标复现。

fjaijf and others added 3 commits November 27, 2026 03:12
Run deterministic/probabilistic training and evaluation through supervised
constraints, validators and callbacks in the unchanged Solver loops. Restore
native optimizer, scaler, EMA, RNG and sampler state at update boundaries;
add bounded MC/deep ensembles and NetCDF readback support.

Retain PR PaddlePaddle#1273 model precision, recomputation, cache and public Hydra options.
Cover structured CLI configuration, both training stages, checkpoint resume,
AMP overflow and forecast metrics. Record full-model numerical and ERA5 checks.

Validation: 14 regression cases, 5 GPU AMP scenarios, 5 CLI workflows,
PyTorch/Paddle forward and optimizer parity, full-size one-update training
in both stages, and a real ERA5 12-hour forecast/evaluation.
Comment thread examples/ucast/MIGRATION_REPORT.md Resolved
Comment thread examples/ucast/README.md Resolved
Comment thread examples/ucast/.gitignore Resolved
Comment thread test/arch/test_ucast.py Resolved
Comment thread test/arch/test_ucast_training.py Resolved
Comment thread examples/ucast/convert_checkpoint.py Resolved
Comment thread examples/ucast/smoke_data.py Resolved
Comment thread examples/ucast/requirements.txt Resolved
Remove auxiliary files, use the hosted figure in both case documents,
and bound xarray below 2026.9 for Zarr 2 compatibility.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants