amazon-science / earth-forecasting-transformer

Official implementation of Earthformer
Apache License 2.0
359 stars 61 forks source link

请问模型运行大概需要多少内存 #46

Closed DBIGSHUAI closed 1 year ago

DBIGSHUAI commented 1 year ago

您好,我想使用您的模型进行降水预测,但是我发现输入数据为(12,288,288)的情况已经需要超过100G的内存,请问论文实验中(13,384,384)的数据需要多少内存,以及训练时显卡推理速度如何。谢谢。

gaozhihan commented 1 year ago

都以micro_batch_size=1为例 training需要约9GB显存.如果使用precision: 16,显存开销可以下降到约6GB. testing需要约4GB显存,在一张NVIDIA A10G上耗时约20分钟.

DBIGSHUAI commented 1 year ago

都以micro_batch_size=1为例 training需要约9GB显存.如果使用precision: 16,显存开销可以下降到约6GB. testing需要约4GB显存,在一张NVIDIA A10G上耗时约20分钟.

您好我只想使用您的模型,我进行了如下测试,程序显示需要超过100G内存,是不是我什么地方理解错误了使用错了。 image

gaozhihan commented 1 year ago

可能是因为[24, 448, 896]的数据分辨率太大导致的. 可以先按照默认config设置超参数,然后尝试调小base_units(e.g., base_units: 4),initial_downsample_stack_conv_dim_list(e.g., initial_downsample_stack_conv_dim_list: [1, 2, 4] ),num_global_vectors(e.g., num_global_vectors: 0).

DBIGSHUAI commented 1 year ago

可能是因为[24, 448, 896]的数据分辨率太大导致的. 可以先按照默认config设置超参数,然后尝试调小base_units(e.g., base_units: 4),initial_downsample_stack_conv_dim_list(e.g., initial_downsample_stack_conv_dim_list: [1, 2, 4] ),num_global_vectors(e.g., num_global_vectors: 0). 非常感谢

gaozhihan commented 1 year ago

Thanks for your issue. Please feel free to reopen it if you have any further questions.