Skip to content

Commit be2a44c

Browse files
authored
Merge pull request #170 from bigcode-project/max/starcoder-fim-fix
fix starcoder fim constructor
2 parents 9d17482 + 35cbd90 commit be2a44c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bigcode_eval/tasks/santacoder_fim.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ def __init__(
5959
fim_prefix: str = "<fim-prefix>",
6060
fim_middle: str = "<fim-middle>",
6161
fim_suffix: str = "<fim-suffix>",
62+
stop_words: List[str] = ["<|endoftext|>", "<|filename|>"],
63+
requires_execution: bool = False
6264
):
63-
stop_words = ["<|endoftext|>", "<|filename|>"]
6465
super().__init__(
6566
stop_words=stop_words,
66-
requires_execution=False,
67+
requires_execution=requires_execution,
6768
)
6869
self.fim_prefix = fim_prefix
6970
self.fim_middle = fim_middle
@@ -124,7 +125,7 @@ def __init__(self):
124125
fim_prefix = "<fim_prefix>"
125126
fim_middle = "<fim_middle>"
126127
fim_suffix = "<fim_suffix>"
127-
stop_words = ["<|endoftext|>", "<|filename|>"]
128+
stop_words = ["<|endoftext|>", "<|filename|>", "<file_sep>"]
128129
super().__init__(
129130
stop_words=stop_words,
130131
requires_execution=False,

0 commit comments

Comments
 (0)