-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removal of commented sections #20
Conversation
@@ -137,8 +137,8 @@ def hook(module, *args, **kwargs) -> None: | |||
|
|||
model_peft.internal_xlora_scalings = torch.full( # type: ignore | |||
(payload.batch_size, payload.seq_len, xlora_classifier.n_layers, xlora_classifier.n_classes), | |||
payload.override_scaling_pass_value, # requires_grad=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented and unused.
@@ -139,14 +139,6 @@ def forward( | |||
model: PeftModel = self.model # type: ignore | |||
with torch.no_grad(): | |||
with model.disable_adapter(): | |||
# TODO(EricLBuehler): Pending removal following analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary
hidden_states = result.hidden_states # type: ignore | ||
|
||
assert hidden_states is not None | ||
hidden_state = hidden_states[-1] # Get the last hidden state | ||
|
||
### Calculate the sequence lengths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed method to use all tokens
@@ -20,7 +20,7 @@ class xLoRALayer: | |||
xLoRA algorithm. | |||
""" | |||
|
|||
__slots__ = {"model", "target_forward", "target", "layer_number", "disabled", "config"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
Removing all, inert, commented sections of code.