mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
no_grad for ctx_encoder model
This commit is contained in:
parent
6c579fa373
commit
541ef37c64
1 changed files with 1 additions and 0 deletions
|
|
@ -321,6 +321,7 @@ class EarlyExit(nn.Module):
|
|||
self.base_model = base_model
|
||||
self.exit_layer = exit_layer
|
||||
|
||||
@torch.no_grad()
|
||||
def forward(self, **kwargs):
|
||||
# if len(kwargs["input_ids"].shape) == 1:
|
||||
# kwargs["input_ids"] = kwargs["input_ids"].unsqueeze(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue