hyunwoongko / openchat

OpenChat: Easy to use opensource chatting framework via neural networks
Apache License 2.0
437 stars 57 forks source link

After several turns, Blenderbot throw Index ErrorL index out of range in self #9

Closed shimazing closed 3 years ago

shimazing commented 3 years ago

image

While running Blenderbot large, IndexError occurs in torch after a few turns. Is it due to the constraint of the maximum length of contexts??

woomurf commented 3 years ago

Did you solve the problem? If you solved it, could you share the solution?

hyunwoongko commented 3 years ago

I'm sorry for the late response. Could you show me the conversation script where the error occurred? I will find a solution after reproducing the error.

fpem123 commented 3 years ago
스크린샷 2021-03-09 오후 4 14 17

I am getting the same error as this. Occurred when sending a message using the same user_id over and over again.

shimazing commented 3 years ago

I think the error occurs when the length of dialogue history + user input is larger than self.max_contex_length. In line 90 blenderbot.py, num_of_stacked_token is checked to be less than max_context_length but this condition is not enough because (# of input tokens + num_of_stacked_token) can be larger than self.max_context_length.

hyunwoongko commented 3 years ago

I redesigned logic. please check new version :)