alpaca-lora icon indicating copy to clipboard operation
alpaca-lora copied to clipboard

Fix the IndexError in get_response

Open RenzeLou opened this issue 1 year ago • 0 comments

When using the get_response function in utils/prompter.py, we can easily get List IndexError due to the case sensitivity of the split method. For example, the LLaMa's output is in lowercase, but the response_split is in uppercase.

So, I update the function with re.split to ignore the case differences between the model's output and response_split.

RenzeLou avatar Feb 16 '24 03:02 RenzeLou