[format] applied code formatting on changed files in pull request 4152 (#4157)

Co-authored-by: github-actions <github-actions@github.com>
pull/4169/head
github-actions[bot] 2023-07-04 16:07:47 +08:00 committed by GitHub
parent f447ca1811
commit c77b3b19be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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"),

View File

@ -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()

View File

@ -41,4 +41,4 @@ def test_layernorm():
if __name__ == '__main__':
test_layernorm_1d()
test_layernorm_1d()