Skip to content

Commit

Permalink
remove args overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Jan 18, 2024
1 parent 8f21297 commit 935bce8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llmfoundry/models/hf/model_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ def __init__(self,
if self.z_loss < 0.0:
raise ValueError(f'z_loss(={z_loss}) cannot be negative.')

self.model_forward_args = inspect.getfullargspec(
self.model.forward).args
# inspect.getfullargspec HuggingFace quantized model could not return args correctly
if not self.model_forward_args:
self.model_forward_args = inspect.signature(
self.model.forward).parameters.keys()

# Note: We need to add the FSDP related attributes to the model AFTER the super init,
# so that the (possible) embedding resizing doesn't destroy them
prepare_hf_model_for_fsdp(self.model, init_device)
Expand Down

0 comments on commit 935bce8

Please sign in to comment.