Skip to content

Commit

Permalink
Fix Platypus template when there are no inputs (#2296)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Marques <[email protected]>
  • Loading branch information
eldarkurtic and anmarques authored May 21, 2024
1 parent aeeba1e commit f16c623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparseml/experimental/sparsegpt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def get_openplatypus(nsamples, seed, seqlen, model, split):
tokenizer = AutoTokenizer.from_pretrained(model)

def _process_sample(sample):
if "input" in sample:
if "input" in sample and sample["input"] != "":
processed_sample = alpaca_template["prompt_input"].format(
instruction=sample["instruction"], input=sample["input"]
)
Expand Down

0 comments on commit f16c623

Please sign in to comment.