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
bc5478a1
Commit
bc5478a1
authored
Mar 26, 2021
by
Leo Gao
Browse files
Minor updates
parent
c971fa82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lm_eval/models/gpt2.py
lm_eval/models/gpt2.py
+1
-1
lm_eval/tasks/hendrycks_test.py
lm_eval/tasks/hendrycks_test.py
+1
-1
No files found.
lm_eval/models/gpt2.py
View file @
bc5478a1
...
@@ -18,7 +18,7 @@ class GPT2LM(LM):
...
@@ -18,7 +18,7 @@ class GPT2LM(LM):
self
.
gpt2
.
eval
()
self
.
gpt2
.
eval
()
# pretrained tokenizer for neo is broken for now so just hardcoding this to gpt2
# pretrained tokenizer for neo is broken for now so just hardcoding this to gpt2
self
.
tokenizer
=
transformers
.
Auto
Tokenizer
.
from_pretrained
(
'gpt2'
)
self
.
tokenizer
=
transformers
.
GPT2
Tokenizer
Fast
.
from_pretrained
(
'gpt2'
)
self
.
tokenizer
.
pad_token
=
"<|endoftext|>"
self
.
tokenizer
.
pad_token
=
"<|endoftext|>"
self
.
max_length
=
self
.
gpt2
.
config
.
n_ctx
self
.
max_length
=
self
.
gpt2
.
config
.
n_ctx
...
...
lm_eval/tasks/hendrycks_test.py
View file @
bc5478a1
...
@@ -44,7 +44,7 @@ class GeneralHendrycksTest(MultipleChoiceTask):
...
@@ -44,7 +44,7 @@ class GeneralHendrycksTest(MultipleChoiceTask):
if
not
self
.
DATASET_PATH
.
exists
():
if
not
self
.
DATASET_PATH
.
exists
():
sh
(
"""
sh
(
"""
mkdir -p data
mkdir -p data
wget https://people.eecs.berkeley.edu/~hendrycks/data.tar -P data/
wget
-c
https://people.eecs.berkeley.edu/~hendrycks/data.tar -P data/
tar -xf data/data.tar -C data/
tar -xf data/data.tar -C data/
rm data/data.tar
rm data/data.tar
mv data/data data/hendrycksTest
mv data/data data/hendrycksTest
...
...
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