Fix: Cast prefetch_bucket_size to integer for deepspeed >= 0.15 (#33402)

Fix: Cast prefetch bucket size to integer in zero_optimization
This commit is contained in:
daejin 2024-09-11 21:25:48 +09:00 committed by GitHub
parent 7a51cbc65f
commit ecf7024bde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,7 +241,7 @@ class HfTrainerDeepSpeedConfig(HfDeepSpeedConfig):
# automatically assign the optimal config values based on model config
self.fill_only(
"zero_optimization.stage3_prefetch_bucket_size",
0.9 * hidden_size * hidden_size,
int(0.9 * hidden_size * hidden_size),
)
self.fill_only(
"zero_optimization.stage3_param_persistence_threshold",