mirror of https://github.com/hpcaitech/ColossalAI
[format] applied code formatting on changed files in pull request 4152 (#4157)
Co-authored-by: github-actions <github-actions@github.com>pull/4169/head
parent
f447ca1811
commit
c77b3b19be
|
@ -503,4 +503,4 @@ class DeviceMesh:
|
|||
num_devices = self.logical_mesh_id.shape[mesh_dim]
|
||||
penalty_factor = num_devices / 2.0
|
||||
return (self.mesh_alpha[mesh_dim] + self.mesh_beta[mesh_dim] *
|
||||
(num_devices - 1) / num_devices / num_devices * num_bytes * penalty_factor + 0.001)
|
||||
(num_devices - 1) / num_devices / num_devices * num_bytes * penalty_factor + 0.001)
|
||||
|
|
|
@ -287,4 +287,4 @@ def reduce_forward(input_, process_group):
|
|||
|
||||
|
||||
def reduce_backward(input_, process_group):
|
||||
return _ReduceBackward.apply(input_, process_group)
|
||||
return _ReduceBackward.apply(input_, process_group)
|
||||
|
|
|
@ -80,7 +80,7 @@ _POLICY_LIST = {
|
|||
PolicyLocation(file_name="opt", class_name="OPTForSequenceClassificationPolicy"),
|
||||
"transformers.models.opt.modeling_opt.OPTForQuestionAnswering":
|
||||
PolicyLocation(file_name="opt", class_name="OPTForQuestionAnsweringPolicy"),
|
||||
|
||||
|
||||
# Bloom
|
||||
"transformers.models.bloom.modeling_bloom.BloomModel":
|
||||
PolicyLocation(file_name="bloom", class_name="BloomModelPolicy"),
|
||||
|
|
|
@ -86,4 +86,4 @@ def test_device_mesh_from_process_group():
|
|||
|
||||
if __name__ == '__main__':
|
||||
test_device_mesh()
|
||||
test_device_mesh_from_process_group()
|
||||
test_device_mesh_from_process_group()
|
||||
|
|
|
@ -41,4 +41,4 @@ def test_layernorm():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_layernorm_1d()
|
||||
test_layernorm_1d()
|
||||
|
|
Loading…
Reference in New Issue