Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
35f1b5a7
"vscode:/vscode.git/clone" did not exist on "e9c6ce461dee92a5088aef9b7b1c436e18557426"
Unverified
Commit
35f1b5a7
authored
Jul 03, 2023
by
Hailey Schoelkopf
Committed by
GitHub
Jul 03, 2023
Browse files
Update base.py
parent
9ad2fc3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/base.py
lm_eval/base.py
+1
-1
No files found.
lm_eval/base.py
View file @
35f1b5a7
...
@@ -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]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment