Could not get the sample code to have a conversation.

by GingerbreadGB - opened

If I copy and paste the sample code, it'll work exactly once, when I try to iterate the process to have a back-and-forth conversation, the model's output is not coherent. Here's my iteration:

knowledge = ''
for x in range(100):
instruction = f'Instruction: given a dialog context, you need to response empathically.'
dialog = input('>>')
response = generate(instruction, knowledge, dialog)


how are you today
what's going?
l? l?
are you messed up?
ld ep0p0p0p0p

I figured out why... the generate function on the model card has the line: dialog = ' EOS '.join(dialog)

It works for the example, but when I change the input to a string, the .join(dialog) was inserting EOS in between every letters.

It's a silly thing, but I'll leave the question here in case someone else has the same issue.

Sign up or log in to comment