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
75920267
"test/magic_number_division/magic_number_division.cpp" did not exist on "992f71e3714e1d7ead7c0c70dc8fea8f5fb6c5c8"
Commit
75920267
authored
Sep 06, 2020
by
Leo Gao
Browse files
Change nll to loglikelihood
parent
8a5a5f74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
base.py
base.py
+1
-1
gpt2.py
gpt2.py
+2
-2
No files found.
base.py
View file @
75920267
...
@@ -7,7 +7,7 @@ class LM(abc.ABC):
...
@@ -7,7 +7,7 @@ class LM(abc.ABC):
pass
pass
@
abc
.
abstractmethod
@
abc
.
abstractmethod
def
nll_of
(
self
,
context
,
continuation
):
def
loglikelihood
(
self
,
context
,
continuation
):
pass
pass
...
...
gpt2.py
View file @
75920267
...
@@ -15,5 +15,5 @@ class GPT2LM(LM):
...
@@ -15,5 +15,5 @@ class GPT2LM(LM):
# chop off the prompt and the final eos token
# chop off the prompt and the final eos token
return
self
.
tok
.
decode
(
res
[
0
][
len
(
context
[
0
]):
-
1
]).
strip
()
return
self
.
tok
.
decode
(
res
[
0
][
len
(
context
[
0
]):
-
1
]).
strip
()
def
nll_of
(
self
,
context
,
continuation
):
def
loglikelihood
(
self
,
context
,
continuation
):
pass
pass
\ No newline at end of file
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