Skip to content

Commit

Permalink
make recurrent_gemma model types included in the force-BOS case (Eleu…
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyschoelkopf authored Jul 15, 2024
1 parent 2b26690 commit 9884ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lm_eval/models/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ def __init__(
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
Expand Down

0 comments on commit 9884ad6

Please sign in to comment.