You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Engram let the layers be non-homogeneous, so we need to set the flag in metadata to let the sharded state dict logic know.
352
-
# This is usefule when all layer are same, the TransformerBlock will be homogeneous, it generate sharded_state_dict will same keys for all layer and need all layers have the same structure.
352
+
# This is useful when all layer are same, the TransformerBlock will be homogeneous, it generate sharded_state_dict will same keys for all layer and need all layers have the same structure.
353
353
# The layer has engram module does not fit this assumption.
354
354
# If the flag is set to True, the sharded_state_dict will use layer_number to generate different keys for different layer, which is same to models has dense layer leading and moe layer following.
355
355
# Actually, engram really causes the layers to be non-homogeneous.
warnings.warn(f"[rank0]: We do not recommend using allreduce for engram embedding, this is deprecated and will be removed in a later version.", DeprecationWarning)
warnings.warn("Offloading embedding optimizer states will offload all embedding optimizer states to CPU, which may cause slowdown. " \
394
394
"Please make sure this is what you want. This is typically used to save GPU memory when Engram embedding is large while accelerators are limited." \
395
395
"If you do not want to offload all embedding optimizer states to CPU, please disable this and set the --optimizer-offload-fraction to a value less than 1 to offload part of the optimizer states to CPU." \
396
-
"Of cource you can set the --optimizer-offload-fraction to offload other params meanwhile enable this to offload all embedding optimizer states to CPU.")
396
+
"Of course you can set the --optimizer-offload-fraction to offload other params meanwhile enable this to offload all embedding optimizer states to CPU.")
397
397
assertnotself.args.use_megatron_fsdp, "Megatron FSDP is not supported yet; support is planned for a later version."
398
398
assertnotself.args.init_model_with_meta_device, "Init_model_with_meta_device is not supported yet; support is planned for a later version."
399
399
assertself.args.use_distributed_optimizer, "When use engram, distributed_optimizer must be enabled, because there is a bug caused by allreduce grad norm in model parallel group when do not use distributed_optimizer. We have not found a pretty solution yet, so disable it temporarily."
0 commit comments