Skip to content
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

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Removal of commented sections #20

merged 1 commit into from
Feb 21, 2024

Conversation

EricLBuehler
Copy link
Owner

Removing all, inert, commented sections of code.

@EricLBuehler EricLBuehler added the enhancement New feature or request label Feb 21, 2024
@EricLBuehler EricLBuehler self-assigned this Feb 21, 2024
@@ -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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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"}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

@EricLBuehler EricLBuehler merged commit 8bf75b3 into master Feb 21, 2024
4 checks passed
@EricLBuehler EricLBuehler deleted the cleaning branch February 21, 2024 17:53
EricLBuehler added a commit to EricLBuehler/peft that referenced this pull request Feb 21, 2024
EricLBuehler added a commit to EricLBuehler/peft that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant