Skip to content

Commit

Permalink
need additional_special_tokens argument for HFLM initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
kumapo committed Oct 21, 2023
1 parent 5e80a0b commit 9a1e5b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lm_eval/models/gpt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(
load_in_8bit: Optional[bool] = False,
trust_remote_code: Optional[bool] = False,
use_fast: Optional[bool] = True,
additional_special_tokens: Optional[str] = None
):
super().__init__()

Expand Down Expand Up @@ -66,6 +67,7 @@ def __init__(
revision=revision,
trust_remote_code=trust_remote_code,
use_fast=use_fast,
additional_special_tokens=additional_special_tokens
)
self.vocab_size = self.tokenizer.vocab_size

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -eu
MODEL_ARGS="pretrained=stabilityai/japanese-stablelm-base-alpha-7b,use_fast=False,trust_remote_code=True,device_map=auto,torch_dtype=auto,offload_folder=/tmp"
MODEL_ARGS="pretrained=stabilityai/japanese-stablelm-base-alpha-7b,use_fast=False,trust_remote_code=True,device_map=auto,torch_dtype=auto,offload_folder=/tmp,tokenizer=novelai/nerdstash-tokenizer-v1,additional_special_tokens=['▁▁']"
TASK="jcommonsenseqa-1.2-0.2"
NUM_FEW_SHOTS="3"
python main.py \
Expand Down

0 comments on commit 9a1e5b8

Please sign in to comment.