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
b3e4c49a
Unverified
Commit
b3e4c49a
authored
Jun 11, 2024
by
Hailey Schoelkopf
Committed by
GitHub
Jun 11, 2024
Browse files
add hacky add_bos_token forcing for Gemma to VLLM too (#1857)
parent
4bb77e82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lm_eval/models/vllm_causallms.py
lm_eval/models/vllm_causallms.py
+6
-0
No files found.
lm_eval/models/vllm_causallms.py
View file @
b3e4c49a
...
...
@@ -119,6 +119,12 @@ class VLLM(TemplateLM):
tokenizer_revision
=
tokenizer_revision
,
)
self
.
add_bos_token
=
add_bos_token
if
"gemma"
in
pretrained
.
lower
():
self
.
add_bos_token
=
True
eval_logger
.
info
(
"Found 'gemma' in model name, a BOS token will be used as Gemma underperforms without it."
)
self
.
custom_prefix_token_id
=
prefix_token_id
if
prefix_token_id
is
not
None
:
eval_logger
.
info
(
...
...
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