From e8ee957b4d243c356841dad3b476e657006a73c6 Mon Sep 17 00:00:00 2001 From: Adam Belfki Date: Tue, 3 Sep 2024 16:55:49 -0400 Subject: [PATCH 1/2] fix: tokenizer padding side is set to left by default --- src/nnsight/models/LanguageModel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nnsight/models/LanguageModel.py b/src/nnsight/models/LanguageModel.py index 164630fe..c703a31a 100755 --- a/src/nnsight/models/LanguageModel.py +++ b/src/nnsight/models/LanguageModel.py @@ -175,6 +175,9 @@ def _load( if tokenizer_kwargs is None: tokenizer_kwargs = {} + if "padding_side" not in tokenizer_kwargs: + tokenizer_kwargs["padding_side"] = "left" + self.tokenizer = AutoTokenizer.from_pretrained( repo_id, config=config, **tokenizer_kwargs ) From 3d1fa98121959dacfc191c21c988ecb2481f9bf5 Mon Sep 17 00:00:00 2001 From: Jaden Fiotto-Kaufman Date: Tue, 3 Sep 2024 16:57:16 -0400 Subject: [PATCH 2/2] Change base torch version to 2.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1b3262f..33202d76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dependencies = [ "python-socketio[client]", "tokenizers>=0.13.0", "pydantic>=2.4.0", - "torch>=2.1.0", + "torch>=2.4.0", "sentencepiece", "torchvision", "accelerate",