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
165f8493
Commit
165f8493
authored
Jul 13, 2023
by
haileyschoelkopf
Browse files
add fast tokenizer flag
parent
98c85d73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+2
-0
No files found.
lm_eval/models/huggingface.py
View file @
165f8493
...
...
@@ -70,6 +70,7 @@ class HFLM(LM):
batch_size
:
Optional
[
int
]
=
1
,
low_cpu_mem_usage
:
Optional
[
bool
]
=
True
,
trust_remote_code
:
Optional
[
bool
]
=
False
,
use_fast_tokenizer
:
Optional
[
bool
]
=
True
,
# arguments used for splitting a model across GPUs naively.
# only used if `parallelize=True`.
parallelize
:
Optional
[
bool
]
=
False
,
...
...
@@ -216,6 +217,7 @@ class HFLM(LM):
pretrained
if
tokenizer
is
None
else
tokenizer
,
revision
=
revision
,
trust_remote_code
=
trust_remote_code
,
use_fast
=
use_fast_tokenizer
,
)
self
.
vocab_size
=
self
.
tokenizer
.
vocab_size
...
...
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