From cb5cccc1d0a2bc79e1e98cf89f2fe265bd77ae6b Mon Sep 17 00:00:00 2001 From: Max Tian Date: Wed, 29 Nov 2023 14:19:06 -0500 Subject: [PATCH 1/2] fix starcoder fim constructor --- bigcode_eval/tasks/santacoder_fim.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bigcode_eval/tasks/santacoder_fim.py b/bigcode_eval/tasks/santacoder_fim.py index 5374fbac2..ab6c12f5b 100644 --- a/bigcode_eval/tasks/santacoder_fim.py +++ b/bigcode_eval/tasks/santacoder_fim.py @@ -59,11 +59,12 @@ def __init__( fim_prefix: str = "", fim_middle: str = "", fim_suffix: str = "", + stop_words: List[str] = ["<|endoftext|>", "<|filename|>"], + requires_execution: bool = False ): - stop_words = ["<|endoftext|>", "<|filename|>"] super().__init__( stop_words=stop_words, - requires_execution=False, + requires_execution=requires_execution, ) self.fim_prefix = fim_prefix self.fim_middle = fim_middle From 35cbd905e1de33d0d7ee6ea8745566df49e17cb6 Mon Sep 17 00:00:00 2001 From: Max Tian Date: Thu, 30 Nov 2023 13:11:12 -0500 Subject: [PATCH 2/2] add starcoder2 stop tokens --- bigcode_eval/tasks/santacoder_fim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigcode_eval/tasks/santacoder_fim.py b/bigcode_eval/tasks/santacoder_fim.py index ab6c12f5b..2ffe1e22f 100644 --- a/bigcode_eval/tasks/santacoder_fim.py +++ b/bigcode_eval/tasks/santacoder_fim.py @@ -125,7 +125,7 @@ def __init__(self): fim_prefix = "" fim_middle = "" fim_suffix = "" - stop_words = ["<|endoftext|>", "<|filename|>"] + stop_words = ["<|endoftext|>", "<|filename|>", ""] super().__init__( stop_words=stop_words, requires_execution=False,