Skip to content

Commit

Permalink
replace hlog
Browse files Browse the repository at this point in the history
  • Loading branch information
mapmeld committed Dec 11, 2024
1 parent d1296bc commit 5498151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lighteval/models/transformers/adapter_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def _create_auto_model(self, config: AdapterModelConfig, env_config: EnvConfig)
token_diff = len(self._tokenizer) - base.config.vocab_size
if token_diff != 0:
if token_diff > 0:
hlog(
logger.info(
f"You're using the adapter model's tokenizer, which has more tokens than the base model. Adding {token_diff} token(s)."
)
else:
hlog(
logger.info(
f"You're using the adapter model's tokenizer, which has fewer tokens than the base model. Removing {abs(token_diff)} token(s)."
)
base.resize_token_embeddings(len(self._tokenizer))
Expand Down

0 comments on commit 5498151

Please sign in to comment.