"vscode:/vscode.git/clone" did not exist on "e9c6ce461dee92a5088aef9b7b1c436e18557426"
Unverified Commit 35f1b5a7 authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

Update base.py

parent 9ad2fc3d
...@@ -350,7 +350,7 @@ class BaseLM(LM): ...@@ -350,7 +350,7 @@ class BaseLM(LM):
# Slice to original seq length # Slice to original seq length
contlen = len(cont_toks) contlen = len(cont_toks)
inplen = inplen + (logits.shape[0] - padding_length) inplen = inplen + (logits.shape[0] - padding_length) # if "virtual tokens" (from prompt tuning) are added, inplen is larger
logits = logits[inplen - contlen : inplen].unsqueeze( logits = logits[inplen - contlen : inplen].unsqueeze(
0 0
) # [1, seq, vocab] ) # [1, seq, vocab]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment