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
206b7722
Unverified
Commit
206b7722
authored
Aug 21, 2025
by
Cyrus Leung
Committed by
GitHub
Aug 21, 2025
Browse files
Fix `add_bos_token` not updated for Gemma tokenizer (#3206)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
3bc7cc8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
lm_eval/models/vllm_causallms.py
lm_eval/models/vllm_causallms.py
+6
-5
No files found.
lm_eval/models/vllm_causallms.py
View file @
206b7722
...
...
@@ -195,6 +195,12 @@ class VLLM(TemplateLM):
self
.
batch_size
=
"auto"
eval_logger
.
info
(
"Manual batching is not compatible with data parallelism."
)
if
"gemma"
in
pretrained
.
lower
():
add_bos_token
=
True
eval_logger
.
info
(
"Found 'gemma' in model name, a BOS token will be used as Gemma series models underperform without it."
)
from
transformers
import
AutoConfig
self
.
_config
=
AutoConfig
.
from_pretrained
(
...
...
@@ -213,11 +219,6 @@ class VLLM(TemplateLM):
"enable_thinking"
,
enable_thinking
)
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 series models underperform without it."
)
if
parse_version
(
version
(
"vllm"
))
>=
parse_version
(
"0.8.3"
):
kwargs_resolve_hf_chat_template
=
{
...
...
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