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
9884ad6e
Unverified
Commit
9884ad6e
authored
Jul 15, 2024
by
Hailey Schoelkopf
Committed by
GitHub
Jul 15, 2024
Browse files
make recurrent_gemma model types included in the force-BOS case (#2105)
parent
2b26690f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+2
-2
No files found.
lm_eval/models/huggingface.py
View file @
9884ad6e
...
...
@@ -257,10 +257,10 @@ class HFLM(TemplateLM):
self
.
tokenizer
=
configure_pad_token
(
self
.
tokenizer
,
model_config
=
self
.
config
)
self
.
add_bos_token
=
add_bos_token
if
getattr
(
self
.
config
,
"model_type"
,
None
)
in
[
"gemma"
,
"gemma2"
]
:
if
"gemma"
in
getattr
(
self
.
config
,
"model_type"
,
""
)
:
self
.
add_bos_token
=
True
eval_logger
.
info
(
f
"Model type is '
{
self
.
config
.
model_type
}
', a BOS token will be used as Gemma underperforms without it."
f
"Model type is '
{
self
.
config
.
model_type
}
',
part of the Gemma family--
a BOS token will be used as Gemma underperforms without it."
)
self
.
_max_length
=
max_length
...
...
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