Skip to content

Commit

Permalink
Remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbenayoun committed Sep 20, 2024
1 parent 25d3c82 commit c7e8c73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions optimum/neuron/distributed/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,6 @@ def should_parallelize_layer_predicate_func(layer):
f"Could not find information for the parameter {name} to set its `requires_grad` attribute."
)

# for name, parameter in model.named_parameters():
# print(f"{name} => {parameter.requires_grad}")

if is_main_worker():
logger.info("Load and initialization of the weights done.")

Expand Down
2 changes: 1 addition & 1 deletion optimum/neuron/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
parent_module._gqa_qkv_output = gqa_qkv_column_parallel_linear(hidden_states)
parent_module._gqa_qkv_output_fetch_counter = 0
parent_module._gqa_qkv_output_fetch_counter += 1
output = torch.nn.Identity()(parent_module._gqa_qkv_output)[self.output_index]
output = parent_module._gqa_qkv_output[self.output_index]
if parent_module._gqa_qkv_output_fetch_counter == 3:
del parent_module._gqa_qkv_output
return output
Expand Down

0 comments on commit c7e8c73

Please sign in to comment.