in summarize_from_feedback/tasks.py [0:0]
def decode_response(self, processed_response_tokens: ProcessedTokenList) -> str:
tokens = [x for x in processed_response_tokens if x != self.padding_token]
if self.H.truncate_token is not None:
if tokens[-1] == self.H.truncate_token:
tokens = tokens[:-1]
else:
assert len(tokens) == self.H.length
return self.encoder.decode(tokens)