fix: don't print token ids of output

This commit is contained in:
Zach Nussbaum 2023-03-25 17:18:07 +00:00
parent cb43f53f7a
commit 147260097b

View File

@ -11,7 +11,6 @@ def generate(tokenizer, prompt, model, config):
outputs = model.generate(input_ids=input_ids, max_new_tokens=config["max_new_tokens"], temperature=config["temperature"])
print(outputs)
decoded = tokenizer.decode(outputs[0], skip_special_tokens=True).strip()
return decoded[len(prompt):]