Skip to content

Commit

Permalink
do not remove prompt key
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
  • Loading branch information
kylesayrs committed Dec 20, 2024
1 parent d27dad3 commit 42f7892
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/llmcompressor/transformers/finetune/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def filter_tokenizer_args(self, dataset: DatasetType) -> DatasetType:
)

column_names = get_columns(dataset)
return dataset.remove_columns(list(set(column_names) - set(tokenizer_args)))
return dataset.remove_columns(
list(set(column_names) - set(tokenizer_args) - set([self.PROMPT_KEY]))
)

def tokenize(self, data: LazyRow) -> Dict[str, Any]:
# separate prompt
Expand Down

0 comments on commit 42f7892

Please sign in to comment.